You can call the DescribeDBInstanceHAConfig operation to query the high availability mode and data replication mode of an ApsaraDB RDS instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDBInstanceHAConfig |
The operation that you want to perform. Set the value to DescribeDBInstanceHAConfig. |
DBInstanceId | String | Yes | rm-uf6wjk5xxxxxx |
The ID of the instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBInstanceId | String | rm-uf6wjk5xxxxxx |
The ID of the instance. |
HAMode | String | RPO |
The high availability mode of the instance. Valid values:
Note This parameter is returned only for instances that run MySQL.
|
SyncMode | String | Sync |
The data replication mode of the instance. For more information, see Change the data replication mode of an ApsaraDB RDS for MySQL instance. Valid values:
Note This parameter is returned only for instances that run MySQL.
|
HostInstanceInfos | Array of NodeInfo |
An array that consists of the information about the primary and secondary instances. |
|
NodeInfo | |||
NodeId | String | 3397027 |
The ID of the instance. |
NodeType | String | Master |
The role of the instance. Valid values:
|
RegionId | String | cn-hangzhou |
The region ID of the instance. |
ZoneId | String | cn-hangzhou-b |
The zone ID of the instance. |
SyncStatus | String | NotAvailable |
The synchronization status of the instance. Valid values:
|
LogSyncTime | String | 2018-05-05T15:15:00Z |
The time when the secondary instance received logs from the primary instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
DataSyncTime | String | 2018-05-05T15:15:00Z |
The time when the secondary instance finished the synchronization of data from the primary instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
RequestId | String | 1AD222E9-E606-4A42-BF6D-8A4442913CEF |
The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/? Action=DescribeDBInstanceHAConfig
&DBInstanceId=rm-uf6wjk5xxxxxx
&<Common request parameters>
Sample success responses
XML
format
<DescribeDBInstanceHAConfigResponse>
<RequestId>103D4ACC-F2F9-4A7E-9ACC-14B0A25613E0</RequestId>
<DBInstanceId>rm-uf6wjk5xxxxxx</DBInstanceId>
<HAMode>RPO</HAMode>
<HostInstanceInfos>
<NodeInfo>
<DataSyncTime></DataSyncTime>
<ZoneId>cn-hangzhou-h</ZoneId>
<LogSyncTime></LogSyncTime>
<NodeType>Slave</NodeType>
<NodeId>13567431</NodeId>
<SyncStatus>NotSupport</SyncStatus>
<RegionId>cn-hangzhou</RegionId>
</NodeInfo>
<NodeInfo>
<DataSyncTime></DataSyncTime>
<ZoneId>cn-hangzhou-h</ZoneId>
<LogSyncTime></LogSyncTime>
<NodeType>Master</NodeType>
<NodeId>14565107</NodeId>
<SyncStatus>NotSupport</SyncStatus>
<RegionId>cn-hangzhou</RegionId>
</NodeInfo>
</HostInstanceInfos>
<SyncMode>Semi-sync</SyncMode>
</DescribeDBInstanceHAConfigResponse>
JSON
format
{
"RequestId": "103D4ACC-F2F9-4A7E-9ACC-14B0A25613E0",
"DBInstanceId": "rm-uf6wjk5xxxxxx",
"HAMode": "RPO",
"HostInstanceInfos": {
"NodeInfo": [
{
"DataSyncTime": "",
"ZoneId": "cn-hangzhou-h",
"LogSyncTime": "",
"NodeType": "Slave",
"NodeId": "13567431",
"SyncStatus": "NotSupport",
"RegionId": "cn-hangzhou"
},
{
"DataSyncTime": "",
"ZoneId": "cn-hangzhou-h",
"LogSyncTime": "",
"NodeType": "Master",
"NodeId": "14565107",
"SyncStatus": "NotSupport",
"RegionId": "cn-hangzhou"
}
]
},
"SyncMode": "Semi-sync"
}
Error codes
For a list of error codes, visit the API Error Center.