DescribeEipPrice

1. 接口描述

本接口(DescribeEipPrice)用于创建公网弹性IP询价。

2. 请求参数

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

参数名称
必选
类型
描述

regionId

String

创建EIP所在的节点ID。

internetChargeType

公网弹性IP的网络计费方式。

amount

Integer

需要创建EIP的数量。

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

默认值:1。

eipV4Type

公网弹性IP的线路类型。

bandwidth

Integer

公网弹性IP的带宽限速。

单位:Mbps。

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

flowPackage

Float

公网IPv6的流量包大小。

单位为TB。

值要求为0或0.1的倍数。

当子网的堆栈类型包括V6且为公网时,且网络计费方式是流量计费(ByTrafficPackage)需要指定。

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

cidrId

String

指定CIDR ID,使用CIDR内分配弹性IP。

该字段和eipV4Type不能同时指定。

clusterId

String

公网IPv6所指定的共享带宽包ID。

当子网的堆栈类型包括V6且为公网时,且网络计费方式是共享带宽包计费(BandwidthCluster)需要指定。

peerRegionId

String

远端的节点ID。

3. 响应结果

参数名称
类型
描述

requestId

String

唯一请求 ID。

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

eipPrice

公网弹性IP的保留价格。如果是通过cidr创建,则保留价格为null。

bandwidthPrice

公网弹性IP的带宽价格。

4. 代码示例

1. 查询一个BGP公网IP的价格,网络计费采用流量包计费。流量包大小为10TB。

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

Request:
{
  "regionId": "asia-east-1",
  "amount": 1,
  "name": "Test-EIP",
  "internetChargeType": "ByTrafficPackage",
  "eipV4Type": "BGPLine",
  "bandwidth": 50,
  "flowPackage": 10
}


Response:
{
  "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
  "response": {
    "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
    "eipPrice": {
      "discount": 95.0,
      "discountPrice": xx.0,
      "originalPrice": xxx.0,
      "unitPrice": null,
      "discountUnitPrice": null,
      "chargeUnit": null,
      "stepPrices": null
    }
      "bandwidthPrice": {
        "discount": 95.0,
        "discountPrice": xx.0,
        "originalPrice": xxx.0,
        "unitPrice": null,
        "discountUnitPrice": null,
        "chargeUnit": null,
        "stepPrices": null
      }
  }
}

5. 开发者工具

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

6. 错误码

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

HTTP状态码

错误码

说明

最后更新于