You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure a customer-controlled maintenance window for Azure Database for PostgreSQL servers.
14
+
15
+
## DESCRIPTION
16
+
17
+
Azure Database for PostgreSQL flexible servers undergo periodic maintenance to ensure your managed database remains secure, stable, and up-to-date. This maintenance includes applying security updates, system upgrades, and software patches.
18
+
19
+
Maintenance windows can be scheduled in two ways for each flexible server:
20
+
21
+
- System-Managed Schedule: The system automatically selects a one-hour window between 11 PM and 7 AM in your server’s regional time.
22
+
- Custom Schedule: You can specify a preferred maintenance window by choosing the day of the week and a one-hour time window.
23
+
24
+
By configuring a customer-controlled maintenance window, you can schedule updates to occur during a preferred time, ideally outside business hours, minimizing disruptions.
25
+
26
+
Only the flexible server deployment model supports customer-controlled maintenance windows.
27
+
28
+
## RECOMMENDATION
29
+
30
+
Consider using a customer-controlled maintenance window to efficiently schedule updates and minimize disruptions.
31
+
32
+
## EXAMPLES
33
+
34
+
### Configure with Azure template
35
+
36
+
To configure servers that pass this rule:
37
+
38
+
- Set the `properties.maintenanceWindow.customWindow` property to `Enabled`.
$ruleResult.TargetName| Should -BeIn 'server-A','server-B','server-D','server-E','ActiveDirectoryAdmin-A','ActiveDirectoryAdmin-C';
171
+
$ruleResult.Length| Should -Be 7;
172
+
$ruleResult.TargetName| Should -BeIn 'server-A','server-B','server-D','server-E','server-G','ActiveDirectoryAdmin-A','ActiveDirectoryAdmin-C';
173
173
174
174
$ruleResult[0].Reason | Should -BeIn 'Path properties.administratorType: Is null or empty.','Path properties.login: Is null or empty.','Path properties.sid: Is null or empty.';
175
175
$ruleResult[1].Reason | Should -BeIn "A sub-resource of type 'Microsoft.DBforPostgreSQL/servers/administrators' has not been specified.";
$ruleResult.TargetName| Should -BeIn 'server-D','server-E','server-F';
210
+
211
+
$ruleResult[0].Reason | Should -BeExactly "Path properties.maintenanceWindow.customWindow: The field 'properties.maintenanceWindow.customWindow' does not exist.";
212
+
$ruleResult[1].Reason | Should -BeExactly "Path properties.maintenanceWindow.customWindow: Is set to 'notset'.";
213
+
$ruleResult[2].Reason | Should -BeExactly "Path properties.maintenanceWindow.customWindow: Is set to 'Disabled'.";
0 commit comments