Skip to content

ERROR: Scope must be a valid resource id #23665

@witekkij

Description

@witekkij

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

Related command
az monitor metrics alert create

Describe the bug
When trying to create alert for Logic App failure, I am getting ERROR no matter what is actually provided as scopes

To Reproduce
use following SHELL script:

ALERT_NAME="Scheduling $(LOGIC_APP_NAME) failed"
ALERT_DESCRYPTION="$ALERT_NAME at least 3 times in last 15 minutes"
RESOURCE_ID=az resource show -n '$(LOGIC_APP_NAME)' --resource-group $(RESOURCE_GROUP) --resource-type Microsoft.Logic/workflows --query id

az monitor metrics alert create
--name "$ALERT_NAME"
--description "$ALERT_DESCRYPTION"
--resource-group $(RESOURCE_GROUP)
--scopes $RESOURCE_ID
--condition "total Runs Failed > 2"
--action $(ACTION)
--severity 4
`

Expected behavior

Additional context
I am using Azure Resource Manager connection

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamMonitoraz monitorService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions