> ## Documentation Index
> Fetch the complete documentation index at: https://docs.internal.nscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Object storage

> Manage object storage endpoints, identity policies, and access keys.

export const resource_0 = "endpoint, including the policy and access key commands,"

**Aliases:** `object-storage`, `os`

Commands that act on one {resource_0} take its ID either as a positional argument or with `--id`. If you omit it, the CLI opens an interactive picker, so always pass it in scripts.

## Subcommands

* [list](#list) — List object storage endpoints
* [classes](#classes) — List object storage endpoint classes
* [get](#get) — Get object storage endpoint details
* [create](#create) — Create a new object storage endpoint
* [delete](#delete) — Delete an object storage endpoint
* [list-policies](#list-policies) — List identity policies for an endpoint
* [get-policy-document](#get-policy-document) — Show the JSON policy document for an identity policy
* [create-policy](#create-policy) — Create a new identity policy on an endpoint
* [update-policy](#update-policy) — Update an existing identity policy
* [delete-policy](#delete-policy) — Delete an identity policy from an endpoint
* [list-access-keys](#list-access-keys) — List access keys for an endpoint
* [create-access-key](#create-access-key) — Create a new access key for an endpoint
* [delete-access-key](#delete-access-key) — Delete an access key from an endpoint

***

## list

List object storage endpoints, optionally filtered by organization, project, or region.

```bash theme={null}
nscale object-storage list [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>
    <tr><td><code>{"--project string"}</code></td><td>Project ID</td></tr>
    <tr><td><code>{"--region string"}</code></td><td>Region ID</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Example

```bash theme={null}
nscale object-storage list --org <org-id> --region <region-id>
```

***

## classes

List the object storage endpoint classes you can create endpoints in. A class sets the region an endpoint lives in and the endpoint types it supports. Pass its ID as `spec.objectStorageEndpointClassId` when you [create](#create) an endpoint. The table shows each class's ID, name, region, and endpoint types.

```bash theme={null}
nscale object-storage classes [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>
    <tr><td><code>{"--region string"}</code></td><td>Region ID (defaults to all regions)</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale object-storage classes --region <region-id>
nscale object-storage classes --region <region-id> -q '.[].metadata.id'
```

***

## get

Get details for a specific object storage endpoint.

```bash theme={null}
nscale object-storage get <endpoint-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## create

Create a new object storage endpoint. Accepts input from a JSON file or stdin.

```bash theme={null}
nscale object-storage create [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"-f, --file string"}</code></td><td>Path to a JSON file</td></tr>
    <tr><td><code>{"--stdin"}</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>{"--dry-run"}</code></td><td>Preview actions and payload without persisting</td></tr>
    <tr><td><code>{"-y, --yes"}</code></td><td>Automatically confirm creation</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale object-storage create --file endpoint.json
nscale object-storage create --stdin < endpoint.json
cat endpoint.json | nscale object-storage create --stdin
```

***

## delete

Delete an existing object storage endpoint.

```bash theme={null}
nscale object-storage delete <endpoint-id> --org <org-id> [flags]
```

### Flags

| Flag | Description |
| - | - |
| `--id string` | Object storage endpoint ID |
| `--org string` | Organization ID |
| `--dry-run` | Preview actions and payload without persisting |
| `-y, --yes` | Automatically confirm deletion |

### Example

```bash theme={null}
nscale object-storage delete <endpoint-id> --org <org-id> --yes
```

***

## list-policies

List identity policies for an object storage endpoint.

```bash theme={null}
nscale object-storage list-policies <endpoint-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## get-policy-document

Show the JSON policy document for an identity policy on an object storage endpoint.

```bash theme={null}
nscale object-storage get-policy-document <endpoint-id> --name <policy-name> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--name string"}</code></td><td>Identity policy name</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## create-policy

Create a new identity policy on an object storage endpoint. The policy document is read from a JSON file or stdin.

```bash theme={null}
nscale object-storage create-policy <endpoint-id> --name <policy-name> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--name string"}</code></td><td>Identity policy name</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>
    <tr><td><code>{"-f, --file string"}</code></td><td>Path to a JSON policy document file</td></tr>
    <tr><td><code>{"--stdin"}</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>{"--dry-run"}</code></td><td>Preview actions and payload without persisting</td></tr>
    <tr><td><code>{"-y, --yes"}</code></td><td>Automatically confirm creation</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale object-storage create-policy <endpoint-id> --name read-only --file policy.json
cat policy.json | nscale object-storage create-policy <endpoint-id> --name read-only --stdin
```

***

## update-policy

Update an existing identity policy on an object storage endpoint. The policy document is read from a JSON file or stdin.

```bash theme={null}
nscale object-storage update-policy <endpoint-id> --name <policy-name> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--name string"}</code></td><td>Identity policy name</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>
    <tr><td><code>{"-f, --file string"}</code></td><td>Path to a JSON policy document file</td></tr>
    <tr><td><code>{"--stdin"}</code></td><td>Read JSON from standard input</td></tr>
    <tr><td><code>{"--dry-run"}</code></td><td>Preview actions and payload without persisting</td></tr>
    <tr><td><code>{"-y, --yes"}</code></td><td>Automatically confirm update</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Examples

```bash theme={null}
nscale object-storage update-policy <endpoint-id> --name read-only --file policy.json
cat policy.json | nscale object-storage update-policy <endpoint-id> --name read-only --stdin
```

***

## delete-policy

Delete an identity policy from an object storage endpoint.

```bash theme={null}
nscale object-storage delete-policy <endpoint-id> --name <policy-name> --org <org-id> [flags]
```

### Flags

| Flag | Description |
| - | - |
| `--id string` | Object storage endpoint ID |
| `--name string` | Identity policy name |
| `--org string` | Organization ID |
| `--dry-run` | Preview actions and payload without persisting |
| `-y, --yes` | Automatically confirm deletion |

### Example

```bash theme={null}
nscale object-storage delete-policy <endpoint-id> --name read-only --org <org-id> --yes
```

***

## list-access-keys

List access keys for an object storage endpoint.

```bash theme={null}
nscale object-storage list-access-keys <endpoint-id> --org <org-id>
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

***

## create-access-key

Create a new access key for an object storage endpoint, optionally associated with an identity policy.

```bash theme={null}
nscale object-storage create-access-key <endpoint-id> --name <key-name> [flags]
```

### Flags

<table>
  <thead><tr><th>Flag</th><th>Description</th></tr></thead>

  <tbody>
    <tr><td><code>{"--id string"}</code></td><td>Object storage endpoint ID</td></tr>
    <tr><td><code>{"--name string"}</code></td><td>Access key name</td></tr>
    <tr><td><code>{"--policy string"}</code></td><td>Identity policy name to associate with the access key</td></tr>
    <tr><td><code>{"--org string"}</code></td><td>Organization ID</td></tr>
    <tr><td><code>{"--dry-run"}</code></td><td>Preview actions and payload without persisting</td></tr>
    <tr><td><code>{"-y, --yes"}</code></td><td>Automatically confirm creation</td></tr>

    <tr>
      <td>
        <code>
          {"--json"}
        </code>
      </td>

      <td>Emit the full JSON payload (mutually exclusive with <code>-q</code>)</td>
    </tr>

    <tr>
      <td>
        <code>
          {"-q, --query stringArray"}
        </code>
      </td>

      <td>jq filter for value extraction (see <a href="/docs/cli/query-output">Query output with <code>-q</code></a>)</td>
    </tr>
  </tbody>
</table>

### Example

```bash theme={null}
nscale object-storage create-access-key <endpoint-id> --name my-key --policy read-only
```

***

## delete-access-key

Delete an access key from an object storage endpoint.

```bash theme={null}
nscale object-storage delete-access-key <endpoint-id> --access-key-id <access-key-id> --org <org-id> [flags]
```

### Flags

| Flag | Description |
| - | - |
| `--id string` | Object storage endpoint ID |
| `--access-key-id string` | Access key ID |
| `--org string` | Organization ID |
| `--dry-run` | Preview actions and payload without persisting |
| `-y, --yes` | Automatically confirm deletion |

### Example

```bash theme={null}
nscale object-storage delete-access-key <endpoint-id> --access-key-id <access-key-id> --org <org-id> --yes
```

***

## Related

<CardGroup cols={2}>
  <Card title="S3 API (CLI)" icon="bucket" href="/docs/cli/s3api">
    Manage buckets and objects inside an endpoint.
  </Card>

  <Card title="Object Storage (Console)" icon="browser" href="/docs/storage/object-storage">
    Create and manage object storage via the Console UI.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.