You need to enable JavaScript to run this app.
导航

ConvertLoadBalancerBillingType

最近更新时间2024.01.12 10:21:38

首次发布时间2022.03.01 08:57:47

调用 ConvertLoadBalancerBillingType 接口,转换负载均衡实例的计费类型。

使用说明

该接口支持以下计费转换:

  • 按量计费-按规格计费与包年包月之间的相互转换。
  • 按量计费-按规格计费与按量计费-按使用量计费之间的相互转换。

说明

  • 包年包月计费类型不支持直接转换为按量计费-按使用量计费。如需转换,请先转换为按量计费-按规格计费,再转换为按量计费-按使用量计费。
  • 公网负载均衡实例关联的公网IP为增强防护类型或已加入共享带宽包时,计费类型不支持转换为包年包月。

调试

请求参数

名称类型是否必选示例值
描述
ActionStringConvertLoadBalancerBillingType要执行的操作,取值为ConvertLoadBalancerBillingType。
VersionString2020-04-01API版本信息,当前版本为:2020-04-01。
LoadBalancerIdStringclb-bp1b6c719dfa08ex****负载均衡实例ID。您可以调用DescribeLoadBalancers接口获取负载均衡实例ID。

LoadBalancerBillingType

Integer

1

负载均衡实例的计费类型。取值如下:

  • 1:包年包月
  • 2:按量计费-按规格计费
  • 3:按量计费-按使用量计费

LoadBalancerSpec

String

small_1

负载均衡实例的规格,不同规格提供的转发能力不同,更多信息请参见产品类型与规格。取值如下:

  • small_1:小型I
  • small_2:小型II
  • medium_1:中型I
  • medium_2:中型II
  • large_1:大型I
  • large_2:大型II

说明

参数LoadBalancerBillingType设置为2,且CLB实例原计费类型为按量计费-按使用量计费时,该参数为必填。

PeriodUnit

String

Month

包年包月计费类型的时长单位。取值如下:

  • Month (默认值):按月计费
  • Year:按年计费

Period

Integer

1

包年包月计费类型的时长数量。

  • PeriodUnit配置为Month时,取值包括1~9,12,24和36。
  • PeriodUnit配置为Year时,取值范围为1~3。

说明

不传入该参数或该参数不传入数值时,默认为1。

返回参数

名称类型示例值
描述
RequestIdString20210811152539010225146063030****请求ID。
OrderIdStringOrder705261343570982****订单ID。

请求示例

GET /?Action=ConvertLoadBalancerBillingType&Version=2020-04-01&LoadBalancerId=clb-bp1b6c719dfa08ex****&LoadBalancerBillingType=1 HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
Service: clb

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20210811152539010225146063030****",
        "Action": "ConvertLoadBalancerBillingType",
        "Version": "2020-04-01",
        "Service": "clb",
        "Region": "cn-beijing"
    }, 
    "Result": {
        "RequestId": "20210811152539010225146063030****",
        "OrderId": "Order705261343570982****"
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HttpCode错误码错误信息描述

400

MissingParameter

The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'XXX'.

该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如XXX

说明

其中,XXX表示缺少的参数名称。

400InvalidLoadBalancerBillingType.MalformedThe specified LoadBalancerBillingType is malformed.指定的 LoadBalancerBillingType 参数格式不合法。
400InvalidPeriod.MalformedThe specified Period is malformed.指定的 Period 参数格式不合法。
400InvalidPeriodUnit.MalformedThe specified PeriodUnit is malformed.指定的 PeriodUnit 参数格式不合法。
400InvalidBillingTypeConvert.MalformedThe specified billing type is malformed. EIP which is already in BandwidthPackage can't be converted to 1.指定的参数BillingType不合法。指定的负载均衡关联的公网IP已加入共享带宽包,不允许转换为包年包月计费类型。
400OrderError.PreOrderFailed to create a preorder.下单失败。
400OrderError.OrderPayFailed to create order and pay.下单支付失败。
400UnsupportedOperation.AccountArrearsThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
400InvalidBillingTypeConvert.MalformedThe specified billing type is malformed. EIP which is already in BandwidthPackage can't be converted to 1.共享带宽里的EIP,其计费方式不能被转换成包年包月。
400InvalidBillingTypeConvert.MalformedThe specified billing type convert is malformed. AntiDDoS enhanced eip billing type only support converting between 2 and 3.指定的计费类型不支持。增强防护EIP只支持按带宽上限计费和按流量计费类型之间互相转换。
400InvalidLoadBalancerSpec.MalformedThe specified LoadBalancerSpec is malformed.指定的 LoadBalancerSpec 参数格式不合法。
400InvalidLoadBalancer.InvalidStatusThe specified LoadBalancer is not in the correct status for the request.指定的负载均衡所处状态无法响应该请求。
400InvalidLoadBalancerSpec.ListenerBandwidthMismatchThe total bandwidth of all listeners exceeds the upper limit of the specified spec.实例内监听器指定带宽总和超过指定的负载均衡规格上限。
400InvalidLoadBalancer.UnSupportActionThe specified LoadBalancer does not support this action.指定的负载均衡不支持当前操作。
403InvalidResourceType.ServcieManagedThe specified ResourceType is managed by a service.指定的资源是服务托管资源。
404InvalidLoadBalancer.NotFoundThe specified LoadBalancer does not exist.指定的负载均衡不存在。
404InvalidExclusiveCluster.NotFoundThe specified ExclusiveCluster does not exist.指定的独占集群不存在。
412InvalidExclusiveCluster.ExpiredThe specified ExclusiveCluster has expired.指定的独占集群已过期。
412InvalidExclusiveCluster.UnPurchasedThe specified ExclusiveCluster is not purchased.指定的独占集群未购买。
412InvalidLoadBalancer.ExpiredThe specified LoadBalancer has expired.指定的负载均衡已过期。
412InvalidLoadBalancer.InvalidBillingTypeThe specified LoadBalancer is not in the correct BillingType for the request.指定的负载均衡所处计费类型无法响应该请求。