Skip to content

aws.ec2.search_transit_gateway_routes

Example SQL Queries

SELECT * FROM
aws.ec2.search_transit_gateway_routes
WHERE
"transit_gateway_route_table_id" = 'VALUE'
AND "filters" = 'VALUE';

Description

Searches for routes in the specified transit gateway route table.

Table Definition

Column NameColumn Data Type
filters Required Input Column

One or more filters. The possible values are:

  • attachment.transit-gateway-attachment-id- The id of the transit gateway attachment.

  • attachment.resource-id - The resource id of the transit gateway attachment.

  • attachment.resource-type - The attachment resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect.

  • prefix-list-id - The ID of the prefix list.

  • route-search.exact-match - The exact match of the specified filter.

  • route-search.longest-prefix-match - The longest prefix that matches the route.

  • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.

  • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.

  • state - The state of the route (active | blackhole).

  • type - The type of route (propagated | static).

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filters[]
Show child fields
filters[].name

The name of the filter. Filter names are case-sensitive.

filters[].values[]
transit_gateway_route_table_id Required Input Column

The ID of the transit gateway route table.

VARCHAR
dry_run Input Column

Checks 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.

BOOLEAN
max_results Input Column

The maximum number of routes to return. If a value is not provided, the default is 1000.

BIGINT
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
additional_routes_available

Indicates whether there are additional routes available.

BOOLEAN
routes

Information about the routes.

STRUCT(
"destination_cidr_block" VARCHAR,
"prefix_list_id" VARCHAR,
"transit_gateway_route_table_announcement_id" VARCHAR,
"transit_gateway_attachments" STRUCT(
"resource_id" VARCHAR,
"transit_gateway_attachment_id" VARCHAR,
"resource_type" VARCHAR
)[],
"type" VARCHAR,
"state" VARCHAR
)[]
Show child fields
routes[]
Show child fields
routes[].destination_cidr_block

The CIDR block used for destination matches.

routes[].prefix_list_id

The ID of the prefix list used for destination matches.

routes[].state

The state of the route.

routes[].transit_gateway_attachments[]
Show child fields
routes[].transit_gateway_attachments[].resource_id

The ID of the resource.

routes[].transit_gateway_attachments[].resource_type

The resource type. Note that the tgw-peering resource type has been deprecated.

routes[].transit_gateway_attachments[].transit_gateway_attachment_id

The ID of the attachment.

routes[].transit_gateway_route_table_announcement_id

The ID of the transit gateway route table announcement.

routes[].type

The route type.