The question was already asked on GitHub, but I should move it here. So here we are.
If you run the command az aks maintenanceconfiguration list you 'll get back a configuration like this:
{
"id": "{someId}",
"name": "default",
"notAllowedTime": null,
"resourceGroup": "{MyResource}",
"systemData": null,
"timeInWeek": [
{
"day": "Sunday",
"hourSlots": [
22,
23
]
}
],
"type": null
}
If you like to update a configuration by a file, the format must be:
{
"timeInWeek": [
{
"day": "Tuesday",
"hour_slots": [
1,
2
]
},
{
"day": "Wednesday",
"hour_slots": [
1,
6
]
}
],
"notAllowedTime": [
{
"start": "2021-05-26T03:00:00Z",
"end": "2021-05-30T12:00:00Z"
}
]
}
It really took me a few minutes to spot, why the update didn't take my hourSlots. The reason is, that the output uses camelCase and defines hourSlots, while the input file uses snake_case and defines hour_slots.
Instead the notAllowedTime property uses in both cases camelCase. So would be great if this would be done for hourSlots also.