Azure / Azure/azure-rest-api-specs

[BUG] activity log alerts: location is not properly defined as required parameter

Open
#35,342 0 comments 0 reactions 0 assignees View on GitHub
bug customer-reported Mgmt Monitor question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

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

Location not properly marked as required parameter -- or not properly using a default

### Expected behavior

Either set it to default to "Global" or whatever the default should be or mark it as required.

### Actual behavior

If not set:

```
{
"error": {
"code": "LocationRequired",
"message": "The location property is required for this definition."
}
}
```

### Reproduction Steps

Post a valid activity log alert without location:

minimal example:
```
{
"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"
}
]
}
}
}
```

### Environment

direct api access

Contributor guide

Open the contributing guide

Research direction

Open specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json and inspect how the activity log alert location parameter is defined. Compare the schema with the reproduction request and decide whether the API contract should require location or provide a default. Done means the specification and the reported LocationRequired behavior agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.