Skip to main content

carrier_gateways

Creates, updates, deletes, gets or lists a carrier_gateways resource.

Overview

Namecarrier_gateways
TypeResource
Idaws.ec2.carrier_gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
carrier_gateway_idstringThe ID of the carrier gateway.
owner_idstringThe Amazon Web Services account ID of the owner of the carrier gateway.
statestringThe state of the carrier gateway.
tagsstringThe tags assigned to the carrier gateway.
vpc_idstringThe ID of the VPC associated with the carrier gateway.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_carrier_gatewaysselectregionCarrierGatewayId, Filter, MaxResults, NextToken, DryRunDescribes one or more of your carrier gateways.
create_carrier_gatewayinsertVpcId, regionTagSpecification, DryRun, ClientTokenCreates a carrier gateway. For more information about carrier gateways, see Carrier gateways in the Amazon Web Services Wavelength Developer Guide.
delete_carrier_gatewaydeleteCarrierGatewayId, regionDryRunDeletes a carrier gateway. If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see DeleteRoute.

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.

NameDatatypeDescription
CarrierGatewayIdstringThe ID of the carrier gateway.
VpcIdstringThe ID of the VPC to associate with the carrier gateway.
regionstringAWS region (default: us-east-1)
CarrierGatewayIdarrayOne or more carrier gateway IDs.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
DryRunbooleanChecks 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.
FilterarrayOne or more filters. carrier-gateway-id - The ID of the carrier gateway. state - The state of the carrier gateway (pending | failed | available | deleting | deleted). owner-id - The Amazon Web Services account ID of the owner of the carrier gateway. 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. vpc-id - The ID of the VPC associated with the carrier gateway.
MaxResultsintegerThe maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
NextTokenstringThe token for the next page of results.
TagSpecificationarrayThe tags to associate with the carrier gateway.

SELECT examples

Describes one or more of your carrier gateways.

SELECT
carrier_gateway_id,
owner_id,
state,
tags,
vpc_id
FROM aws.ec2.carrier_gateways
WHERE region = '{{ region }}' -- required
AND CarrierGatewayId = '{{ CarrierGatewayId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Creates a carrier gateway. For more information about carrier gateways, see Carrier gateways in the Amazon Web Services Wavelength Developer Guide.

INSERT INTO aws.ec2.carrier_gateways (
VpcId,
region,
TagSpecification,
DryRun,
ClientToken
)
SELECT
'{{ VpcId }}',
'{{ region }}',
'{{ TagSpecification }}',
'{{ DryRun }}',
'{{ ClientToken }}'
RETURNING
carrier_gateway_id,
owner_id,
state,
tags,
vpc_id
;

DELETE examples

Deletes a carrier gateway. If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see DeleteRoute.

DELETE FROM aws.ec2.carrier_gateways
WHERE CarrierGatewayId = '{{ CarrierGatewayId }}' --required
AND region = '{{ region }}' --required
AND DryRun = '{{ DryRun }}'
;