You can call this operation to modify the IP address whitelist of an ApsaraDB for Redis instance.

For more information about how to perform the corresponding operation in the console, see Set an IP address whitelist.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifySecurityIps

The operation that you want to perform. Set this parameter to ModifySecurityIps.

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance for which you want to modify the IP address whitelist.

SecurityIps String Yes 100.xxx.xxx.xxx/24,10.xxx.xxx.xxx

The IP addresses in the whitelist group. The maximum number of IP addresses in the whitelist group is 1000. Separate multiple IP addresses with a comma (,). You can add 0.0.0.0/0, IP addresses such as 10.23.12.24, and Classless Inter-Domain Routing (CIDR) blocks such as 10.23.12.24/24 to the whitelist group. In CIDR block 10.23.12.24/24, /24 specifies the length of the prefix in the IP addresses. The prefix length ranges from 1 to 32.

SecurityIpGroupAttribute String No hidden

The value of this parameter is empty by default. The attribute of the whitelist group. The console does not display the whitelist group whose value of this parameter is hidden.

ModifyMode String No Append

The method of modifying the whitelist. Valid values:

  • Cover: overwrites the original whitelist.
  • Append: adds the IP addresses to the whitelist.
  • Delete: deletes the IP addresses from the whitelist.
SecurityIpGroupName String No default

The name of the whitelist group.

AccessKeyId String No Lxxxxxxxxxxxxxxw

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Parameter Type Example Description
RequestId String AAAF99B1-69ED-4E80-8CD5-272C09E46ACF

The ID of the request.

Examples

Sample request


https://r-kvstore.aliyuncs.com/
? Action=ModifySecurityIps
&InstanceId=r-bp1xxxxxxxxxxxxx
&SecurityIps=100.xxx.xxx.xxx/24,10.xxx.xxx.xxx
&<Common request parameters>

Sample success response

XML format

<ModifySecurityIpsResponse>
  <RequestId>AAAF99B1-69ED-4E80-8CD5-272C09E46ACF</RequestId>
</ModifySecurityIpsResponse>

JSON format

{
	"RequestId":"AAAF99B1-69ED-4E80-8CD5-272C09E46ACF"
}

Error codes

View error codes.