Creates a quality of service (QoS) policy.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateQos |
The operation that you want to perform. Set the value to CreateQos. |
| RegionId | String | Yes | cn-shanghai |
The ID of the region where the QoS policy is deployed. |
| QosName | String | Yes | doctest |
The name of the QoS policy. The name must be 2 to 100 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
| QosDescription | String | No | testdesc |
The description of the QoS policy. The description must be 1 to 512 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | AACF5140-783D-48F0-9E4F-E59D716F7D08 |
The ID of the request. |
| QosId | String | rg-acfm2iu4fnc**** |
The ID of the QoS policy. |
| ResourceGroupId | String | qos-oek3r2cmvk7m8q**** |
The ID of the resource group to which the QoS policy belongs. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateQos
&RegionId=cn-shanghai
&QosName=doctest
&QosDescription=testdesc
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateQosResponse>
<RequestId>AACF5140-783D-48F0-9E4F-E59D716F7D08</RequestId>
<QosId>rg-acfm2iu4fnc****</QosId>
<ResourceGroupId>qos-oek3r2cmvk7m8q****</ResourceGroupId>
</CreateQosResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "AACF5140-783D-48F0-9E4F-E59D716F7D08",
"QosId" : "rg-acfm2iu4fnc****",
"ResourceGroupId" : "qos-oek3r2cmvk7m8q****"
}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | QosAmountLimit | No more QoS can be created. You can submit a ticket to increase the quota of QoSes. | The error message returned because the number of QoS policies that you have created has reached the upper limit. Submit a ticket to increase the quota. |
| 400 | MissParameter.RegionId | You must specify RegionId. | The error message returned because the ID (RegionId) of the region is not specified. |
| 400 | MissParameter.Name | You must specify Name. | The error message returned because the name (QosName) of the QoS policy is not specified. |
| 400 | InvalidParameter.Name | The specified Name is invalid. | The error message returned because the specified name (QosName) of the QoS policy is invalid. |
| 400 | InvalidParameter.Description | The specified Description is invalid. | The error message returned because the specified description (QosDescription) of the QoS policy is invalid. |
| 403 | InternalError | An internal server error occurred. | The error message returned because an internal server error has occurred. |
For a list of error codes, visit the API Error Center.