vpn_gateways
Creates, updates, deletes or gets a vpn_gateway
resource or lists vpn_gateways
in a region
Overview
Name | vpn_gateways |
Type | Resource |
Description | Schema for EC2 VPN Gateway |
Id | aws.ec2.vpn_gateways |
Fields
Name | Datatype | Description |
---|---|---|
v_pn_gateway_id | string | VPN Gateway ID generated by service |
amazon_side_asn | integer | The private Autonomous System Number (ASN) for the Amazon side of a BGP session. |
tags | array | Any tags assigned to the virtual private gateway. |
type | string | The type of VPN connection the virtual private gateway supports. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all vpn_gateways
in a region.
SELECT
region,
v_pn_gateway_id,
amazon_side_asn,
tags,
type
FROM aws.ec2.vpn_gateways
WHERE region = 'us-east-1';
Gets all properties from an individual vpn_gateway
.
SELECT
region,
v_pn_gateway_id,
amazon_side_asn,
tags,
type
FROM aws.ec2.vpn_gateways
WHERE region = 'us-east-1' AND data__Identifier = '<VPNGatewayId>';
INSERT
example
Use the following StackQL query and manifest file to create a new vpn_gateway
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.vpn_gateways (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.vpn_gateways (
AmazonSideAsn,
Tags,
Type,
region
)
SELECT
'{{ AmazonSideAsn }}',
'{{ Tags }}',
'{{ Type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpn_gateway
props:
- name: AmazonSideAsn
value: '{{ AmazonSideAsn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Type
value: '{{ Type }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.vpn_gateways
WHERE data__Identifier = '<VPNGatewayId>'
AND region = 'us-east-1';
Permissions
To operate on the vpn_gateways
resource, the following permissions are required:
Create
ec2:CreateVpnGateway,
ec2:DescribeVpnGateways
Read
ec2:DescribeVpnGateways
Update
ec2:CreateTags,
ec2:DeleteTags
Delete
ec2:DeleteVpnGateway
List
ec2:DescribeVpnGateways