You can call this operation to change and enable the maintenance window of an instance.

Note the following before calling this operation:

  • Before maintenance is performed, the system sends SMS messages and emails to the contacts listed in your Alibaba Cloud account.
  • To ensure smooth maintenance, your Alibaba Cloud Elasticsearch cluster enters the Initializing state prior to the maintenance window. In this case, you can still access the cluster and perform query operations such as performance monitoring. However, you cannot perform modification operations such as restart and configuration upgrades for the cluster.
  • Make sure that you configured automatic reconnection policies for your applications because the cluster may experience transient disconnections within the 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 header

This operation uses only common request headers. For more information, see the Common request parameters topic.

Request syntax

POST /openapi/instances/[InstanceId]/actions/modify-maintaintime HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-n6w1o1x0w001c****

The ID of the instance.

ClientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

A unique token generated by the client to guarantee the idempotency of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

RequestBody

The following parameters must be entered in RequestBody to specify maintenance window information.

Parameter

Type

Required

Example

Description

maintainStartTime

String

No

02:00Z

The start time of the maintenance window. Specify the time in the HH:mmZ format. The time must be in UTC.

maintainEndTime

String

No

06:00Z

The end time of the maintenance window. Specify the time in the HH:mmZ format. The time must be in UTC.

openMaintainTime

boolean

Yes

true

Whether the maintenance window feature is enabled. The value true indicates enabled. The value false indicates disabled.

Example:


{
    "openMaintainTime": true,
    "maintainStartTime": "03:00Z",
    "maintainEndTime": "04:00Z"
}
            

Or


{
  "openMaintainTime":false
}
            

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

The ID of the request.

Result Boolean true

Indicates whether SQL audit was disabled for the DRDS database.

Examples

Sample requests

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/modify-maintaintime HTTP/1.1
Common request parameters
{
    "openMaintainTime":true,
    "maintainStartTime":"03:00Z",
    "maintainEndTime":"04:00Z"
}

Sample success responses

XML format

<Result>true</Result>
<RequestId>8577468C-D13F-4980-BD71-977F9D82****</RequestId>

JSON format

{
    "Result": true,
    "RequestId": "8577468C-D13F-4980-BD71-977F9D82****"
}

Error codes

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