All Products
Search
Document Center

Server Load Balancer:ModifyLoadBalancerInstanceChargeType

Last Updated:Sep 20, 2024

Changes the billing method of a pay-as-you-go Classic Load Balancer (CLB) instance.

Operation description

Note
  • 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

    OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

    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.
    OperationAccess levelResource typeCondition keyAssociated operation
    slb:ModifyLoadBalancerInstanceChargeTypeupdate
    • LoadBalancer
      acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
      none
    none

    Request parameters

    ParameterTypeRequiredDescriptionExample
    RegionIdstringYes

    The region ID of the CLB instance.

    You can call the DescribeRegions operation to query the most recent region list.

    cn-hangzhou
    LoadBalancerIdstringYes

    The ID of the CLB instance.

    lb-bp1b3jus5hpenznuu****
    InternetChargeTypestringNo

    The metering method of Internet data transfer after the change.

    Valid value: paybytraffic.

    Note
  • If the value of the InstanceChargeType parameter is set to PayByCLCU, only pay-by-data-transfer is supported.
  • When you change the metering method, the new metering method takes effect at 00:00:00 the next day.
  • paybytraffic
    InstanceChargeTypestringYes

    The metering method of the instance after the change.

    Valid value: PayByCLCU. Only pay-by-LCU is supported.

    PayByCLCU
    LoadBalancerSpecstringNo

    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
    BandwidthintegerNo

    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

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The ID of the request.

    365F4154-92F6-4AE4-92F8-7FF34B540710

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    400OperationFailed.UnpaidBillsExistThe account has unpaid bills. Please pay your overdue bill first.-
    400Operation.NotAllowedOperation Denied. Unfinished order exists.-
    400Operation.NotAllowedOperation Denied. Unfinished purchase exists.The specified action is invalid. Your account contains incomplete purchase orders.
    400Operation.NotAllowedOperation Denied. Prepay instance only permitted to modify internet bandwidth.-
    400Operation.NotAllowedOperation Denied. Prepay instance only permitted to increase internet bandwidth.-
    400Operation.NotAllowedOperation Denied. The Purchase status of the instance is not valid.-
    400PAYFOR.ACCOUNT_MONEY_VALIDATE_ERRORYour channel partner account does not have sufficient funds, please contact your channel partner to recharge the account.-
    400OperationDenied.PayByCLCUThe operation is not allowed because the instanceChargeType of loadbalancer is PayByCLCU.-
    400IllegalParam.InstanceChargeTypeThe parameter InstanceChargeType is illegal.-
    400IllegalParam.InternetChargeTypeThe parameter InternetChargeType is illegal.-
    400InvalidAction.RegionNotSupportThe region does not support this action.-
    400MissingParam.LoadBalancerSpecThe param LoadBalancerSpec is required.-
    400OperationDenied.PayBySpecThe operation is not allowed because the instanceChargeType of loadbalancer is PayBySpec.-
    400InvalidParameterBandwidthThe specified Bandwidth is invalid.-
    400InvalidParameterThe specified LoadBalancerSpec is invalid.The specified Load Balancer Spec is invalid. Check the parameters and try again.
    400Forbidden.LcuToSpecUser does not have permission modify InstanceChargeType to spec.-

    For a list of error codes, visit the Service error codes.