Adds IP addresses to a listener whitelist.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes AddListenerWhiteListItem

The name of this action.

Value: AddListenerWhiteListItem

ListenerPort Integer Yes 80

The frontend port used by the SLB instance.

LoadBalancerId String Yes 139a00604ad-cn-east-hangzhou-01

The ID of the SLB instance.

RegionId String Yes cn-hangzhou-d

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

SourceItems String Yes 1.1.1.1,1.1.1.0/21

The access control list.

This parameter is valid when the value of the AccessControlStatus parameter is open_white_list.

Both IP addresses and IP address segments (namely, CIDR blocks) are supported. Use commas (,) to separate multiple IP addresses or CIDR blocks.

0.0.0.0 or 0.0.0.0/0 is not allowed. You can call SetListenerAccessControlStatus to set AccessControlStatus to close to disable access control.

Response parameters

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

The ID of the request.

Examples

Request example


http(s)://[Endpoint]/? Action=AddListenerWhiteListItem
&ListenerPort=80
&LoadBalancerId=139a00604ad-cn-east-hangzhou-01
&SourceItems=1.1.1.1,1.1.1.0/21
&<CommonParameters>

Response examples

XML format

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

JSON format

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

Error codes

See common error codes.