All Products
Search
Document Center

ApsaraDB RDS:DescribeReadDBInstanceDelay

Last Updated:May 29, 2023

You can call the DescribeReadDBInstanceDelay operation to query the latency of data replication between a primary ApsaraDB RDS instance and its read-only instance.

Operation Description

Before you call this operation, make sure that the following requirements are met:

  • The primary instance must run the MySQL or PostgreSQL database engine.
  • The primary instance must be attached with a read-only 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:DescribeReadDBInstanceDelayREAD
  • RDS
    acs:rds:*:{#accountId}:dbinstance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region where the global active database clusters that you want to query reside. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
DBInstanceIdstringYes

The ID of the primary instance.

rm-bp*****
ReadInstanceIdstringYes

The ID of the read-only instance.

rr-bp*****

Response parameters

ParameterTypeDescriptionExample
object
DBInstanceIdstring

The ID of the primary instance.

rm-bp*****
RequestIdstring

The ID of the request.

F1BDDEA8-452D-450B-AB10-CD5C5BAFC5DF
DelayTimeinteger

The latency of data replication between the primary instance and the read-only instance.

0
ReadDBInstanceIdstring

The ID of the read-only instance.

rr-bp*****
Itemsobject []

An array that consists of latency information.

DBInstanceIdstring

The ID of the primary instance.

rm-bp*****
ReadonlyInstanceDelayobject []

An array that consists of information about the write-ahead log (WAL) latency.

NoteThis parameter is returned only when the primary instance runs the PostgreSQL database engine.
WriteLatencystring

The data size that is allowed for the latency in the write-back of WAL data. Unit: MB.

0
FlushLatencystring

The data size that is allowed for the latency in the persistence of WAL data. Unit: MB.

0
ReadDBInstanceNamestring

The ID of the read-only instance.

rr-bp*****
WriteLagstring

The duration that is allowed for the latency in the write-back of WAL data. Unit: seconds.

0
FlushLagstring

The duration that is allowed for the latency in the persistence of WAL data. Unit: seconds.

0
SendLatencystring

The data size that is allowed for the latency in the sending of WAL data. Unit: MB.

0
ReplayLagstring

The duration that is allowed for the latency in the playback of WAL data. Unit: seconds.

0
ReplayLatencystring

The data size that is allowed for the latency in the playback of WAL data. Unit: MB.

0
ReadDelayTimesarray

An array that consists of latencies.

NoteThis parameter is returned only when the primary instance runs the MySQL database engine.
string

The time of the latence.

0
ReadDBInstanceNamesarray

An array that consists of information about the read-only instance.

NoteThis parameter is returned only when the primary instance runs the MySQL database engine.
string

The name of the read-only instance.

rr-bp*****

Examples

Sample success responses

JSONformat

{
  "DBInstanceId": "rm-bp*****",
  "RequestId": "F1BDDEA8-452D-450B-AB10-CD5C5BAFC5DF",
  "DelayTime": 0,
  "ReadDBInstanceId": "rr-bp*****",
  "Items": {
    "Items": [
      {
        "DBInstanceId": "rm-bp*****",
        "ReadonlyInstanceDelay": {
          "ReadonlyInstanceDelay": [
            {
              "WriteLatency": "0",
              "FlushLatency": "0",
              "ReadDBInstanceName": "rr-bp*****",
              "WriteLag": "0",
              "FlushLag": "0",
              "SendLatency": "0",
              "ReplayLag": "0",
              "ReplayLatency": "0"
            }
          ]
        },
        "ReadDelayTimes": {
          "ReadDelayTime": [
            "0"
          ]
        },
        "ReadDBInstanceNames": {
          "ReadDBInstanceName": [
            "rr-bp*****"
          ]
        }
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-06-17The internal configurations of the API operation change but you can still call the operation.
Change itemChange content
The internal configurations of the API operation change but you can still call the operation.