POST /#Action=CreateNatGateway
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.
Servers
- https://ec2.{region}.amazonaws.com
- https://ec2.amazonaws.com
- https://ec2.{region}.amazonaws.com.cn
Request headers
Name | Type | Required | Description |
---|---|---|---|
X-Amz-Content-Sha256 |
String | No | |
X-Amz-Credential |
String | No | |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "text/xml" |
X-Amz-Date |
String | No | |
X-Amz-Algorithm |
String | No | |
X-Amz-SignedHeaders |
String | No | |
X-Amz-Security-Token |
String | No | |
X-Amz-Signature |
String | No |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
Version |
String | Yes |
Possible values:
|
Action |
String | Yes |
Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
ConnectivityType |
String | No |
Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity. Possible values:
|
ClientToken |
String | No |
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. |
TagSpecifications[] |
Array | No |
The tags to assign to the NAT gateway. |
SecondaryPrivateIpAddressCount |
Integer | No |
[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. |
PrivateIpAddress |
String | No |
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. |
SecondaryPrivateIpAddresses[] |
Array | No |
Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide. |
AllocationId |
String | No |
[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. |
SecondaryAllocationIds[] |
Array | No |
Secondary EIP allocation IDs. For more information about secondary addresses, see Create a NAT gateway in the Amazon Virtual Private Cloud User Guide. |
DryRun |
Boolean | No |
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 |
SubnetId |
String | Yes |
The ID of the subnet in which to create the NAT gateway. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.