Creates a quality of service (QoS) policy for an Enterprise Edition transit router to control and optimize inter-region network communication.
Operation description
-
Only inter-region connections created on Enterprise Edition transit routers support QoS policies.
If your inter-region connection uses test bandwidth, you cannot create QoS policies for the inter-region connection.
-
QoS policies apply only to outbound traffic on Enterprise Edition transit routers.
If you create an inter-region connection between the China (Hangzhou) region and the China (Qingdao) region, and create QoS policies for the transit router in the China (Hangzhou) region and the transit router in the China (Qingdao) region, the QoS policies apply only to the network traffic that flows from China (Hangzhou) to China (Qingdao). QoS policies allocate bandwidth resources to different services.
-
CreateCenInterRegionTrafficQosPolicy is an asynchronous operation. After you send a request, the system returns a QoS policy ID and runs the task in the system background. You can call ListCenInterRegionTrafficQosPolicies to query the status of a QoS policy.
- If a QoS policy is in the Creating state, the QoS policy is being created. You can query the QoS policy but cannot perform other operations.
- If a QoS policy is in the Active state, the QoS policy is created.
Prerequisites
Make sure that the following requirements are met before you call the CreateCenInterRegionTrafficQosPolicy operation:
- An inter-region connection is created. For more information, see CreateTransitRouterPeerAttachment .
- A traffic marking policy is created. For more information, see CreateTrafficMarkingPolicy .
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cen:CreateCenInterRegionTrafficQosPolicy | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | 123e4567-e89b-12d3-a456-426655**** |
DryRun | boolean | No | Specifies whether only to precheck the API request. Valid values:
| false |
TransitRouterId | string | Yes | The ID of the transit router. | tr-8vbuqeo5h5pu3m01d**** |
TransitRouterAttachmentId | string | Yes | The ID of the inter-region connection. | tr-attach-r6g0m3epjehw57**** |
TrafficQosPolicyName | string | No | The name of the QoS policy. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. | nametest |
TrafficQosPolicyDescription | string | No | The description of the QoS policy. The description must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter. | desctest |
TrafficQosQueues | object [] | No | The information about the QoS queue. You can call this operation to create at most three QoS queues. To create more queues, you must call the CreateCenInterRegionTrafficQosQueue operation. | |
QosQueueName | string | No | The name of the current queue. Each QoS policy supports up to three queues. You can specify a name for each queue. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. | nametest |
RemainBandwidthPercent | string | No | The percentage of bandwidth resources that can be allocated to the current queue. Each QoS policy supports up to three queues. You can specify a percentage of bandwidth resources for each queue. If you enter 1, it indicates that the current queue can consume at most **1%** of the bandwidth resources. Note
The sum of the percentage values of all the queues in a QoS policy cannot exceed 100%.
| 1 |
Dscps | array | No | The DSCP value that matches the current queue. Each QoS policy supports up to three queues. You can specify at most 60 DSCP values for each queue. Separate DSCP values with commas (,). | |
integer | No | The DSCP value that matches the current queue. Each QoS policy supports up to three queues. You can specify at most 60 DSCP values for each queue. Separate DSCP values with commas (,). | 5 | |
QosQueueDescription | string | No | The description of the current queue. Each QoS policy supports up to three queues. You can add a description to each queue. The description must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter. | desctest |
Response parameters
Examples
Sample success responses
JSON
format
{
"TrafficQosPolicyId": "qos-eczzew0v1kzrb5****",
"RequestId": "6DF9A765-BCD2-5C7E-8C32-C35C8A361A39"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | AssociationExist.TrafficQos | The traffic qos with the specified attachment already exists. | The error message returned because the specified attachment is already associated with a QoS policy. |
400 | InvalidTransitRouterId.NotFound | The specified TransitRouterId is not found. | The error message returned because the specified transit router does not exist. |
400 | IllegalParam.TransitRouterAttachmentId | TransitRouterAttachmentId is illegal. | The error message returned because the specified transit router is invalid. |
400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2021-11-26 | Add Operation | see changesets |