0

Delete an Object Storage TLS/SSL certificate

by
Published Oct 17, 2025

Deletes this Object Storage bucket's user uploaded TLS/SSL certificate and private key. > --- - __CLI__. ``` linode-cli object-storage ssl-delete \ us-east-1 example-bucket ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli) - __OAuth scopes__. ``` object_storage:read_write ``` [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * Delete an Object Storage TLS/SSL certificate
7
 * Deletes this Object Storage bucket's user uploaded TLS/SSL certificate and private key.
8

9

10
>
11

12
---
13

14

15
- __CLI__.
16

17
    ```
18
    linode-cli object-storage ssl-delete \
19
  us-east-1 example-bucket
20
    ```
21

22
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
23

24
- __OAuth scopes__.
25

26
    ```
27
    object_storage:read_write
28
    ```
29

30
    [Learn more...](https://techdocs.akamai.com/linode-api/reference/get-started#oauth)
31
 */
32
export async function main(
33
  auth: Linode,
34
  apiVersion: "v4" | "v4beta",
35
  regionId: string,
36
  bucket: string,
37
) {
38
  const url = new URL(
39
    `https://api.linode.com/${apiVersion}/object-storage/buckets/${regionId}/${bucket}/ssl`,
40
  );
41

42
  const response = await fetch(url, {
43
    method: "DELETE",
44
    headers: {
45
      Authorization: "Bearer " + auth.token,
46
    },
47
    body: undefined,
48
  });
49
  if (!response.ok) {
50
    const text = await response.text();
51
    throw new Error(`${response.status} ${text}`);
52
  }
53
  return await response.json();
54
}
55