InquiryPriceCreateLoadBalancer

1. 接口描述

本接口用于查询创建负载均衡的价格。

2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

参数名称
必选
类型
描述

regionId

String

区域节点ID。

vpcId

String

负载均衡后端服务器所属的VPC网络 ID。

internetChargeType

IP网络计费模式。

ipNetworkType

IP 的网络类型。

bandwidthMbps

Integer

EIP的最大出带宽。

单位为Mbps。

最大限制通常为10000,如果有额外要求, 请联系Support。

可选值范围:[1, +)。

trafficPackageSize

Float

流量包大小。

指定此参数时,IP网络计费模式(internetChargeType) 需为ByTrafficPackage, 否则该参数不生效。

可选值范围:[0.0, 999999.0]。

bandwidthClusterId

String

共享带宽包ID。

指定此参数时,IP网络计费模式(internetChargeType) 需为BandwidthCluster, 否则该参数不生效。

3. 响应结果

参数名称
类型
描述

requestId

String

唯一请求 ID。

每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

loadBalancerInstancePrice

负载均衡实例的价格。

eipPrice

弹性IP的价格。

eipNetworkPrice

弹性IP的网络计费的价格。

lcuPrice

负载均衡实例LCU的价格。

4. 代码示例

**1.查询创建一个公网负载均衡实例价格。 **

POST /api/v2/zlb HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: InquiryPriceCreateLoadBalancer
<Common Request Params>

Request:
{
  "regionId" : "asia-east-1",
  "vpcId" : "<vpcId>",
  "internetChargeType" : "ByBandwidth",
  "ipNetworkType" : "BGPLine",
  "bandwidthMbps" : 2,
  "trafficPackageSize" : null,
  "number" : 1
}

Response:
{
  "requestId": "T775F300E-F989-4CC8-BB6E-0452A4C7EA03",
  "response": {
    "lcuPrice": {
      "unitPrice": null,
      "originalPrice": null,
      "discountPrice": null,
      "discount": 100,
      "stepPrices": [
        {
          "unitPrice": 1,
          "stepStart": 0,
          "discountUnitPrice": 1,
          "stepEnd": null
        }
      ],
      "excessUnitPrice": null,
      "excessAmountUnit": null,
      "discountUnitPrice": null,
      "chargeUnit": "HOUR",
      "amountUnit": "LCU",
      "excessDiscountUnitPrice": null
    },
    "loadBalancerInstancePrice": {
      "unitPrice": 0.016806,
      "originalPrice": null,
      "discountPrice": null,
      "discount": 100,
      "stepPrices": null,
      "excessUnitPrice": null,
      "excessAmountUnit": null,
      "discountUnitPrice": 0.016806,
      "chargeUnit": "HOUR",
      "amountUnit": null,
      "excessDiscountUnitPrice": null
    },
    "requestId": "T775F300E-F989-4CC8-BB6E-0452A4C7EA03",
    "eipPrice": {
      "unitPrice": 0.076389,
      "originalPrice": null,
      "discountPrice": null,
      "discount": 100,
      "stepPrices": null,
      "excessUnitPrice": null,
      "excessAmountUnit": null,
      "discountUnitPrice": 0.076389,
      "chargeUnit": "HOUR",
      "amountUnit": null,
      "excessDiscountUnitPrice": null
    },
    "eipNetworkPrice": {
      "unitPrice": 0.061112,
      "originalPrice": null,
      "discountPrice": null,
      "discount": 100,
      "stepPrices": null,
      "excessUnitPrice": null,
      "excessAmountUnit": null,
      "discountUnitPrice": 0.061112,
      "chargeUnit": "HOUR",
      "amountUnit": null,
      "excessDiscountUnitPrice": null
    }
  }
}

5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的开发工具集(SDK),未来会陆续支持更多开发语言,方便快速接入和使用Zenlayer的产品和服务。

6. 错误码

下面包含业务逻辑中遇到的错误码,其他错误码见公共错误码

最后更新于