Skip to main content

maintenance_events

Creates, updates, deletes, gets or lists a maintenance_events resource.

Overview

Namemaintenance_events
TypeResource
Idazure.postgresql_flexible_servers.maintenance_events

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
deferrablebooleanA value indicating whether this maintenance event can be rescheduled by the customer. Required.
deferralDeadlinestring (date-time)The latest date/time this maintenance event can be postponed to (UTC). Present only when deferrable is true.
descriptionstringThe human-readable description of the maintenance event.
endTimestring (date-time)The scheduled end time of the maintenance event (UTC). Required.
estimatedDowntimestringThe estimated downtime as an ISO 8601 duration string (e.g., 'PT60S' = 60 seconds).
lastUpdatedTimestring (date-time)The time this maintenance event record was last updated (UTC).
maintenanceEventIdstringA service-generated identifier for this maintenance event, assigned by the platform (e.g., 'YL1T-HFG'). The format is not contractual and clients should not attempt to parse or construct this value.
maintenanceTypestringThe maintenance type (e.g., 'PlannedMaintenance'). Required. "PlannedMaintenance" (PlannedMaintenance)
originalStartTimestring (date-time)The initial scheduled start time before any reschedule (UTC). Equals startTime when the event has never been rescheduled. Required.
rescheduledFromstring (date-time)The previous scheduled start time before the most recent reschedule (UTC). Null if the event has never been rescheduled.
startTimestring (date-time)The scheduled start time of the maintenance event (UTC). Required.
statusstringThe customer-facing status of the maintenance event. Required. Known values are: "Planned", "InProgress", "Complete", "Rescheduled", and "Canceled". (Planned, InProgress, Complete, Rescheduled, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, maintenance_event_id, subscription_idGets information about a maintenance event for a flexible server.
listselectresource_group_name, server_name, subscription_idmaintenanceStatusLists all maintenance events for a flexible server.
rescheduleexecresource_group_name, server_name, maintenance_event_id, subscription_id, postponeToDateTimeReschedules a maintenance event to a new date and time.
apply_nowexecresource_group_name, server_name, maintenance_event_id, subscription_idApplies the maintenance event immediately.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
maintenance_event_idstringThe name of the MaintenanceEventResource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring
maintenanceStatusstringFilter maintenance events by status. Known values are: "Upcoming" and "Past". Default value is None.

SELECT examples

Gets information about a maintenance event for a flexible server.

SELECT
id,
name,
deferrable,
deferralDeadline,
description,
endTime,
estimatedDowntime,
lastUpdatedTime,
maintenanceEventId,
maintenanceType,
originalStartTime,
rescheduledFrom,
startTime,
status,
systemData,
type
FROM azure.postgresql_flexible_servers.maintenance_events
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND maintenance_event_id = '{{ maintenance_event_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Reschedules a maintenance event to a new date and time.

EXEC azure.postgresql_flexible_servers.maintenance_events.reschedule 
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@maintenance_event_id='{{ maintenance_event_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"postponeToDateTime": "{{ postponeToDateTime }}"
}'
;