保障型負載均衡創建詢價
更新時間 2025-07-11 17:58:35
最近更新時間: 2025-07-11 17:58:35
分享文章
接口功能介紹
保障型負載均衡創建詢價
接口約束
無
URI
POST /v4/elb/query-create-price
路徑參數
無
Query參數
無
請求參數
請求頭header參數
無
請求體body參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| clientToken | 是 | String | 客戶端存根,用于保證訂單冪等性, 長度 1 - 64 | 79fa97e3-c48b-xxxx-9f46-6a13d8163678 | |
| regionID | 是 | String | 區域ID | ||
| projectID | 否 | String | 企業項目 ID,默認為'0' | 0 | |
| vpcID | 否 | String | vpc的ID | ||
| subnetID | 是 | String | 子網的ID | ||
| name | 是 | String | 支持拉丁字母、中文、數字,下劃線,連字符,中文 / 英文字母開頭,不能以 http: / https: 開頭,長度 2 - 32 | acl11 | |
| description | 否 | String | 支持拉丁字母、中文、數字, 特殊字符: |
《》?:“”【】、;‘',。、,不能以 http: / https: 開頭,長度 0 - 128 | acl |
| eipID | 否 | String | 彈性公網IP的ID。當resourceType=external為必填 | ||
| slaName | 是 | String | lb的規格名稱, 支持:elb.s2.small,elb.s3.small,elb.s4.small,elb.s5.small,elb.s2.large,elb.s3.large,elb.s4.large,elb.s5.large | elb.s2.small | |
| resourceType | 是 | String | 資源類型。internal:內網負載均衡,external:公網負載均衡 | internal | |
| privateIpAddress | 否 | String | 負載均衡的私有IP地址,不指定則自動分配 | ||
| cycleType | 是 | String | 訂購類型:month(包月) / year(包年) | month | |
| cycleCount | 是 | Integer | 訂購時長, 當 cycleType = month, 支持續訂 1 - 11 個月; 當 cycleType = year, 支持續訂 1 - 3 年 | 1 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 返回狀態碼(800為成功,900為失敗) | 800 | |
| message | String | statusCode為900時的錯誤信息; statusCode為800時為success, 英文 | success | |
| description | String | statusCode為900時的錯誤信息; statusCode為800時為成功, 中文 | 成功 | |
| errorCode | String | statusCode為900時為業務細分錯誤碼,三段式:product.module.code; statusCode為800時為SUCCESS | SUCCESS | |
| returnObj | Object | 業務數據 | 見下表 | returnObj |
| error | String | statusCode為900時為業務細分錯誤碼,三段式:product.module.code; statusCode為800時為SUCCESS |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| totalPrice | Double | 總價格 | 336.0 | |
| discountPrice | Double | 折后價格,云主機相關產品有 | 225.3 | |
| finalPrice | Double | 最終價格 | 225.3 | |
| subOrderPrices | Array of Objects | 子訂單價格信息 | 見下表 | subOrderPrices |
表 subOrderPrices
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| serviceTag | String | 服務類型 | OVMS | |
| totalPrice | Double | 子訂單總價格 | 336.0 | |
| finalPrice | Double | 最終價格 | 225.3 | |
| orderItemPrices | Array of Objects | item價格信息 | 見下表 | orderItemPrices |
表 orderItemPrices
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| resourceType | String | 資源類型 | NETWORK | |
| totalPrice | String | 總價格 | 246.0 | |
| finalPrice | String | 最終價格 | 135.3 |
枚舉參數
無
請求示例
請求url
POST /v4/elb/query-create-price
請求頭header
無
請求體body
{
"clientToken": "xxxx",
"regionID": "81f7728662dd11ec810800155d307d5b",
"subnetID": "subnet-23k8nuci7z",
"name": "yacos_lb_test_ipv6",
"description": "yacos_lb_test_ipv6",
"resourceType": "internal",
"privateIpAddress": "10.10.0.10",
"slaName": "elb.s2.small",
"cycleType": "month",
"cycleCount": 1
}
響應示例
{
"statusCode": 800,
"message": "success",
"description": "",
"errorCode": "SUCCESS",
"returnObj": {
"discountPrice": 1101.6,
"totalPrice": 1836,
"finalPrice": 1101.6,
"subOrderPrices": [
{
"totalPrice": 1836,
"finalPrice": 1101.6,
"serviceTag": "CT_ELB",
"orderItemPrices": [
{
"resourceType": "PGELB",
"totalPrice": 1836,
"finalPrice": 1101.6
}
]
}
]
}
}
狀態碼
請參考
錯誤碼
請參考