All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceHAConfig

Last Updated:May 16, 2023

Queries the high availability mode and data replication mode of an instance.

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
rds:DescribeDBInstanceHAConfigREAD
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

rm-uf6wjk5xxxxxx

Response parameters

ParameterTypeDescriptionExample
object
DBInstanceIdstring

The ID of the instance.

rm-uf6wjk5xxxxxx
RequestIdstring

The ID of the request.

1AD222E9-E606-4A42-BF6D-8A4442913CEF
HAModestring

The high availability mode of the instance. Valid values:

  • RPO: Data consistency is preferred. The instance ensures data reliability to minimize data losses. If you have high requirements on data consistency, select this mode.
  • RTO: Service availability is preferred. The instance restores the database service at the earliest opportunity to ensure service availability. If you have high requirements on instance availability, select this mode.
NoteThis parameter is returned only for instances that run MySQL.
RPO
SyncModestring

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:

  • Sync: the synchronous mode
  • Semi-sync: the semi-synchronous replication mode
  • Async: the asynchronous mode
NoteThis parameter is returned only for instances that run MySQL.
Sync
HostInstanceInfosarray

An array that consists of the information of the primary and secondary instances.

object
LogSyncTimestring

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.

2018-05-05T15:15:00Z
NodeTypestring

The type of the node. Valid values:

  • Master: the primary node
  • Slave: the secondary node
Master
ZoneIdstring

The zone ID of the instance.

cn-hangzhou-b
SyncStatusstring

The synchronization status. Valid values:

  • NotAvailable: The synchronization fails. This means that faults occur.
  • Syncing: The synchronization is in process. In this case, a primary/secondary switchover may cause data losses.
  • Synchronized: The synchronization is completed.
  • NotSupport: The database engine or database engine version does not involve the synchronization between the primary and secondary instances.
NotAvailable
DataSyncTimestring

The time when the secondary instance completed 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.

2018-05-05T15:15:00Z
NodeIdstring

The unique identifier of the instance.

3397027
RegionIdstring

The region ID of the instance.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
	"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"
}

XMLformat

<DescribeDBInstanceHAConfigResponse>
<RequestId>103D4ACC-F2F9-4A7E-9ACC-14B0A25613E0</RequestId>
<DBInstanceId>rm-uf6wjk5xxxxxx</DBInstanceId>
<HAMode>RPO</HAMode>
<HostInstanceInfos>
    <NodeInfo>
        <DataSyncTime/>
        <ZoneId>cn-hangzhou-h</ZoneId>
        <LogSyncTime/>
        <NodeType>Slave</NodeType>
        <NodeId>13567431</NodeId>
        <SyncStatus>NotSupport</SyncStatus>
        <RegionId>cn-hangzhou</RegionId>
    </NodeInfo>
    <NodeInfo>
        <DataSyncTime/>
        <ZoneId>cn-hangzhou-h</ZoneId>
        <LogSyncTime/>
        <NodeType>Master</NodeType>
        <NodeId>14565107</NodeId>
        <SyncStatus>NotSupport</SyncStatus>
        <RegionId>cn-hangzhou</RegionId>
    </NodeInfo>
</HostInstanceInfos>
<SyncMode>Semi-sync</SyncMode>
</DescribeDBInstanceHAConfigResponse>

Sample failed responses

JSONformat

{
    "RequestId": "7463B73D-35CC-4D19-A010-6B8D65D242EF",
    "HostId": "rds.aliyuncs.com",
    "Code": "UnsupportedOperation",
    "Message": "The specified action is not supported."
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-06-23API Description Update
Change itemChange content
API DescriptionAPI Description Update