Creates a quality of service (QoS) entry for an Internet NAT gateway.
Usage notes
Before you call this operation to create a QoS entry for an Internet NAT gateway, make sure that the QoS feature is enabled for the Internet NAT gateway. For more information about how to enable the QoS feature for a NAT gateway, see EnableNatGatewayQosEntry.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateNatGatewaySessionQosEntry |
The operation that you want to perform. Set the value to CreateNatGatewaySessionQosEntry. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the NAT gateway. You can call the DescribeRegions operation to query the most recent region list. |
NatGatewayId | String | Yes | ngw-112za33e4**** |
The ID of the NAT gateway. |
EcsIp | String | Yes | 192.168.1.6 |
The IP address of the ECS instance to which you want to apply the QoS entry. Note The IP address must fall into the following RFC-defined private CIDR blocks: 192.168.0.0/16,
172.16.0.0/12, and 10.0.0.0/8.
|
QosEntryName | String | Yes | nametest |
The name of the QoS entry. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. |
QosEntryDesc | String | Yes | Description |
The description of the QoS entry. The description must be 2 to 256 characters in length. It must start with a letter
but cannot start with |
QosTableId | String | Yes | qtb-gw8uztpwp2eiqz4un**** |
The ID of the table to which the QoS entry belongs. |
Quota | Long | Yes | 5 |
The maximum number of concurrent connections allowed for the ECS instance to which you want to apply the QoS entry.
|
EstablishRate | Long | Yes | 10 |
The maximum number of new connections per second allowed for the ECS instance to which you want to apply the QoS entry.
|
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
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. Note If you do not specify this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B45 |
The ID of the request. |
QosEntryId | String | qos-gw8rrbfsqmq5zdwb8**** |
The ID of the QoS entry. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateNatGatewaySessionQosEntry
&RegionId=cn-hangzhou
&NatGatewayId=ngw-112za33e4****
&EcsIp=192.168.1.6
&QosEntryName=nametest
&QosEntryDesc=Description
&QosTableId=qtb-gw8uztpwp2eiqz4un****
&Quota=5
&EstablishRate=10
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateNatGatewaySessionQosEntryResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
<QosEntryId>qos-gw8rrbfsqmq5zdwb8****</QosEntryId>
</CreateNatGatewaySessionQosEntryResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
"QosEntryId" : "qos-gw8rrbfsqmq5zdwb8****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidNatGatewayId.NotFound | The NatGatewayId not exist. | The error message returned because the specified NAT gateway ID does not exist. Check whether the value of the NatGatewayId parameter is valid. |
400 | UnsupportedFeature.NatQosEntry | The specified natGateway can not support the qos entry feature. | The error message returned because the NAT gateway does not support the QoS feature. |
400 | ResourceAlreadyExist.NatQosEntry | The specified natGateway qosEntry already exists | The error message returned because the QoS entry already exists. |
For a list of error codes, visit the API Error Center.