Updated on 2025-09-19 GMT+08:00

Modifying a Maintenance Window

Function

This API is used to change a maintenance window. To prevent service interruptions, you are advised to set the maintenance window to off-peak hours.

Calling Method

For details, see Calling APIs.

URI

PUT /v1.0/{project_id}/clusters/{cluster_id}/maintenance-window

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

cluster_id

Yes

String

Definition

Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

day

Yes

String

Definition

Date. The value can be Mon, Tue, Wed, Thu, Fri, Sat, or Sun.

Range

N/A

start_time

Yes

String

Definition

Start time (UTC). The format is HH:mm, for example, 22:00.

The time is exactly on the hour, and the interval between the start time and end time must be 4 hours.

Range

N/A

end_time

Yes

String

Definition

End time (UTC). The format is HH:mm, for example, 22:00.

The time is exactly on the hour, and the interval between the start time and end time must be 4 hours.

Range

N/A

Response Parameters

Status code: 200

The maintenance window is configured.

None

Example Requests

Configure the maintenance window of a cluster (from 22:00 to 02:00 every Thursday).

PUT https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/b5c45780-1006-49e3-b2d5-b3229975bbc7/maintenance-window

{
  "day" : "Thu",
  "start_time" : "22:00",
  "end_time" : "02:00"
}

Example Responses

None

Status Codes

Status Code

Description

200

The maintenance window is configured.

400

Request error.

401

Authentication failed.

403

You do not have required permissions.

404

No resources found.

500

Internal server error.

503

Service unavailable.