Azure / Azure/azure-rest-api-specs
[BUG] activity log alerts default to enabled: false instead of true
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json
### API Spec version
2020-10-01
### Describe the bug
https://learn.microsoft.com/en-us/rest/api/monitor/activity-log-alerts/create-or-update?view=rest-monitor-2020-10-01&tabs=HTTP&tryIt=true#activitylogalertresource
The docs say it should default to `enabled: true` reality is it defaults to `enabled: false`
### Expected behavior
enabled: true
### Actual behavior
enabled: false
### Reproduction Steps
minimal example:
```
{
"location": "Global",
"properties": {
"scopes": [
"/subscriptions/subscription_id/resourceGroups/resource_group"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "Administrative"
},
{
"field": "level",
"equals": "Error"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/subscription_id/resourceGroups/resource_group/providers/microsoft.insights/actionGroups/Monitoring-e-resource_group-ActionGroup"
}
]
}
}
}
```
See #35342 on why I also set the "optional" location parameter in a minimal example
### Environment
direct rest api access
Contributor guide
Research direction
Start with the linked activityLogAlerts_API.json specification and compare its enabled property with the linked Microsoft REST API documentation. Reproduce the minimal request through direct REST API access and verify whether the default is true or false. Done means the specification and documented behavior accurately reflect the service behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100