All Products
Search
Document Center

PolarDB:DescribeDBClusterAccessWhitelist

Last Updated:Jan 22, 2025

Queries the IP address whitelists and security groups of a PolarDB cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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:DescribeDBClusterAccessWhitelistget
*DBCluster
acs:polardb:{#regionId}:{#accountId}:dbcluster/{#DbClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the PolarDB cluster.

pc-***************

Response parameters

ParameterTypeDescriptionExample
object
DBClusterSecurityGroupsarray<object>

The Elastic Compute Service (ECS) security groups that are associated with the cluster.

DBClusterSecurityGroupobject
SecurityGroupIdstring

The ID of the ECS security group.

sg-bp**************
SecurityGroupNamestring

The name of the ECS security group.

vpc-********************
Itemsarray<object>

The details about the cluster.

DBClusterIPArrayobject
DBClusterIPArrayAttributestring

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
    DBClusterIPArrayNamestring

    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
    SecurityIpsstring

    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.
    11.***.***.***,11.***.***.***
    RequestIdstring

    The request ID.

    559E91A2-CDA3-4E9F-808B-29D738******

    Examples

    Sample success responses

    JSONformat

    {
      "DBClusterSecurityGroups": {
        "DBClusterSecurityGroup": [
          {
            "SecurityGroupId": "sg-bp**************",
            "SecurityGroupName": "vpc-********************"
          }
        ]
      },
      "Items": {
        "DBClusterIPArray": [
          {
            "DBClusterIPArrayAttribute": "hidden",
            "DBClusterIPArrayName": "default",
            "SecurityIps": "11.***.***.***,11.***.***.***"
          }
        ]
      },
      "RequestId": "559E91A2-CDA3-4E9F-808B-29D738******"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    403Forbidden.RAMUser not authorized to operate on the specified resource, or this API does not support RAM.-
    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 changedView Change Details