Skip to main content

transit_gateway_route_tables

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

Overview

Nametransit_gateway_route_tables
TypeResource
Idaws.ec2.transit_gateway_route_tables

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestringThe creation time.
default_association_route_tablebooleanIndicates whether this is the default association route table for the transit gateway.
default_propagation_route_tablebooleanIndicates whether this is the default propagation route table for the transit gateway.
statestringThe state of the transit gateway route table.
tagsstringAny tags assigned to the route table.
transit_gateway_idstringThe ID of the transit gateway.
transit_gateway_route_table_idstringThe ID of the transit gateway route table.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_transit_gateway_route_tablesselectregionTransitGatewayRouteTableIds, Filter, MaxResults, NextToken, DryRunDescribes one or more transit gateway route tables. By default, all transit gateway route tables are described. Alternatively, you can filter the results.
create_transit_gateway_route_tableinsertTransitGatewayId, regionTagSpecifications, DryRunCreates a route table for the specified transit gateway.
associate_transit_gateway_route_tableupdateTransitGatewayRouteTableId, TransitGatewayAttachmentId, regionDryRunAssociates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.
delete_transit_gateway_route_tabledeleteTransitGatewayRouteTableId, regionDryRunDeletes the specified transit gateway route table. If there are any route tables associated with the transit gateway route table, you must first run DisassociateRouteTable before you can delete the transit gateway route table. This removes any route tables associated with the transit gateway route table.
disable_transit_gateway_route_table_propagationexecTransitGatewayRouteTableId, regionTransitGatewayAttachmentId, DryRun, TransitGatewayRouteTableAnnouncementIdDisables the specified resource attachment from propagating routes to the specified propagation route table.
disassociate_transit_gateway_route_tableexecTransitGatewayRouteTableId, TransitGatewayAttachmentId, regionDryRunDisassociates a resource attachment from a transit gateway route table.
enable_transit_gateway_route_table_propagationexecTransitGatewayRouteTableId, regionTransitGatewayAttachmentId, DryRun, TransitGatewayRouteTableAnnouncementIdEnables the specified attachment to propagate routes to the specified propagation route table.

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
TransitGatewayAttachmentIdstringThe ID of the attachment.
TransitGatewayIdstringThe ID of the transit gateway.
TransitGatewayRouteTableIdstringThe ID of the propagation route table.
regionstringAWS region (default: us-east-1)
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. The possible values are: default-association-route-table - Indicates whether this is the default association route table for the transit gateway (true | false). default-propagation-route-table - Indicates whether this is the default propagation route table for the transit gateway (true | false). state - The state of the route table (available | deleting | deleted | pending). transit-gateway-id - The ID of the transit gateway. transit-gateway-route-table-id - The ID of the transit gateway route table.
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.
TagSpecificationsarrayThe tags to apply to the transit gateway route table.
TransitGatewayAttachmentIdstringThe ID of the attachment.
TransitGatewayRouteTableAnnouncementIdstringThe ID of the transit gateway route table announcement.
TransitGatewayRouteTableIdsarrayThe IDs of the transit gateway route tables.

SELECT examples

Describes one or more transit gateway route tables. By default, all transit gateway route tables are described. Alternatively, you can filter the results.

SELECT
creation_time,
default_association_route_table,
default_propagation_route_table,
state,
tags,
transit_gateway_id,
transit_gateway_route_table_id
FROM aws.ec2.transit_gateway_route_tables
WHERE region = '{{ region }}' -- required
AND TransitGatewayRouteTableIds = '{{ TransitGatewayRouteTableIds }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;

INSERT examples

Creates a route table for the specified transit gateway.

INSERT INTO aws.ec2.transit_gateway_route_tables (
TransitGatewayId,
region,
TagSpecifications,
DryRun
)
SELECT
'{{ TransitGatewayId }}',
'{{ region }}',
'{{ TagSpecifications }}',
'{{ DryRun }}'
RETURNING
creation_time,
default_association_route_table,
default_propagation_route_table,
state,
tags,
transit_gateway_id,
transit_gateway_route_table_id
;

UPDATE examples

Associates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.

UPDATE aws.ec2.transit_gateway_route_tables
SET
-- No updatable properties
WHERE
TransitGatewayRouteTableId = '{{ TransitGatewayRouteTableId }}' --required
AND TransitGatewayAttachmentId = '{{ TransitGatewayAttachmentId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
RETURNING
resource_id,
resource_type,
state,
transit_gateway_attachment_id,
transit_gateway_route_table_id;

DELETE examples

Deletes the specified transit gateway route table. If there are any route tables associated with the transit gateway route table, you must first run DisassociateRouteTable before you can delete the transit gateway route table. This removes any route tables associated with the transit gateway route table.

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

Lifecycle Methods

Disables the specified resource attachment from propagating routes to the specified propagation route table.

EXEC aws.ec2.transit_gateway_route_tables.disable_transit_gateway_route_table_propagation
@TransitGatewayRouteTableId='{{ TransitGatewayRouteTableId }}' --required,
@region='{{ region }}' --required,
@TransitGatewayAttachmentId='{{ TransitGatewayAttachmentId }}',
@DryRun={{ DryRun }},
@TransitGatewayRouteTableAnnouncementId='{{ TransitGatewayRouteTableAnnouncementId }}'
;