終端節點創建詢價
更新時間 2023-09-21 14:25:06
最近更新時間: 2023-09-21 14:25:06
分享文章
接口功能介紹
終端節點創建詢價
接口約束
URI
POST /v4/vpce/query-create-endpoint-price
請求參數
請求體Body參數
| 參數 | 參數類型 | 是否必填 | 說明 | 示例 |
|---|---|---|---|---|
| clientToken | String | 是 | 客戶端存根,用于保證訂單冪等性, 長度 1 - 64 | 79fa97e3-c48b-xxxx-9f46-6a13d8163678 |
| regionID | String | 是 | 資源池ID | 81f7728662dd11ec810800155d307d5b |
| cycleType | String | 是 | 收費類型:只能填寫 on_demand | |
| endpointServiceID | String | 是 | 終端節點關聯的終端節點服務 | |
| endpointName | String | 是 | 終端節點名稱,只能由數字,字母,-組成不能以數字和-開頭,最大長度28 | |
| subnetID | String | 是 | 子網id | subnet-xxxx |
| vpcID | String | 是 | vpc-xxxx | |
| IP | String | 否 | vpc address | 192.168.1.1 |
| whitelistFlag | int | 是 | 白名單開關 1.開啟 0.關閉,默認1 | 1 |
| whitelist | String of Array | 否 | 白名單 | ['1.1.1.1/24'] |
| description | String | 否 | 描述,內容限制:1、長度限制100 2、支持漢字,大小寫字母,數字 3、支持英文特殊字符:~!@#$%^&*()_-+=<>?:"{} | this is a test |
響應參數
| 參數 | 參數類型 | 說明 | 示例 |
|---|---|---|---|
| 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
| 參數名 | 類型 | 示例值 | 說明 |
|---|---|---|---|
| totalPrice | Float | 總價格 | 336.0 |
| discountPrice | Float | 折后價格,云主機相關產品有 | 225.3 |
| finalPrice | Float | 最終價格 | 225.3 |
| subOrderPrices | Array of Objects | 子訂單價格信息 | 見下表 |
表 subOrderPrices
| 參數名 | 類型 | 示例值 | 說明 |
|---|---|---|---|
| serviceTag | String | 服務類型 | OVMS |
| totalPrice | Float | 子訂單總價格 | 336.0 |
| finalPrice | Float | 最終價格 | 225.3 |
| orderItemPrices | Array of Object | item價格信息 | 見下表 |
表 orderItemPrices
| 參數名 | 類型 | 示例值 | 說明 |
|---|---|---|---|
| resourceType | String | 資源類型 | NETWORK |
| totalPrice | String | 總價格 | 246.0 |
| finalPrice | String | 最終價格 | 135.3 |
請求示例
POST /v4/eip/query-create-price
請求體body
{
"clientToken": "et",
"regionID": "81f7728662dd11ec810800155d307d5b",
"endpointName": "test",
"cycleType": "on_demand",
"whitelistFlag": 1,
"endpointServiceID": "826a37c3-0b9f-4e37-bad2-6c8fa0ae9ecd",
"vpcID": "cd94e957-893f-5257-927e-aefdfa22af49",
"whitelist": ["10.10.1.0/24"],
"subnetID": "b0192cd3-dade-535e-afc9-d46ce8d55278"
}
響應示例
{
"statusCode": 800,
"message": "success",
"description": "",
"errorCode": "SUCCESS",
"returnObj": {
"discountPrice": 1101.6,
"totalPrice": 1836,
"finalPrice": 1101.6,
"subOrderPrices": [
{
"totalPrice": 1836,
"finalPrice": 1101.6,
"serviceTag": "NETWORK",
"orderItemPrices": [
{
"resourceType": "VPCE_INSTANCE",
"totalPrice": 1836,
"finalPrice": 1101.6
}
]
}
]
}
}
狀態碼
| 狀態碼 | 描述 |
|---|---|
| 200 | 表示請求成功。 |
錯誤碼
請參考 錯誤碼說明。