Skip to content

az monitor scheduled-query update doesn't account for SchedulequeryRules created with older API version. #22055

@timmcfadden

Description

@timmcfadden

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
If I try to enable a or disable a scheduledqueryrule with az monitor scheduled-query update it doesn't work on rules created with an older version of the API

To Reproduce
az monitor scheduled-query update --resource-group scom2k16-loganalytics-rg --name "Unexpected shutdown" -
-disabled false

(InvalidRequestContent) The request content was invalid and could not be deserialized: 'MuteActionsDuration of 0 minutes is not supported. Supported values are: 5, 10, 15, 30, 45, 60, 120, 180, 240, 300, 360, 1440, 2880'
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'MuteActionsDuration of 0 minutes is not supported. Supported values are: 5, 10, 15, 30, 45, 60, 120, 180, 240, 300, 360, 1440, 2880'

I can also reproduce this behavior with the azure api. If I set the api version to a older version the issue doesn't exit but its impossible to know which api the rule was originally created.

Expected behavior
It would enable or disable it.

Environment summary
Win 11, latest version

azure-cli 2.35.0

core 2.35.0
telemetry 1.0.6

Extensions:
scheduled-query 0.5.0

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

Additional context
This error doesn't happen in AZ PowerShell. They have seemed to worked around it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions