Describe the bug
This command started to fail suddenly in GitHub Actions. I understand that the Azure CLI version has been updated. I have upgraded my local version and run the command and also I have experienced the same issue.
Related command
az backup protection enable-for-azurewl -policy-name "policy-name" --resource-group "rsg" --vault-name "vaultname" --protectable-item-type SQLDataBase --server-name "vmname.domain" --workload-type MSSQL --protectable-item-name "sqldatabase;mssqlserver;master"
Errors
The command failed with an unexpected error. Here is the traceback:
'list' object has no attribute 'properties'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/_exception_handler.py", line 11, in backup_exception_handler
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/custom_base.py", line 387, in enable_protection_for_azure_wl
return custom_wl.enable_protection_for_azure_wl(cmd, client, resource_group_name, vault_name, policy_object,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/custom_wl.py", line 436, in enable_protection_for_azure_wl
protectable_item_type = protectable_item_object.properties.protectable_item_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'properties'
Issue script & Debug output
Exposes sensitive information. I cannot clean it right now.
Expected behavior
It should not fail.
It should enable the protection for the SQL database hosted in a VM.
Environment Summary
azure-cli 2.54.0
core 2.54.0
telemetry 1.1.0
Extensions:
azure-devops 0.25.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/bin/python'
Extensions directory '/Users/myuser/.azure/cliextensions'
Python (Darwin) 3.11.6 (main, Nov 2 2023, 04:39:43) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Additional context
No response
Describe the bug
This command started to fail suddenly in GitHub Actions. I understand that the Azure CLI version has been updated. I have upgraded my local version and run the command and also I have experienced the same issue.
Related command
az backup protection enable-for-azurewl -policy-name "policy-name" --resource-group "rsg" --vault-name "vaultname" --protectable-item-type SQLDataBase --server-name "vmname.domain" --workload-type MSSQL --protectable-item-name "sqldatabase;mssqlserver;master"
Errors
The command failed with an unexpected error. Here is the traceback:
'list' object has no attribute 'properties'
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/_exception_handler.py", line 11, in backup_exception_handler
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/custom_base.py", line 387, in enable_protection_for_azure_wl
return custom_wl.enable_protection_for_azure_wl(cmd, client, resource_group_name, vault_name, policy_object,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/backup/custom_wl.py", line 436, in enable_protection_for_azure_wl
protectable_item_type = protectable_item_object.properties.protectable_item_type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'properties'
Issue script & Debug output
Exposes sensitive information. I cannot clean it right now.
Expected behavior
It should not fail.
It should enable the protection for the SQL database hosted in a VM.
Environment Summary
azure-cli 2.54.0
core 2.54.0
telemetry 1.1.0
Extensions:
azure-devops 0.25.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/opt/homebrew/Cellar/azure-cli/2.54.0/libexec/bin/python'
Extensions directory '/Users/myuser/.azure/cliextensions'
Python (Darwin) 3.11.6 (main, Nov 2 2023, 04:39:43) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Additional context
No response