All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceHAConfig

Last Updated:May 22, 2024

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

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
  • SQL Server

References

Note Before you call this operation, carefully read the following documentation. Make sure that you fully understand the prerequisites and impacts for calling this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

rm-uf6wjk5xxxxxx

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DBInstanceIdstring

The instance ID.

rm-uf6wjk5xxxxxx
RequestIdstring

The request ID.

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.
Note This parameter is returned only for instances that run MySQL.
RPO
SyncModestring

The data replication mode of the instance. Valid values:

  • Sync: the synchronous mode
  • Semi-sync: the semi-synchronous replication mode
  • Async: the asynchronous mode
Note This parameter is returned only for instances that run MySQL.
Sync
HostInstanceInfosobject []

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

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 ID of the zone.

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 ID of the instance.

3397027
RegionIdstring

The region ID of the instance.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
  "DBInstanceId": "rm-uf6wjk5xxxxxx",
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "HAMode": "RPO",
  "SyncMode": "Sync",
  "HostInstanceInfos": {
    "NodeInfo": [
      {
        "LogSyncTime": "2018-05-05T15:15:00Z",
        "NodeType": "Master",
        "ZoneId": "cn-hangzhou-b",
        "SyncStatus": "NotAvailable",
        "DataSyncTime": "2018-05-05T15:15:00Z",
        "NodeId": "3397027",
        "RegionId": "cn-hangzhou"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidConfigNameThe ConfigName is not valid.-
400IncorrectEngineVersionCurrent DB instance engine version does not support this operation.This operation is not supported for the database engine version of the current instance.
400InvalidParameters.FormatSpecified parameter is not validThe operation failed. The values of some parameters are invalid.
403IncorrectDBInstanceTypeCurrent DB instance engine and type does not support operations.The operation failed. The operation is not supported for the database engine of the RDS instance.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
404InvalidDBInstanceName.NotFoundThe database instance does not exist.The name of the RDS instance cannot be found. Check the name of the RDS instance.
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The RDS instance cannot be found. Check the ID or name of the RDS instance.

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

Change history

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