[az resource update] Unable to assign an action group ID for a Smart Detection alert rule
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
I'd like to update the Smart Detection alert rule by assigning an action group with its resource ID.
### Related command
`az resource update --name "Response Latency Degradation - sandbox" --resource-group "ResourceGroupName" --resource-type Microsoft.AlertsManagement/smartDetectorAlertRules --add properties.actionGroups.groupIds "/subscriptions/subscriptionId/resourceGroups/ResourceGroupName/providers/microsoft.insights/actiongroups/appinsightsperformancemonitoring"`
### Errors
`Couldn't find 'groupIds' in 'properties.actionGroups'. 'properties.actionGroups' does not support further indexing.`
### Issue script & Debug output
Not applicable to az resource update.
### Expected behavior
Programmatically add an action group to the current Smart Detector alert rule.
### Environment Summary
```
{
"azure-cli": "2.61.0",
"azure-cli-core": "2.61.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "4.0.0b4",
"azure-devops": "1.0.1",
"containerapp": "0.3.52"
}
}
```
### Additional context
I've already tried with the other option like --set but an error appears as below:
```
(INVALID_PAYLOAD) Payload is not valid:
Code: INVALID_PAYLOAD
Message: Payload is not valid:
```
Contributor guide
Assessment
This issue has not been assessed yet.