CreateNatGateway
This API has been deprecated. We recommend migrating to Vpc(2016-04-28) - CreateNatGateway for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateNatGateway |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
|
|
| VpcId |
string |
Yes |
|
|
| Name |
string |
No |
The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character but cannot start with |
|
| Description |
string |
No |
The description must be 2 to 256 characters in length. It must start with a letter or a Chinese character but cannot start with |
|
| ClientToken |
string |
No |
This token is client-generated and must be unique for each request. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
|
| BandwidthPackage |
array<object> |
Yes |
|
|
|
object |
No |
|
||
| Bandwidth |
integer |
No |
|
|
| Zone |
string |
No |
|
|
| IpCount |
integer |
No |
|
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|
||
| NatGatewayId |
string |
|
|
| RequestId |
string |
|
|
| ForwardTableIds |
object |
|
|
| ForwardTableId |
array |
|
|
|
string |
|
||
| BandwidthPackageIds |
object |
|
|
| BandwidthPackageId |
array |
|
|
|
string |
|
Examples
Success response
JSON format
{
"NatGatewayId": "",
"RequestId": "",
"ForwardTableIds": {
"ForwardTableId": [
""
]
},
"BandwidthPackageIds": {
"BandwidthPackageId": [
""
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidVPCStatus | vpc incorrect status. | The specified VPC state is invalid. |
| 400 | InvalidNatGatewayName.MalFormed | NatGateway name is not valid. | The specified NAT gateway name is invalid. |
| 400 | InvalidNatGatewayDescription.MalFormed | NatGateway description is not valid. | The specified NAT gateway description is invalid. |
| 400 | MissingParameter.BandwidthPackage | only support one BandwidthPackage be created with NatGateway. | |
| 400 | OperationDenied | The user cannot allow to create natgw, please call PD to authorize | |
| 400 | RouterEntryConflict.Duplicated | A route entry already exists, which CIDR is '0.0.0.0/0' | |
| 400 | MissingParameter | Miss mandatory parameter. | Required parameters must be specified. |
| 400 | QuotaExceeded.BandwidthPackageIps | The specified ipCount exceeded quota. | The specified number of IP addresses exceeds the upper limit. |
| 400 | AllocateIpFailed | Alloc bandwidthPackage ips failed, maybe no available ip. | |
| 400 | ParameterIllegal | ipCount,bandwidth parameter invalid | |
| 400 | ZONE_NO_AVAILABLE_IP | The Zone have no available ip. | No IP addresses are available in the specified zone. |
| 400 | InvalidNatGatewayId.NotFound | The NatGatewayId not exist. | |
| 400 | InvalidParameter.Spec.ValueNotSupported | The specified Spec is not valid. | |
| 400 | COMMODITY.INVALID_COMPONENT | The instance component is invalid. | |
| 400 | OperationUnsupported.MultiNatGateway | More than one natGateway per vpc is unsupported. | |
| 400 | VswitchStatusError | The VSwitch is creating . | |
| 400 | Forbidden.CheckEntryRuleQuota | Route entry quota rule check error. | An error occurred when the system was checking the quota of route entries. |
| 400 | OperationFailed.UnpaidBillsExist | The account has unpaid bills. Please pay your overdue bill first. | |
| 400 | IncorrectStatus.RouteEntry | Specified routeEntry status error. | |
| 400 | IncorrectStatus.RouteTableStatus | %s | |
| 400 | TaskConflict | The operation is too frequent, please wait a moment and try again. | |
| 400 | OperationFailed.TokenVerfiy | Token verify failed. | |
| 400 | IllegalParam.Name | The specified Name is invalid, shorter than 2 characters. | |
| 500 | OrderError.NatGateway | The Account failed to create order. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified RegionId parameter does not exist. Check whether the service is available in the specified region. |
| 404 | InvalidVpcId.NotFound | Specified value of VpcId is not found in our record. | The specified VPC ID does not exist. |
| 404 | InvalidZoneId.NotFound | Specified value of ZoneId is not exists. | The specified zone ID does not exist. |
| 404 | VPC_ONLY_CAN_CREATE_ONE_NAT_GATEWAY | NatGateway in one vpc support only one. | |
| 404 | OperationFailed.CrateEntryTimeOut | Operation failed because create custom routeEntry timeout. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.