Maintenance Events - Apply Now
Applies the maintenance event immediately.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/maintenanceEvents/{maintenanceEventId}/applyNow?api-version=2026-10-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
maintenance
|
path | True |
string pattern: ^[A-Z0-9]{4}-[A-Z0-9]{3}$ |
The name of the MaintenanceEventResource |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
server
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)* |
The name of the server. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| 202 Accepted |
Resource operation accepted. Headers
|
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Apply maintenance immediately for a server.
Sample request
POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/maintenanceEvents/XXXX-111/applyNow?api-version=2026-10-01
Sample response
{
"maintenanceEventId": "XXXX-111",
"serverId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver",
"status": "Rescheduled",
"plannedStartTime": "2026-04-15T10:00:00Z",
"plannedEndTime": "2026-04-15T10:05:00Z",
"appliedNow": true,
"lastUpdatedTime": "2026-04-15T10:05:00Z"
}
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus2/operationResults/1d3fb8f8-c018-4809-b875-299e9e99892a?api-version=2026-10-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus2/azureAsyncOperation/1d3fb8f8-c018-4809-b875-299e9e99892a?api-version=2026-10-01
Retry-After: 60
Definitions
| Name | Description |
|---|---|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Maintenance |
Response model for maintenance event reschedule and apply-now actions. |
|
Maintenance |
The status of a maintenance event. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
MaintenanceEventActionResponse
Response model for maintenance event reschedule and apply-now actions.
| Name | Type | Description |
|---|---|---|
| appliedNow |
boolean |
A value indicating whether this was an apply-now (immediate) action. True for ApplyNow; false for Reschedule. |
| lastUpdatedTime |
string (date-time) |
The time this maintenance event record was last updated (UTC). |
| maintenanceEventId |
string |
The maintenance event name (maintenance ID). |
| plannedEndTime |
string (date-time) |
The planned end time of the maintenance event (UTC). |
| plannedStartTime |
string (date-time) |
The planned start time of the maintenance event (UTC). |
| serverId |
string (arm-id) |
The full Azure resource ID of the server. |
| status |
The status of the maintenance event. |
MaintenanceEventStatus
The status of a maintenance event.
| Value | Description |
|---|---|
| Planned |
The maintenance event is scheduled and has not yet started. |
| InProgress |
The maintenance event is currently in progress. |
| Complete |
The maintenance event has completed successfully. |
| Rescheduled |
The maintenance event has been rescheduled (postponed) by the customer. |
| Canceled |
The maintenance event was canceled, failed, or timed out. |