pnp/cli-microsoft365

New command: m365 spe container add

Opened this issue · 2 comments

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 containerTypeName and containerTypeId are 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 of Adds a container, we should use Creates a new container to 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 containerTypeName and containerTypeId are 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 of Adds a container, we should use Creates a new container to keep the commands a bit more inline.

good feed. I updated the spec. Thanks