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
DescriptionSpecifies a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.
For more information, see [](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *User Guide*.
Idaws.ec2.vpn_gateways

Fields

NameDatatypeDescription
v_pn_gateway_idstring
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.

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

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,
ec2:CreateTags

Read

ec2:DescribeVpnGateways

Update

ec2:DescribeVpnGateways,
ec2:CreateTags,
ec2:DeleteTags

Delete

ec2:DeleteVpnGateway,
ec2:DescribeVpnGateways

List

ec2:DescribeVpnGateways