Creates a quintuple rule for a Quality of Service (QoS) policy.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
DestCidr String Yes 10.10.10.0/24

The destination CIDR block.

DestPortRange String Yes 80/80

The destination port range.

IpProtocol String Yes TCP

The transport layer protocol.

Priority Integer Yes 6

The priority of the quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.

Value range: 1 to 7.

QosId String Yes qos-dhf***********

The instance ID of the QoS policy to which the quintuple rule is created.

RegionId String Yes cn-hangzhou

The ID of the region to which the QoS policy belongs.

SourceCidr String Yes 10.10.10.9/24

The source CIDR block.

SourcePortRange String Yes 80/80

The source port range of the transport layer.

Action String No CreateQosPolicy

The name of this action.

Value: CreateQosPolicy

Description String No Quintuple rule

The description of the quintuple rule.

EndTime String No 2019-09-14T16:41:33+0800

The expiration time of the quintuple rule.

StartTime String No 2019-07-14T16:41:33+0800

The time when the quintuple rule takes effect.

Response parameters

Parameter Type Example value Description
Description String Quintuple rule

The description of the quintuple rule.

DestCidr String 10.10.10.0/24

The destination CIDR block.

DestPortRange String 80/80

The destination port range.

EndTime String 2019-09-14T16:41:33+0800

The expiration time of the quintuple rule.

IpProtocol String TCP

The transport layer protocol.

Priority Integer 3

The priority of the created quintuple rule. A smaller value indicates a higher priority. If the priorities of two quintuple rules are the same, the rule created earlier is applied first.

Value range: 1 to 7.

QosId String qos-xhwhyuo43l********

The instance ID of the QoS policy for which the quintuple rule is created.

QosPolicyId String qospy-xhwhyuo43l********

The ID of the created quintuple rule.

RequestId String 97862812-2C7E-4D25-B0D5-B26DAC7FA293

The ID of the request.

SourceCidr String 10.10.10.9/24

The source CIDR block.

SourcePortRange String 80/80

The source port range.

StartTime String 2019-07-14T16:41:33+0800

The time when the quintuple rule takes effect.

Examples

Request example


http(s)://[Endpoint]/? Action=CreateQosPolicy
&DestCidr=10.10.10.0/24
&DestPortRange=80/80
&IpProtocol=TCP
&Priority=6
&QosId=qos-dhf***********
&RegionId=cn-hangzhou
&SourceCidr=10.10.10.9/24
&SourcePortRange=80/80
&<CommonParameters>

Response example

XML format

<CreateQosPolicyResponse>
	  <Description>bvt-test</Description>
	  <DestCidr>10.10.0.0/24</DestCidr>
	  <DestPortRange>-1/-1</DestPortRange>
	  <EndTime>2019-09-14T16:41:33+0800</EndTime>
	  <IpProtocol>ALL</IpProtocol>
	  <Priority>1</Priority>
	  <QosId>qos-awfxl1adxeqyklcb9m</QosId>
	  <QosPolicyId>qospy-427m9fo6wkhofs1aml</QosPolicyId>
	  <RequestId>97862812-2C7E-4D25-B0D5-B26DAC7FA293</RequestId>
	  <SourceCidr>192.168.0.0/24</SourceCidr>
	  <SourcePortRange>-1/-1</SourcePortRange>
	  <StartTime>2019-07-14T16:41:33+0800</StartTime>
    </CreateQosPolicyResponse>

JSON format

{
	"IpProtocol":"ALL",
	"SourceCidr":"192.168.0.0/24",
	"Description":"bvt-test",
	"SourcePortRange":"-1/-1",
	"RequestId":"97862812-2C7E-4D25-B0D5-B26DAC7FA293",
	"DestPortRange":"-1/-1",
	"EndTime":"2019-09-14T16:41:33+0800",
	"StartTime":"2019-07-14T16:41:33+0800",
	"DestCidr":"10.10.0.0/24",
	"QosPolicyId":"qospy-427m9fo6wkhofs1aml",
	"QosId":"qos-awfxl1adxeqyklcb9m",
	"Priority":1
}

Errors

HTTP status code Error code Error message Description
403 InternalError An internal server error occurred. An internal error occurred.
400 NotSupportedProtocol The specified protocol of the QoS policy is not supported. The specified protocol is not supported.
403 InvalidPortRange The specified port range is invalid. The specified port range is invalid.
400 InvalidId.Qos The specified QosId is invalid. The specified QosId is invalid.
400 QosPyPerQosPyPerQosAmountLimitQosAmountLimit The maximum number of policies in a QoS is exceeded. You can submit a ticket to increase the quota. The number of quintuple rules created for the QoS policy has reached the quota. You can open a ticket to increase the quota.
400 MissParameter.RegionId You must specify RegionId. You must specify the RegionId.
400 MissParameter.QosId You must specify QosId. You must specify the QosId.
400 MissParameter.QosPolicyId You must specify QosPolicyId. You must specify the QosPolicyId.
400 InvalidParameter.Priority The specified Priority is invalid. The specified Priority is invalid.
400 MissParameter.SourceCidr You must specify SourceCidr. You must specify the SourceCidr.
400 MissParameter.SourcePortRange You must specify SourcePortRange. You must specify the SourcePortRange.
400 MissParameter.DestCidr You must specify DestCidr. You must specify the DestCidr.
400 MissParameter.DestPortRange You must specify DestPortRange. You must specify the DestPortRange.
400 MissParameter.IpProtocol You must specify IpProtocol. You must specify the IpProtocol.
400 InvalidParameter.Description The specified Description is invalid. The specified Description is invalid.
400 InvalidParameter.DestCidr The specified DestCidr is invalid. The specified DestCidr is invalid.
400 InvalidParameter.DestPortRange The specified DestPortRange is invalid. The specified DestPortRange is invalid.
400 InvalidParameter.SourceCidr The specified SourceCidr is invalid. The specified SourceCidr is invalid.
400 InvalidParameter.SourcePortRange The specified SourcePortRange is invalid. The specified SourcePortRange is invalid.
400 InvalidParameter.StartTime The specified StartTime is invalid. The specified StartTime is invalid.
400 InvalidParameter.EndTime The specified EndTime is invalid. The specified EndTime is invalid.
400 InvalidTimeRangeCompare The specified end time is earlier than the start time. Please check your input. The specified EndTime is earlier than the StartTime.

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