All Products
Search
Document Center

Smart Access Gateway:GetQosAttribute

Last Updated:Jul 31, 2025

Queries the attributes of a quality of service (QoS) policy.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
smartag:GetQosAttributeget
*Qos
acs:smartag:{#regionId}:{#accountId}:qos/{#QosId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

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

cn-shanghai
QosIdstringYes

The ID of the QoS policy.

qos-1iqifund3gcno5****

Response parameters

ParameterTypeDescriptionExample
object
QosPoliciesarray<object>

List of QoS policies based on 5-tuple.

QosPolicyobject
EndTimelong

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

The time must be in UTC+8.

2021-07-29T00:00:00+0800
StartTimelong

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

2021-06-21T00:00:00+0800
DestCidrstring

The range of the destination CIDR block.

0.0.0.0/0
DestPortRangestring

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.
-1/-1
IpProtocolstring

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

ALL
Priorityinteger

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

A smaller value indicates a higher priority.

1
QosPolicieDescriptionstring

The description of the 5-tuple.

test
SourceCidrstring

The range of the source CIDR block.

0.0.0.0/0
QosPolicieNamestring

The name of the 5-tuple.

test
SourcePortRangestring

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.
-1/-1
QosCarsarray<object>

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

QosCarobject
MaxBandwidthAbsinteger

The maximum bandwidth. Unit: Mbit/s.

2
QosCarNamestring

The name of the traffic throttling rule.

test
PercentSourceTypestring

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.
InternetUpBandwidth
MinBandwidthAbsinteger

The minimum bandwidth. Unit: Mbit/s.

1
MaxBandwidthPercentinteger

The maximum bandwidth percentage that the traffic is throttled to.

20
QosCarDescriptionstring

The description of the traffic throttling rule.

test
LimitTypestring

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.
Absolute
Priorityinteger

The priority of the traffic throttling rule.

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

1
MinBandwidthPercentinteger

The minimum bandwidth percentage.

10
QosCarIdstring

The ID of the traffic throttling rule.

qoscar-xir1apa8ayjp56ei****
RequestIdstring

The ID of the request.

91058E01-1806-45D5-B305-19E4D0A5CE04
ErrorConfigSmartAGCountinteger

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

1
QosNamestring

The name of the QoS policy.

test
QosDescriptionstring

The description of the QoS policy.

test

Examples

Sample success responses

JSONformat

{
  "QosPolicies": [
    {
      "EndTime": 0,
      "StartTime": 0,
      "DestCidr": "0.0.0.0/0",
      "DestPortRange": "-1/-1",
      "IpProtocol": "ALL",
      "Priority": 1,
      "QosPolicieDescription": "test",
      "SourceCidr": "0.0.0.0/0",
      "QosPolicieName": "test",
      "SourcePortRange": "-1/-1"
    }
  ],
  "QosCars": [
    {
      "MaxBandwidthAbs": 2,
      "QosCarName": "test",
      "PercentSourceType": "InternetUpBandwidth",
      "MinBandwidthAbs": 1,
      "MaxBandwidthPercent": 20,
      "QosCarDescription": "test",
      "LimitType": "Absolute",
      "Priority": 1,
      "MinBandwidthPercent": 10,
      "QosCarId": "qoscar-xir1apa8ayjp56ei****"
    }
  ],
  "RequestId": "91058E01-1806-45D5-B305-19E4D0A5CE04",
  "ErrorConfigSmartAGCount": 1,
  "QosName": "test",
  "QosDescription": "test"
}

Error codes

For a list of error codes, visit the Service error codes.