# MaintenanceWindow

A MaintenanceWindow is a resource snoozing Alerts during maintenance time.

> **Package : spaceone.api.monitoring.v1**

\
\


## MaintenanceWindow

**MaintenanceWindow Methods:**

| Method                                                                                                                         | Request                                                                                                                                                                    | Response                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**create**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#create) | [CreateMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#createmaintenancewindowrequest) | [MaintenanceWindowInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowinfo)   |
| [**update**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#update) | [UpdateMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#updatemaintenancewindowrequest) | [MaintenanceWindowInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowinfo)   |
| [**close**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#close)   | [MaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowrequest)             | [MaintenanceWindowInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowinfo)   |
| [**get**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#get)       | [GetMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#getmaintenancewindowrequest)       | [MaintenanceWindowInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowinfo)   |
| [**list**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#list)     | [MaintenanceWindowQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowquery)                 | [MaintenanceWindowsInfo](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowsinfo) |
| [**stat**](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#stat)     | [MaintenanceWindowStatQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowstatquery)         | [Struct](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#struct)                                 |

\


### create

Creates a new MaintenanceWindow. When creating a MaintenanceWindow, you can set the title and maintenance schedule of the MaintenanceWindow. From the `start_time` to the `end_time` specified by the schedule set in this method, alerts in the Projects linked with the MaintenanceWindow are ceased.

> **POST** /monitoring/v1/maintenance-window/create

\{{< tabs " create " >\}}

\{{< tab "Request Example" >\}}

[CreateMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#createmaintenancewindowrequest)

* **title** (string) `Required`
* **projects** (string) `Repeated` `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **domain\_id** (string) `Required`
* **tags** (Struct)

\{{< highlight json >\}} { "title": "The dev server is under regular maintenance.", "projects": \["project-123456789012"], "start\_time": "2022-01-01T09:45:00.000Z", "end\_time": "2022-01-01T10:45:00.000Z", "domain\_id": "domain-123456789012" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[MaintenanceWindowInfo](#MAINTENANCEWINDOWINFO)

* **maintenance\_window\_id** (string) `Required`
* **title** (string) `Required`
* **state** (MaintenanceWindowState) `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **tags** (Struct) `Required`
* **projects** (string) `Repeated` `Required`
* **domain\_id** (string) `Required`
* **created\_by** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
* **closed\_at** (string) `Required`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-01-01T09:45:00.000Z", "end\_time": "2022-01-01T10:45:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user1@email.com", "created\_at": "2022-06-02T09:46:49.196Z", "updated\_at": "2022-06-02T09:46:49.196Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### update

Updates a specific MaintenanceWindow. You can make changes in MaintenanceWindow settings including, the `title` and the schedule.

> **POST** /monitoring/v1/maintenance-window/update

\{{< tabs " update " >\}}

\{{< tab "Request Example" >\}}

[UpdateMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#updatemaintenancewindowrequest)

* **maintenance\_window\_id** (string) `Required`
* **domain\_id** (string) `Required`
* **title** (string)
* **projects** (string) `Repeated`
* **start\_time** (string)
* **end\_time** (string)
* **tags** (Struct)

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "projects": \["project-123456789012"], "start\_time": "2022-01-03T00:00:00.000Z", "end\_time": "2022-01-03T01:00:00.000Z", "domain\_id": "domain-123456789012" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[MaintenanceWindowInfo](#MAINTENANCEWINDOWINFO)

* **maintenance\_window\_id** (string) `Required`
* **title** (string) `Required`
* **state** (MaintenanceWindowState) `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **tags** (Struct) `Required`
* **projects** (string) `Repeated` `Required`
* **domain\_id** (string) `Required`
* **created\_by** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
* **closed\_at** (string) `Required`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-01-01T09:45:00.000Z", "end\_time": "2022-01-01T10:45:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user1@email.com", "created\_at": "2022-06-02T09:46:49.196Z", "updated\_at": "2022-06-02T09:46:49.196Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### close

Closes a MaintenanceWindow by changing the state of the MaintenanceWindow to `CLOSED` when the maintenance is completed. As the MaintenanceWindow is not deleted but closed, the maintenance history remains undeleted.

> **POST** /monitoring/v1/maintenance-window/close

\{{< tabs " close " >\}}

\{{< tab "Request Example" >\}}

[MaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowrequest)

* **maintenance\_window\_id** (string) `Required`
* **domain\_id** (string) `Required`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "domain\_id": "domain-123456789012" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[MaintenanceWindowInfo](#MAINTENANCEWINDOWINFO)

* **maintenance\_window\_id** (string) `Required`
* **title** (string) `Required`
* **state** (MaintenanceWindowState) `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **tags** (Struct) `Required`
* **projects** (string) `Repeated` `Required`
* **domain\_id** (string) `Required`
* **created\_by** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
* **closed\_at** (string) `Required`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-01-01T09:45:00.000Z", "end\_time": "2022-01-01T10:45:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user1@email.com", "created\_at": "2022-06-02T09:46:49.196Z", "updated\_at": "2022-06-02T09:46:49.196Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### get

Gets a specific MaintenanceWindow. Prints detailed information about the MaintenanceWindow, including the title and the schedule.

> **POST** /monitoring/v1/maintenance-window/get

\{{< tabs " get " >\}}

\{{< tab "Request Example" >\}}

[GetMaintenanceWindowRequest](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#getmaintenancewindowrequest)

* **maintenance\_window\_id** (string) `Required`
* **domain\_id** (string) `Required`
* **only** (string) `Repeated`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "domain\_id": "domain-123456789012" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[MaintenanceWindowInfo](#MAINTENANCEWINDOWINFO)

* **maintenance\_window\_id** (string) `Required`
* **title** (string) `Required`
* **state** (MaintenanceWindowState) `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **tags** (Struct) `Required`
* **projects** (string) `Repeated` `Required`
* **domain\_id** (string) `Required`
* **created\_by** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
* **closed\_at** (string) `Required`

\{{< highlight json >\}} { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-01-01T09:45:00.000Z", "end\_time": "2022-01-01T10:45:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user1@email.com", "created\_at": "2022-06-02T09:46:49.196Z", "updated\_at": "2022-06-02T09:46:49.196Z" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### list

Gets a list of all MaintenanceWindows. You can use a query to get a filtered list of MaintenanceWindows.

> **POST** /monitoring/v1/maintenance-window/list

\{{< tabs " list " >\}}

\{{< tab "Request Example" >\}}

[MaintenanceWindowQuery](https://github.com/cloudforet-io/api-doc/blob/master/content/en/monitoring/v1/MaintenanceWindow/README.md#maintenancewindowquery)

* **domain\_id** (string) `Required`
* **query** (Query)
* **maintenance\_window\_id** (string)
* **title** (string)
* **state** (MaintenanceWindowState)
* **project\_id** (string)
* **created\_by** (string)

\{{< highlight json >\}} { "query": {}, "domain\_id": "domain-123456789012" } \{{< /highlight >\}} \{{< /tab >\}}

\{{< tab "Response Example" >\}}

[MaintenanceWindowsInfo](#MAINTENANCEWINDOWSINFO)

* **results** (MaintenanceWindowInfo) `Repeated` `Required`
* **total\_count** (int32) `Required`

\{{< highlight json >\}} { "results": \[ { "maintenance\_window\_id": "mw-123456789012", "title": "The dev server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-06-03T00:00:00.000Z", "end\_time": "2022-06-03T01:00:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user1@email.com", "created\_at": "2022-01-01T09:59:01.966Z", "updated\_at": "2022-01-01T09:59:01.966Z" }, { "maintenance\_window\_id": "mw-987654321098", "title": "The prd server is under regular maintenance.", "state": "OPEN", "start\_time": "2022-06-03T00:00:00.000Z", "end\_time": "2022-06-03T01:00:00.000Z", "tags": {}, "projects": \[ "project-123456789012" ], "domain\_id": "domain-123456789012", "created\_by": "user2@email.com", "created\_at": "2022-01-02T09:57:28.999Z", "updated\_at": "2022-01-02T09:57:28.999Z" } ], "total\_count": 50 } \{{< /highlight >\}} \{{< /tab >\}}

\{{< /tabs >\}}

\


### stat

> **POST** /monitoring/v1/maintenance-window/stat

\
\


## Message

### CreateMaintenanceWindowRequest

* **title** (string) `Required`
* **projects** (string) `Repeated` `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **domain\_id** (string) `Required`
*   **tags** (Struct)

    \


### GetMaintenanceWindowRequest

* **maintenance\_window\_id** (string) `Required`
* **domain\_id** (string) `Required`
*   **only** (string) `Repeated`

    \


### MaintenanceWindowInfo

* **maintenance\_window\_id** (string) `Required`
* **title** (string) `Required`
* **state** (MaintenanceWindowState) `Required`
* **start\_time** (string) `Required`
* **end\_time** (string) `Required`
* **tags** (Struct) `Required`
* **projects** (string) `Repeated` `Required`
* **domain\_id** (string) `Required`
* **created\_by** (string) `Required`
* **created\_at** (string) `Required`
* **updated\_at** (string) `Required`
*   **closed\_at** (string) `Required`

    \


### MaintenanceWindowQuery

* **domain\_id** (string) `Required`
* **query** (Query)
* **maintenance\_window\_id** (string)
* **title** (string)
* **state** (MaintenanceWindowState)
* **project\_id** (string)
*   **created\_by** (string)

    \


### MaintenanceWindowRequest

* **maintenance\_window\_id** (string) `Required`
*   **domain\_id** (string) `Required`

    \


### MaintenanceWindowStatQuery

* **query** (StatisticsQuery) `Required`
*   **domain\_id** (string) `Required`

    \


### MaintenanceWindowsInfo

* **results** (MaintenanceWindowInfo) `Repeated` `Required`
*   **total\_count** (int32) `Required`

    \


### UpdateMaintenanceWindowRequest

* **maintenance\_window\_id** (string) `Required`
* **domain\_id** (string) `Required`
* **title** (string)
* **projects** (string) `Repeated`
* **start\_time** (string)
* **end\_time** (string)
*   **tags** (Struct)

    \
