DescribeNatGateways#

Description#

Request for a list of NAT gateways and their descriptions. Filtering by the specified criteria allows you to include only the necessary NAT gateways in the output.

Request Parameters#

  • Filter.N — One or more filters.

    • Type: List of Filter objects

    • Required: No

  • NatGatewayId.N — NAT gateway IDs. If the parameter is not specified, information about all NAT gateways of the project is displayed.

    • Type: Array of strings

    • Required: No

Supported Filters#

  • nat-gateway-id — The ID of the NAT gateway.

  • state — The state of the NAT gateway (valid values — available, deleting, failed, pending).

  • 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 in which the NAT gateway is created.

Response Elements#

  • natGatewaySet — Information about NAT gateways.

  • requestId — The request ID.

    • Type: String

Examples#

c2-ec2 DescribeNatGateways

c2-ec2 DescribeNatGateways NatGatewayId.1 <natgw_id>

c2-ec2 DescribeNatGateways Filter.1.Name vpc-id Filter.1.Value <vpc_id>

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