Azure / Azure/bicep-types-az

[Microsoft.Insights/metricAlerts@2024-03-01-preview]: Type does not include scope

Open
#2,599 0 comments 0 reactions 0 assignees View on GitHub
inaccuracy
Dominant language
TypeScript
Stars
108
Forks
44
Avg merge
18h 53m
Merged PRs (30d)
29

Description

### Resource Type

Microsoft.Insights/metricAlerts@2024-03-01-preview

### Api Version

2024-03-01-preview

### Issue Type

Missing property(s)

### Other Notes

Missing scope, documentation example given at https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/metricalerts?pivots=deployment-language-bicep is considered invalid

### Bicep Repro

Example from https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/metricalerts?pivots=deployment-language-bicep, when placeholders filled:

```bicep
resource symbolicname 'Microsoft.Insights/metricAlerts@2024-03-01-preview' = {
scope: 'example'
identity: {
type: 'SystemAssigned'
}
location: 'string'
name: 'string'
properties: {
actions: [
{
actionGroupId: 'string'

}
]
autoMitigate: true
criteria: {
'odata.type': 'Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria'
allOf: [
{
criterionType: 'StaticThresholdCriterion'
metricName: 'string'
metricNamespace: 'string'
name: 'string'
operator: 'string'
threshold: 3
timeAggregation: 'string'
}
]
}
description: 'string'
enabled: true
evaluationFrequency: 'string'
resolveConfiguration: {
autoResolved: true
timeToResolve: 'string'
}
scopes: [
'string'
]
severity: 3
targetResourceRegion: 'string'
targetResourceType: 'string'
windowSize: 'string'
}
}
```

### Confirm

- [x] I have read the troubleshooting guide and looked for duplicates.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names Microsoft.Insights/metricAlerts@2024-03-01-preview and provides a Bicep reproduction based on the linked documentation example. Start by locating the generated type definition for this resource and compare it with the example; done means the type accepts the documented scope property and the invalid example is valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
cloud, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.