接口功能介绍
性能保障型负载均衡创建询价
接口约束
URI
POST /v4/elb/query-create-price
请求参数
请求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 |
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
参数名 | 类型 | 示例值 | 说明 |
---|---|---|---|
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/elb/query-create-price
请求体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
}
]
}
]
}
}
状态码
状态码 | 描述 |
---|---|
200 | 表示请求成功。 |
错误码
请参考 错误码说明。