调用ModifyLoadBalancerInstanceChargeType接口变更按量付费CLB实例的实例计费方式。

说明
  • 按量付费实例中,仅支持按规格计费转按使用量计费,不支持按使用量计费转按规格计费。
  • 目前,该接口不支持批量变更实例计费方式。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
RegionId String cn-hangzhou

传统型负载均衡实例的地域ID。

您可以通过调用DescribeRegions接口查询地域ID。

Action String ModifyLoadBalancerInstanceChargeType

系统规定参数。取值:ModifyLoadBalancerInstanceChargeType

LoadBalancerId String lb-bp1b3jus5hpenznuu****

传统型负载均衡实例ID。

InternetChargeType String paybytraffic

变更后的公网计费方式。

仅取值paybytraffic:按使用流量计费。

说明
  • InstanceChargeType参数的值为PayByCLCU时,只支持按使用流量计费。
  • 如果公网计费方式从按固定带宽变更为按使用流量,则所有变配会在次日00:00:00生效。
InstanceChargeType String PayByCLCU

变更后的实例计费方式。

仅取值PayByCLCU:按使用量计费。

LoadBalancerSpec String slb.s1.small

传统型负载均衡实例的规格。

您无需设置该参数。目前仅支持按规格计费转按使用量计费,不支持按使用量计费转按规格计费。

Bandwidth Integer 5

按带宽计费的公网型实例的带宽峰值。

您无需设置该参数,按使用量计费实例的公网计费方式仅支持按使用流量计费。

返回数据

名称 类型 示例值 描述
RequestId String 365F4154-92F6-4AE4-92F8-7FF34B540710

请求ID。

示例

请求示例

http(s)://[Endpoint]/?RegionId=cn-hangzhou
&Action=ModifyLoadBalancerInstanceChargeType
&LoadBalancerId=lb-bp1b3jus5hpenznuu****
&InternetChargeType=paybytraffic
&InstanceChargeType=PayByCLCU
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyLoadBalancerInstanceChargeTypeResponse>
    <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
</ModifyLoadBalancerInstanceChargeTypeResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710"
}

错误码

HttpCode 错误码 错误信息 描述
400 OperationFailed.UnpaidBillsExist The account has unpaid bills. Please pay your overdue bill first. 操作失败,原因是当前账户下存在未支付账单。请先支付您的逾期账单。
400 Operation.NotAllowed Operation Denied. Unfinished order exists. 操作被拒绝,原因是存在未完成的订单。
400 Operation.NotAllowed Operation Denied. Unfinished purchase exists. 不允许该操作,存在未完成的购买订单。
400 Operation.NotAllowed Operation Denied. Prepay instance only permitted to modify internet bandwidth. 操作被拒绝,原因是预付费实例只允许修改公网带宽。
400 Operation.NotAllowed Operation Denied. Prepay instance only permitted to increase internet bandwidth. 操作被拒绝,原因是预付费实例只支持升配公网带宽。
400 Operation.NotAllowed Operation Denied. The Purchase status of the instance is not valid. 操作被拒绝,原因是负载均衡实例下单参数非法。
400 OperationDenied.PayByCLCU The operation is not allowed because the instanceChargeType of loadbalancer is PayByCLCU. 操作被拒绝,原因是为PayByCLCU类型实例。
400 IllegalParam.InstanceChargeType The parameter InstanceChargeType is illegal. 指定的InstanceChargeType非法。
400 IllegalParam.InternetChargeType The parameter InternetChargeType is illegal. 指定的InternetChargeType非法。
400 InvalidAction.RegionNotSupport The region does not support this action. 当前地域不支持指定功能。
400 MissingParam.LoadBalancerSpec The param LoadBalancerSpec is required. 参数LoadBalancerSpec缺失。
400 OperationDenied.PayBySpec The operation is not allowed because the instanceChargeType of loadbalancer is PayBySpec. 操作被拒绝,原因是为PayBySpec类型实例。
400 InvalidParameter The specified LoadBalancerSpec is invalid. 参数LoadBalancerSpec无效。请检查该参数是否正确。
400 Forbidden.LcuToSpec User does not have permission modify InstanceChargeType to spec. 用户不允许lcu 转规格

访问错误中心查看更多错误码。