You can call the ModifyHADiagnoseConfig operation to modify the availability check method of an ApsaraDB RDS instance.

By default, Alibaba Cloud uses persistent connections to check the availability of an ApsaraDB RDS instance.

For more information, see What is availability detection?

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 Yes ModifyHADiagnoseConfig

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the instance. You can call the DescribeDBInstances operation to query the IDs of instances.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

TcpConnectionType String No SHORT

The availability check method of the instance. Valid values:

  • SHORT: Alibaba Cloud uses short-lived connections to check the availability of the instance.
  • LONG: Alibaba Cloud uses persistent connections to check the availability of the instance.

Response parameters

Parameter Type Example Description
RequestId String 9EFA6DF3-5247-4D9D-80AA-68765BE6D5EA

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=ModifyHADiagnoseConfig
&DBInstanceId=rm-uf6wjk5xxxxxxxxxx
&RegionId=cn-hangzhou
&TcpConnectionType=SHORT
&<Common request parameters>

Sample success responses

XML format

<ModifyHADiagnoseConfigResponse>
      <RequestId>9EFA6DF3-5247-4D9D-80AA-68765BE6D5EA</RequestId>
</ModifyHADiagnoseConfigResponse>

JSON format

{
    "RequestId":"9EFA6DF3-5247-4D9D-80AA-68765BE6D5EA"
}

Error codes

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