Modifies the specification of a NAT Gateway.

The NAT Gateway is billed according to the largest specification used in a day.

A NAT Gateway specification determines the performance metrics (Max Connections and Connections Per Second) of SNAT, but does not relate to data throughput.

The relationship between a NAT Gateway specification and its corresponding performance metrics is as follows:

Specification Max Connections Connections Per Second (CPS)
Small 10 thousand 1 thousand
Medium 50,000 5,000
Large 200,000 10,000

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK example codes, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes ModifyNatGatewaySpec

The action to perform. Valid value:

ModifyNatGatewaySpec

NatGatewayId String Yes ngw-bp1uewa15k4iy5770ya89

The ID of the NAT Gateway.

RegionId String Yes cn-hangzhou

The region to which the NAT Gateway belongs.

To query the region ID, call DescribeRegions.

Spec String Yes Small
The specification of the NAT Gateway. Valid values:
  • Small(default value): small

  • Middle: medium

  • Large: large

ClientToken String No SHA234js121223xxxxx

A client token used to guarantee the idempotence of requests.

This parameter value is generated by the client and must be unique. It cannot exceed 64 ASCII characters.

Response parameters

Parameter Type Example value Description
RequestId String DBD4E4A2-786E-4BD2-8EB6-107FFC2B5B7D The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=ModifyNatGatewaySpec
&NatGatewayId=ngw-bp1uewa15k4iy5770ya89
&RegionId=cn-hangzhou
&Spec=Small
&<CommonParameters>
Response example
  • XML format

    <ModifyNatGatewaySpecResponse>
      <RequestId>DBD4E4A2-786E-4BD2-8EB6-107FFC2B5B7D</RequestId>
    </ModifyNatGatewaySpecResponse>
    
  • JSON format

    {
    	"RequestId":"DBD4E4A2-786E-4BD2-8EB6-107FFC2B5B7D"
    }

Error codes

HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified region ID 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 specification you entered is the same as the current specification.
400 InvalidParameter.Spec.ValueNotSupported The specified Spec is not valid. The specification is invalid.

See common error codes