Adds IP addresses to the whitelist of a listener.


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
RegionId String No cn-hangzhou

The ID of the region where the Classic Load Balancer (CLB) instance is created.

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

Action String Yes AddListenerWhiteListItem

The operation that you want to perform. Set the value to AddListenerWhiteListItem.

LoadBalancerId String Yes lb-bp1o94dp5i6ea*******

The ID of the CLB instance.

ListenerPort Integer Yes 80

The frontend port that is used by the CLB instance.

SourceItems String Yes 192.168.XX.XX

The IP addresses or CIDR blocks that you want to add to the whitelist.

This parameter takes effect when the AccessControlStatus parameter of the listener is set to open_white_list.

Separate multiple IP addresses or CIDR blocks with commas (,).

You cannot enter or To disable access control, you can call the SetListenerAccessControlStatus operation to set the value of the AccessControlStatus parameter to close.

ListenerProtocol String No https

The frontend protocol that is used by the CLB instance.

Note This parameter is required when listeners that use different protocols listen on the same port.

Response parameters

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

The ID of the request.


Sample requests

&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"

Error codes

HttpCode Error code Error message Description
400 TooManyListeners More than 1 listener is found, please be more specified The error message returned because more than one listener matches the specified conditions. Specify more filter conditions and try again.
400 Operation.NotAllowed WhiteList is Disabled while Acl is Enabled The error message returned because you cannot configure the whitelist after the whitelist is enabled.
400 InvalidAddress %s,%s The error message returned because a parameter is set to an invalid value. The error message returned because one or more specified parameters are invalid. Make sure that the parameters are valid and try again.
400 InvalidParameter.SourceItems %s. The error message returned because the IP addresses or CIDR blocks that you add to the whitelist overlap with each other.

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