Skip to main content

carrier_gateways

Creates, updates, deletes or gets a carrier_gateway resource or lists carrier_gateways in a region

Overview

Namecarrier_gateways
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idaws.ec2.carrier_gateways

Fields

NameDatatypeDescription
carrier_gateway_idstringThe ID of the carrier gateway.
statestringThe state of the carrier gateway.
vpc_idstringThe ID of the VPC.
owner_idstringThe ID of the owner.
tagsarrayThe tags for the carrier gateway.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTVpcId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.ec2.carrier_gateways (
VpcId,
region
)
SELECT
'{{ VpcId }}',
'{{ region }}';

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