carrier_gateways
Creates, updates, deletes or gets a carrier_gateway
resource or lists carrier_gateways
in a region
Overview
Name | carrier_gateways |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.ec2.carrier_gateways |
Fields
Name | Datatype | Description |
---|---|---|
carrier_gateway_id | string | The ID of the carrier gateway. |
state | string | The state of the carrier gateway. |
vpc_id | string | The ID of the VPC. |
owner_id | string | The ID of the owner. |
tags | array | The tags for the carrier gateway. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | VpcId, 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 carrier_gateways
in a region.
SELECT
region,
carrier_gateway_id,
state,
vpc_id,
owner_id,
tags
FROM aws.ec2.carrier_gateways
WHERE region = 'us-east-1';
Gets all properties from an individual carrier_gateway
.
SELECT
region,
carrier_gateway_id,
state,
vpc_id,
owner_id,
tags
FROM aws.ec2.carrier_gateways
WHERE region = 'us-east-1' AND data__Identifier = '<CarrierGatewayId>';
INSERT
example
Use the following StackQL query and manifest file to create a new carrier_gateway
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.carrier_gateways (
VpcId,
region
)
SELECT
'{{ VpcId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.carrier_gateways (
VpcId,
Tags,
region
)
SELECT
'{{ VpcId }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: carrier_gateway
props:
- name: VpcId
value: '{{ VpcId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.carrier_gateways
WHERE data__Identifier = '<CarrierGatewayId>'
AND region = 'us-east-1';
Permissions
To operate on the carrier_gateways
resource, the following permissions are required:
Create
ec2:CreateCarrierGateway,
ec2:DescribeCarrierGateways,
ec2:CreateTags
Read
ec2:DescribeCarrierGateways
Update
ec2:DescribeCarrierGateways,
ec2:CreateTags,
ec2:DeleteTags
Delete
ec2:DeleteCarrierGateway,
ec2:DescribeCarrierGateways
List
ec2:DescribeCarrierGateways