HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/awscli/examples/ec2/search-transit-gateway-routes.rst
**To search for routes in the specified transit gateway route table**

The following ``search-transit-gateway-routes`` example returns all the routes that are of type ``static`` in the specified route table. ::

    aws ec2 search-transit-gateway-routes \
        --transit-gateway-route-table-id tgw-rtb-0a823edbdeEXAMPLE \
        --filters "Name=type,Values=static"

Output::

    {
        "Routes": [
            {
                "DestinationCidrBlock": "10.0.2.0/24",
                "TransitGatewayAttachments": [
                    {
                        "ResourceId": "vpc-4EXAMPLE",
                        "TransitGatewayAttachmentId": "tgw-attach-09b52ccdb5EXAMPLE",
                        "ResourceType": "vpc"
                    }
                ],
                "Type": "static",
                "State": "active"
            },
            {
                "DestinationCidrBlock": "10.1.0.0/24",
                "TransitGatewayAttachments": [
                    {
                        "ResourceId": "vpc-4EXAMPLE",
                        "TransitGatewayAttachmentId": "tgw-attach-09b52ccdb5EXAMPLE",
                        "ResourceType": "vpc"
                    }
                ],
                "Type": "static",
                "State": "active"
            }
        ],
        "AdditionalRoutesAvailable": false
    }

For more information, see `View Transit Gateway Route Tables <https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#WorkWithRouteTables>`__ in the *AWS Transit Gateways Guide*.