Skip to main content

route_servers

Creates, updates, deletes or gets a route_server resource or lists route_servers in a region

Overview

Nameroute_servers
TypeResource
DescriptionVPC Route Server
Idawscc.ec2.route_servers

Fields

NameDatatypeDescription
amazon_side_asnintegerThe Amazon-side ASN of the Route Server.
arnstringThe Amazon Resource Name (ARN) of the Route Server.
idstringThe ID of the Route Server.
persist_routesstringWhether to enable persistent routes
persist_routes_durationintegerThe duration of persistent routes in minutes
sns_notifications_enabledbooleanWhether to enable SNS notifications
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::EC2::RouteServer.

Methods

NameResourceAccessible byRequired Params
create_resourceroute_serversINSERTAmazonSideAsn, region
delete_resourceroute_serversDELETEIdentifier, region
update_resourceroute_serversUPDATEIdentifier, PatchDocument, region
list_resourcesroute_servers_list_onlySELECTregion
get_resourceroute_serversSELECTIdentifier, region

SELECT examples

Gets all properties from an individual route_server.

SELECT
region,
amazon_side_asn,
arn,
id,
persist_routes,
persist_routes_duration,
sns_notifications_enabled,
tags
FROM awscc.ec2.route_servers
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new route_server resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.route_servers (
AmazonSideAsn,
region
)
SELECT
'{{ amazon_side_asn }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a route_server resource, using stack-deploy.

/*+ update */
UPDATE awscc.ec2.route_servers
SET PatchDocument = string('{{ {
"PersistRoutes": persist_routes,
"PersistRoutesDuration": persist_routes_duration,
"SnsNotificationsEnabled": sns_notifications_enabled,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.route_servers
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

To operate on the route_servers resource, the following permissions are required:

ec2:CreateRouteServer,
ec2:CreateTags,
ec2:DescribeRouteServers,
sns:CreateTopic