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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.route_servers
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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