> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/sdks/statuspagesmaintenances1.md).

# StatusPages.Maintenances

## Overview

### Available Operations

* [list](#list) - List Maintenances
* [create](#create) - Create Maintenance

## list

List Maintenances

### Example Usage

```python
from squadcast import SquadcastSDK


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.status_pages.maintenances.list(statuspage_id="<id>", start_time="<value>", end_time="<value>")

    # Handle response
    print(res)

```

### Parameters

| Parameter       | Type                                                                                                                           | Required             | Description                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `statuspage_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `start_time`    | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `end_time`      | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `retries`       | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.V4StatusPagesMaintenancesListMaintenancesResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/v4statuspagesmaintenanceslistmaintenancesresponse.md)

### Errors

| Error Type                      | Status Code | Content Type     |
| ------------------------------- | ----------- | ---------------- |
| errors.BadRequestError          | 400         | application/json |
| errors.UnauthorizedError        | 401         | application/json |
| errors.PaymentRequiredError     | 402         | application/json |
| errors.ForbiddenError           | 403         | application/json |
| errors.NotFoundError            | 404         | application/json |
| errors.ConflictError            | 409         | application/json |
| errors.UnprocessableEntityError | 422         | application/json |
| errors.InternalServerError      | 500         | application/json |
| errors.BadGatewayError          | 502         | application/json |
| errors.ServiceUnavailableError  | 503         | application/json |
| errors.GatewayTimeoutError      | 504         | application/json |
| errors.SDKDefaultError          | 4XX, 5XX    | \*/\*            |

## create

Create Maintenance

### Example Usage

```python
from squadcast import SquadcastSDK
from squadcast.utils import parse_datetime


with SquadcastSDK(
    refresh_token_auth="<YOUR_REFRESH_TOKEN_AUTH_HERE>",
) as squadcast_sdk:

    res = squadcast_sdk.status_pages.maintenances.create(statuspage_id="<id>", title="<value>", note="<value>", components=[
        191583,
        227211,
        362920,
    ], start_time=parse_datetime("2024-08-24T09:07:30.992Z"), end_time=parse_datetime("2024-04-27T16:39:01.283Z"))

    # Handle response
    print(res)

```

### Parameters

| Parameter       | Type                                                                                                                           | Required             | Description                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------- |
| `statuspage_id` | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `title`         | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `note`          | *str*                                                                                                                          | :heavy\_check\_mark: | N/A                                                                 |
| `components`    | List\[*int*]                                                                                                                   | :heavy\_check\_mark: | N/A                                                                 |
| `start_time`    | [date](https://docs.python.org/3/library/datetime.html#date-objects)                                                           | :heavy\_check\_mark: | N/A                                                                 |
| `end_time`      | [date](https://docs.python.org/3/library/datetime.html#date-objects)                                                           | :heavy\_check\_mark: | N/A                                                                 |
| `retries`       | [Optional\[utils.RetryConfig\]](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/utils/retryconfig.md) | :heavy\_minus\_sign: | Configuration to override the default retry behavior of the client. |

### Response

[**models.MaintenancesCreateMaintenanceResponse**](https://developers.incidents.cloud.solarwinds.com/python-sdk/docs/models/maintenancescreatemaintenanceresponse.md)

### Errors

| Error Type                      | Status Code | Content Type     |
| ------------------------------- | ----------- | ---------------- |
| errors.BadRequestError          | 400         | application/json |
| errors.UnauthorizedError        | 401         | application/json |
| errors.PaymentRequiredError     | 402         | application/json |
| errors.ForbiddenError           | 403         | application/json |
| errors.NotFoundError            | 404         | application/json |
| errors.ConflictError            | 409         | application/json |
| errors.UnprocessableEntityError | 422         | application/json |
| errors.InternalServerError      | 500         | application/json |
| errors.BadGatewayError          | 502         | application/json |
| errors.ServiceUnavailableError  | 503         | application/json |
| errors.GatewayTimeoutError      | 504         | application/json |
| errors.SDKDefaultError          | 4XX, 5XX    | \*/\*            |
