Modifies the state of a Classic Load Balancer (CLB) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetLoadBalancerStatus

The operation that you want to perform.

Set the value to SetLoadBalancerStatus.

LoadBalancerId String Yes lb-bp1b6c719dfa08e******

The ID of the CLB instance.

LoadBalancerStatus String Yes active

The state of the CLB instance. Valid values: active and inactive.

  • active (default)

    If a CLB instance is in the active state, listeners of the CLB instance can forward traffic based on forwarding rules.

    By default, newly created CLB instances are in the active state.

  • inactive

    If a CLB instance is in the inactive state, listeners of the CLB instance do not forward traffic.

Note If all listeners of a CLB instance are deleted, the CLB instance automatically switches to the inactive state.
RegionId String Yes cn-hangzhou

The ID of the region where the CLB instance is deployed.

You can query region IDs from the Regions and zones list or by calling the DescribeRegions operation.

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=SetLoadBalancerStatus
&LoadBalancerId=lb-bp1b6c719dfa08e******
&LoadBalancerStatus=active
&<Common request parameters>

Sample success responses

XML format

<SetLoadBalancerStatusResponse>
			  <RequestId>E6DDFE22-F019-4F34-B8DD-FD14973450A6</RequestId>
		</SetLoadBalancerStatusResponse>

JSON format

{
    "RequestId": "E6DDFE22-F019-4F34-B8DD-FD14973450A6"
}

Error codes

For a list of error codes, visit the API Error Center.