接口功能介绍
终端节点创建询价
接口约束
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
}
]
}
]
}
}
状态码
错误码
请参考 错误码说明。