Adds IP addresses to the whitelist of a 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
Action String Yes AddListenerWhiteListItem

The operation that you want to perform.

Set the value to AddListenerWhiteListItem.

ListenerPort Integer Yes 80

The frontend port that is used by the Classic Load Balancer (CLB) instance.

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

The ID of the CLB instance.

SourceItems String Yes 1.1.1.0/21

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

This parameter takes effect only when AccessControlStatus is set to open_white_list.

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

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

RegionId String Yes cn-hangzhou

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

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=AddListenerWhiteListItem
&ListenerPort=80
&LoadBalancerId=139a00604ad-cn-east-hangzhou-01
&SourceItems=1.1.1.1,1.1.1.0/21
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

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