route_servers
Creates, updates, deletes or gets a route_server resource or lists route_servers in a region
Overview
| Name | route_servers |
| Type | Resource |
| Description | VPC Route Server |
| Id | awscc.ec2.route_servers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
amazon_side_asn | integer | The Amazon-side ASN of the Route Server. |
arn | string | The Amazon Resource Name (ARN) of the Route Server. |
id | string | The ID of the Route Server. |
persist_routes | string | Whether to enable persistent routes |
persist_routes_duration | integer | The duration of persistent routes in minutes |
sns_notifications_enabled | boolean | Whether to enable SNS notifications |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the Route Server. |
region | string | AWS region. |
For more information, see AWS::EC2::RouteServer.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | route_servers | INSERT | AmazonSideAsn, region |
delete_resource | route_servers | DELETE | Identifier, region |
update_resource | route_servers | UPDATE | Identifier, PatchDocument, region |
list_resources | route_servers_list_only | SELECT | region |
get_resource | route_servers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all route_servers in a region.
SELECT
region,
id
FROM awscc.ec2.route_servers_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new route_server resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.route_servers (
AmazonSideAsn,
region
)
SELECT
'{{ amazon_side_asn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.route_servers (
AmazonSideAsn,
PersistRoutes,
PersistRoutesDuration,
SnsNotificationsEnabled,
Tags,
region
)
SELECT
'{{ amazon_side_asn }}',
'{{ persist_routes }}',
'{{ persist_routes_duration }}',
'{{ sns_notifications_enabled }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: route_server
props:
- name: amazon_side_asn
value: '{{ amazon_side_asn }}'
- name: persist_routes
value: '{{ persist_routes }}'
- name: persist_routes_duration
value: '{{ persist_routes_duration }}'
- name: sns_notifications_enabled
value: '{{ sns_notifications_enabled }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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:
- Create
- Read
- Update
- Delete
- List
ec2:CreateRouteServer,
ec2:CreateTags,
ec2:DescribeRouteServers,
sns:CreateTopic
ec2:DescribeRouteServers,
ec2:DescribeTags
ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeRouteServers,
ec2:DescribeTags,
ec2:ModifyRouteServer,
sns:CreateTopic,
sns:DeleteTopic
ec2:DescribeTags,
ec2:DescribeRouteServers,
ec2:DeleteRouteServer,
ec2:DeleteTags,
sns:DeleteTopic
ec2:DescribeTags,
ec2:DescribeRouteServers