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.
Idawscc.ec2.customer_gateways

Fields

NameDatatypeDescription
typestringThe type of VPN connection that this customer gateway supports (ipsec.1).
customer_gateway_idstring
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 Ipv6, you can use an IPv6 address.
bgp_asn_extendednumber
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
bgp_asninteger
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
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

NameResourceAccessible byRequired Params
create_resourcecustomer_gatewaysINSERTIpAddress, Type, region
delete_resourcecustomer_gatewaysDELETEIdentifier, region
update_resourcecustomer_gatewaysUPDATEIdentifier, PatchDocument, region
list_resourcescustomer_gateways_list_onlySELECTregion
get_resourcecustomer_gatewaysSELECTIdentifier, region

SELECT examples

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 awscc.ec2.customer_gateways
WHERE
region = '{{ region }}' AND
Identifier = '{{ customer_gateway_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ec2.customer_gateways (
Type,
IpAddress,
region
)
SELECT
'{{ type }}',
'{{ ip_address }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.ec2.customer_gateways
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ customer_gateway_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.customer_gateways
WHERE
Identifier = '{{ customer_gateway_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

ec2:DescribeCustomerGateways