All Products
Search
Document Center

Smart Access Gateway:CreateQosCar

Last Updated:Jun 17, 2026

Creates a rate limiting rule for a quality of service (QoS) policy by calling the CreateQosCar operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

smartag:CreateQosCar

create

*Qos

acs:smartag:{#regionId}:{#accountId}:qos/{#QosId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Description

string

No

The description of the QoS rate limiting rule.

Qosdesc

RegionId

string

Yes

The region ID of the QoS policy instance.

You can call the DescribeRegions operation to query region IDs.

cn-shanghai

QosId

string

Yes

The instance ID of the QoS policy.

qos-xitd8690ucu8ro****

Priority

integer

Yes

The priority of the rate limiting rule.

Valid values: 1 to 3. A smaller value indicates a higher priority. If two rules have the same priority, the rule that is created first takes effect.

2

LimitType

string

Yes

The type of rate limiting. Valid values:

  • Absolute: by bandwidth value.

  • Percent: by percentage.

Absolute

MinBandwidthAbs

integer

No

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

This parameter is required when LimitType is set to Absolute.

2

MaxBandwidthAbs

integer

No

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

This parameter is required when LimitType is set to Absolute.

Note

The maximum bandwidth value must be greater than the minimum bandwidth value.

6

MinBandwidthPercent

integer

No

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

This parameter is required when LimitType is set to Percent.

20

MaxBandwidthPercent

integer

No

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

This parameter is required when LimitType is set to Percent.

Note

The maximum bandwidth percentage must be greater than the minimum bandwidth percentage.

90

PercentSourceType

string

No

The bandwidth type when rate limiting by percentage. Valid values:

  • CcnBandwidth: CCN bandwidth.

  • InternetUpBandwidth: total Internet bandwidth.

CcnBandwidth

Name

string

No

The name of the QoS rate limiting rule.

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

nametest

Response elements

Element

Type

Description

Example

object

The response parameters.

MinBandwidthAbs

integer

The minimum bandwidth value. Unit: Mbit/s.

This parameter is required when LimitType is set to Absolute.

2

Description

string

The description of the QoS rate limiting rule.

Qosdesc

RequestId

string

The request ID.

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

QosCarId

string

The instance ID of the QoS rate limiting rule.

qoscar-n5k8g97lihlph****

MaxBandwidthAbs

integer

The maximum bandwidth value. Unit: Mbit/s.

This parameter is required when LimitType is set to Absolute.

6

MaxBandwidthPercent

integer

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

90

Priority

integer

The priority of the rule.

2

QosId

string

The instance ID of the QoS policy.

qos-xitd8690ucu8ro****

PercentSourceType

string

The bandwidth type when rate limiting by percentage. Valid values:

  • CcnBandwidth: CCN bandwidth.

  • InternetUpBandwidth: total Internet bandwidth.

CcnBandwidth

MinBandwidthPercent

integer

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

20

LimitType

string

The type of rate limiting. Valid values:

  • Absolute: by bandwidth value.

  • Percent: by percentage.

Percent

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

400 MissParameter.RegionId You must specify RegionId. You must set the RegionId parameter.
400 MissParameter.QosId You must specify QosId. You must set the QosId parameter.
400 MissParameter.LimitType You must specify LimitType. You must specify LimitType.
400 MissParameter.Priority You must specify Priority. You must specify Priority.
400 InvalidParameter.LimitType You must specify LimitType.
400 MissParameter.MaxBandwidthAbs You must specify MaxBandwidthAbs. You must specify MaxBandwidthAbs.
400 MissParameter.MaxBandwidthPercent You must specify MaxBandwidthPercent. You must specify MaxBandwidthPercent.
400 MissParameter.MinBandwidthAbs You must specify MinBandwidthAbs. You must specify MinBandwidthAbs.
400 MissParameter.MinBandwidthPercent You must specify MinBandwidthPercent. You must specify MinBandwidthPercent.
400 InvalidBandwidthCompare The 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.
400 MissParameter.PercentSourceType You must specify PercentSourceType. You must specify PercentSourceType.
400 InvalidId.Qos The specified QosId is invalid. The QosId parameter is set to an invalid value.
400 Invalid.QosCar.Priority The specified priority of QosCarId is invalid. The specified priority of QosCarId is invalid.
400 QosCarPerQosAmountLimit The 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.
400 InvalidParameter.Priority The specified Priority is invalid. The Priority parameter is set to an invalid value.
400 InvalidParameter.PercentSourceType The specified PercentSourceType is invalid. The specified PercentSourceType is invalid.
400 InvalidParameter.Description The specified Description is invalid. The Description parameter is set to an invalid value.
400 InvalidParameter.Name The specified Name is invalid. The Name parameter is set to an invalid value.
403 InternalError An internal server error occurred. An internal server error occurred.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.