You can call the SetLoadBalancerStatus API to set the status of an SLB instance.


Click here to perform a debug operation in OpenAPI Explorer and automatically generate an SDK code example.

Request parameters

Name Type Required? Example value Description
Action String Yes SetLoadBalancerStatus

The action to perform. Valid value: SetLoadBalancerStatus

LoadBalancerId String Yes lb-bp1b6c719dfa08exfuca5

The ID of the SLB instance

LoadBalancerStatus String Yes active

The status of the SLB instance. Valid values: acitve | inactive.

  • active (default value)
If you set the status of an SLB instance to active, the listeners in the instance can distribute traffic according to the specified rules.

By default, the SLB instance status is active.

  • inactive
If you set the status of an SLB instance to inactive , the listeners in the instance stops distributing traffic.
Note The instance status changes to inactive if all the listeners of the instance are deleted.
RegionId String Yes cn-hangzhou

The ID of the region to which the SLB instance belongs.

You can query the region ID by referring to the list of regions and zones or by calling the DescribeRegions API.

OwnerAccount String No OwnerAccount


Response parameters

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

The ID of the request


Request example

http(s)://[Endpoint]/? Action=SetLoadBalancerStatus

Normal response examples

XML format


JSON format


Error codes

Click here to view the error codes.