Skip to main content

customer_gateways

Creates, updates, deletes, gets or lists a customer_gateways resource.

Overview

Namecustomer_gateways
TypeResource
Idaws.ec2.customer_gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
bgp_asnstringThe customer gateway device's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values: 1 to 2,147,483,647
bgp_asn_extendedstringThe customer gateway device's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values: 2,147,483,648 to 4,294,967,295
certificate_arnstringThe Amazon Resource Name (ARN) for the customer gateway certificate.
customer_gateway_idstringThe ID of the customer gateway.
device_namestringThe name of customer gateway device.
ip_addressstringThe IP 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. If OutsideIpAddressType is set to Ipv6, you can use a public IPv6 address.
statestringThe current state of the customer gateway (pending | available | deleting | deleted).
tagsstringAny tags assigned to the customer gateway.
typestringThe type of VPN connection the customer gateway supports (ipsec.1).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_customer_gatewaysselectregionCustomerGatewayId, Filter, DryRunDescribes one or more of your VPN customer gateways. For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.
create_customer_gatewayinsertregionBgpAsn, PublicIp, CertificateArn, Type, TagSpecification, DeviceName, IpAddress, BgpAsnExtended, DryRunProvides information to Amazon Web Services about your customer gateway device. The customer gateway device is the appliance at your end of the VPN connection. You must provide the IP address of the customer gateway device’s external interface. The IP address must be static and can be behind a device performing network address translation (NAT). For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN. For more information, see Customer gateway options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide. To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. An identical request returns information about the existing customer gateway; it doesn't create a new customer gateway.
delete_customer_gatewaydeleteCustomerGatewayId, regionDryRunDeletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
CustomerGatewayIdstringThe ID of the customer gateway.
regionstringAWS region (default: us-east-1)
BgpAsnintegerFor 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
BgpAsnExtendedinteger (int64)For 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
CertificateArnstringThe Amazon Resource Name (ARN) for the customer gateway certificate.
CustomerGatewayIdarrayOne or more customer gateway IDs. Default: Describes all your customer gateways.
DeviceNamestringA name for the customer gateway device. Length Constraints: Up to 255 characters.
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterarrayOne or more filters. bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). customer-gateway-id - The ID of the customer gateway. ip-address - The IP address of the customer gateway device's external interface. state - The state of the customer gateway (pending | available | deleting | deleted). type - The type of customer gateway. Currently, the only supported type is ipsec.1. tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
IpAddressstringThe IP 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 Ipv6, you can use an IPv6 address.
PublicIpstringThis member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
TagSpecificationarrayThe tags to apply to the customer gateway.
TypestringThe type of VPN connection that this customer gateway supports (ipsec.1).

SELECT examples

Describes one or more of your VPN customer gateways. For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide.

SELECT
bgp_asn,
bgp_asn_extended,
certificate_arn,
customer_gateway_id,
device_name,
ip_address,
state,
tags,
type
FROM aws.ec2.customer_gateways
WHERE region = '{{ region }}' -- required
AND CustomerGatewayId = '{{ CustomerGatewayId }}'
AND Filter = '{{ Filter }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Provides information to Amazon Web Services about your customer gateway device. The customer gateway device is the appliance at your end of the VPN connection. You must provide the IP address of the customer gateway device’s external interface. The IP address must be static and can be behind a device performing network address translation (NAT). For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN. For more information, see Customer gateway options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide. To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. An identical request returns information about the existing customer gateway; it doesn't create a new customer gateway.

INSERT INTO aws.ec2.customer_gateways (
region,
BgpAsn,
PublicIp,
CertificateArn,
Type,
TagSpecification,
DeviceName,
IpAddress,
BgpAsnExtended,
DryRun
)
SELECT
'{{ region }}',
'{{ BgpAsn }}',
'{{ PublicIp }}',
'{{ CertificateArn }}',
'{{ Type }}',
'{{ TagSpecification }}',
'{{ DeviceName }}',
'{{ IpAddress }}',
'{{ BgpAsnExtended }}',
'{{ DryRun }}'
RETURNING
bgp_asn,
bgp_asn_extended,
certificate_arn,
customer_gateway_id,
device_name,
ip_address,
state,
tags,
type
;

DELETE examples

Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

DELETE FROM aws.ec2.customer_gateways
WHERE CustomerGatewayId = '{{ CustomerGatewayId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;