Azure / Azure/azure-cli

Problem with entering az backup vault update --name $name --rv01 --resource-group test-dev-bcdr-rg --classic-alert disable

Open
#29,843 4 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign Auto-Resolve bug customer-reported Recovery Services Backup Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

az backup vault update --name {vault-name} --resource-group {rg} --classic-alert disable
When I enter the command, I get a python error message. The items in the brackets are just place holders, the real information was left out.
![az_error_9-4-2024_monitor](https://github.com/user-attachments/assets/cd200906-2c07-44fc-9a55-6a7eb2eb8a16)

I have included the error message for your review.
![az_error_9-4-2024_monitor](https://github.com/user-attachments/assets/45106a51-61be-482e-884e-ccb0aaef4f69)

### Related command

az backup vault update --name {vault-name} --resource-group {rg} --classic-alert disable

### Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'classic_alert_settings'
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 723, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/_exception_handler.py", line 11, in backup_exception_handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 701, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 334, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/custom.py", line 164, in update_vault
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/custom.py", line 243, in _get_vault_monitoring_settings
AttributeError: 'NoneType' object has no attribute 'classic_alert_settings'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

### Issue script & Debug output

$vname=test1 # The items listed are just place holders to give you an idea
$rg=test1-rg
Just ran a line of code and it failed - (ex - az backup vault update --name $vname --resource-group $rg --classic-alert disable)

### Expected behavior

When I run the command as indicated above, I get a Python error message
The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'classic_alert_settings'
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 723, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/_exception_handler.py", line 11, in backup_exception_handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 701, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 334, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/custom.py", line 164, in update_vault
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/custom.py", line 243, in _get_vault_monitoring_settings
AttributeError: 'NoneType' object has no attribute 'classic_alert_settings'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

### Environment Summary

C:\Users\chsanders>az --version
azure-cli 2.61.0

core 2.61.0
telemetry 1.1.0

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

### Additional context

None at this time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.