Changes the metering method of a pay-as-you-go Classic Load Balancer (CLB) instance.
- For pay-as-you-go CLB instances, you can only change the metering method from pay-by-specification to pay-by-LCU. You cannot change the metering method from pay-by-LCU to pay-by-specification.
- This operation can change the metering method of only one instance at a time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-hangzhou | The region ID of the CLB instance. You can call the DescribeRegions operation to query the most recent region list. |
Action | String | Yes | ModifyLoadBalancerInstanceChargeType | The operation that you want to perform. Set the value to ModifyLoadBalancerInstanceChargeType. |
LoadBalancerId | String | Yes | lb-bp1b3jus5hpenznuu**** | The ID of the CLB instance. |
InternetChargeType | String | No | paybytraffic | The metering method of Internet data transfer after the change. Valid value: paybytraffic. Note
|
InstanceChargeType | String | Yes | PayByCLCU | The metering method of the instance after the change. Valid value: PayByCLCU. Only pay-by-LCU is supported. |
LoadBalancerSpec | String | No | slb.s1.small | The specification of the CLB instance. You do not need to set this parameter. For pay-as-you-go CLB instances, you can only change the metering method from pay-by-specification to pay-by-LCU. You cannot change the metering method from pay-by-LCU to pay-by-specification. |
Bandwidth | Integer | No | 5 | The maximum bandwidth of the Internet-facing CLB instance that is billed on a pay-by-bandwidth basis. You do not need to set this parameter. The metering method of Internet data transfer for pay-by-LCU instances supports only pay-by-traffic. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=cn-hangzhou
&Action=ModifyLoadBalancerInstanceChargeType
&LoadBalancerId=lb-bp1b3jus5hpenznuu****
&InternetChargeType=paybytraffic
&InstanceChargeType=PayByCLCU
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyLoadBalancerInstanceChargeTypeResponse>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
</ModifyLoadBalancerInstanceChargeTypeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | OperationFailed.UnpaidBillsExist | The account has unpaid bills. Please pay your overdue bill first. | The error message returned because you cannot perform the operation when a you have an overdue payment in your account. Settle the overdue payment and try again. |
400 | Operation.NotAllowed | Operation Denied. Unfinished order exists. | The error message returned because a pending order exists. |
400 | Operation.NotAllowed | Operation Denied. Unfinished purchase exists. | The error message returned because the payment of an order is not completed. |
400 | Operation.NotAllowed | Operation Denied. Prepay instance only permitted to modify internet bandwidth. | The error message returned because you can modify only the maximum bandwidth of an Internet-facing CLB instance that uses the subscription billing method. |
400 | Operation.NotAllowed | Operation Denied. Prepay instance only permitted to increase internet bandwidth. | The error message returned because you can upgrade only the maximum bandwidth of an Internet-facing CLB instance that uses the subscription billing method. |
400 | Operation.NotAllowed | Operation Denied. The Purchase status of the instance is not valid. | The error message returned because the value of a parameter in the CLB order is invalid. |
400 | OperationDenied.PayByCLCU | The operation is not allowed because the instanceChargeType of loadbalancer is PayByCLCU. | The error message returned because the metering method of the CLB instance is pay-by-LCU. |
400 | IllegalParam.InstanceChargeType | The parameter InstanceChargeType is illegal. | The error message returned because the value of the InstanceChargeType parameter is invalid. |
400 | IllegalParam.InternetChargeType | The parameter InternetChargeType is illegal. | The error message returned because the value of the InternetChargeType parameter is invalid. |
400 | InvalidAction.RegionNotSupport | The region does not support this action. | The error message returned because the parameter is not supported in the current region. |
400 | MissingParam.LoadBalancerSpec | The param LoadBalancerSpec is required. | The error message returned because LoadBalancerSpec is not set. |
400 | OperationDenied.PayBySpec | The operation is not allowed because the instanceChargeType of loadbalancer is PayBySpec. | The error message returned because the metering method of the CLB instance is pay-by-LCU. |
400 | InvalidParameter | The specified LoadBalancerSpec is invalid. | The error message returned because the value of the LoadBalancerSpec parameter is invalid. Check the parameter value and try again. |
400 | Forbidden.LcuToSpec | User does not have permission modify InstanceChargeType to spec. | The error message returned because you cannot change the metering method of the CLB instance from pay-by-LCU to pay-by-specification. |
For a list of error codes, see Service error codes.