All Products
Search
Document Center

Smart Access Gateway:CreateQosCar

Last Updated:Mar 29, 2024

Creates a traffic throttling rule for a quality of service (QoS) policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:CreateQosCarWrite
  • Qos
    acs:smartag:{#regionId}:{#accountId}:qos/{#QosId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DescriptionstringNo

The description of the traffic throttling rule.

Qosdesc
RegionIdstringYes

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

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

cn-shanghai
QosIdstringYes

The ID of the QoS policy.

qos-xitd8690ucu8ro****
PriorityintegerYes

The priority of the traffic throttling rule.

Valid values: 1 to 3. A smaller value indicates a higher priority. If rules have the same priority, the one created the earliest is applied.

2
LimitTypestringYes

The type of the traffic throttling rule. Valid values:

  • Absolute: throttles traffic based on a specific range of bandwidth values.
  • Percent: throttles traffic based on a specific range of bandwidth percentage.
Absolute
MinBandwidthAbsintegerYes

The minimum bandwidth value. The value must be an integer. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

2
MaxBandwidthAbsintegerYes

The maximum bandwidth value. The value must be an integer. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

Note The maximum bandwidth value must be greater than the minimum bandwidth value.
6
MinBandwidthPercentintegerYes

The minimum bandwidth percentage. Unit: percent (%). Valid values: 1 to 100.

This parameter is required when you set LimitType to Percent.

20
MaxBandwidthPercentintegerYes

The maximum bandwidth percentage. Unit: percent (%). Valid values: 1 to 100.

This parameter is required when you set LimitType to Percent.

Note The maximum bandwidth percentage must be greater than the minimum bandwidth percentage.
90
PercentSourceTypestringNo

The type of bandwidth when traffic is throttled based on bandwidth percentage. Valid values:

  • CcnBandwidth: CCN bandwidth
  • InternetUpBandwidth: total Internet bandwidth
CcnBandwidth
NamestringNo

The name of the traffic throttling rule.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

nametest

Response parameters

ParameterTypeDescriptionExample
object
MinBandwidthAbsinteger

The minimum bandwidth value. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

2
Descriptionstring

The description of the traffic throttling rule.

Qosdesc
RequestIdstring

The ID of the request.

AC13E8FF-4D61-40AD-868E-817F2D3AC86A
QosCarIdstring

The ID of the traffic throttling rule.

qoscar-n5k8g97lihlph****
MaxBandwidthAbsinteger

The maximum bandwidth value. Unit: Mbit/s.

This parameter is returned when LimitType is set to Absolute.

6
MaxBandwidthPercentinteger

The maximum bandwidth percentage. Unit: percent (%).

90
Priorityinteger

The priority value of the traffic throttling rule.

2
QosIdstring

The ID of the QoS policy.

qos-xitd8690ucu8ro****
PercentSourceTypestring

The type of bandwidth when traffic is throttled based on bandwidth percentage. Valid values:

  • CcnBandwidth: CCN bandwidth
  • InternetUpBandwidth: total Internet bandwidth
CcnBandwidth
MinBandwidthPercentinteger

The minimum bandwidth percentage. Unit: percent (%).

20
LimitTypestring

The type of the traffic throttling rule. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "MinBandwidthAbs": 2,
  "Description": "Qosdesc",
  "RequestId": "AC13E8FF-4D61-40AD-868E-817F2D3AC86A",
  "QosCarId": "qoscar-n5k8g97lihlph****",
  "MaxBandwidthAbs": 6,
  "MaxBandwidthPercent": 90,
  "Priority": 2,
  "QosId": "qos-xitd8690ucu8ro****",
  "PercentSourceType": "CcnBandwidth",
  "MinBandwidthPercent": 20,
  "LimitType": "Percent"
}

Error codes

HTTP status codeError codeError messageDescription
400MissParameter.RegionIdYou must specify RegionId.You must set the RegionId parameter.
400MissParameter.QosIdYou must specify QosId.You must set the QosId parameter.
400MissParameter.LimitTypeYou must specify LimitType.You must specify LimitType.
400MissParameter.PriorityYou must specify Priority.You must specify Priority.
400InvalidParameter.LimitTypeYou must specify LimitType.-
400MissParameter.MaxBandwidthAbsYou must specify MaxBandwidthAbs.You must specify MaxBandwidthAbs.
400MissParameter.MaxBandwidthPercentYou must specify MaxBandwidthPercent.You must specify MaxBandwidthPercent.
400MissParameter.MinBandwidthAbsYou must specify MinBandwidthAbs.You must specify MinBandwidthAbs.
400MissParameter.MinBandwidthPercentYou must specify MinBandwidthPercent.You must specify MinBandwidthPercent.
400InvalidBandwidthCompareThe specified maximum bandwidth is smaller than the minimum bandwidth. Please check your input.The specified maximum bandwidth is smaller than the minimum bandwidth. Please check your input.
400MissParameter.PercentSourceTypeYou must specify PercentSourceType.You must specify PercentSourceType.
400InvalidId.QosThe specified QosId is invalid.The QosId parameter is set to an invalid value.
400Invalid.QosCar.PriorityThe specified priority of QosCarId is invalid.The specified priority of QosCarId is invalid.
400QosCarPerQosAmountLimitThe maximum number of QosCar in a QoS is exceeded. You can submit a ticket to increase the quota.The maximum number of QosCar in a QoS is exceeded. Submit a ticket to increase the quota.
400InvalidParameter.PriorityThe specified Priority is invalid.The Priority parameter is set to an invalid value.
400InvalidParameter.PercentSourceTypeThe specified PercentSourceType is invalid.The specified PercentSourceType is invalid.
400InvalidParameter.DescriptionThe specified Description is invalid.The Description parameter is set to an invalid value.
400InvalidParameter.LimitTypeThe specified LimitType is invalid.The specified LimitType is invalid.
400InvalidParameter.NameThe specified Name is invalid.The Name parameter is set to an invalid value.
403InternalErrorAn internal server error occurred.An internal server error occurred.

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