Amazon Elastic Compute Cloud

2023/01/31 - Amazon Elastic Compute Cloud - 4 new2 updated api methods

Changes  This launch allows customers to associate up to 8 IP addresses to their NAT Gateways to increase the limit on concurrent connections to a single destination by eight times from 55K to 440K.

UnassignPrivateNatGatewayAddress (new) Link ¶

Unassigns secondary private NAT gateway IPv4 addresses from a private NAT gateway. You cannot unassign your primary private IP. For more information, see Edit secondary IP address associations in the Amazon Virtual Private Cloud User Guide.

While unassigning is in progress, you cannot assign/unassign additional IP addresses while the connections are being drained. You are, however, allowed to delete the NAT gateway.

A private IP address will only be released at the end of MaxDrainDurationSeconds. The private IP addresses stay associated and support the existing connections but do not support any new connections (new connections are distributed across the remaining assigned private IP address). After the existing connections drain out, the private IP addresses get released.

See also: AWS API Documentation

Request Syntax

client.unassign_private_nat_gateway_address(
    NatGatewayId='string',
    PrivateIpAddresses=[
        'string',
    ],
    MaxDrainDurationSeconds=123,
    DryRun=True|False
)
type NatGatewayId:

string

param NatGatewayId:

[REQUIRED]

The NAT gateway ID.

type PrivateIpAddresses:

list

param PrivateIpAddresses:

[REQUIRED]

The private IPv4 addresses you want to unassign.

  • (string) --

type MaxDrainDurationSeconds:

integer

param MaxDrainDurationSeconds:

The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. Default value is 350 seconds.

type DryRun:

boolean

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NatGatewayId': 'string',
    'NatGatewayAddresses': [
        {
            'AllocationId': 'string',
            'NetworkInterfaceId': 'string',
            'PrivateIp': 'string',
            'PublicIp': 'string',
            'AssociationId': 'string',
            'IsPrimary': True|False,
            'FailureMessage': 'string',
            'Status': 'assigning'|'unassigning'|'associating'|'disassociating'|'succeeded'|'failed'
        },
    ]
}

Response Structure

  • (dict) --

    • NatGatewayId (string) --

      The NAT gateway ID.

    • NatGatewayAddresses (list) --

      Information about the NAT gateway IP addresses.

      • (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.

AssignPrivateNatGatewayAddress (new) Link ¶

Assigns one or more private IPv4 addresses to a private NAT gateway. For more information, see Work with NAT gateways in the Amazon Virtual Private Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.assign_private_nat_gateway_address(
    NatGatewayId='string',
    PrivateIpAddresses=[
        'string',
    ],
    PrivateIpAddressCount=123,
    DryRun=True|False
)
type NatGatewayId:

string

param NatGatewayId:

[REQUIRED]

The NAT gateway ID.

type PrivateIpAddresses:

list

param PrivateIpAddresses:

The private IPv4 addresses you want to assign to the private NAT gateway.

  • (string) --

type PrivateIpAddressCount:

integer

param PrivateIpAddressCount:

The number of private IP addresses to assign to the NAT gateway. You can't specify this parameter when also specifying private IP addresses.

type DryRun:

boolean

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NatGatewayId': 'string',
    'NatGatewayAddresses': [
        {
            'AllocationId': 'string',
            'NetworkInterfaceId': 'string',
            'PrivateIp': 'string',
            'PublicIp': 'string',
            'AssociationId': 'string',
            'IsPrimary': True|False,
            'FailureMessage': 'string',
            'Status': 'assigning'|'unassigning'|'associating'|'disassociating'|'succeeded'|'failed'
        },
    ]
}

Response Structure

  • (dict) --

    • NatGatewayId (string) --

      The NAT gateway ID.

    • NatGatewayAddresses (list) --

      NAT gateway IP addresses.

      • (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.

DisassociateNatGatewayAddress (new) Link ¶

Disassociates secondary Elastic IP addresses (EIPs) from a public NAT gateway. You cannot disassociate your primary EIP. For more information, see Edit secondary IP address associations in the Amazon Virtual Private Cloud User Guide.

While disassociating is in progress, you cannot associate/disassociate additional EIPs while the connections are being drained. You are, however, allowed to delete the NAT gateway.

An EIP will only be released at the end of MaxDrainDurationSeconds. The EIPs stay associated and support the existing connections but do not support any new connections (new connections are distributed across the remaining associated EIPs). As the existing connections drain out, the EIPs (and the corresponding private IPs mapped to them) get released.

See also: AWS API Documentation

Request Syntax

client.disassociate_nat_gateway_address(
    NatGatewayId='string',
    AssociationIds=[
        'string',
    ],
    MaxDrainDurationSeconds=123,
    DryRun=True|False
)
type NatGatewayId:

string

param NatGatewayId:

[REQUIRED]

The NAT gateway ID.

type AssociationIds:

list

param AssociationIds:

[REQUIRED]

The association IDs of EIPs that have been associated with the NAT gateway.

  • (string) --

type MaxDrainDurationSeconds:

integer

param MaxDrainDurationSeconds:

The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. Default value is 350 seconds.

type DryRun:

boolean

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NatGatewayId': 'string',
    'NatGatewayAddresses': [
        {
            'AllocationId': 'string',
            'NetworkInterfaceId': 'string',
            'PrivateIp': 'string',
            'PublicIp': 'string',
            'AssociationId': 'string',
            'IsPrimary': True|False,
            'FailureMessage': 'string',
            'Status': 'assigning'|'unassigning'|'associating'|'disassociating'|'succeeded'|'failed'
        },
    ]
}

Response Structure

  • (dict) --

    • NatGatewayId (string) --

      The NAT gateway ID.

    • NatGatewayAddresses (list) --

      Information about the NAT gateway IP addresses.

      • (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.

AssociateNatGatewayAddress (new) Link ¶

Associates Elastic IP addresses (EIPs) and private IPv4 addresses with a public NAT gateway. For more information, see Work with NAT gateways in the Amazon Virtual Private Cloud User Guide.

By default, you can associate up to 2 Elastic IP addresses per public NAT gateway. You can increase the limit by requesting a quota adjustment. For more information, see Elastic IP address quotas in the Amazon Virtual Private Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.associate_nat_gateway_address(
    NatGatewayId='string',
    AllocationIds=[
        'string',
    ],
    PrivateIpAddresses=[
        'string',
    ],
    DryRun=True|False
)
type NatGatewayId:

string

param NatGatewayId:

[REQUIRED]

The NAT gateway ID.

type AllocationIds:

list

param AllocationIds:

[REQUIRED]

The allocation IDs of EIPs that you want to associate with your NAT gateway.

  • (string) --

type PrivateIpAddresses:

list

param PrivateIpAddresses:

The private IPv4 addresses that you want to assign to the NAT gateway.

  • (string) --

type DryRun:

boolean

param 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.

rtype:

dict

returns:

Response Syntax

{
    'NatGatewayId': 'string',
    'NatGatewayAddresses': [
        {
            'AllocationId': 'string',
            'NetworkInterfaceId': 'string',
            'PrivateIp': 'string',
            'PublicIp': 'string',
            'AssociationId': 'string',
            'IsPrimary': True|False,
            'FailureMessage': 'string',
            'Status': 'assigning'|'unassigning'|'associating'|'disassociating'|'succeeded'|'failed'
        },
    ]
}

Response Structure

  • (dict) --

    • NatGatewayId (string) --

      The NAT gateway ID.

    • NatGatewayAddresses (list) --

      The IP addresses.

      • (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.

CreateNatGateway (updated) Link ¶
Changes (request, response)
Request
{'SecondaryAllocationIds': ['string'],
 'SecondaryPrivateIpAddressCount': 'integer',
 'SecondaryPrivateIpAddresses': ['string']}
Response
{'NatGateway': {'NatGatewayAddresses': {'AssociationId': 'string',
                                        'FailureMessage': 'string',
                                        'IsPrimary': 'boolean',
                                        'Status': 'assigning | unassigning | '
                                                  'associating | '
                                                  'disassociating | succeeded '
                                                  '| failed'}}}

Creates a NAT gateway in the specified subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. You can create either a public NAT gateway or a private NAT gateway.

With a public NAT gateway, internet-bound traffic from a private subnet can be routed to the NAT gateway, so that instances in a private subnet can connect to the internet.

With a private NAT gateway, private communication is routed across VPCs and on-premises networks through a transit gateway or virtual private gateway. Common use cases include running large workloads behind a small pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and communicating between overlapping networks.

For more information, see NAT gateways in the Amazon Virtual Private Cloud User Guide.

See also: AWS API Documentation

Request Syntax

client.create_nat_gateway(
    AllocationId='string',
    ClientToken='string',
    DryRun=True|False,
    SubnetId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'ipam-resource-discovery'|'ipam-resource-discovery-association',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ConnectivityType='private'|'public',
    PrivateIpAddress='string',
    SecondaryAllocationIds=[
        'string',
    ],
    SecondaryPrivateIpAddresses=[
        'string',
    ],
    SecondaryPrivateIpAddressCount=123
)
type AllocationId:

string

param AllocationId:

[Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

type ClientToken:

string

param ClientToken:

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

Constraint: Maximum 64 ASCII characters.

This field is autopopulated if not provided.

type DryRun:

boolean

param 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 SubnetId:

string

param SubnetId:

[REQUIRED]

The ID of the subnet in which to create the NAT gateway.

type TagSpecifications:

list

param TagSpecifications:

The tags to assign to the NAT gateway.

  • (dict) --

    The tags to apply to a resource when the resource is being created.

    • ResourceType (string) --

      The type of resource to tag on creation.

    • Tags (list) --

      The tags to apply to the resource.

      • (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.

type ConnectivityType:

string

param ConnectivityType:

Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.

type PrivateIpAddress:

string

param PrivateIpAddress:

The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address will be automatically assigned.

type SecondaryAllocationIds:

list

param SecondaryAllocationIds:

Secondary EIP allocation IDs. For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide.

  • (string) --

type SecondaryPrivateIpAddresses:

list

param SecondaryPrivateIpAddresses:

Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide.

  • (string) --

type SecondaryPrivateIpAddressCount:

integer

param SecondaryPrivateIpAddressCount:

[Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide.

rtype:

dict

returns:

Response Syntax

{
    'ClientToken': 'string',
    'NatGateway': {
        '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) --

    • ClientToken (string) --

      Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

    • NatGateway (dict) --

      Information about the 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.

      • 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 failureCode and failureMessage fields 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.

DescribeNatGateways (updated) Link ¶
Changes (response)
{'NatGateways': {'NatGatewayAddresses': {'AssociationId': 'string',
                                         'FailureMessage': 'string',
                                         'IsPrimary': 'boolean',
                                         'Status': 'assigning | unassigning | '
                                                   'associating | '
                                                   'disassociating | succeeded '
                                                   '| failed'}}}

Describes one or more of your NAT gateways.

See also: AWS API Documentation

Request Syntax

client.describe_nat_gateways(
    DryRun=True|False,
    Filter=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NatGatewayIds=[
        'string',
    ],
    NextToken='string'
)
type DryRun:

boolean

param 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 Filter:

list

param Filter:

One or more 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 Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for 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) --

type MaxResults:

integer

param MaxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

type NatGatewayIds:

list

param NatGatewayIds:

One or more NAT gateway IDs.

  • (string) --

type NextToken:

string

param NextToken:

The token for the next page of results.

rtype:

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'
        },
    ],
    'NextToken': 'string'
}

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.

        • 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 failureCode and failureMessage fields 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.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.