You can call this operation to query the IP address whitelist and security groups of a specified ApsaraDB for PolarDB 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
DBClusterId String Yes pc-xxxxxxxxxxx

The ID of the cluster.

AccessKeyId String No key-test

The AccessKey ID provided to you by Alibaba Cloud.

Action String No DescribeDBClusterAccessWhitelist

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

Response parameters

Parameter Type Example Description
DBClusterSecurityGroups Array

The ECS security groups associated with the cluster. It is an array consisting of DBClusterSecurityGroup data.

DBClusterSecurityGroup

The ECS security group associated with the cluster.

SecurityGroupId String sg-bpxxxxxxxx

The ID of the ECS security group.

SecurityGroupName String mytest1

The name of the ECS security group.

Items Array

The IP address whitelist of the cluster.

DBClusterIPArray

The details of the IP address whitelist.

DBClusterIPArrayAttribute String hidden

The attribute of the IP address whitelist.

DBClusterIPArrayName String default

The name of the IP address whitelist.

SecurityIps String 11.xx.xx.xx,11.xx.xx.xx

The IP addresses in the IP address 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:

  • Standard IP address format, such as 10.23.12.24.
  • Classless Inter-Domain Routing (CIDR) blocks, such as 10.23.12.24/24, where 24 indicates the prefix of the CIDR block is 24-bit. You can replace 24 with a value ranging from 1 to 32.
RequestId String 8D0429EC-8E2C-4675-8102-28AC6FE92751

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=DescribeDBClusterAccessWhitelist
&DBClusterId=pc-xxxxxxxxxxx
&<Common request parameters>

Sample success responses

XML format

<Items>
    <DBClusterIPArray>
        <DBClusterIPArrayAttribute/>
        <DBClusterIPArrayName>default</DBClusterIPArrayName>
        <SecurityIps>127.0.0.1</SecurityIps>
    </DBClusterIPArray>
    <DBClusterIPArray>
        <DBClusterIPArrayAttribute>hidden</DBClusterIPArrayAttribute>
        <DBClusterIPArrayName>maxscale</DBClusterIPArrayName>
        <SecurityIps>11.xx.xx.xx,11.xx.xx.xx</SecurityIps>
    </DBClusterIPArray>
</Items>
<RequestId>0E863680-F8AC-4EE5-B090-31529D3CFD30</RequestId>
<DBClusterSecurityGroups>
    <DBClusterSecurityGroup>
        <SecurityGroupId>sg-bpxxxxxxxx</SecurityGroupId>
        <SecurityGroupName>mytest1</SecurityGroupName>
    </DBClusterSecurityGroup>
</DBClusterSecurityGroups>

JSON format

{
	"Items":{
		"DBClusterIPArray":[
			{
				"DBClusterIPArrayAttribute":"",
				"DBClusterIPArrayName":"default",
				"SecurityIps":"127.0.0.1"
			},
			{
				"DBClusterIPArrayAttribute":"hidden",
				"DBClusterIPArrayName":"maxscale",
				"SecurityIps":"11.xx.xx.xx,11.xx.xx.xx"
			}
		]
	},
	"RequestId":"0E863680-F8AC-4EE5-B090-31529D3CFD30",
	"DBClusterSecurityGroups":{
		"DBClusterSecurityGroup":[
			{
				"SecurityGroupId":"sg-bpxxxxxxxx",
				"SecurityGroupName":"mytest1"
			}
		]
	}
}

Error codes

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