import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spe container get

Gets a container of a specific container type

## Usage

```sh
m365 spe container get [options]
```

## Options

```md definition-list
`-i, --id [id]`
: The Id of the container instance. Specify either `id` or `name` but not both.

`-n, --name [name]`
: Display name of the container. Specify either `id` or `name` but not both.

`--containerTypeId [containerTypeId]`
: The container type ID of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.

`--containerTypeName [containerTypeName]`
: The container type name of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

  | Resource        | Permissions                   |
  |-----------------|-------------------------------|
  | Microsoft Graph | FileStorageContainer.Selected |

  </TabItem>
  <TabItem value="Application">

  | Resource        | Permissions                   |
  |-----------------|-------------------------------|
  | Microsoft Graph | FileStorageContainer.Selected |

  </TabItem>
</Tabs>

## Examples

Gets a container of a specific type by id.

```sh
m365 spe container get --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
```

Gets a container of a specific type by display name.

```sh
m365 spe container get --name "My Application Storage Container" --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
```

Gets container by using its name and container type name.

```sh
m365 spe container get --name "Invoices" --containerTypeName "My container type name"
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  {
    "id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
    "displayName": "My Application Storage Container",
    "description": "Description of My Application Storage Container",
    "containerTypeId": "91710488-5756-407f-9046-fbe5f0b4de73",
    "status": "active",
    "createdDateTime": "2021-11-24T15:41:52.347Z",
    "settings": {
      "isOcrEnabled": false
    }
  }
  ```

  </TabItem>
  <TabItem value="Text">

  ```text
  id              : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
  displayName     : My Application Storage Container
  description     : Description of My Application Storage Container
  containerTypeId : 91710488-5756-407f-9046-fbe5f0b4de73
  status          : active
  createdDateTime : 2021-11-24T15:41:52.347Z
  ```

  </TabItem>
  <TabItem value="CSV">

  ```csv
  id,displayName,description,containerTypeId,status,createdDateTime
  b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,My Application Storage Container,Description of My Application Storage Container,91710488-5756-407f-9046-fbe5f0b4de73,active,2021-11-24T15:41:52.347Z
  ```

  </TabItem>
  <TabItem value="Markdown">

  ```md
  # spe container get --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"

  Date: 14/03/2024

  ## My Application Storage Container (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)

  Property | Value
  ---------|-------
  id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
  displayName | My Application Storage Container
  description | Description of My Application Storage Container
  containerTypeId | 91710488-5756-407f-9046-fbe5f0b4de73
  status | active
  createdDateTime | 2021-11-24T15:41:52.347Z
  ```

  </TabItem>
</Tabs>
