Azure-cli: "az container delete" using half name

Created on 17 Jul 2018  Â·  2Comments  Â·  Source: Azure/azure-cli

Is there a way to use this command to delete containers with partial name? for i.e.
az container delete Container1* (to remove every container starting like that, but not the ones starting with Container2#)?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Service Attention question

All 2 comments

@weiserdl We currently do not plan on supporting a wildcard feature. The best way would be writing a quick bash script to use 'az container list' to get all the container names in the group then 'az container delete' for each result.

You could also use a script to get a list of container IDs, filter the list of IDs and then supply that list to the delete command with --ids …. Effectively this does what @samkreter is suggesting, calling the delete command for each item in the list.

Was this page helpful?
0 / 5 - 0 ratings