保障型负载均衡创建询价
更新时间 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
}
]
}
]
}
}
状态码
请参考 状态码
错误码
请参考 错误码