Amazon EC2 Ec2 Nat Gateway API
The Ec2 Nat Gateway API from Amazon EC2 — 3 operation(s) for ec2 nat gateway.
The Ec2 Nat Gateway API from Amazon EC2 — 3 operation(s) for ec2 nat gateway.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/amazon-ec2:amazon-ec2-nat-gateway-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.1.0
info:
title: Amazon Elastic Compute Cloud Nat Gateway API
version: '2016-11-15'
description: Generated from AWS's published Smithy model for Amazon Elastic Compute Cloud. 3 operation(s).
contact:
name: Amazon Web Services
url: https://aws.amazon.com/contact-us/
license:
name: Apache 2.0
identifier: Apache-2.0
url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://ec2.{region}.amazonaws.com
variables:
region:
default: us-east-1
security:
- sigv4: []
paths:
/?Action=CreateNatGateway:
post:
operationId: CreateNatGateway
summary: Create Nat Gateway
description: 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
VPC User Guide. When you create a public NAT gateway and assign it an EIP or secondary EIPs, the network border group
of the EIPs must match the network border group of the Availability Zone (AZ) that the public NAT gateway is in. If
it's not the same, the NAT gateway will fail to launch. You can see the network border group for the subnet's AZ by
viewing the details of the subnet. Similarl
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/CreateNatGatewayResult'
example:
NatGateway:
NatGatewayAddresses:
- AllocationId: eipalloc-37fc1a52
VpcId: vpc-1122aabb
State: pending
NatGatewayId: nat-08d48af2a8e83edfd
SubnetId: subnet-1a2b3c4d
CreateTime: '2015-12-17T12:45:26.732Z'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: CreateNatGateway
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/CreateNatGatewayRequest'
example:
SubnetId: subnet-1a2b3c4d
AllocationId: eipalloc-37fc1a52
tags:
- Nat Gateway
/?Action=DeleteNatGateway:
post:
operationId: DeleteNatGateway
summary: Delete Nat Gateway
description: Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates its Elastic IP address,
but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes
in your route tables.
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/DeleteNatGatewayResult'
example:
NatGatewayId: nat-04ae55e711cec5680
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: DeleteNatGateway
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/DeleteNatGatewayRequest'
example:
NatGatewayId: nat-04ae55e711cec5680
tags:
- Nat Gateway
/?Action=DescribeNatGateways:
post:
operationId: DescribeNatGateways
summary: Describe Nat Gateways
description: Describes your NAT gateways. The default is to describe all your NAT gateways. Alternatively, you can specify
specific NAT gateway IDs or filter the results to include only the NAT gateways that match specific criteria.
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/DescribeNatGatewaysResult'
example:
NatGateways:
- NatGatewayAddresses:
- PublicIp: 198.11.222.333
NetworkInterfaceId: eni-9dec76cd
AllocationId: eipalloc-89c620ec
PrivateIp: 10.0.0.149
VpcId: vpc-1a2b3c4d
State: available
NatGatewayId: nat-05dba92075d71c408
SubnetId: subnet-847e4dc2
CreateTime: '2015-12-01T12:26:55.983Z'
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
allOf:
- type: object
required:
- Action
- Version
properties:
Action:
type: string
const: DescribeNatGateways
Version:
type: string
const: '2016-11-15'
- $ref: '#/components/schemas/DescribeNatGatewaysRequest'
example:
Filter:
- Name: vpc-id
Values:
- vpc-1a2b3c4d
tags:
- Nat Gateway
components:
securitySchemes:
sigv4:
type: apiKey
in: header
name: Authorization
description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
x-aws-sigv4:
signingName: ec2
schemas:
AvailabilityZoneAddress:
type: object
properties:
AvailabilityZone:
type: string
description: 'For regional NAT gateways only: The Availability Zone where this specific NAT gateway configuration
will be active. Each AZ in a regional NAT gateway has its own configuration to handle outbound NAT traffic from
that AZ. A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in
your VPC, providing redundancy, scalability and availability across all the AZs in a Region.'
AvailabilityZoneId:
type: string
description: 'For regional NAT gateways only: The ID of the Availability Zone where this specific NAT gateway configuration
will be active. Each AZ in a regional NAT gateway has its own configuration to handle outbound NAT traffic from
that AZ. Use this instead of AvailabilityZone for consistent identification of AZs across Amazon Web Services
Regions. A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in
your VPC, providing redundancy, scalability and availability across all the AZs in a Region.'
AllocationIds:
type: array
items:
type: string
description: The allocation IDs of the Elastic IP addresses (EIPs) to be used for handling outbound NAT traffic
in this specific Availability Zone.
CreateNatGatewayRequest:
type: object
properties:
AvailabilityMode:
type: string
enum:
- zonal
- regional
description: Specifies whether to create a zonal (single-AZ) or regional (multi-AZ) NAT gateway. Defaults to zonal.
A zonal NAT gateway is a NAT Gateway that provides redundancy and scalability within a single availability zone.
A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC,
providing redundancy, scalability and availability across all the AZs in a Region. For more information, see Regional
NAT gateways for automatic multi-AZ expansion in the Amazon VPC User Guide.
AllocationId:
type: string
description: '[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.'
ClientToken:
type: string
description: 'Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
information, see Ensuring idempotency. Constraint: Maximum 64 ASCII characters.'
DryRun:
type: boolean
description: 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.
SubnetId:
type: string
description: The ID of the subnet in which to create the NAT gateway.
VpcId:
type: string
description: The ID of the VPC where you want to create a regional NAT gateway.
AvailabilityZoneAddresses:
type: array
items:
$ref: '#/components/schemas/AvailabilityZoneAddress'
description: 'For regional NAT gateways only: Specifies which Availability Zones you want the NAT gateway to support
and the Elastic IP addresses (EIPs) to use in each AZ. The regional NAT gateway uses these EIPs to handle outbound
NAT traffic from their respective AZs. If not specified, the NAT gateway will automatically expand to new AZs
and associate EIPs upon detection of an elastic network interface. If you specify this parameter, auto-expansion
is disabled and you must manually manage AZ coverage. A regional NAT gateway is a single NAT Gateway that works
across multiple availability zones (AZs) in you'
TagSpecifications:
type: array
items:
$ref: '#/components/schemas/TagSpecification'
description: The tags to assign to the NAT gateway.
ConnectivityType:
type: string
enum:
- private
- public
description: Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.
PrivateIpAddress:
type: string
description: 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.
SecondaryAllocationIds:
type: array
items:
type: string
description: Secondary EIP allocation IDs. For more information, see Create a NAT gateway in the Amazon VPC User
Guide.
SecondaryPrivateIpAddresses:
type: array
items:
type: string
description: Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT
gateway in the Amazon VPC User Guide.
SecondaryPrivateIpAddressCount:
type: integer
description: '[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 VPC User Guide.'
CreateNatGatewayResult:
type: object
properties:
ClientToken:
type: string
description: Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client
token was provided in the request.
NatGateway:
$ref: '#/components/schemas/NatGateway'
DeleteNatGatewayRequest:
type: object
properties:
DryRun:
type: boolean
description: 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.
NatGatewayId:
type: string
description: The ID of the NAT gateway.
required:
- NatGatewayId
DeleteNatGatewayResult:
type: object
properties:
NatGatewayId:
type: string
description: The ID of the NAT gateway.
DescribeNatGatewaysRequest:
type: object
properties:
DryRun:
type: boolean
description: 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.
Filter:
type: array
items:
$ref: '#/components/schemas/Filter'
description: 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 - 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 res
MaxResults:
type: integer
description: The maximum number of items to return for this request. To get the next page of items, make another
request with the token returned in the output. For more information, see Pagination.
NatGatewayIds:
type: array
items:
type: string
description: The IDs of the NAT gateways.
NextToken:
type: string
description: The token returned from a previous paginated request. Pagination continues from the end of the items
returned by the previous request.
DescribeNatGatewaysResult:
type: object
properties:
NatGateways:
type: array
items:
$ref: '#/components/schemas/NatGateway'
description: Information about the NAT gateways.
NextToken:
type: string
description: The token to include in another request to get the next page of items. This value is null when there
are no more items to return.
Filter:
type: object
properties:
Name:
type: string
description: The name of the filter. Filter names are case-sensitive.
Values:
type: array
items:
type: string
description: 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.
NatGateway:
type: object
properties:
CreateTime:
type: string
format: date-time
description: The date and time the NAT gateway was created.
DeleteTime:
type: string
format: date-time
description: The date and time the NAT gateway was deleted, if applicable.
FailureCode:
type: string
description: 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:
type: string
description: '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 internall'
NatGatewayAddresses:
type: array
items:
$ref: '#/components/schemas/NatGatewayAddress'
description: Information about the IP addresses and network interface associated with the NAT gateway.
NatGatewayId:
type: string
description: The ID of the NAT gateway.
ProvisionedBandwidth:
$ref: '#/components/schemas/ProvisionedBandwidth'
State:
type: string
enum:
- pending
- failed
- available
- deleting
- deleted
description: '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:
type: string
description: The ID of the subnet in which the NAT gateway is located.
VpcId:
type: string
description: The ID of the VPC in which the NAT gateway is located.
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: The tags for the NAT gateway.
ConnectivityType:
type: string
enum:
- private
- public
description: Indicates whether the NAT gateway supports public or private connectivity.
AvailabilityMode:
type: string
enum:
- zonal
- regional
description: Indicates whether this is a zonal (single-AZ) or regional (multi-AZ) NAT gateway. A zonal NAT gateway
is a NAT Gateway that provides redundancy and scalability within a single availability zone. A regional NAT gateway
is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy,
scalability and availability across all the AZs in a Region. For more information, see Regional NAT gateways for
automatic multi-AZ expansion in the Amazon VPC User Guide.
AutoScalingIps:
type: string
enum:
- enabled
- disabled
description: 'For regional NAT gateways only: Indicates whether Amazon Web Services automatically allocates additional
Elastic IP addresses (EIPs) in an AZ when the NAT gateway needs more ports due to increased concurrent connections
to a single destination from that AZ. For more information, see Regional NAT gateways for automatic multi-AZ expansion
in the Amazon VPC User Guide.'
AutoProvisionZones:
type: string
enum:
- enabled
- disabled
description: 'For regional NAT gateways only: Indicates whether Amazon Web Services automatically manages AZ coverage.
When enabled, the NAT gateway associates EIPs in all AZs where your VPC has subnets to handle outbound NAT traffic,
expands to new AZs when you create subnets there, and retracts from AZs where you''ve removed all subnets. When
disabled, you must manually manage which AZs the NAT gateway supports and their corresponding EIPs. A regional
NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing
redundancy, scalability and availability acros'
AttachedAppliances:
type: array
items:
$ref: '#/components/schemas/NatGatewayAttachedAppliance'
description: The proxy appliances attached to the NAT Gateway for filtering and inspecting traffic to prevent data
exfiltration.
RouteTableId:
type: string
description: For regional NAT gateways only, this is the ID of the NAT gateway.
NatGatewayAddress:
type: object
properties:
AllocationId:
type: string
description: '[Public NAT gateway only] The allocation ID of the Elastic IP address that''s associated with the
NAT gateway.'
NetworkInterfaceId:
type: string
description: The ID of the network interface associated with the NAT gateway.
PrivateIp:
type: string
description: The private IP address associated with the NAT gateway.
PublicIp:
type: string
description: '[Public NAT gateway only] The Elastic IP address associated with the NAT gateway.'
AssociationId:
type: string
description: '[Public NAT gateway only] The association ID of the Elastic IP address that''s associated with the
NAT gateway.'
IsPrimary:
type: boolean
description: Defines if the IP address is the primary address.
FailureMessage:
type: string
description: The address failure message.
Status:
type: string
enum:
- assigning
- unassigning
- associating
- disassociating
- succeeded
- failed
description: The address status.
AvailabilityZone:
type: string
description: The Availability Zone where this Elastic IP address (EIP) is being used to handle outbound NAT traffic.
AvailabilityZoneId:
type: string
description: The ID of the Availability Zone where this Elastic IP address (EIP) is being used to handle outbound
NAT traffic. Use this instead of AvailabilityZone for consistent identification of AZs across Amazon Web Services
Regions.
NatGatewayAttachedAppliance:
type: object
properties:
Type:
type: string
enum:
- network-firewall-proxy
description: The type of appliance attached to the NAT Gateway. For network firewall proxy functionality, this will
be "network-firewall-proxy".
ApplianceArn:
type: string
description: The Amazon Resource Name (ARN) of the attached appliance, identifying the specific proxy or security
appliance resource.
VpcEndpointId:
type: string
description: The VPC endpoint ID used to route traffic from application VPCs to the proxy for inspection and filtering.
AttachmentState:
type: string
enum:
- attaching
- attached
- detaching
- detached
- attach-failed
- detach-failed
description: The current attachment state of the appliance.
ModificationState:
type: string
enum:
- modifying
- completed
- failed
description: The current modification state of the appliance.
FailureCode:
type: string
description: The failure code if the appliance attachment or modification operation failed.
FailureMessage:
type: string
description: A descriptive message explaining the failure if the appliance attachment or modification operation
failed.
ProvisionedBandwidth:
type: object
properties:
ProvisionTime:
type: string
format: date-time
description: Reserved.
Provisioned:
type: string
description: Reserved.
RequestTime:
type: string
format: date-time
description: Reserved.
Requested:
type: string
description: Reserved.
Status:
type: string
description: Reserved.
Tag:
type: object
properties:
Key:
type: string
description: '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:
type: string
description: 'The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode
characters.'
TagSpecification:
type: object
properties:
ResourceType:
type: string
enum:
- capacity-reservation
- client-vpn-endpoint
- customer-gateway
- carrier-gateway
- coip-pool
- declarative-policies-report
- dedicated-host
- dhcp-options
- egress-only-internet-gateway
- elastic-ip
- elastic-gpu
- export-image-task
- export-instance-task
- fleet
- fpga-image
- host-reservation
- image
- image-usage-report
- 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
- outpost-lag
- placement-group
- prefix-list
- replace-root-volume-task
- reserved-instances
- route-table
- security-group
- security-group-rule
- service-link-virtual-interface
- 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-metering-policy
- 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
- vpc-encryption-control
- route-server
- route-server-endpoint
- route-server-peer
- ipam-resource-discovery
- ipam-resource-discovery-association
- instance-connect-endpoint
- verified-access-endpoint-target
- ipam-external-resource-verification-token
- capacity-block
- mac-modification-task
- ipam-prefix-list-resolver
- ipam-policy
- ipam-prefix-list-resolver-target
- ipam-internet-registry-association
- secondary-interface
- secondary-network
- secondary-subnet
- capacity-manager-data-export
- vpn-concentrator
- ipam-pool-allocation
- capacity-reservation-cancellation-quote
- application-status-check
- capacity-reservation-modification-quote
description: The type of resource to tag on creation.
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
description: The tags to apply to the resource.
x-provenance:
method: harvested
publisher: Amazon Web Services
source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/ec2/service/2016-11-15/ec2-2016-11-15.json
note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)