Skip to main content

transit_gateways

Creates, updates, deletes or gets a transit_gateway resource or lists transit_gateways in a region

Overview

Nametransit_gateways
TypeResource
DescriptionResource Type definition for AWS::EC2::TransitGateway
Idawscc.ec2.transit_gateways

Fields

NameDatatypeDescription
default_route_table_propagationstring
transit_gateway_arnstring
descriptionstring
auto_accept_shared_attachmentsstring
default_route_table_associationstring
idstring
vpn_ecmp_supportstring
dns_supportstring
security_group_referencing_supportstring
multicast_supportstring
amazon_side_asninteger
transit_gateway_cidr_blocksarray
tagsarray
association_default_route_table_idstring
propagation_default_route_table_idstring
regionstringAWS region.

For more information, see AWS::EC2::TransitGateway.

Methods

NameResourceAccessible byRequired Params
create_resourcetransit_gatewaysINSERTregion
delete_resourcetransit_gatewaysDELETEIdentifier, region
update_resourcetransit_gatewaysUPDATEIdentifier, PatchDocument, region
list_resourcestransit_gateways_list_onlySELECTregion
get_resourcetransit_gatewaysSELECTIdentifier, region

SELECT examples

Gets all properties from an individual transit_gateway.

SELECT
region,
default_route_table_propagation,
transit_gateway_arn,
description,
auto_accept_shared_attachments,
default_route_table_association,
id,
vpn_ecmp_support,
dns_support,
security_group_referencing_support,
multicast_support,
amazon_side_asn,
transit_gateway_cidr_blocks,
tags,
association_default_route_table_id,
propagation_default_route_table_id
FROM awscc.ec2.transit_gateways
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ec2.transit_gateways (
DefaultRouteTablePropagation,
Description,
AutoAcceptSharedAttachments,
DefaultRouteTableAssociation,
VpnEcmpSupport,
DnsSupport,
SecurityGroupReferencingSupport,
MulticastSupport,
AmazonSideAsn,
TransitGatewayCidrBlocks,
Tags,
AssociationDefaultRouteTableId,
PropagationDefaultRouteTableId,
region
)
SELECT
'{{ default_route_table_propagation }}',
'{{ description }}',
'{{ auto_accept_shared_attachments }}',
'{{ default_route_table_association }}',
'{{ vpn_ecmp_support }}',
'{{ dns_support }}',
'{{ security_group_referencing_support }}',
'{{ multicast_support }}',
'{{ amazon_side_asn }}',
'{{ transit_gateway_cidr_blocks }}',
'{{ tags }}',
'{{ association_default_route_table_id }}',
'{{ propagation_default_route_table_id }}',
'{{ 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 transit_gateway resource, using stack-deploy.

/*+ update */
UPDATE awscc.ec2.transit_gateways
SET PatchDocument = string('{{ {
"DefaultRouteTablePropagation": default_route_table_propagation,
"Description": description,
"AutoAcceptSharedAttachments": auto_accept_shared_attachments,
"DefaultRouteTableAssociation": default_route_table_association,
"VpnEcmpSupport": vpn_ecmp_support,
"DnsSupport": dns_support,
"SecurityGroupReferencingSupport": security_group_referencing_support,
"TransitGatewayCidrBlocks": transit_gateway_cidr_blocks,
"Tags": tags,
"AssociationDefaultRouteTableId": association_default_route_table_id,
"PropagationDefaultRouteTableId": propagation_default_route_table_id
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.transit_gateways
WHERE
Identifier = '{{ 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 transit_gateways resource, the following permissions are required:

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags