You can call this operation to modify a rule that contains 5-tuples in a specific quality of service (QoS) policy.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | ModifyQosPolicy |
The operation that you want to perform. Set the value to ModifyQosPolicy. |
QosId | String | Yes | qos-djhgg*********** |
The ID of the QoS policy. |
QosPolicyId | String | Yes | qospy-427m9fo6wkh********* |
The ID of the 5-tuple in the QoS rule. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the QoS policy is deployed. |
Priority | Integer | No | 3 |
The priority of the QoS rule. A smaller value represents a higher priority. If rules are assigned the same priority, the one applied the earliest prevails. Valid values: 1 to 7. |
SourceCidr | String | No | 10.XX.XX.0/24 |
The source CIDR block. |
DestCidr | String | No | 10.XX.XX.0/20 |
The destination CIDR block. |
IpProtocol | String | No | TCP |
The transport layer protocol. |
SourcePortRange | String | No | 80/80 |
The range of source ports. |
DestPortRange | String | No | 80/80 |
The range of destination ports. |
StartTime | String | No | 2019-07-14T16:41:33+0800 |
The time when the QoS rule takes effect. |
EndTime | String | No | 2019-09-14T16:41:33+0800 |
The time when the QoS rule expires. |
Description | String | No | docdesc |
The description of the QoS rule. |
Name | String | No | doctest |
The name of the QoS rule. The name must be 2 to 100 characters in length, and can contain digits, hyphens (-), and underscores (_). It must start with a letter or Chinese character. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 551CD836-9E46-4F2C-A167-B4363180A647 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ModifyQosPolicy
&QosId=qos-djhgg***********
&QosPolicyId=qospy-427m9fo6wkh*********
&RegionId=cn-hangzhou
&<Common request parameter>
Sample success responses
XML
format
<ModifyQosPolicyResponse>
<RequestId>551CD836-9E46-4F2C-A167-B4363180A647</RequestId>
</ModifyQosPolicyResponse>
JSON
format
{
"RequestId":"551CD836-9E46-4F2C-A167-B4363180A647"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | MissParameter.RegionId | You must specify RegionId. | The error message returned because the ID (RegionId) of the region is not specified. |
400 | MissParameter.QosId | You must specify QosId. | The error message returned because the ID (QosId) of the QoS policy is not specified. |
400 | MissParameter.QosPolicyId | You must specify QosPolicyId. | The error message returned because the ID (QosPolicyId) of the QoS rule is not specified. |
400 | InvalidParameter.Description | The specified Description is invalid. | The error message returned because the specified description (Description) of the QoS rule is invalid. |
400 | InvalidParameter.Priority | The specified Priority is invalid. | The error message returned because the specified priority (Priority) of the QoS rule is invalid. |
400 | InvalidParameter.SourcePortRange | The specified SourcePortRange is invalid. | The error message returned because the specified source port range (SourcePortRange) is invalid. |
400 | InvalidParameter.DestCidr | The specified DestCidr is invalid. | The error message returned because the specified destination CIDR block (DestCidr) is invalid. |
400 | InvalidParameter.DestPortRange | The specified DestPortRange is invalid. | The error message returned because the specified destination port range (DestPortRange) is invalid. |
400 | InvalidParameter.SourceCidr | The specified SourceCidr is invalid. | The error message returned because the specified source CIDR block (SourceCidr) is invalid. |
400 | InvalidParameter.StartTime | The specified StartTime is invalid. | The error message returned because the specified time (StartTime) when the QoS rule takes effect is invalid. |
400 | InvalidParameter.EndTime | The specified EndTime is invalid. | The error message returned because the specified time (EndTime) when the QoS rule expires is invalid. |
400 | InvalidTimeRangeCompare | The specified end time is earlier than the start time. Please check your input. | The error message returned because the specified end time is earlier than the start time. Check whether the parameters are correctly set. |
400 | InvalidId.QOSPY | The specified QosPolicyId is invalid. | The error message returned because the ID of the QoS rule specified in the QosPolicy parameter is invalid. |
403 | InternalError | An internal server error occurred. | The error message returned because an internal error occurred. |
400 | InvalidId.Qos | The specified QosId is invalid. | The error message returned because the specified ID (QosId) of the QoS policy is invalid. |
400 | NotSupportedProtocol | The specified protocol of the QoS policy is not supported. | The error message returned because the specified transport layer protocol is not supported by the QoS rule. |
403 | InvalidPortRange | The specified port range is invalid. | The error message returned because the specified port range is invalid. |
400 | InvalidParameter.Name | The specified Name is invalid. | The error message returned because the specified name (Name) of the QoS rule is invalid. |
For a list of error codes, visit the API Error Center.