Upgrades a subscription Internet NAT gateway.
You cannot call this operation to downgrade a subscription Internet NAT gateway. You can downgrade a subscription Internet NAT gateway only in the console.
When you call this operation to upgrade a subscription Internet NAT gateway, an order is generated. After you complete the payment in the order center, the Internet NAT gateway is upgraded.
ModifyNatGatewaySpec is an asynchronous operation. After you make a request, the ID of the request is returned but the Internet NAT gateway is not upgraded. The system upgrades the NAT gateway in the background. You can call the DescribeNatGateways operation to query the status of an Internet NAT gateway. - If an Internet NAT gateway is in the Modifying state, the NAT gateway is being upgraded. In this case, you can only query the NAT gateway but cannot perform other operations.
- If an Internet NAT gateway is in the Available state, the Internet NAT gateway is upgraded.
You cannot repeatedly call the ModifyNatGatewaySpec operation to resize a pay-by-specification NAT gateway.
Internet NAT gateways are available in different sizes. The size of an Internet NAT gateway determines the SNAT performance, which includes the maximum number of connections and the number of new connections per second. However, the size of a NAT gateway does not affect the data throughput. The following table describes the correlations between different sizes of Internet NAT gateways and SNAT performance metrics.
|Maximum number of connections
|Number of new connections per second
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 Resourcesis 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.
The ID of the region where the Internet NAT gateway is deployed.
You can call the DescribeRegions operation to query the most recent region list.
The ID of the Internet NAT gateway that you want to upgrade.
The size of the Internet NAT gateway. Valid values:
Specifies whether to automatically complete the payment.
The client token that is used to ensure the idempotence of the request.
You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters.
Sample success responses
|HTTP status code
|The specified Spec is same with now.
|The specified gateway size is the same as the current one.
|The specified Spec is not valid.
|The specification is invalid.
|The operation failed.
|Query price failed when create order.
|Failed to query the price when creating the order.
|The specified RegionId does not exist in our records.
|The specified region ID does not exist.
|The specified NatGatewayId does not exist in our records.
|The value of the NatGatewayId parameter is invalid.
|The spec of payByLcu nat is unsupported to modify.
|Pay-as-you-go NAT gateways cannot be resized.
|You are not authorized to modify nat spec to special spec.
|Normal NAT is not allowed to change to special spec, only enhanced nat allowed.
|The Zone have no available resource.
|No resources are available in the region.
For a list of error codes, visit the Service error codes.
|Summary of changes
|The Error code has changed
|The Error code has changed