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

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 DescribeDBClusterAccessWhitelist

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

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

The ID of the PolarDB cluster.

Response parameters

Parameter Type Example Description
DBClusterSecurityGroups Array of DBClusterSecurityGroup

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

DBClusterSecurityGroup
SecurityGroupId String sg-bp**************

The ID of the ECS security group.

SecurityGroupName String vpc-********************

The name of the ECS security group.

Items Array of DBClusterIPArray

The list of IP address whitelists for the cluster.

DBClusterIPArray
DBClusterIPArrayAttribute String hidden

The attributes of the IP address whitelist.

DBClusterIPArrayName String default

The name of the IP address whitelist.

SecurityIps String 11.***.***.***,11.***.***.***

The IP addresses in the whitelist. Each whitelist can contain a maximum of 1,000 IP addresses. Multiple IP addresses are separated with commas (,). The following two formats are supported:

  • IP addresses, such as 10.xx.xx.24.
  • CIDR blocks, such as 10.xx.xx.24/24. In this example value, the second 24 indicates that the prefix of the CIDR block is 24-bit long. You can replace the second 24 with a value that ranges from 1 to 32.
RequestId String 559E91A2-CDA3-4E9F-808B-29D738******

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeDBClusterAccessWhitelistResponse>
  <RequestId>559E91A2-CDA3-4E9F-808B-29D738******</RequestId>
  <Items>
        <DBClusterIPArray>
              <SecurityIps>127.0.0.1</SecurityIps>
              <DBClusterIPArrayName>default</DBClusterIPArrayName>
              <DBClusterIPArrayAttribute></DBClusterIPArrayAttribute>
        </DBClusterIPArray>
        <DBClusterIPArray>
              <SecurityIps>11.***.***.***</SecurityIps>
              <DBClusterIPArrayName>test</DBClusterIPArrayName>
              <DBClusterIPArrayAttribute>hidden</DBClusterIPArrayAttribute>
        </DBClusterIPArray>
  </Items>
  <DBClusterSecurityGroups>
        <DBClusterSecurityGroup>
              <SecurityGroupName>vpc-********************</SecurityGroupName>
              <SecurityGroupId>sg-******************</SecurityGroupId>
        </DBClusterSecurityGroup>
  </DBClusterSecurityGroups>
</DescribeDBClusterAccessWhitelistResponse>

JSON format

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

Error codes

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