Skip to main content

customer_gateways

Creates, updates, deletes or gets a customer_gateway resource or lists customer_gateways in a region

Overview

Namecustomer_gateways
TypeResource
DescriptionSpecifies a customer gateway.
Idaws.ec2.customer_gateways

Fields

NameDatatypeDescription
typestringThe type of VPN connection that this customer gateway supports (ipsec.1).
customer_gateway_idstring
ip_addressstringIPv4 address for the customer gateway device's outside interface. The address must be static. If OutsideIpAddressType in your VPN connection options is set to PrivateIpv4, you can use an RFC6598 or RFC1918 private IPv4 address. If OutsideIpAddressType is set to PublicIpv4, you can use a public IPv4 address.
bgp_asn_extendednumberFor customer gateway devices that support BGP, specify the device's ASN. You must specify either BgpAsn or BgpAsnExtended when creating the customer gateway. If the ASN is larger than 2,147,483,647, you must use BgpAsnExtended.
Valid values: 2,147,483,648 to 4,294,967,295
bgp_asnintegerFor customer gateway devices that support BGP, specify the device's ASN. You must specify either BgpAsn or BgpAsnExtended when creating the customer gateway. If the ASN is larger than 2,147,483,647, you must use BgpAsnExtended.
Default: 65000
Valid values: 1 to 2,147,483,647
tagsarrayOne or more tags for the customer gateway.
certificate_arnstringThe Amazon Resource Name (ARN) for the customer gateway certificate.
device_namestringThe name of customer gateway device.
regionstringAWS region.

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

Methods

NameAccessible byRequired Params
create_resourceINSERTIpAddress, Type, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all customer_gateways in a region.

SELECT
region,
type,
customer_gateway_id,
ip_address,
bgp_asn_extended,
bgp_asn,
tags,
certificate_arn,
device_name
FROM aws.ec2.customer_gateways
WHERE region = 'us-east-1';

Gets all properties from an individual customer_gateway.

SELECT
region,
type,
customer_gateway_id,
ip_address,
bgp_asn_extended,
bgp_asn,
tags,
certificate_arn,
device_name
FROM aws.ec2.customer_gateways
WHERE region = 'us-east-1' AND data__Identifier = '<CustomerGatewayId>';

INSERT example

Use the following StackQL query and manifest file to create a new customer_gateway resource, using stack-deploy.

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

DELETE example

/*+ delete */
DELETE FROM aws.ec2.customer_gateways
WHERE data__Identifier = '<CustomerGatewayId>'
AND region = 'us-east-1';

Permissions

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

Read

ec2:DescribeCustomerGateways

Create

ec2:CreateCustomerGateway,
ec2:DescribeCustomerGateways,
ec2:CreateTags

Update

ec2:CreateTags,
ec2:DeleteTags,
ec2:DescribeCustomerGateways

List

ec2:DescribeCustomerGateways

Delete

ec2:DeleteCustomerGateway,
ec2:DescribeCustomerGateways