Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeInternetGateways

Describes one or more of your Internet gateways.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

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.

Type: Boolean

Required: No

Filter.N

One or more filters.

  • attachment.state - The current state of the attachment between the gateway and the VPC (available). Present only if a VPC is attached.

  • attachment.vpc-id - The ID of an attached VPC.

  • internet-gateway-id - The ID of the Internet gateway.

  • tag:key=value - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify tag:Purpose for the filter name and X for the filter value.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key=value filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

Type: Array of Filter objects

Required: No

InternetGatewayId.N

One or more Internet gateway IDs.

Default: Describes all your Internet gateways.

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

internetGatewaySet

Information about one or more Internet gateways.

Type: Array of InternetGateway objects

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Example

Example

This example describes all your Internet gateways.

Sample Request

https://ec2.amazonaws.com/?Action=DescribeInternetGateways
&AUTHPARAMS

Sample Response

<DescribeInternetGatewaysResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <internetGatewaySet>  
      <item>
         <internetGatewayId>igw-eaad4883EXAMPLE</internetGatewayId>
         <attachmentSet>
            <item>
               <vpcId>vpc-11ad4878</vpcId>
               <state>available</state>
            </item>
         </attachmentSet>
         <tagSet/>
      </item>
   </internetGatewaySet>
</DescribeInternetGatewaysResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: