要實現跨地域網路執行個體互通,您必須購買頻寬套件。您可以呼叫CreateCenBandwidthPackage介面建立頻寬套件。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cen:CreateCenBandwidthPackage |
create |
*CenBandwidthPackage
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 由用戶端產生該參數值,需保證該參數在不同請求間唯一,最大值不超過 64 個 ASCII 字元。 |
02fb3da4-130e-11e9-8e44-001**** |
| Name |
string |
否 |
頻寬套件執行個體的名稱。 名稱可以為空或長度為 1~128 個字元,不能以 http://或 https://開頭。 |
nametest |
| Description |
string |
否 |
頻寬套件執行個體的描述資訊。 描述可以為空或長度為 1~256 個字元,不能以 http://或 https://開頭。 |
namedesc |
| Bandwidth |
integer |
是 |
頻寬套件執行個體的頻寬峰值。單位:Mbps。取值範圍:2~10000。 |
2 |
| GeographicRegionAId |
string |
是 |
網路執行個體所屬的區域。取值:
|
China |
| GeographicRegionBId |
string |
是 |
另一個網路執行個體所屬的區域。取值:
|
China |
| BandwidthPackageChargeType |
string |
否 |
頻寬套件執行個體的付費類型。取值: PREPAY,表示先付費後使用的付費方式。 |
PREPAY |
| Period |
integer |
否 |
頻寬套件執行個體的購買時長。預設值:1。
說明
當 BandwidthPackageChargeType 為 PREPAY 時本參數必填。 |
1 |
| PricingCycle |
string |
否 |
頻寬套件執行個體的計費週期。取值:
|
Month |
| AutoPay |
boolean |
否 |
是否自動支付頻寬套件執行個體的帳單。取值:
如果您選擇不自動支付帳單,在您呼叫本介面後,請前往控制台的訂單中心完成支付,執行個體才能建立成功。 |
false |
| Tag |
array<object> |
否 |
是否啟用自動續約功能。取值:
說明
目前僅預付費頻寬套件支援自動續約。 |
|
|
object |
否 |
|||
| Key |
string |
否 |
資源的標籤鍵。 一旦傳入該值,則不允許為空白字串。最多支援 64 個字元,不能以 一次最多支援輸入 20 個標籤的標籤鍵。 |
tagtest |
| Value |
string |
否 |
資源的標籤值。 標籤值可以為空白或輸入不超過 128 個字元的字串,不能以 每一個標籤鍵對應一個標籤值,一次最多支援輸入 20 個標籤鍵對應的標籤值。 |
tagtest |
|
否 |
自動續約時長。單位:月。取值範圍:0~2147483647。預設值:1。 |
|||
|
否 |
標籤資訊。 一次最多支援輸入 20 個標籤資訊。 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| CenBandwidthPackageId |
string |
新建的頻寬套件執行個體 ID。 |
cenbwp-4c2zaavbvh5fx**** |
| CenBandwidthPackageOrderId |
string |
頻寬套件執行個體的訂單 ID。 |
20156420004**** |
| RequestId |
string |
請求 ID。 |
E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B |
樣本
正常返回樣本
JSON格式
{
"CenBandwidthPackageId": "cenbwp-4c2zaavbvh5fx****",
"CenBandwidthPackageOrderId": "20156420004****",
"RequestId": "E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | UnSupported.ChargeType | The charge type is not supported. | |
| 400 | ParameterIllegal.BandwidthPackage | The parameter of bandwidth packaged is illegal. | 參數中指定的 BandwidthPackage 不合法。 |
| 400 | OperationInvalid.UserCanNotBuyCrossBorderBwp | According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. | 根據營運商及中國大陸法律法規的要求,您目前暫不符合購買/續約跨境頻寬包條件,請聯絡線上客服或您的商務經理諮詢處理。 |
| 400 | OperationInvalid.UserCanNotBuyBwp | The user can not buy Cen bandwidthPackage. | |
| 400 | Order.AccountStatusIllegal | Illegal account status for postpay service not opened for this account. | 帳號未開通後付費白名單,請開通後重試。 |
| 400 | InvalidParameter | Invalid parameter. | 參數不合法。 |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | 帳號無權限操作。 |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | 輸入的參數 Tag Value 不合法。 |
| 500 | PayFor.AccountMoneyValidateError | Your channel merchant quota is insufficient. Please contact the channel merchant. | 您的通路商額度不足,請與通路商聯繫。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。