0

List maintenances

by
Published Oct 17, 2025

Returns a collection of Maintenance objects for any entity a user has permissions to view. Canceled Maintenance objects are not returned. Currently, Linodes are the only entities available for viewing. > --- - __CLI__. ``` linode-cli account maintenance-list ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * List maintenances
7
 * Returns a collection of Maintenance objects for any entity a user has permissions to view. Canceled Maintenance objects are not returned.
8

9
Currently, Linodes are the only entities available for viewing.
10

11

12
>
13

14
---
15

16

17
- __CLI__.
18

19
    ```
20
    linode-cli account maintenance-list
21
    ```
22

23
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
24
 */
25
export async function main(auth: Linode, apiVersion: "v4" | "v4beta") {
26
  const url = new URL(
27
    `https://api.linode.com/${apiVersion}/account/maintenance`,
28
  );
29

30
  const response = await fetch(url, {
31
    method: "GET",
32
    headers: {
33
      Authorization: "Bearer " + auth.token,
34
    },
35
    body: undefined,
36
  });
37
  if (!response.ok) {
38
    const text = await response.text();
39
    throw new Error(`${response.status} ${text}`);
40
  }
41
  return await response.json();
42
}
43