Azure / Azure/azure-rest-api-specs

[BUG] Maintenance Configuration API should allow value "Resource" for maintenanceScope

Open
#34,327 1 comment 9 reactions 0 assignees View on GitHub
bug Maintenance Mgmt Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
6k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/5db6f4b2219494122de700460988e9f3ef735dc0/specification/maintenance/resource-manager/Microsoft.Maintenance/stable/2023-04-01/Maintenance.json#L2459

### API Spec version

2023-04-01

### Describe the bug

Though Swagger indicates that Maintenance Configuration API allows value "Resource" for maintenanceScope but actually service API doesn't allow it. Could you take a look this issue? Thanks.

Request payload:
```
PUT https://management.azure.com/subscriptions/xx-xx-xx-xx/resourceGroups/acctestRG-maint-250429161349981180/providers/Microsoft.Maintenance/maintenanceConfigurations/acctest-MC250429161349981180

{
"location": "eastus",
"name": "acctest-MC250429161349981180",
"properties": {
"extensionProperties": {},
"maintenanceScope": "Resource",
"namespace": "Microsoft.Maintenance",
"visibility": "Custom"
},
"tags": {}
}
```

Error message:
```
Error: creating Maintenance Configuration (Subscription: "xx-xx-x-x-x-xx"
Resource Group Name: "acctestRG-maint-250429160645032882"
Maintenance Configuration Name: "acctest-MC250429160645032882"): unexpected status 400 (400 Bad Request) with response: {"Message":"Given Maintenance Subscope is not supported for Maintenance Control"}
```

### Expected behavior

Maintenance Configuration API should allow value "Resource" for maintenanceScope

### Actual behavior

Maintenance Configuration API doesn't allow value "Resource" for maintenanceScope

### Reproduction Steps

1. Create resource group
2. Create maintenance configuration

### Environment

PROD

Contributor guide

Open the contributing guide

Research direction

Read specification/maintenance/resource-manager/Microsoft.Maintenance/stable/2023-04-01/Maintenance.json around line 2459 and compare the maintenanceScope definition with the documented service behavior. Reproduce the PUT request using maintenanceScope "Resource" and determine whether the specification or service needs alignment. Done means the API specification and the service acceptability are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.