DescribeRouteTables#

Description#

Describes one or more of your route tables in a VPC. They may be filtered by various parameters.

Request Parameters#

  • Filter.N — One or more filters.

    • Type: List of Filter objects

  • RouteTableId.N — The route table IDs.

    • Type: Array of strings

    • Required: No

Supported Filters#

  • association.main — Indicates whether the route table is the main route table for the VPC.

  • association.route-table-association-id — The ID of the route table association.

  • association.subnet-id — The ID of the subnet the route table is associated with.

  • route.destination-cidr-block — The IPv4 CIDR range specified in a route in the route table.

  • route.gateway-id — The ID of the internet gateway.

  • tag-key — The tag key. Such a filter allows you to get resources with the specified key and any value.

  • tag:<tag-key> — The key/value a pair of a tag. The tag key is passed in the filter name, while the tag value is used as the filter value.

  • vpc-id — The ID of the VPC.

Response Elements#

  • requestId — The request ID.

    • Type: String

  • routeTableSet — List of route tables.

Examples#

c2-ec2 DescribeRouteTables

c2-ec2 DescribeRouteTables RouteTableId.1 rtb-12345678

c2-ec2 DescribeRouteTables Filter.1.Name vpc-id Filter.1.Value.1 vpc-12345678

c2-ec2 DescribeRouteTables Filter.1.Name tag:<tag-key> Filter.1.Value <tag-value>

c2-ec2 DescribeRouteTables Filter.1.Name tag-key Filter.1.Value <key>