You can call ModifyInstanceMaintainTime to modify the maintenance window of an ApsaraDB for Redis instance. Alibaba Cloud maintains the ApsaraDB for Redis instance in the specified maintenance window.

For more information about how to perform the corresponding operation in the console, see Set a maintenance window.

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 No ModifyInstanceMaintainTime

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

InstanceId String Yes r-bp1xxxxxxxxxxxxx

The ID of the instance.

MaintainStartTime String Yes 03:00Z

The start time of the maintenance window. Specify the time in the ISO 8601 standard in the HH:mmZ format. The time must be in UTC. For example, if the maintenance starts at 1:00 a.m. UTC+08:00, you must set this parameter to 17:00Z.

MaintainEndTime String Yes 02:00Z

The end time of the maintenance window. Specify the time in the ISO 8601 standard in the HH:mmZ format. The time must be in UTC. For example, if the maintenance ends at 2:00 a.m. UTC+08:00, you must set this parameter to 18:00Z.

Note The end time must be one hour later than the start time. For example, if the value of the MaintainStartTime parameter is 17:00Z, the value of the MaintainEndTime parameter must be 18:00Z.

Response parameters

Parameter Type Example Description
RequestId String 8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/
?Action=ModifyInstanceMaintainTime
&InstanceId=r-bp1xxxxxxxxxxxxx
&MaintainStartTime=17:00Z
&MaintainEndTime=18:00Z
&<Common request parameters>

Sample success responses

XML format

<ModifyInstanceMaintainTimeResponse>
      <RequestId>8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76</RequestId>
</ModifyInstanceMaintainTimeResponse>

JSON format

{
    "RequestId": "8D0C0AFC-E9CD-47A4-8395-5C31BF9B3E76"
}

Error codes

HttpCode Error code Error message Description
400 InvalidEndTime.Format Specified end time is not valid. The error message returned because the verification of the end time failed.

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