customer_gateways
Creates, updates, deletes or gets a customer_gateway
resource or lists customer_gateways
in a region
Overview
Name | customer_gateways |
Type | Resource |
Description | Specifies a customer gateway. |
Id | aws.ec2.customer_gateways |
Fields
Name | Datatype | Description |
---|---|---|
type | string | The type of VPN connection that this customer gateway supports (ipsec.1 ). |
customer_gateway_id | string | |
ip_address | string | IPv4 address for the customer gateway device's outside interface. The address must be static. |
bgp_asn_extended | number | |
bgp_asn | integer | For devices that support BGP, the customer gateway's BGP ASN. Default: 65000 |
tags | array | One or more tags for the customer gateway. |
certificate_arn | string | |
device_name | string | The name of customer gateway device. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IpAddress, Type, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.customer_gateways (
Type,
IpAddress,
region
)
SELECT
'{{ Type }}',
'{{ IpAddress }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.customer_gateways (
Type,
IpAddress,
BgpAsnExtended,
BgpAsn,
Tags,
CertificateArn,
DeviceName,
region
)
SELECT
'{{ Type }}',
'{{ IpAddress }}',
'{{ BgpAsnExtended }}',
'{{ BgpAsn }}',
'{{ Tags }}',
'{{ CertificateArn }}',
'{{ DeviceName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: customer_gateway
props:
- name: Type
value: '{{ Type }}'
- name: IpAddress
value: '{{ IpAddress }}'
- name: BgpAsnExtended
value: null
- name: BgpAsn
value: '{{ BgpAsn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: CertificateArn
value: '{{ CertificateArn }}'
- name: DeviceName
value: '{{ DeviceName }}'
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,
ec2:DeleteTags