Creates a cross-region traffic scheduling policy for an Enterprise Edition transit router to optimize and control network traffic across regions.
Operation description
-
Only inter-region connections of Enterprise Edition transit routers support the creation of cross-region traffic scheduling policies.
-
The traffic scheduling feature takes effect only in the outbound direction of an Enterprise Edition transit router.
For example, if you create an inter-region connection between the China (Hangzhou) and China (Qingdao) regions and configure the traffic scheduling feature on the transit router in the China (Hangzhou) region, the traffic scheduling feature can guarantee bandwidth for various services when traffic flows from the China (Hangzhou) region to the China (Qingdao) region. However, the traffic scheduling feature does not guarantee service bandwidth when traffic flows from the China (Qingdao) region to the China (Hangzhou) region.
-
CreateCenInterRegionTrafficQosPolicy is an asynchronous operation. After you send a request, the system returns a traffic scheduling policy ID but the policy is not yet created. The creation task continues to run in the background. You can call ListCenInterRegionTrafficQosPolicies to query the status of the traffic scheduling policy.
If the traffic scheduling policy is in the Creating state, the policy is being created. In this state, you can only query the policy but cannot perform other operations on it.
If the traffic scheduling policy is in the Active state, the policy is created.
Before you begin
Before you call CreateCenInterRegionTrafficQosPolicy, make sure that the following conditions are met:
An inter-region connection is created. For more information, see CreateTransitRouterPeerAttachment.
A traffic marking policy is created. For more information, see CreateTrafficMarkingPolicy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:CreateCenInterRegionTrafficQosPolicy |
create |
*All Resource
|
None | 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 token, but you must make sure that the token 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 to perform a dry run. Valid values:
|
false |
| TransitRouterId |
string |
Yes |
The ID of the transit router instance. |
tr-8vbuqeo5h5pu3m01d**** |
| TransitRouterAttachmentId |
string |
Yes |
The ID of the inter-region connection. |
tr-attach-r6g0m3epjehw57**** |
| TrafficQosPolicyName |
string |
No |
The name of the traffic scheduling policy. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://. |
nametest |
| TrafficQosPolicyDescription |
string |
No |
The description of the traffic scheduling policy. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://. |
desctest |
| BandwidthGuaranteeMode |
string |
No |
The bandwidth guarantee mode. You can configure QoS queues based on absolute bandwidth values or bandwidth percentages. Valid values:
|
byBandwidthPercent |
| TrafficQosQueues |
array<object> |
No |
The queue information of the traffic scheduling policy. You can create up to 3 queues. To create more queues, call CreateCenInterRegionTrafficQosQueue. |
|
|
object |
No |
The queue information. |
||
| QosQueueName |
string |
No |
The name of the queue. A traffic scheduling policy supports up to 3 queues, and each queue can be assigned a name. The name can be empty or 1 to 128 characters in length and cannot start with http:// or https://. |
nametest |
| RemainBandwidthPercent |
string |
No |
The percentage of inter-region bandwidth that the queue can use. A traffic scheduling policy supports up to 10 queues, and each queue can be assigned a percentage of inter-region bandwidth. For example, if you enter 1, traffic that matches the queue can use up to 1% of the inter-region bandwidth. Note
The sum of bandwidth percentages of all queues in a traffic scheduling policy cannot exceed 100%. |
1 |
| Bandwidth |
string |
No |
The absolute bandwidth value that the queue can use for inter-region traffic, in Mbit/s. A traffic scheduling policy supports up to 10 queues, and each queue can be assigned an absolute bandwidth value. For example, if you enter 1, traffic that matches the queue can use up to 1 Mbit/s of inter-region bandwidth. Note
The sum of absolute bandwidth values of all allocated queues in a traffic scheduling policy cannot exceed the inter-region bandwidth value. |
1 |
| Dscps |
array |
No |
The DSCP values that the queue matches. A traffic scheduling policy supports up to 3 queues, and each queue can match up to 60 DSCP values. Separate multiple DSCP values with commas (,). |
|
|
integer |
No |
The DSCP values that the queue matches. A traffic scheduling policy supports up to 3 queues, and each queue can match up to 60 DSCP values. Separate multiple DSCP values with commas (,). |
5 |
|
| QosQueueDescription |
string |
No |
The description of the queue. A traffic scheduling policy supports up to 10 queues, and each queue can have a description. The description can be empty or 1 to 256 characters in length and cannot start with http:// or https://. |
desctest |
| ConsoleDryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| TrafficQosPolicyId |
string |
The ID of the traffic scheduling policy. |
qos-eczzew0v1kzrb5**** |
| RequestId |
string |
The request ID. |
6DF9A765-BCD2-5C7E-8C32-C35C8A361A39 |
Examples
Success response
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 | InvalidParamSize.TrafficQosQueues | The queue size included in the traffic QoS policy exceeds the limit. | The queue size included in the traffic scheduling policy exceeds the limit. |
| 400 | IllegalParam.BandwidthGuaranteeModeMismatch | The BandwidthGuaranteeMode does not match the Bandwidth or RemainBandwidthPercent. | The BandwidthGuaranteeMode does not match the Bandwidth or RemainBandwidthPercent. |
| 400 | IllegalParam.AttachmentBandwidthExceed | The entered bandwidth causes the total QoS guaranteed bandwidth to exceed the cross-region bandwidth allocation value. | The entered bandwidth causes the total QoS guaranteed bandwidth to exceed the cross-region bandwidth allocation value. |
| 400 | IllegalParam.BandwidthGuaranteeMode | The input bandwidth guarantee type is not valid. | The input bandwidth guarantee type is not valid. |
| 400 | MissingParam.RemainBandwidthPercent | RemainBandwidthPercent is missing. | RemainBandwidthPercent is missing. |
| 400 | MissingParam.Bandwidth | The parameter Bandwidth is mandatory. | The error message returned because no bandwidth value is specified. You must specify a bandwidth value. |
| 400 | IllegalParam.RemainBandwidthPercent | The specified RemainBandwidthPercent is invalid. | The error message returned because the RemainBandwidthPercent parameter is set to invalid value. |
| 400 | IllegalParam.Bandwidth | Bandwidth is illegal | The error message returned because the specified bandwidth value is invalid. |
| 400 | IllegalParam.BandwidthPackageStatus | The status of the bandwidth package is incorrect. | The status of the bandwidth package is incorrect. |
| 400 | IncorrectStatus.TransitRouterInstance | The status of TransitRouter is incorrect. | The error message returned because the transit router is in an invalid state. |
| 400 | IncorrectStatus.TransitRouterAttachment | TransitRouterAttachmentId status is invalid. | The error message returned because the status of the transit router attachment does not support this operation. Try again later. |
| 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. |
| 400 | MissingParam.TransitRouterId | The parameter TransitrouterId is mandatory. | The error message returned because the TransitRouterId parameter is not set. |
| 400 | MissingParam.TransitRouterAttachmentId | The parameter TransitRouterAttachmentId is Missing. | The error message returned because the TransitRouterAttachmentId parameter is not set. |
| 400 | Forbidden.CDTServiceExpired | The CDT service is out of service. | The cloud data transfer service has been suspended due for payment. Please renew the service and try again. |
| 400 | OperationUnsupported.TransitRouterType | The specified TransitRouterType does not support the operation. | The error message returned because this operation is not supported by the specified type of transit router. |
| 400 | OperationUnsupported.QosPolicyForLowLatencyLinkType | QoS Policy is not supported for Low Latency LinkType. | QoS Policy is not supported for Low Latency LinkType. |
| 400 | InvalidTransitRouterAttachmentId.NotFound | TransitRouterAttachmentId is not found. | The error message returned because the ID of the network instance does not exist. |
| 400 | IncorrectStatus.TransitRouterAttachmentId | The resource is not in a valid state for the attachment operation. | The error message returned because the operation is not supported when the specified attachment is in an unstable state |
| 400 | InvalidOperation.QueueLinkTypeNotEqualsAttachmentLinkType | The operation is invalid because the link type of an existing QoS queue does not match the link type of the attachment. | The operation is invalid because the link type of an existing QoS queue does not match the link type of the attachment. |
| 400 | ParamMismatch.BandwidthGuaranteeModeAndQueueSchedulingMode | The parameters BandwidthGuaranteeMode and QueueSchedulingMode are incompatible. | The parameters BandwidthGuaranteeMode and QueueSchedulingMode are incompatible. |
| 400 | InvalidOperation.NotSupportHierarchicalQoS | The operation is invalid because the transit router does not support HierarchicalQoS. | The operation is invalid because the transit router does not support HierarchicalQoS. |
| 400 | InvalidOperation.QueuesExceeded | The operation is invalid because the maximum queue quota for HierarchicalQoS has been exceeded. | The operation is invalid because the maximum queue quota for HierarchicalQoS has been exceeded. |
| 400 | ParamMismatch.QueueSchedulingModeAndBandwidth | The parameters QueueSchedulingMode and Bandwidth are incompatible. | The parameters QueueSchedulingMode and Bandwidth are incompatible. |
| 400 | IllegalParam.QueueType | The parameter QueueType is illegal. | The parameter QueueType is illegal. |
| 400 | ParamMismatch.QueueTypeAndBandwidthPercent | The parameters QueueType and BandwidthPercent are incompatible. | The parameters QueueType and BandwidthPercent are incompatible. |
| 400 | InvalidOperation.PriorityQueueExceeded | The operation is invalid because HierarchicalQoS supports only one priority queue. | The operation is invalid because HierarchicalQoS supports only one priority queue. |
| 400 | ParamMismatch.QueueSchedulingModeAndQueueType | The parameters QueueSchedulingMode and QueueType are incompatible. | The parameters QueueSchedulingMode and QueueType are incompatible. |
| 400 | ParamMismatch.QueueSchedulingModeAndLinkType | The parameters QueueSchedulingMode and LinkType are incompatible. | The parameters QueueSchedulingMode and LinkType are incompatible. |
| 400 | IllegalParam.QueueSchedulingMode | The parameter QueueSchedulingMode is illegal. | The parameter QueueSchedulingMode is illegal. |
| 400 | InvalidOperation.TransitRouterNotSupportHierarchicalQoS | The operation is invalid because the transit router does not support HierarchicalQoS. | The operation is invalid because the transit router does not support HierarchicalQoS. |
| 400 | InvalidParameter.TransitRouterAttachmentId | The specified parameter TransitRouterAttachmentId is invalid. | |
| 400 | InvalidParameter.TransitRouterId | The specified parameter TransitRouterId is invalid. | The parameter TransitRouterId entered is illegal. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.