pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
882 stars 312 forks source link

New command: m365 spe container remove #6084

Open Adam-it opened 3 weeks ago

Adam-it commented 3 weeks ago

Usage

m365 spe container remove [options]

Description

Removes a container

Options

Option Description
-i, --id <id> Container id
--recycle Recycle a container instead of actually deleting it.

Examples

Permanently deletes a container

m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"

Recycles a container

m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --recycle 

Default properties

No response

Additional Info

we may use the following DELETE request to move a container to recycle bin

/storage/fileStorage/containers/{containerId}

https://learn.microsoft.com/en-us/graph/api/filestorage-delete-containers?view=graph-rest-1.0&tabs=http

to permanently delete it we may use

beta/storageContainers/{containerId}/permanentDelete

what's worth noticing is that permanent delete as of now is only available on beta MS Graph endpoint

https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-permanentdelete?view=graph-rest-betathe

Adam-it commented 1 week ago

@pnp/cli-for-microsoft-365-maintainers any feed?