Skip to content

New command: m365 spe container add #6081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Adam-it opened this issue Jun 9, 2024 · 5 comments · May be fixed by #6688
Open

New command: m365 spe container add #6081

Adam-it opened this issue Jun 9, 2024 · 5 comments · May be fixed by #6688

Comments

@Adam-it
Copy link
Member

Adam-it commented Jun 9, 2024

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

@Adam-it Adam-it added new feature needs peer review Needs second pair of eyes to review the spec or PR labels Jun 9, 2024
@milanholemans
Copy link
Contributor

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.

@Adam-it
Copy link
Member Author

Adam-it commented Jun 16, 2024

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

@milanholemans milanholemans added help wanted and removed needs peer review Needs second pair of eyes to review the spec or PR labels Jun 16, 2024
@Adam-it Adam-it added the hacktoberfest Issue perfect for hacktoberfest label Sep 24, 2024
@Adam-it Adam-it removed the hacktoberfest Issue perfect for hacktoberfest label Nov 3, 2024
@milanholemans milanholemans self-assigned this Apr 4, 2025
@milanholemans
Copy link
Contributor

@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?

@waldekmastykarz
Copy link
Member

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.

@Adam-it
Copy link
Member Author

Adam-it commented Apr 4, 2025

@waldekmastykarz, @milanholemans good point. Yes I think we might add this as well

milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Apr 15, 2025
@milanholemans milanholemans linked a pull request Apr 15, 2025 that will close this issue
milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Apr 15, 2025
milanholemans added a commit to milanholemans/cli-microsoft365 that referenced this issue Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants