Skip to content

[az resource update] Unable to assign an action group ID for a Smart Detection alert rule #29560

@vienleidl

Description

@vienleidl

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:

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions