All Products
Search
Document Center

Cloud Enterprise Network:CreateCenInterRegionTrafficQosPolicy

Last Updated:Apr 26, 2024

Creates a quality of service (QoS) policy for an inter-region connection on an Enterprise Edition transit router.

Operation description

  • Only inter-region connections created on Enterprise Edition transit routers support QoS policies.

  • Traffic scheduling applies only to outbound traffic on Enterprise Edition transit routers.

    For example, you create an inter-region connection between the China (Hangzhou) and China (Qingdao) regions, and create a QoS policy for the transit router in the China (Hangzhou) region. In this case, the QoS policy can ensure bandwidth for network traffic from the China (Hangzhou) region to the China (Qingdao) region. However, the QoS policy does not apply to network traffic from the China (Qingdao) region to the China (Hangzhou) region.

  • CreateCenInterRegionTrafficQosPolicy is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the ListCenInterRegionTrafficQosPolicies operation to query the status of the task.

    • If the QoS policy is in the Creating state, the QoS policy is being created. You can query the QoS policy but cannot perform other operations on the QoS policy.
    • If the QoS policy is in the Active state, the QoS policy is created.

Prerequisite

Before you call the CreateCenInterRegionTrafficQosPolicy operation, make sure that the following requirements are met:

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
cen:CreateCenInterRegionTrafficQosPolicyWrite
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

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****
DryRunbooleanNo

Specifies whether only to precheck the API request. Valid values:

  • true: prechecks the request but does not create the QoS policy. The system checks the required parameters, the request format, and the service limits. If the request fails the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false: sends the API request. If the request passes the precheck, the QoS policy is created. This is the default value.
false
TransitRouterIdstringYes

The ID of the transit router.

tr-8vbuqeo5h5pu3m01d****
TransitRouterAttachmentIdstringYes

The ID of the inter-region connection.

tr-attach-r6g0m3epjehw57****
TrafficQosPolicyNamestringNo

The name of the QoS policy.

The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

nametest
TrafficQosPolicyDescriptionstringNo

The description of the QoS policy.

This parameter is optional. If you enter a description, it must be 1 to 256 characters in length, and cannot start with http:// or https://.

desctest
TrafficQosQueuesobject []No

The information about the QoS queue.

You can add at most three QoS queues in a QoS policy by calling this operation. To add more QoS queues, call the CreateCenInterRegionTrafficQosQueue operation.

QosQueueNamestringNo

The name of the current queue.

Each QoS policy supports at most three queues. You can specify a name for each queue.

The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

nametest
RemainBandwidthPercentstringNo

The percentage of the inter-region bandwidth that can be used by the queue.

Each QoS policy supports at most three queues. You can specify a valid percentage for each queue.

For example, a value of 1 specifies that the queue can consume 1% of the inter-region bandwidth.

Note The sum of the percentage values of all the queues in a QoS policy cannot exceed 100%.
1
DscpsarrayNo

The Differentiated Services Code Point (DSCP) value that matches the current queue.

Each QoS policy supports at most three queues. You can specify at most 60 DSCP values for each queue. Separate multiple DCSP values with commas (,).

integerNo

The Differentiated Services Code Point (DSCP) value that matches the current queue.

Each QoS policy supports at most three queues. You can specify at most 60 DSCP values for each queue. Separate multiple DCSP values with commas (,).

5
QosQueueDescriptionstringNo

The description of the current queue.

Each QoS policy supports at most three queues. You can specify a description for each queue.

This parameter is optional. If you enter a description, it must be 1 to 256 characters in length and cannot start with http:// or https://.

desctest

Response parameters

ParameterTypeDescriptionExample
object

The response.

TrafficQosPolicyIdstring

The ID of the QoS policy.

qos-eczzew0v1kzrb5****
RequestIdstring

The ID of the request.

6DF9A765-BCD2-5C7E-8C32-C35C8A361A39

Examples

Sample success responses

JSONformat

{
  "TrafficQosPolicyId": "qos-eczzew0v1kzrb5****",
  "RequestId": "6DF9A765-BCD2-5C7E-8C32-C35C8A361A39"
}

Error codes

HTTP status codeError codeError messageDescription
400AssociationExist.TrafficQosThe traffic qos with the specified attachment already exists.The error message returned because the specified attachment is already associated with a QoS policy.
400InvalidTransitRouterId.NotFoundThe specified TransitRouterId is not found.The error message returned because the specified transit router does not exist.
400IllegalParam.TransitRouterAttachmentIdTransitRouterAttachmentId is illegal.The error message returned because the specified transit router is invalid.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe 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 timeSummary of changesOperation
2021-11-26Add Operationsee changesets