Creates or modifies the whitelists for a PolarDB cluster. The whitelists include IP address whitelists and security groups.

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 No ModifyDBClusterAccessWhitelist

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

DBClusterId String Yes pc-*************

The ID of the cluster.

WhiteListType String No IP

The type of the whitelist. Valid values:

  • IP: IP whitelist group
  • SecurityGroup: security group

Default value: IP.

DBClusterIPArrayName String No default

The name of the IP whitelist group. The group name must be 2 to 120 characters in length and consists of lowercase letters and digits. It must start with a letter, and end with a letter or a digit.

  • If the specified whitelist group name does not exist, the whitelist group is created.
  • If the specified whitelist group name exists, the whitelist group is modified.
  • If you do not specify this parameter, the default group is modified.
Note
  • You can create a maximum of 50 IP whitelist groups for a cluster.
  • This parameter can be specified only when the WhiteListType parameter is set to IP.
DBClusterIPArrayAttribute String No hidden

The attribute of the IP whitelist group. Set this parameter to hidden to hide the IP whitelist group in the console.

Note
  • The IP whitelist group that has appeared in the console cannot be hidden.
  • This parameter can be specified only when the WhiteListType parameter is set to IP.
SecurityIps String No 10.23.12.24

The IP addresses or Classless Inter-Domain Routing (CIDR) blocks in the IP whitelist group. You can add 1,000 IP addresses or CIDR blocks to all the IP whitelist groups. Separate multiple IP addresses with commas (,). The following two formats are supported:

  • IP addresses. Example: 10.23.12.24.
  • CIDR blocks. Example: 10.23.12.24/24. 24 indicates the length of the prefix of the CIDR block. The length is the range of 1 to 32.
Note This parameter can be specified only when the WhiteListType parameter is set to IP.
ModifyMode String No Cover

The method for modifying the IP whitelist. Valid values:

  • Cover: overwrites the original IP whitelist. This value is the default value.
  • Append: adds the IP address.
  • Delete: deletes the IP address.
Note This parameter can be specified only when the WhiteListType parameter is set to IP.
SecurityGroupIds String No sg-*********

The ID of the security group. Separate multiple security groups with commas (,).

Note
  • You can add a maximum of three security groups to a cluster.
  • This parameter can be specified only when the WhiteListType parameter is set to SecurityGroup.

Response parameters

Parameter Type Example Description
RequestId String D0CEC6AC-7760-409A-A0D5-E6CD86******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=ModifyDBClusterAccessWhitelist
&DBClusterId=pc-*************
&<Common request parameters>

Sample success responses

XML format

<ModifyDBClusterAccessWhitelistResponse>  
      <RequestId>D0CEC6AC-7760-409A-A0D5-E6CD86******</RequestId>
</ModifyDBClusterAccessWhitelistResponse>

JSON format

{
  "RequestId": "D0CEC6AC-7760-409A-A0D5-E6CD86******"
}

Error codes

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