Creates a NAT Gateway in Edge Node Service (ENS).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:CreateNatGateway |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the NAT gateway. The name must be 1 to 128 characters long and cannot start with |
name |
| EnsRegionId |
string |
Yes |
The ID of the ENS edge node. |
cn-suzhou-telecom |
| NetworkId |
string |
Yes |
The ID of the network. |
n-5qj7ykuxmjn7k96l090sp**** |
| VSwitchId |
string |
No |
The ID of the vSwitch. |
vsw-5savh5ngxh8sbj14bu7n**** |
| InstanceType |
string |
No |
The instance type of the NAT gateway. Set the value to enat.default. |
enat.default |
| Tag |
array<object> |
No |
The tags to add to the resource. |
|
|
object |
No |
An array of key-value pairs. |
||
| Key |
string |
No |
The tag key. A resource can have up to 20 tags.
|
team |
| Value |
string |
No |
The tag value. The value can be an empty string or up to 128 characters long. The value cannot start with |
Deep |
| InstanceBillingCycle |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| NatGatewayId |
string |
The ID of the NAT gateway. |
nat-5t7nh1cfm6kxiszlttr38**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"NatGatewayId": "nat-5t7nh1cfm6kxiszlttr38****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ens.interface.error | An error occurred while call the API. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InvalidParameter.RegionNotSupported | The specified EnsRegion does not support this operation. | |
| 400 | InvalidParameter.VSwitchNotFound | The specified VSwitch is not found. | |
| 400 | InvalidParameter.VSwitchNotBelongToNetwork | The specified VSwitch is not bound to the Network | |
| 400 | InvalidParameter.NetworkNotFound | The specified Network is not found. | |
| 400 | InvalidParameter.NetworkNotSupported | The specified Network does not support this operation. | |
| 400 | QuotaExceed.NatGateway | The maximum number of natGateway is reached. | |
| 400 | SaleControl.VerificationFailed | You did not pass the salecontrol verification.Please contact the product. | Failed to pass the sales constraint verification when you create the resource. |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.