Enables or disables the whitelist of a specified listener.

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

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 SetListenerAccessControlStatus

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

LoadBalancerId String Yes lb-8vb86hxixo8lvsja8****

The ID of the CLB instance.

ListenerPort Integer Yes 80

The frontend port that is used by the CLB instance.

Valid values: 1 to 65535.

AccessControlStatus String Yes open_white_list

Specifies whether to enable the whitelist. Valid values:

  • open_white_list: enables the whitelist.
  • close: disables the whitelist.
Note After the whitelist is enabled, if no IP address is added to the whitelist, the CLB instance does not distribute network traffic.
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.

Examples

Sample requests

http(s)://[Endpoint]/?RegionId=cn-hangzhou
&Action=SetListenerAccessControlStatus
&ResourceOwnerId=11
&LoadBalancerId=lb-8vb86hxixo8lvsja8****
&ListenerPort=80
&AccessControlStatus=open_white_list
&ListenerProtocol=https
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<SetListenerAccessControlStatusResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</SetListenerAccessControlStatusResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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 OperationFailed.ActionNotSupport The loadbalancer of ipv6 does not support such action. The error message returned because IPv6 CLB instances do not support this operation.
400 OperationUnsupported.SetAccessControl The singleTunnel/anyTunnel loadbalancer does not support config AccessControlList. The error message returned because Single Tunnel and Any Tunnel CLB instances do not support network access control lists (ACLs).

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