Changes the billing method of a pay-as-you-go Classic Load Balancer (CLB) instance.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
slb:ModifyLoadBalancerInstanceChargeType | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the CLB instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
LoadBalancerId | string | Yes | The ID of the CLB instance. | lb-bp1b3jus5hpenznuu**** |
InternetChargeType | string | No | The metering method of Internet data transfer after the change. Valid value: paybytraffic. Note
| paybytraffic |
InstanceChargeType | string | Yes | The metering method of the instance after the change. Valid value: PayByCLCU. Only pay-by-LCU is supported. | PayByCLCU |
LoadBalancerSpec | string | No | 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. | slb.s1.small |
Bandwidth | integer | No | 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. | 5 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
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. | The specified action is invalid. Your account contains incomplete purchase orders. |
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 | PAYFOR.ACCOUNT_MONEY_VALIDATE_ERROR | Your channel partner account does not have sufficient funds, please contact your channel partner to recharge the account. | - |
400 | OperationDenied.PayByCLCU | The operation is not allowed because the instanceChargeType of loadbalancer is PayByCLCU. | - |
400 | IllegalParam.InstanceChargeType | The parameter InstanceChargeType is illegal. | - |
400 | IllegalParam.InternetChargeType | The parameter InternetChargeType is illegal. | - |
400 | InvalidAction.RegionNotSupport | The region does not support this action. | - |
400 | MissingParam.LoadBalancerSpec | The param LoadBalancerSpec is required. | - |
400 | OperationDenied.PayBySpec | The operation is not allowed because the instanceChargeType of loadbalancer is PayBySpec. | - |
400 | InvalidParameterBandwidth | The specified Bandwidth is invalid. | - |
400 | InvalidParameter | The specified LoadBalancerSpec is invalid. | The specified Load Balancer Spec is invalid. Check the parameters and try again. |
400 | Forbidden.LcuToSpec | User does not have permission modify InstanceChargeType to spec. | - |
For a list of error codes, visit the Service error codes.