Queries attributes of quality of service (QoS) policies

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetQosAttribute

The operation that you want to perform. Set the value to GetQosAttribute.

RegionId String Yes cn-shanghai

The ID of the region where the QoS policy is deployed.

You can call the DescribeRegions operation to query the most recent region list.

QosId String Yes qos-1iqifund3gcno5****

The ID of the QoS policy.

Response parameters

Parameter Type Example Description
QosPolicies Array of QosPolicy

List of QoS policies based on 5-tuple.

EndTime Long 2021-07-29T00:00:00+0800

The end time of the valid time of the 5-tuple.

The time must be in UTC+8.

StartTime Long 2021-06-21T00:00:00+0800

The start time of the valid time of the 5-tuple.

DestCidr String 0.0.0.0/0

The range of the destination CIDR block.

DestPortRange String -1/-1

The range of destination ports.

Valid values: 1 to 65535 and -1.

Examples of the format of the destination port range:

  • 1/200: a port range from 1 to 200.
  • 80/80: port 80.
  • -1/-1: all ports.
IpProtocol String ALL

The type of the protocol that is applied to the 5-tuple rule.

Priority Integer 1

The priority of the traffic throttling rule that is applied to the 5-tuple.rule.

A smaller value indicates a higher priority.

QosPolicieDescription String test

The description of the 5-tuple.

SourceCidr String 0.0.0.0/0

The range of the source CIDR block.

QosPolicieName String test

The name of the 5-tuple.

SourcePortRange String -1/-1

The range of source ports.

Valid values: 1 to 65535 and -1.

Examples of the format of the source port range:

  • 1/200: a port range from 1 to 200.
  • 80/80: port 80.
  • -1/-1: all ports.
QosCars Array of QosCar

The traffic throttling rule applied to the QoS policies that have exceptional configurations.

MaxBandwidthAbs Integer 2

The maximum bandwidth. Unit: Mbit/s.

QosCarName String test

The name of the traffic throttling rule.

PercentSourceType String InternetUpBandwidth

Bandwidth type when traffic is throttled to a percentage of the total bandwidth of the network.

  • CcnBandwidth: Cloud Connect Network (CCN) bandwidth.
  • InternetUpBandwidth: Internet upstream bandwidth.
MinBandwidthAbs Integer 1

The minimum bandwidth. Unit: Mbit/s.

MaxBandwidthPercent Integer 20

The maximum bandwidth percentage that the traffic is throttled to.

QosCarDescription String test

The description of the traffic throttling rule.

LimitType String Absolute

The type of traffic throttling. Valid values:

  • Absolute: throttles traffic based on a specific range of bandwidth.
  • Percent: throttles traffic based on a specific range of bandwidth percentage.
Priority Integer 1

The priority of the traffic throttling rule.

Valid values are from 1 to 3. A smaller value indicates a higher priority.

MinBandwidthPercent Integer 10

The minimum bandwidth percentage.

QosCarId String qoscar-xir1apa8ayjp56ei****

The ID of the traffic throttling rule.

RequestId String 91058E01-1806-45D5-B305-19E4D0A5CE04

The ID of the request.

ErrorConfigSmartAGCount Integer 1

The number of Smart Access Gateway (SAG) instances that have exceptional configurations.

QosName String test

The name of the QoS policy.

QosDescription String test

The description of the QoS policy.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetQosAttribute
&RegionId=cn-shanghai
&QosId=qos-1iqifund3gcno5****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetQosAttributeResponse>
    <QosPolicies>
        <DestCidr>0.0.0.0/0</DestCidr>
        <SourcePortRange>-1/-1</SourcePortRange>
        <SourceCidr>0.0.0.0/0</SourceCidr>
        <Priority>1</Priority>
        <IpProtocol>ALL</IpProtocol>
        <DestPortRange>-1/-1</DestPortRange>
    </QosPolicies>
    <QosCars>
        <MinBandwidthAbs>1</MinBandwidthAbs>
        <QosCarId>qoscar-xir1apa8ayjp56ei****</QosCarId>
        <Priority>1</Priority>
        <MaxBandwidthAbs>2</MaxBandwidthAbs>
        <PercentSourceType>InternetUpBandwidth</PercentSourceType>
        <LimitType>Absolute</LimitType>
    </QosCars>
    <RequestId>91058E01-1806-45D5-B305-19E4D0A5CE04</RequestId>
    <ErrorConfigSmartAGCount>1</ErrorConfigSmartAGCount>
    <QosName>ccn-yaochi-bvt-qos</QosName>
</GetQosAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "QosPolicies" : [ {
    "DestCidr" : "0.0.0.0/0",
    "SourcePortRange" : "-1/-1",
    "SourceCidr" : "0.0.0.0/0",
    "Priority" : 1,
    "IpProtocol" : "ALL",
    "DestPortRange" : "-1/-1"
  } ],
  "QosCars" : [ {
    "MinBandwidthAbs" : 1,
    "QosCarId" : "qoscar-xir1apa8ayjp56ei****",
    "Priority" : 1,
    "MaxBandwidthAbs" : 2,
    "PercentSourceType" : "InternetUpBandwidth",
    "LimitType" : "Absolute"
  } ],
  "RequestId" : "91058E01-1806-45D5-B305-19E4D0A5CE04",
  "ErrorConfigSmartAGCount" : 1,
  "QosName" : "ccn-yaochi-bvt-qos"
}

Error codes

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