Describe the bug
az storage blob batch-delete command does not support --tags-condition param
Related command
az storage blob delete-batch --account-key xxxxx --source '$web' --tags-condition buildVersion=xxxx
Errors
unrecognized arguments: --tags-condition buildVersion=xxxxxxx
Issue script & Debug output
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x03CDF8E8>]
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 660, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_01_01.models' has no attribute 'ActiveDirectoryPropertiesAccountType'
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 660, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_01_01.models' has no attribute 'ListKeyExpand'
cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 660, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_01_01.models' has no attribute 'CorsRuleAllowedMethodsItem'
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x03CDF9D8>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x03CECBB8>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.azure.cli.core.command_recommender: "--tags-condition" is an invalid parameter for command "storage blob delete-batch".
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=..... HTTP/1.1" 200 None
cli.azure.cli.core.command_recommender: "--tags-condition" is an invalid parameter for command "storage blob delete-batch".
cli.azure.cli.core.azclierror: NoneType: None
cli.azure.cli.core.azclierror: unrecognized arguments: --tags-condition buildVersion=xxxxxxx
az_command_data_logger: unrecognized arguments: --tags-condition buildVersion=xxxxxxx
Examples from AI knowledge base:
az storage blob delete-batch --source mycontainer --pattern cli-201[!89]-??-??.txt
Delete all blobs with the format 'cli-201x-xx-xx.txt' except cli-2018-xx-xx.txt' and 'cli-2019-xx-xx.txt' in a container.
az storage blob delete-batch --source mycontainer --account-name mystorageaccount --pattern *.py --if-unmodified-since $date --auth-mode login
Delete all blobs ending with ".py" in a container that have not been modified for 10 days.
https://docs.microsoft.com/en-US/cli/azure/storage/blob#az_storage_blob_delete_batch
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x03CB28E8>]
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 2.107 seconds (init: 0.543, invoke: 1.565)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3947 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\iviha\.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
similar to the az storage blob delete command i would expect --tag-condition to be supported
Environment Summary
azure-cli 2.58.0
core 2.58.0
telemetry 1.1.0
Extensions:
account 0.2.5
azure-devops 0.26.0
kusto 0.5.0
storage-blob-preview 0.7.2
Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\iviha\.azure\cliextensions'
Python (Windows) 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:13:08) [MSC v.1937 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
n/a
Describe the bug
az storage blob batch-deletecommand does not support--tags-conditionparamRelated command
az storage blob delete-batch --account-key xxxxx --source '$web' --tags-condition buildVersion=xxxxErrors
unrecognized arguments: --tags-condition buildVersion=xxxxxxxIssue script & Debug output
Expected behavior
similar to the
az storage blob deletecommand i would expect--tag-conditionto be supportedEnvironment Summary
Additional context
n/a