Upgrades a standard NAT gateway to an enhanced NAT gateway.
Operation Description
Before you call this operation, take note of the following limits:
-
UpdateNatGatewayNatType is an asynchronous operation. After you send a request to call this operation, the system returns a request ID and the NAT gateway is still being upgraded in the backend. You can call the GetNatGatewayConvertStatus operation to query the upgrade progress of a NAT gateway. For more information, see GetNatGatewayConvertStatus.
- If the NAT gateway is in the processing state, the NAT gateway is being upgraded. You can only query the status of the NAT gateway but cannot perform other operations.
- If the NAT gateway is in the successful state, the NAT gateway is upgraded.
- If the NAT gateway is in the failed state, the system failed to upgrade the NAT gateway.
-
You cannot repeatedly call the UpdateNatGatewayNatType operation for the same VPN gateway within the specified period of time.
-
The billing method and billable items remain the same after the upgrade.
-
It takes about five minutes to upgrade a standard NAT gateway to an enhanced NAT gateway. During the upgrade, transient connection errors may occur once or twice. The service can be recovered by reconnection. You can determine whether to enable automatic reconnection or use manual reconnection based on your business requirements.
-
You can only upgrade standard NAT gateways to enhanced NAT gateways. You are not allowed to downgrade enhanced NAT gateways to standard NAT gateways.
debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:UpdateNatGatewayNatType | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the NAT gateway that you want to upgrade is deployed. You can call the DescribeRegions operation to query the most recent region list. | cn-qingdao |
NatGatewayId | string | Yes | The ID of the standard NAT gateway to be upgraded. | ngw-bp1b0lic8uz4r6vf2**** |
VSwitchId | string | Yes | The vSwitch to which the enhanced Internet NAT gateway belongs. Note
If you do not set this parameter, the system generates an Internet NAT gateway in a random vSwitch of a virtual private cloud (VPC).
| vsw-bp17nszybg8epodke**** |
NatType | string | Yes | The type of Internet NAT gateway. Set the value to Enhanced, which specifies an enhanced Internet NAT gateway. | Enhanced |
DryRun | boolean | No | Specifies whether to only precheck this request. Valid values: true: prechecks the request without upgrading the Internet NAT gateway. The system checks whether your AccessKey pair is valid, whether RAM users are granted required permissions, and whether the required parameters are set. If the request fails to pass the precheck, an error code is returned. If the request passes the precheck, the false: sends the API request. This is the default value. After the request passes the precheck, a 2XX HTTP status code is returned and the Internet NAT gateway is upgraded. | false |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate a value, and you must make sure that each request has a unique token value. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the value of RequestId as the value of ClientToken. The request ID may be different for each request.
| 0c593ea1-3bea-11e9-b96b-88e9fe637760 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | OperationUnsupported.NatConvert | The NAT gateway conversion function is not supported. | The NAT gateway conversion function is not supported. |
400 | NATGW_NOT_EXIST | The specified NAT gateway does not exist. | The specified NAT gateway does not exist. |
400 | OperationFailed.VpcNotExist | The specified VPC does not exist. | The specified VPC does not exist. |
400 | OperationFailed.VswNotExist | The specified VSwitch does not exist. | The specified VSwitch does not exist. |
400 | OperationFailed.NatTypeNotEnhanced | Operation failed because the specified NAT gateway type is not enhanced. | Operation failed because the specified NAT gateway type is not enhanced. |
400 | OperationFailed.NatGwBindWithBandwidthPackage | Operation failed because the NAT gateway is bound to bandwidth packages. | Operation failed because the NAT gateway is bound to bandwidth packages. |
400 | IncorrectStatus.NatGateway | The status of NAT gateway is incorrect. | The status of NAT gateway is incorrect. |
400 | OperationFailed.EipInMiddleStatus | Operation failed because the status of EIP associated with the specified NAT gateway is abnormal. | Operation failed because the status of EIP associated with the specified NAT gateway is abnormal. |
400 | OperationFailed.SnatInMiddleStatus | Operation failed because the status of the SNAT entry of the specified NAT gateway is abnormal. | Operation failed because the status of the SNAT entry of the specified NAT gateway is abnormal. |
400 | OperationFailed.DnatInMiddleStatus | Operation failed because the status of the DNAT entry associated with the NAT gateway is abnormal. | Operation failed because the status of the DNAT entry associated with the NAT gateway is abnormal. |
400 | OperationFailed.NatGwRouteInMiddleStatus | Operation failed because the status of the route entry associated with the NAT gateway is abnormal. | Operation failed because the status of the route entry associated with the NAT gateway is abnormal. |
400 | OperationFailed.EnhancedInventoryNotEnough | The enhanced NAT gateway inventory is insufficient in the specified zone. | The stock of enhanced NAT gateways is insufficient in the specified zone. |
400 | OperationFailed.EnhancedUserIsUnAuthorized | Operation failed because the user is not authorized to create an enhanced NAT gateway. | Operation failed because the user is not authorized to create an enhanced NAT gateway. |
400 | OperationFailed.EnhancedRegion | Operation failed because enhanced NAT gateways are not available for sale in the specified region. | Operation failed because enhanced NAT gateways are not available for sale in the specified region. |
400 | OperationFailed.EnhancedQuotaExceed | Operation failed because the maximum number of enhanced NAT gateways in the same VPC is exceeded. | Operation failed because the maximum number of enhanced NAT gateways in the same VPC is exceeded. |
400 | InvalidBandwidthPackageIdNumber.NotSupported | The number of BandwidthPackageIds exceeds the limit. | The number of BandwidthPackageIds exceeds the limit. |
400 | OperationFailed.VswNotBelongToVpc | Operation failed because the specified VSwitch is not bound to the same VPC with NAT gateway. | The vSwitch and NAT gateway do not belong to the same VPC. |
400 | OperationUnsupported.VpcAttachedCen | Operation failed because the VPC is attached to CEN. | Operation failed because the VPC is attached to CEN. |
400 | OperationUnsupported.RouterInterfaceExist | Operation failed because the VPC has a router interface. | The VPC has a router interface. |
400 | OperationFailed.VRouterNotExist | Operation failed because the VRouter does not exist. | Operation failed because the VRouter does not exist. |
400 | OperationFailed.SnatQuotaExceed | Operation failed because the maximum number of SNAT entry is exceeded. | Operation failed because the maximum number of SNAT entry is exceeded. |
400 | OperationFailed.DnatQuotaExceed | Operation failed because the maximum number of forward entry is exceeded. | Operation failed because the maximum number of forward entry is exceeded. |
400 | OperationFailed.VswBindedRouteTable | The operation failed because a custom route table that contains subnet routes is associated with the specified VSwitch. | The specified vSwitch is associated with a subnet route table. |
400 | OperationFailed.VswBindedAcl | The operation failed because a network ACL is associated with the specified VSwitch. | The specified vSwitch is associated with a network ACL. |
400 | Forbidden.Convert | User does not have permission to operate. | - |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2023-03-01 | The error codes of the API operation change. | see changesets | ||||||
|