New command: m365 spe container add
Usage
m365 spe container add [options]
Description
Creates a new container
Options
| Option | Description |
|---|---|
-n, --name <name> |
The display name of the container |
-d, --description [description] |
The description of the container |
--containerTypeId [containerTypeId] |
The container type Id of the container instance. Use either containerTypeId or containerTypeName but not both |
--containerTypeName [containerTypeName] |
The container type name of the container instance. Use either containerTypeId or containerTypeName but not both. |
Examples
Adds a new container specifying the container type by id
m365 spe container add --name "My Application Storage Container" --description "Description of My Application Storage Container" --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
Adds a new container specifying the container type by name
m365 spe container add --name "My Application Storage Container" --description "Description of My Application Storage Container" --containerTypeName "Application Storage Container Type"
Default properties
No response
Additional Info
we may base this functionality on the following POST request
/storage/fileStorage/containers
passing in body the:
{
"displayName": "My Container",
"description": "My container description.",
"containerTypeId": "{{ContainerTypeId}}"
}
https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-post?view=graph-rest-1.0&tabs=http
Hi @Adam-it, few remarks from my side:
- We always try to specify at least 2 examples
- Since
containerTypeNameandcontainerTypeIdare coupled together, I would remove the short option for the ID variant to keep them a bit more aligned. Seems odd that one has a short and the other doesn't. - For the container type command we used as description
Creates a new Container Type for your app, maybe instead ofAdds a container, we should useCreates a new containerto keep the commands a bit more inline.
Hi @Adam-it, few remarks from my side:
- We always try to specify at least 2 examples
- Since
containerTypeNameandcontainerTypeIdare coupled together, I would remove the short option for the ID variant to keep them a bit more aligned. Seems odd that one has a short and the other doesn't.- For the container type command we used as description
Creates a new Container Type for your app, maybe instead ofAdds a container, we should useCreates a new containerto keep the commands a bit more inline.
good feed. I updated the spec. Thanks
@Adam-it, looking at the docs, it seems like we can provide 3 values as settings:
- isOcrEnabled
- itemMajorVersionLimit
- isItemVersioningEnabled
Shouldn't we add these as command options as well?
Since we're creating a container, it would be clearer to name them ocrEnabled and itemVersioningEnabled. is prefix is more indicative of a question that would be more at place in a get/list command.
@waldekmastykarz, @milanholemans good point. Yes I think we might add this as well