0

List Object Storage types

by
Published Oct 17, 2025

Returns Object Storage types and prices, including any region-specific rates. > --- - __CLI__. ``` linode-cli object-storage types ``` [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 Object Storage types
7
 * Returns Object Storage types and prices, including any region-specific rates.
8

9

10
>
11

12
---
13

14

15
- __CLI__.
16

17
    ```
18
    linode-cli object-storage types
19
    ```
20

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

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