Help Center/ Distributed Cache Service/ API Reference/ API V2/ Other APIs/ Listing Maintenance Time Windows
Updated on 2025-10-23 GMT+08:00

Listing Maintenance Time Windows

Function

This API is used to query the start time and end time of maintenance windows.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v2/instances/maintain-windows

Request Parameters

None

Response Parameters

Status code: 200

Table 1 Response body parameters

Parameter

Type

Description

maintain_windows

Array of MaintainWindowsEntity objects

Parameter description:

List of supported maintenance time windows.

Value range:

N/A.

Table 2 MaintainWindowsEntity

Parameter

Type

Description

seq

Integer

Parameter description:

Sequence number.

Value range:

N/A.

default

Boolean

Parameter description:

Whether a maintenance time window is set to the default time segment.

Value range:

  • true

  • false

begin

String

Parameter description:

UTC time when the maintenance time window starts. The format is HH:mm:ss.

Value range:

N/A.

end

String

Parameter description:

UTC time when the maintenance time window ends. The format is HH:mm:ss.

Value range:

N/A.

Status code: 500

Table 3 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Example Requests

GET https://{dcs_endpoint}/v2/instances/maintain-windows

Example Responses

Status code: 200

Maintenance time windows queried successfully.

{
  "maintain_windows" : [ {
    "default" : true,
    "end" : "19",
    "begin" : "18",
    "seq" : 1
  }, {
    "default" : false,
    "end" : "20",
    "begin" : "19",
    "seq" : 2
  }, {
    "default" : false,
    "end" : "21",
    "begin" : "20",
    "seq" : 3
  }, {
    "default" : false,
    "end" : "22",
    "begin" : "21",
    "seq" : 4
  }, {
    "default" : false,
    "end" : "23",
    "begin" : "22",
    "seq" : 5
  }, {
    "default" : false,
    "end" : "00",
    "begin" : "23",
    "seq" : 6
  }, {
    "default" : false,
    "end" : "01",
    "begin" : "00",
    "seq" : 1
  }, {
    "default" : false,
    "end" : "02",
    "begin" : "01",
    "seq" : 2
  }, {
    "default" : false,
    "end" : "03",
    "begin" : "02",
    "seq" : 3
  }, {
    "default" : false,
    "end" : "04",
    "begin" : "03",
    "seq" : 3
  }, {
    "default" : false,
    "end" : "05",
    "begin" : "04",
    "seq" : 4
  }, {
    "default" : false,
    "end" : "06",
    "begin" : "05",
    "seq" : 5
  }, {
    "default" : false,
    "end" : "07",
    "begin" : "06",
    "seq" : 6
  }, {
    "default" : false,
    "end" : "08",
    "begin" : "07",
    "seq" : 1
  }, {
    "default" : true,
    "end" : "09",
    "begin" : "08",
    "seq" : 2
  }, {
    "default" : false,
    "end" : "10",
    "begin" : "09",
    "seq" : 3
  }, {
    "default" : false,
    "end" : "11",
    "begin" : "10",
    "seq" : 4
  }, {
    "default" : false,
    "end" : "12",
    "begin" : "11",
    "seq" : 5
  }, {
    "default" : false,
    "end" : "13",
    "begin" : "12",
    "seq" : 6
  }, {
    "default" : false,
    "end" : "14",
    "begin" : "13",
    "seq" : 1
  }, {
    "default" : true,
    "end" : "15",
    "begin" : "14",
    "seq" : 2
  }, {
    "default" : false,
    "end" : "16",
    "begin" : "15",
    "seq" : 3
  }, {
    "default" : false,
    "end" : "17",
    "begin" : "16",
    "seq" : 4
  }, {
    "default" : false,
    "end" : "18",
    "begin" : "17",
    "seq" : 5
  } ]
}

Status Codes

Status Code

Description

200

Maintenance time windows queried successfully.

500

Internal service error.

Error Codes

See Error Codes.