Skip to content

Commit f1ad4aa

Browse files
committed
Adds command 'spe container add'. Closes #6081
1 parent add4854 commit f1ad4aa

File tree

8 files changed

+556
-0
lines changed

8 files changed

+556
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import Global from '/docs/cmd/_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# spe container add
6+
7+
Creates a new container
8+
9+
## Usage
10+
11+
```sh
12+
m365 spe container add [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`-n, --name <name>`
19+
: The display name of the new container.
20+
21+
`-d, --description [description]`
22+
: The description of the new container.
23+
24+
`--containerTypeId [containerTypeId]`
25+
: The container type ID of the container instance. Use either `containerTypeId`, or `containerTypeName` but not both.
26+
27+
`--containerTypeName [containerTypeName]`
28+
: The container type name of the container instance. Use either `containerTypeId`, or `containerTypeName` but not both.
29+
30+
`--ocrEnabled [ocrEnabled]`
31+
: Indicates whether Optical Character Recognition (OCR) is enabled for the container. Possible values: `true`, `false`. Defaults to `false`.
32+
33+
`--itemMajorVersionLimit [itemMajorVersionLimit]`
34+
: The maximum major versions allowed for items in the container. Defaults to `500`.
35+
36+
`--itemVersioningEnabled [itemVersioningEnabled]`
37+
: Indicates whether versioning is enabled for items in the container. Possible values: `true`, `false`. Defaults to `true`.
38+
```
39+
40+
<Global />
41+
42+
## Examples
43+
44+
Creates a new container by specifying the container type ID
45+
46+
```sh
47+
m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb
48+
```
49+
50+
Creates a new container by specifying the container type name
51+
52+
```sh
53+
m365 spe container add --name Invoices --containerTypeName "Invoice app container type"
54+
```
55+
56+
Creates a new container with additional options
57+
58+
```sh
59+
m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb --ocrEnabled true --itemMajorVersionLimit 200 --itemVersioningEnabled true
60+
```
61+
62+
## Response
63+
64+
<Tabs>
65+
<TabItem value="JSON">
66+
67+
```json
68+
{
69+
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
70+
"displayName": "Invoices",
71+
"description": "This container is used to store invoices",
72+
"containerTypeId": "bfdd048e-e03f-47d2-bd16-dbbc27281aa3",
73+
"status": "inactive",
74+
"createdDateTime": "2025-04-15T13:31:09.62Z",
75+
"lockState": "unlocked",
76+
"settings": {
77+
"isOcrEnabled": false,
78+
"itemMajorVersionLimit": 500,
79+
"isItemVersioningEnabled": true
80+
}
81+
}
82+
```
83+
84+
</TabItem>
85+
<TabItem value="Text">
86+
87+
```text
88+
containerTypeId: bfdd048e-e03f-47d2-bd16-dbbc27281aa3
89+
createdDateTime: 2025-04-15T15:14:03.89Z
90+
description : This container is used to store invoices
91+
displayName : Invoices
92+
id : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
93+
lockState : unlocked
94+
settings : {"isOcrEnabled":false,"itemMajorVersionLimit":500,"isItemVersioningEnabled":true}
95+
status : inactive
96+
```
97+
98+
</TabItem>
99+
<TabItem value="CSV">
100+
101+
```csv
102+
id,displayName,description,containerTypeId,status,createdDateTime,lockState
103+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,Invoices,This container is used to store invoices,bfdd048e-e03f-47d2-bd16-dbbc27281aa3,inactive,2025-04-15T15:14:45.317Z,unlocked
104+
```
105+
106+
</TabItem>
107+
<TabItem value="Markdown">
108+
109+
```md
110+
# spe container add --name "Invoices" --containerTypeId "bfdd048e-e03f-47d2-bd16-dbbc27281aa3" --description "This container is used to store invoices"
111+
112+
Date: 15/04/2025
113+
114+
## Invoices (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
115+
116+
Property | Value
117+
---------|-------
118+
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
119+
displayName | Invoices
120+
description | This container is used to store invoices
121+
containerTypeId | bfdd048e-e03f-47d2-bd16-dbbc27281aa3
122+
status | inactive
123+
createdDateTime | 2025-04-15T15:15:19.123Z
124+
lockState | unlocked
125+
```
126+
127+
</TabItem>
128+
</Tabs>

docs/src/config/sidebars.ts

+5
Original file line numberDiff line numberDiff line change
@@ -2108,6 +2108,11 @@ const sidebars: SidebarsConfig = {
21082108
label: 'container activate',
21092109
id: 'cmd/spe/container/container-activate'
21102110
},
2111+
{
2112+
type: 'doc',
2113+
label: 'container add',
2114+
id: 'cmd/spe/container/container-add'
2115+
},
21112116
{
21122117
type: 'doc',
21132118
label: 'container get',

src/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default {
1919
'https://graph.microsoft.com/Directory.ReadWrite.All',
2020
'https://graph.microsoft.com/ExternalConnection.ReadWrite.All',
2121
'https://graph.microsoft.com/ExternalItem.ReadWrite.All',
22+
'https://graph.microsoft.com/FileStorageContainer.Selected',
2223
'https://graph.microsoft.com/Group.ReadWrite.All',
2324
'https://graph.microsoft.com/IdentityProvider.ReadWrite.All',
2425
'https://graph.microsoft.com/InformationProtectionPolicy.Read',

src/m365/spe/commands.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const prefix: string = 'spe';
22

33
export default {
44
CONTAINER_ACTIVATE: `${prefix} container activate`,
5+
CONTAINER_ADD: `${prefix} container add`,
56
CONTAINER_GET: `${prefix} container get`,
67
CONTAINER_LIST: `${prefix} container list`,
78
CONTAINERTYPE_ADD: `${prefix} containertype add`,

0 commit comments

Comments
 (0)