Skip to main content

vpn_gateways

Creates, updates, deletes or gets a vpn_gateway resource or lists vpn_gateways in a region

Overview

Namevpn_gateways
TypeResource
DescriptionSchema for EC2 VPN Gateway
Idaws.ec2.vpn_gateways

Fields

NameDatatypeDescription
v_pn_gateway_idstringVPN Gateway ID generated by service
amazon_side_asnintegerThe private Autonomous System Number (ASN) for the Amazon side of a BGP session.
tagsarrayAny tags assigned to the virtual private gateway.
typestringThe type of VPN connection the virtual private gateway supports.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.ec2.vpn_gateways (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';

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