Queries whether the source IP address can access the 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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeDBClusterConnectivity

The action that you want to perform. Set the value to DescribeDBClusterConnectivity.

ResourceGroupIdStringNorg-************

The ID of the resource group.

DBClusterIdStringYespc-xxxxxxxxxxxxx

The ID of the cluster.

SourceIpAddressStringYes192.***.***.1

The source IP address.

Response parameters

ParameterTypeExampleDescription
RequestIdString73A85BAF-1039-4CDE-A83F-1A140F******

The ID of the request.

DBClusterIdStringpc-xxxxxxxxxxxxx

The ID of the cluster.

ConnCheckResultStringFailed

The connection diagnosis result. Valid values:

  • Success
  • Failed
ConnCheckErrorCodeStringSRC_IP_NOT_IN_USER_WHITELIST

The error code for connection diagnosis. Valid values:

  • SRC_IP_NOT_IN_USER_WHITELIST: The source IP address is not added to the whitelist.
  • CONNECTION_ABNORMAL: The connection is abnormal.
ConnCheckErrorMessageStringSrc ip:192.***.***.1 not in user whitelist

The error message for connection diagnosis.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeDBClusterConnectivity
&ResourceGroupId=rg-************
&DBClusterId=pc-xxxxxxxxxxxxx
&SourceIpAddress=192.***.***.1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBClusterConnectivityResponse>
    <RequestId>73A85BAF-1039-4CDE-A83F-1A140F******</RequestId>
    <DBClusterId>pc-xxxxxxxxxxxxx</DBClusterId>
    <ConnCheckResult>Failed</ConnCheckResult>
    <ConnCheckErrorCode>SRC_IP_NOT_IN_USER_WHITELIST</ConnCheckErrorCode>
    <ConnCheckErrorMessage>Src ip:192.***.***.1 not in user whitelist</ConnCheckErrorMessage>
</DescribeDBClusterConnectivityResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "73A85BAF-1039-4CDE-A83F-1A140F******",
  "DBClusterId" : "pc-xxxxxxxxxxxxx",
  "ConnCheckResult" : "Failed",
  "ConnCheckErrorCode" : "SRC_IP_NOT_IN_USER_WHITELIST",
  "ConnCheckErrorMessage" : "Src ip:192.***.***.1 not in user whitelist"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidActionSpecified action is not valid.The error message returned because the specified action is invalid.

For a list of error codes, see Service error codes.