You can call the ModifyDBInstanceDelayedReplicationTime operation to set the replication latency for a read-only ApsaraDB RDS for MySQL instance.

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 ModifyDBInstanceDelayedReplicationTime

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

DBInstanceId String Yes rm-uf6wjk5*****

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

ReadSQLReplicationTime String Yes 100

The replication latency of the read-only instance. Unit: seconds.

Response parameters

Parameter Type Example Description
DBInstanceId String rm-uf6wjk5*****

The ID of the instance.

RequestId String EFB6083A-7699-489B-8278-C0CB4793A96E

The ID of the request.

TaskId String 1715482.0

The ID of the task.

ReadSQLReplicationTime String 100

The replication latency of the read-only instance. Unit: seconds.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyDBInstanceDelayedReplicationTime
&DBInstanceId=rm-uf6wjk5*****
&ReadSQLReplicationTime=100
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDBInstanceDelayedReplicationTimeResponse>
    <TaskId>1715482.0</TaskId>
    <RequestId>49A3225B-5DFC-1885-8EFC-A4BCCBCD1EAD</RequestId>
</ModifyDBInstanceDelayedReplicationTimeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TaskId" : "1715482.0",
  "RequestId" : "49A3225B-5DFC-1885-8EFC-A4BCCBCD1EAD"
}

Error codes

HTTP status code Error code Error message Description
403 OperationDenied.DBInstanceType The operation is not permitted due to type of instance. The error message returned because this operation is not supported when the instance is not a primary instance.
404 EngineNotSupported Engine specified cannot be supported the operation. The error message returned because this operation is not supported by the database engine that is run on the instance. You must update the minor engine version.

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