Modifies the specification of a NAT Gateway.

API description

NAT Gateway comes in different specifications. The specification of a NAT Gateway determines the performance metrics (Max Connections and Connections Per Second) of SNAT, but does not relate to data throughput.

The relationship between the NAT Gateway specification and SNAT performance is as follows:


Max Connections

Connections Per Second (CPS)










Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String  Yes ModifyNatGatewaySpec

The name of this action. Value: ModifyNatGatewaySpec

NatGatewayId String  Yes ngw-bp1uewa15k4iy5770****

The ID of the NAT Gateway.

RegionId String Yes cn-hangzhou

The ID of the region to which the NAT Gateway belongs.

Spec String  Yes Small

The specification of the NAT Gateway. Valid values:

  • Small
  • Middle
  • Large
ClientToken String No SHA234js121223xxxxx

The client token that guarantees the idempotence of the request.

The value of this parameter is generated by the client. The value is unique among different requests and is 1 to 64 ASCII characters in length.

For more information, see How to guarantee the idempotence?

Response parameters

Parameter Type Example value Description
RequestId String DBD4E4A2-786E-4BD2-8EB6-107FFC2B5B7D

The ID of the request.


Request example
&<Common request parameters>

Response example

XML format


JSON format



HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified RegionId does not exist.
404 InvalidNatGatewayId.NotFound The specified NatGatewayId does not exist in our records. The specified NatGatewayId does not exist.
400 NATGW_MODIFY_SPEC_SAME The specified Spec is same with now. The specified specification is the same as the current one.
400 InvalidParameter.Spec.ValueNotSupported The specified Spec is not valid. The specification is invalid.

For a list of error codes, visit the API Error Center.