Azure / azure-cli

Azure Command-Line Interface
MIT License
4.02k stars 2.99k forks source link

delete-batch ignores --query option #21568

Open j3ffrw opened 2 years ago

j3ffrw commented 2 years ago

Describe the bug

According to documentation delete-batch --query is supported as part of Global parameter https://docs.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-delete-batch

Command Name az storage blob list
az storage delete-batch

Errors:

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

az storage delete-batch --dry-run --query should only show file that match the "--query"

Environment Summary

Linux-5.4.0-54-generic-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.8.0

Additional Context

This is related to this https://github.com/Azure/azure-cli/issues/15734 though OP asked for delete-batch, answer was for download-batch but I assume its a mistype. Basically we want to delete-batch a blob that match the query, in my case a metadata.

yonzhan commented 2 years ago

storage