InquiryPriceCreateLoadBalancer

1. API Description

This API is used to query the price for creating a load balancer.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

regionId

Yes

String

Region ID.

vpcId

Yes

String

VPC ID to which the load balance backend server belongs.

internetChargeType

Yes

IP network billing model.

ipNetworkType

Yes

IP network type.

bandwidthMbps

No

Integer

Maximum outbound bandwidth of the elastic IP.

Unit: Mbps.

The maximum limit is usually 10000 Mbps. If you have additional requirements, please contact Support.

Available range: [1, +).

trafficPackageSize

No

Float

Data transfer package size.

The parameter is only required when internetChargeType is ByTrafficPackage.

Available range: [0.0, 999999.0].

bandwidthClusterId

No

String

ID of bandwidth cluster.

The parameter is only required when internetChargeType is BandwidthCluster.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required to locate a problem.

LoadBalancerInstancePrice

The price of the load balance instance.

eipPrice

The price of the elastic IP.

eipNetworkPrice

The price of network billing for the elastic IP.

lcuPrice

The price of LCU for the load balance instance.

4. Code Example

Query the price for creating a public network load balance instance.

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. Developer Resources

Zenlayer Cloud API 2.0 SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

No error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated