Configure a whitelist for a listener.

Request parameters

Name  Type Required  Description
Action  String   Yes The action to perform. Valid value:

AddListenerWhiteListItem

RegionId String   Yes The region of SLB instance.

You can obtain the region ID by calling the DescribeRegions API.

LoadBalancerId String   Yes The ID of SLB instance.
ListenerPort Integer Yes The frontend listener port used by the SLB instance.

Valid value: 1-65535

SourceItems String   Yes Only requests from IP addresses in the whitelist are forwarded.

Separate multiple IP addresses or IP address ranges using commas (,).

The IP address 0.0.0.0 or the IP address range 0.0.0.0/0 are not allowed. To disable access control, call the SetListenerAccessControlStatus API and set the value of the AccessControlStatus parameter to close.

Note This is valid when the AccessControlStatus of the listener is open_white_list.

Response parameters

Name Type Description
RequestId String The ID of the request.

Examples

Request example

https://slb.aliyuncs.com/?Action=AddListenerWhiteListItem
&LoadBalancerId=lb-t4nj5vuz8ish9emfk1f20
&ListenerPort=80
&SourceItems=10.10.10.10,10.20.10.3/24
&CommonParameters

Response example

  • XML format
    <? xml version="1.0" encoding="UTF-8"? >
    <AddListenerWhiteListItemResponse>
          <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    </AddListenerWhiteListItemResponse>
  • JSON format
    {
      "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
    }