All Products
Search
Document Center

Database Autonomy Service:GetDBInstanceConnectivityDiagnosis

Last Updated:Dec 23, 2024

Queries the diagnosis of network connectivity when a user accesses a specific database instance by specifying an IP address.

Operation description

Before you call this operation, take note of the following items:

  • If you use an Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.
  • If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.
  • The database instance that you want to manage is connected to DAS.

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:
    • 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
hdm:GetDBInstanceConnectivityDiagnosisget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The instance ID.

rm-2ze8g2am97624****
SrcIpstringYes

The source IP address.

47.110.180.62

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Codestring

The HTTP status code returned.

200
Messagestring

The returned message.

Note If the request was successful, Successful is returned. Otherwise, an error message such as an error code is returned.
Successful
Dataobject

The detailed information.

instanceIdstring

The instance ID.

rm-2ze8g2am97624****
successboolean

Indicates whether the connectivity test was passed:

  • true
  • false
false
failTypestring

The type of the exception:

  • 0: an exception that can be handled by the user.
  • 1: an exception that can be handled by a technical engineer.
0
connCheckErrorCodestring

The exception detection items:

  • SRC_IP_NOT_IN_USER_WHITELIST: The source IP address is not added to the whitelist of the user.
  • VIP_NOT_EXISTS: The Application Load Balancer (ALB) instance corresponding to the virtual IP address (VIP) does not exist.
  • RS_NOT_EXISTS: The resource sharing (RS) is not properly mounted.
  • VIP_TUNNEL_ID_NOT_CONSISTENT: The tunnel ID used by the VIP of the virtual private cloud (VPC) type is different from the tunnel ID of the VPC.
  • VIP_VPC_CLOUD_INSTANCE_NOT_EXISTS: The VIP of the VPC type does not exist.
  • VIP_IS_NOT_NGLB: The NGLB mode is disabled for the VIP.
  • CUSTINS_NOT_ASSOCIATE_ECS_SECURITY_GROUP: No security group is associated with the instance.
  • SRC_IP_NOT_IN_USER_WHITELIST: The source IP address is not added to the whitelist of the user.
  • SRC_IP_NOT_IN_ADMIN_WHITELIST: The source IP address is not added to the whitelist of the instance.
  • SRC_IP_NOT_IN_ECS_SECURITY_GROUP: The source IP address is not added to the security group that is associated with the instance.
  • VPC_INSTANCE_IP_NOT_WORKING_STATUS: The IP address in the VPC is in an abnormal state.
SRC_IP_NOT_IN_USER_WHITELIST
connCheckErrorMessagestring

The details of the exception detection.

Src ip:47.110.180.62 not in user whitelist
RequestIdstring

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "Data": {
    "instanceId": "rm-2ze8g2am97624****",
    "success": false,
    "failType": "0",
    "connCheckErrorCode": "SRC_IP_NOT_IN_USER_WHITELIST",
    "connCheckErrorMessage": "Src ip:47.110.180.62 not in user whitelist"
  },
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true"
}

Error codes

HTTP status codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

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