如果您需要最佳化和控制跨地區的網路流量,您可以調用CreateCenInterRegionTrafficQosPolicy介面建立企業版轉寄路由器下的跨地區流量調度策略。
介面說明
-
僅企業版轉寄路由器下的跨地區串連支援建立跨地區流量調度策略。
-
流量調度功能僅作用在企業版轉寄路由器的出方向。
例如,您建立了華東 1(杭州)與華北 1(青島)地區的跨地區串連,您在華東 1(杭州)地區的轉寄路由器下配置流量調度功能後,在流量從華東 1(杭州)地區去往華北 1(青島)地區的過程中,流量調度功能可以幫您保證各類業務的使用頻寬。在流量從華北 1(青島)地區去往華東 1(杭州)地區的過程中,流量調度功能不幫您保證業務頻寬。
-
CreateCenInterRegionTrafficQosPolicy 介面屬於非同步介面,即系統會先返回一個流量調度策略 ID,但該流量調度策略並未建立完成,系統背景建立任務仍在進行。您可以調用 ListCenInterRegionTrafficQosPolicies 介面查詢流量調度策略的狀態。
當流量調度策略處於 Creating 狀態時,表示流量調度策略正在建立中,在該狀態下,您只能對流量調度策略執行查詢操作,不能執行其他動作。
當流量調度策略處於 Active 狀態時,表示流量調度策略建立完成。
前提條件
在調用 CreateCenInterRegionTrafficQosPolicy 介面前,確保已滿足以下條件:
已建立跨地區串連。具體操作,請參見 CreateTransitRouterPeerAttachment 。
已建立流量標記策略。具體操作,請參見 CreateTrafficMarkingPolicy 。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cen:CreateCenInterRegionTrafficQosPolicy |
create |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的等冪性。 由用戶端產生該參數值,要保證在不同請求間唯一,最大值不超過 64 個 ASCII 字元。 |
123e4567-e89b-12d3-a456-426655**** |
| DryRun |
boolean |
否 |
是否只預檢此次請求。取值:
|
false |
| TransitRouterId |
string |
是 |
轉寄路由器執行個體 ID。 |
tr-8vbuqeo5h5pu3m01d**** |
| TransitRouterAttachmentId |
string |
是 |
跨地區串連 ID。 |
tr-attach-r6g0m3epjehw57**** |
| TrafficQosPolicyName |
string |
否 |
流量調度策略的名稱。 名稱可以為空白或長度為 1~128 個字元,不能以 http://或 https://開頭。 |
nametest |
| TrafficQosPolicyDescription |
string |
否 |
流量調度策略的描述資訊。 描述可以為空白或長度為 1~256 個字元,不能以 http://或 https://開頭。 |
desctest |
| BandwidthGuaranteeMode |
string |
否 |
頻寬保障類型,可以選擇按頻寬絕對值或者按頻寬百分比模式。取值:
|
byBandwidthPercent |
| TrafficQosQueues |
array<object> |
否 |
流量調度策略包含的隊列資訊。 最多支援建立 3 個隊列,更多隊列需要用 CreateCenInterRegionTrafficQosQueue 建立。 |
|
|
object |
否 |
隊列資訊。 |
||
| QosQueueName |
string |
否 |
當前隊列的名稱。 一個流量調度策略最多支援建立 3 個隊列,每個隊列可以被指定一個隊列名稱。 名稱可以為空白或長度為 1~128 個字元,不能以 http://或 https://開頭。 |
nametest |
| RemainBandwidthPercent |
string |
否 |
當前隊列可使用的跨地區頻寬的百分比。 一個流量調度策略最多支援建立 10 個隊列,每個隊列可以被指定允許使用的跨地區頻寬百分比。 例如,您輸入 1,則表示符合當前隊列的流量報文最多隻能使用 1%的跨地區頻寬。 說明
一個流量調度策略下,所有隊列的跨地區頻寬百分比之和不能超過 100%。 |
1 |
| Bandwidth |
string |
否 |
當前隊列可使用的跨地區頻寬的絕對值,單位是 Mbps。 一個流量調度策略最多支援建立 10 個隊列,每個隊列可以被指定允許使用的跨地區頻寬。 例如,您輸入 1,則表示符合當前隊列的流量報文最多隻能使用 1Mbps 的跨地區頻寬。 說明
一個流量調度策略下,所有已指派隊列的跨地區頻寬絕對值之和不能超過跨地區頻寬的值。 |
1 |
| Dscps |
array |
否 |
當前隊列匹配的 DSCP 值。 一個流量調度策略最多支援建立 3 個隊列,每個隊列最多支援匹配 60 個 DSCP 值,DSCP 值之間使用半形逗號(,)分隔。 |
|
|
integer |
否 |
當前隊列匹配的 DSCP 值。 一個流量調度策略最多支援建立 3 個隊列,每個隊列最多支援匹配 60 個 DSCP 值,DSCP 值之間使用半形逗號(,)分隔。 |
5 |
|
| QosQueueDescription |
string |
否 |
當前隊列的描述資訊。 一個流量調度策略最多支援建立 10 個隊列,每個隊列可以被添加一個隊列描述資訊。 描述可以為空白或長度為 1~256 個字元,不能以 http://或 https://開頭。 |
desctest |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| TrafficQosPolicyId |
string |
流量調度策略 ID。 |
qos-eczzew0v1kzrb5**** |
| RequestId |
string |
請求 ID。 |
6DF9A765-BCD2-5C7E-8C32-C35C8A361A39 |
樣本
正常返回樣本
JSON格式
{
"TrafficQosPolicyId": "qos-eczzew0v1kzrb5****",
"RequestId": "6DF9A765-BCD2-5C7E-8C32-C35C8A361A39"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | AssociationExist.TrafficQos | The traffic qos with the specified attachment already exists. | 該Attachment已存在流量調度策略。 |
| 400 | InvalidTransitRouterId.NotFound | The specified TransitRouterId is not found. | 指定的轉寄路由器不存在 |
| 400 | IllegalParam.TransitRouterAttachmentId | TransitRouterAttachmentId is illegal. | 參數中指定的TrInstance不合法。 |
| 400 | InvalidParamSize.TrafficQosQueues | The queue size included in the traffic QoS policy exceeds the limit. | 流量調度策略中包含的隊列大小超出限制。 |
| 400 | IllegalParam.BandwidthGuaranteeModeMismatch | 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. | 輸入的頻寬使得QoS總保障頻寬超過了跨地區頻寬分配的值。 |
| 400 | IllegalParam.BandwidthGuaranteeMode | The input bandwidth guarantee type is not valid. | 輸入的頻寬保障類型不合法。 |
| 400 | MissingParam.RemainBandwidthPercent | RemainBandwidthPercent is missing. | 缺少保障頻寬百分比。 |
| 400 | MissingParam.Bandwidth | The parameter Bandwidth is mandatory. | 頻寬值參數是必需的。 |
| 400 | IllegalParam.RemainBandwidthPercent | The specified RemainBandwidthPercent is invalid. | 參數中指定的RemainBandwidthPercent不合法。 |
| 400 | IllegalParam.Bandwidth | Bandwidth is illegal | 跨地區串連時入參頻寬值非法。 |
| 400 | IllegalParam.BandwidthPackageStatus | The status of the bandwidth package is incorrect. | 頻寬包的狀態錯誤。 |
| 400 | IncorrectStatus.TransitRouterInstance | The status of TransitRouter is incorrect. | 轉寄路由器狀態不正確。 |
| 400 | IncorrectStatus.TransitRouterAttachment | TransitRouterAttachmentId status is invalid. | 當前TransitRouterAttachment的狀態不支援該操作,請稍後重試。 |
| 400 | InvalidParameter | Invalid parameter. | 參數不合法。 |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | 帳號無許可權操作。 |
| 400 | MissingParam.TransitRouterId | The parameter TransitrouterId is mandatory. | 缺少參數TransitRouterId。 |
| 400 | MissingParam.TransitRouterAttachmentId | The parameter TransitRouterAttachmentId is Missing. | 缺少參數TransitRouterAttachmentId。 |
| 400 | Forbidden.CDTServiceExpired | The CDT service is out of service. | 雲Data Transmission Service已欠費停服,請續約後重試。 |
| 400 | OperationUnsupported.TransitRouterType | The specified TransitRouterType does not support the operation. | 當前TransitRouter類型不支援該操作。 |
| 400 | OperationUnsupported.QosPolicyForLowLatencyLinkType | QoS Policy is not supported for Low Latency LinkType. | 低時延鏈路不支援配置QoS策略。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。