-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ERROR: Scope must be a valid resource id #23665
Copy link
Copy link
Closed
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamMonitoraz monitoraz monitorService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This 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.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK team
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamMonitoraz monitoraz monitorService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This 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.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK team
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 idaz 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