EC2 / Paginator / DescribeNatGateways
DescribeNatGateways#
- class EC2.Paginator.DescribeNatGateways#
- paginator = client.get_paginator('describe_nat_gateways') - paginate(**kwargs)#
- Creates an iterator that will paginate through responses from - EC2.Client.describe_nat_gateways().- See also: AWS API Documentation - Request Syntax- response_iterator = paginator.paginate( DryRun=True|False, Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], NatGatewayIds=[ 'string', ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) - Parameters:
- DryRun (boolean) – 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.
- Filters (list) – - The filters. - nat-gateway-id- The ID of the NAT gateway.
- state- The state of the NAT gateway (- pending|- failed|- available|- deleting|- deleted).
- subnet-id- The ID of the subnet in which the NAT gateway resides.
- tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key- Ownerand the value- TeamA, specify- tag:Ownerfor the filter name and- TeamAfor the filter value.
- tag-key- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
- vpc-id- The ID of the VPC in which the NAT gateway resides.
 - (dict) – - A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs. - If you specify multiple filters, the filters are joined with an - AND, and the request returns only results that match all of the specified filters.- Name (string) – - The name of the filter. Filter names are case-sensitive. 
- Values (list) – - The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an - OR, and the request returns all results that match any of the specified values.- (string) – 
 
 
 
- NatGatewayIds (list) – - The IDs of the NAT gateways. - (string) – 
 
- PaginationConfig (dict) – - A dictionary that provides parameters to control pagination. - MaxItems (integer) – - The total number of items to return. If the total number of items available is more than the value specified in max-items then a - NextTokenwill be provided in the output that you can use to resume pagination.
- PageSize (integer) – - The size of each page. 
- StartingToken (string) – - A token to specify where to start paginating. This is the - NextTokenfrom a previous response.
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'NatGateways': [ { 'CreateTime': datetime(2015, 1, 1), 'DeleteTime': datetime(2015, 1, 1), 'FailureCode': 'string', 'FailureMessage': 'string', 'NatGatewayAddresses': [ { 'AllocationId': 'string', 'NetworkInterfaceId': 'string', 'PrivateIp': 'string', 'PublicIp': 'string', 'AssociationId': 'string', 'IsPrimary': True|False, 'FailureMessage': 'string', 'Status': 'assigning'|'unassigning'|'associating'|'disassociating'|'succeeded'|'failed' }, ], 'NatGatewayId': 'string', 'ProvisionedBandwidth': { 'ProvisionTime': datetime(2015, 1, 1), 'Provisioned': 'string', 'RequestTime': datetime(2015, 1, 1), 'Requested': 'string', 'Status': 'string' }, 'State': 'pending'|'failed'|'available'|'deleting'|'deleted', 'SubnetId': 'string', 'VpcId': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'ConnectivityType': 'private'|'public' }, ], } - Response Structure- (dict) – - NatGateways (list) – - Information about the NAT gateways. - (dict) – - Describes a NAT gateway. - CreateTime (datetime) – - The date and time the NAT gateway was created. 
- DeleteTime (datetime) – - The date and time the NAT gateway was deleted, if applicable. 
- FailureCode (string) – - If the NAT gateway could not be created, specifies the error code for the failure. ( - InsufficientFreeAddressesInSubnet|- Gateway.NotAttached|- InvalidAllocationID.NotFound|- Resource.AlreadyAssociated|- InternalError|- InvalidSubnetID.NotFound)
- FailureMessage (string) – - If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code. - For InsufficientFreeAddressesInSubnet: “Subnet has insufficient free addresses to create this NAT gateway” 
- For Gateway.NotAttached: “Network vpc-xxxxxxxx has no Internet gateway attached” 
- For InvalidAllocationID.NotFound: “Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway” 
- For Resource.AlreadyAssociated: “Elastic IP address eipalloc-xxxxxxxx is already associated” 
- For InternalError: “Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again.” 
- For InvalidSubnetID.NotFound: “The specified subnet subnet-xxxxxxxx does not exist or could not be found.” 
 
- NatGatewayAddresses (list) – - Information about the IP addresses and network interface associated with the NAT gateway. - (dict) – - Describes the IP addresses and network interface associated with a NAT gateway. - AllocationId (string) – - [Public NAT gateway only] The allocation ID of the Elastic IP address that’s associated with the NAT gateway. 
- NetworkInterfaceId (string) – - The ID of the network interface associated with the NAT gateway. 
- PrivateIp (string) – - The private IP address associated with the NAT gateway. 
- PublicIp (string) – - [Public NAT gateway only] The Elastic IP address associated with the NAT gateway. 
- AssociationId (string) – - [Public NAT gateway only] The association ID of the Elastic IP address that’s associated with the NAT gateway. 
- IsPrimary (boolean) – - Defines if the IP address is the primary address. 
- FailureMessage (string) – - The address failure message. 
- Status (string) – - The address status. 
 
 
- NatGatewayId (string) – - The ID of the NAT gateway. 
- ProvisionedBandwidth (dict) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. - ProvisionTime (datetime) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. 
- Provisioned (string) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. 
- RequestTime (datetime) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. 
- Requested (string) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. 
- Status (string) – - Reserved. If you need to sustain traffic greater than the documented limits, contact us through the Support Center. 
 
- State (string) – - The state of the NAT gateway. - pending: The NAT gateway is being created and is not ready to process traffic.
- failed: The NAT gateway could not be created. Check the- failureCodeand- failureMessagefields for the reason.
- available: The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.
- deleting: The NAT gateway is in the process of being terminated and may still be processing traffic.
- deleted: The NAT gateway has been terminated and is no longer processing traffic.
 
- SubnetId (string) – - The ID of the subnet in which the NAT gateway is located. 
- VpcId (string) – - The ID of the VPC in which the NAT gateway is located. 
- Tags (list) – - The tags for the NAT gateway. - (dict) – - Describes a tag. - Key (string) – - The key of the tag. - Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with - aws:.
- Value (string) – - The value of the tag. - Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. 
 
 
- ConnectivityType (string) – - Indicates whether the NAT gateway supports public or private connectivity.