All Products
Search
Document Center

PolarDB:ModifyDBClusterAccessWhitelist

Last Updated:Mar 01, 2024

Creates or modifies the whitelists (IP whitelists and security groups) of a specified cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
polardb:ModifyDBClusterAccessWhitelistWRITE
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

pc-*************
SecurityIpsstringNo

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.
10.23.12.24
DBClusterIPArrayNamestringNo

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.

default
DBClusterIPArrayAttributestringNo

The attributes 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.
  • hidden
    WhiteListTypestringNo

    The type of the whitelist. Valid values:

    • IP: IP whitelist group.
    • SecurityGroup: security group.

    Default value: IP.

    IP
    SecurityGroupIdsstringNo

    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.
  • sg-*********
    ModifyModestringNo

    The method used to modify the IP whitelist. Valid values:

    • Cover (default): overwrites the original IP whitelist.
    • Append: appends IP addresses to the original whitelist.
    • Delete: deletes IP addresses.
    Note This parameter can be specified only when the WhiteListType parameter is set to IP.
    Cover

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    The request ID.

    D0CEC6AC-7760-409A-A0D5-E6CD86******

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    400NumberExceed.securityGroupIdsThe number of SecurityGroupIds exceeds 10.The number of security groups cannot exceed 10. Modify the parameter and try again.
    400InvalidSecurityIPList.DuplicateSpecified security IP list is not valid: Duplicate IP address in the listThe specified IP address whitelist is invalid, because the whitelist contains duplicate IP addresses.
    400InvalidSecurityIPList.FormatSpecified security IP list format is not valid.The format of the specified IP address in the whitelist is invalid.
    400LockTimeoutThe request processing has failed due to lock timeout.Failed to process the request due to a lock timeout.
    403SecurityIPList.DuplicateSpecified same security IP already exists.The specified security group IP address already exists.
    403OperationDenied.LockModeThe operation is not permitted when the instance is locked.This operation is not supported while the cluster is in the locked state.
    404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.
    404InvalidDBClusterId.NotFoundThe DBInstanceId provided does not exist in our records.The specified DBClusterId parameter does not exist in the current record.

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2023-06-12The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      Error Codes 403 change
      Error Codes 404 change
    2023-04-24The Error code has changedsee changesets
    Change itemChange content
    Error CodesThe Error code has changed.
      Error Codes 400 change
      delete Error Codes: 403
      delete Error Codes: 404