DescribeVpcs#

Description#

Describes your VPCs if any exists. It is possible to use one or more filters.

Request Parameters#

  • Filter.N — One or more filters.

    • Type: List of Filter objects

    • Required: No

  • VpcId — The ID of the VPC.

    • Type: String

    • Required: No

Supported Filters#

  • cidr — The IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC’s CIDR block for information on the VPC to be returned. It must contain a slash followed by one or two digits (for example, /28).

  • dhcp-options-id — The ID of the set of DHCP options.

  • isDefault — Indicates whether the VPC is the default VPC.

  • tag-key — The tag key. This filter is used to get tagged VPCs 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.

  • state — The state of the VPC (available | pending).

  • vpc-id — The ID of the VPC.

Response Elements#

  • requestId — The request ID

    • Type: String

  • vpcSet — Information about VPCs.

    • Type: List of Vpc objects

Examples#

c2-ec2 DescribeVpcs

c2-ec2 DescribeVpcs Filter.1.Name state Filter.1.Value available

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

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