customer_gateways
Creates, updates, deletes, gets or lists a customer_gateways resource.
Overview
| Name | customer_gateways |
| Type | Resource |
| Id | aws.ec2.customer_gateways |
Fields
The following fields are returned by SELECT queries:
- describe_customer_gateways
| Name | Datatype | Description |
|---|---|---|
bgp_asn | string | The customer gateway device's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values: 1 to 2,147,483,647 |
bgp_asn_extended | string | The customer gateway device's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Valid values: 2,147,483,648 to 4,294,967,295 |
certificate_arn | string | The Amazon Resource Name (ARN) for the customer gateway certificate. |
customer_gateway_id | string | The ID of the customer gateway. |
device_name | string | The name of customer gateway device. |
ip_address | string | The 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. |
state | string | The current state of the customer gateway (pending | available | deleting | deleted). |
tags | string | Any tags assigned to the customer gateway. |
type | string | The type of VPN connection the customer gateway supports (ipsec.1). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_customer_gateways | select | region | CustomerGatewayId, Filter, DryRun | 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. |
create_customer_gateway | insert | region | BgpAsn, PublicIp, CertificateArn, Type, TagSpecification, DeviceName, IpAddress, BgpAsnExtended, DryRun | 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. |
delete_customer_gateway | delete | CustomerGatewayId, region | DryRun | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
CustomerGatewayId | string | The ID of the customer gateway. |
region | string | AWS region (default: us-east-1) |
BgpAsn | integer | 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. Default: 65000 Valid values: 1 to 2,147,483,647 |
BgpAsnExtended | integer (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 |
CertificateArn | string | The Amazon Resource Name (ARN) for the customer gateway certificate. |
CustomerGatewayId | array | One or more customer gateway IDs. Default: Describes all your customer gateways. |
DeviceName | string | A name for the customer gateway device. Length Constraints: Up to 255 characters. |
DryRun | boolean | Checks 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. |
Filter | array | One 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. |
IpAddress | string | The 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. |
PublicIp | string | This member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static. |
TagSpecification | array | The tags to apply to the customer gateway. |
Type | string | The type of VPN connection that this customer gateway supports (ipsec.1). |
SELECT examples
- describe_customer_gateways
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
- create_customer_gateway
- Manifest
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
;
# Description fields are for documentation purposes
- name: customer_gateways
props:
- name: region
value: "{{ region }}"
description: Required parameter for the customer_gateways resource.
- name: BgpAsn
value: {{ BgpAsn }}
description: 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. Default: 65000 Valid values: 1 to 2,147,483,647
description: 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. Default: 65000 Valid values: 1 to 2,147,483,647
- name: PublicIp
value: "{{ PublicIp }}"
description: This member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
description: This member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
- name: CertificateArn
value: "{{ CertificateArn }}"
description: The Amazon Resource Name (ARN) for the customer gateway certificate.
description: The Amazon Resource Name (ARN) for the customer gateway certificate.
- name: Type
value: "{{ Type }}"
description: The type of VPN connection that this customer gateway supports (ipsec.1).
description: The type of VPN connection that this customer gateway supports (ipsec.1).
- name: TagSpecification
value: "{{ TagSpecification }}"
description: The tags to apply to the customer gateway.
description: The tags to apply to the customer gateway.
- name: DeviceName
value: "{{ DeviceName }}"
description: A name for the customer gateway device. Length Constraints: Up to 255 characters.
description: A name for the customer gateway device. Length Constraints: Up to 255 characters.
- name: IpAddress
value: "{{ IpAddress }}"
description: The 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.
description: The 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.
- name: BgpAsnExtended
value: "{{ BgpAsnExtended }}"
description: 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
description: 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
- name: DryRun
value: {{ DryRun }}
description: Checks 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.
description: Checks 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.
DELETE examples
- delete_customer_gateway
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 }}'
;