Azure / Azure/azure-cli

az monitor scheduled-query is missing the optional parameter --override-query-time-range

Open
#29,150 3 comments 0 reactions 1 assignee Claimed by @AllyW View on GitHub
act-observability-squad Auto-Assign Azure CLI Team customer-reported feature-request Monitor
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
[az monitor scheduled-query create](https://learn.microsoft.com/en-us/cli/azure/monitor/scheduled-query?view=azure-cli-latest#az-monitor-scheduled-query-create)
[az monitor scheduled-query update](https://learn.microsoft.com/en-us/cli/azure/monitor/scheduled-query?view=azure-cli-latest#az-monitor-scheduled-query-update)

**Is your feature request related to a problem? Please describe.**
The schedule query create and update az cli commands are missing the property for `--override-query-time-range` which should ultimately create or update the `overrideQueryTimeRange` property of the alert rule json.
![image](https://github.com/Azure/azure-cli/assets/7443253/940f96a7-8e66-4f37-976d-49a9ffa570e2)

This property seems to exist in the [azure cmdlet](https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.monitor.scheduledqueryruledata.overridequerytimerange?view=azure-dotnet) so it would make sense that the az cli command should have it as well.
Like the cmdlet, this property should only apply for LogAlert rules.

**Describe the solution you'd like**
A new optional parameter named `--override-query-time-range` with a default value. This parameter could alternatively be short-handed with `-oqtr`.

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.