Azure / Azure/azure-rest-api-specs
`Microsoft.Maintenance/maintenanceConfigurations` - rebootSetting return `AlwaysReboot` if pass `Always`
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 6k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### swagger:
https://github.com/Azure/azure-rest-api-specs/blob/64260c287d69860340a7c932f1450933dbb2c886/specification/maintenance/resource-manager/Microsoft.Maintenance/stable/2023-04-01/Maintenance.json#L2535-L2544
### API flow: send `Always` return `AlwaysReboot`:
PUT https://management.azure.com/subscriptions/xxx/resourceGroups/example-resources/providers/Microsoft.Maintenance/maintenanceConfigurations/example-mc?api-version=2022-07-01-preview HTTP/2.0
content-type: application/json; charset=utf-8
```json
{
"location":"westeurope",
"name":"example-mc",
"properties":{
"extensionProperties":{
"InGuestPatchMode":"User"
},
"installPatches":{
"linuxParameters":{
"classificationsToInclude":[
"Critical",
"Security"
],
"packageNameMasksToExclude":[],
"packageNameMasksToInclude":[]
},
--> "rebootSetting":"Always",
"windowsParameters":{
"classificationsToInclude":[
"Critical",
"Security",
"UpdateRollup",
"Definition",
"Updates"
],
"kbNumbersToExclude":[],
"kbNumbersToInclude":[]
}
},
"maintenanceScope":"InGuestPatch",
"maintenanceWindow":{
"duration":"02:00",
"expirationDateTime":"",
"recurEvery":"Day",
"startDateTime":"2025-02-01 11:00",
"timeZone":"Central Standard Time"
},
"namespace":"Microsoft.Maintenance",
"visibility":"Custom"
},
"tags":{
"Env":"prod"
}
}
```
HTTP/2.0 200
cache-control: no-cache
pragma: no-cache
content-type: application/json; charset=utf-8
expires: -1
vary: Accept-Encoding
x-ms-request-id: cc905654-4c0c-988b-6823-d8d3436011ff
x-ms-correlation-request-id: cc905654-4c0c-988b-6823-d8d3436011ff
date: Tue, 02 Jan 2024 10:43:47 GMT
content-length: 1316
```json
{
"location": "westeurope",
"tags": {
"env": "prod"
},
"properties": {
"namespace": "Microsoft.Maintenance",
"extensionProperties": {
"inGuestPatchMode": "User"
},
"maintenanceScope": "InGuestPatch",
"maintenanceWindow": {
"startDateTime": "2025-02-01 11:00",
"duration": "02:00",
"timeZone": "Central Standard Time",
"recurEvery": "Day"
},
"visibility": "Custom",
"installPatches": {
--> "rebootSetting": "AlwaysReboot",
"windowsParameters": {
"kbNumbersToExclude": [],
"kbNumbersToInclude": [],
"classificationsToInclude": [
"Critical",
"Security",
"UpdateRollup",
"Definition",
"Updates"
]
},
"linuxParameters": {
"packageNameMasksToExclude": [],
"packageNameMasksToInclude": [],
"classificationsToInclude": [
"Critical",
"Security"
]
}
},
"configurationType": "Regular"
},
"id": "/subscriptions/xxx/resourcegroups/example-resources/providers/Microsoft.Maintenance/maintenanceConfigurations/example-mc",
"name": "example-mc",
"type": "Microsoft.Maintenance/maintenanceConfigurations"
}
```
Contributor guide
Research direction
Start with the linked Maintenance.json Swagger definition at lines 2535-2544 and compare its rebootSetting enum with the reported PUT request and 200 response. Trace the 2023-04-01 maintenanceConfigurations schema and verify that the documented accepted and returned values consistently match the API behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100