az sentinel alert-rule-action list uses unavailable api version
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Related command az sentinel alert-rule action list -g somerg -w someworkspace --rule-name ‘/subscriptions/somesubscritpion/resourceGroups/somergsentinel/providers/Microsoft.OperationalInsights/workspaces/someworkspace/providers/Microsoft.SecurityInsights/alertRules/ruleidentifier’ --debug
Describe the bug
Unable to list alert-rule actions using az-cli, when invoking a request it uses api that is not available, in the request when it is being made (–debug) I can see that it ends with:
/actions?api-version=2022-06-01-preview
Same with current preview for az alert-rule action 2022-07-01-preview
To Reproduce
Simply create alert rule, add an action on trigger and attempt to list it using mentioned command
Expected behavior
Command should list alert rule actions
Environment summary
azure-cli 2.42.0 core 2.42.0 telemetry 1.0.8
Extensions: account 0.2.5 sentinel 0.2.0
Dependencies: msal 1.20.0 azure-mgmt-resource 21.1.0b1
Python location ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe’ Extensions directory ‘C:\Users\xxxx.azure\cliextensions’
Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Then I guess it works as designed - it would be nice if the documentation specifically said you cannot use the full identifier but have to use the individual name!
Thanks for investigating
@Kaloszer I do not think it is possible as Actions - List By Alert Rule REST API doesn’t work with the whole resource identifier and throwing similar errors.