Skip to main content

maintenances

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

Overview

Namemaintenances
TypeResource
Idazure.mysql_flexible_servers.maintenances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}".
namestringThe name of the resource.
maintenanceAvailableScheduleMaxTimestring (date-time)The max time the maintenance can be rescheduled.
maintenanceAvailableScheduleMinTimestring (date-time)The min time the maintenance can be rescheduled.
maintenanceDescriptionstringThe maintenance description.
maintenanceEndTimestring (date-time)The end time for a maintenance.
maintenanceExecutionEndTimestring (date-time)The end time for a maintenance execution.
maintenanceExecutionStartTimestring (date-time)The start time for a maintenance execution.
maintenanceStartTimestring (date-time)The start time for a maintenance.
maintenanceStatestringA string describes the maintenance status. Known values are: "Scheduled", "ReScheduled", "InPreparation", "Processing", "Completed", and "Canceled".
maintenanceTitlestringThe maintenance title.
maintenanceTypestringA string defines maintenance type. Known values are: "RoutineMaintenance", "MinorVersionUpgrade", "SecurityPatches", and "HotFixes".
provisioningStatestringProvisioning state of the Maintenance. Known values are: "Succeeded", "Creating", "Deleting", and "Failed".
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
listselectresource_group_name, server_name, subscription_idList maintenances.
updateupdateresource_group_name, server_name, maintenance_name, subscription_idUpdate maintenances.
readexecresource_group_name, server_name, maintenance_name, subscription_idRead maintenance.

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_namestringThe name of the maintenance. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

List maintenances.

SELECT
id,
name,
maintenanceAvailableScheduleMaxTime,
maintenanceAvailableScheduleMinTime,
maintenanceDescription,
maintenanceEndTime,
maintenanceExecutionEndTime,
maintenanceExecutionStartTime,
maintenanceStartTime,
maintenanceState,
maintenanceTitle,
maintenanceType,
provisioningState,
systemData,
type
FROM azure.mysql_flexible_servers.maintenances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

UPDATE examples

Update maintenances.

UPDATE azure.mysql_flexible_servers.maintenances
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND maintenance_name = '{{ maintenance_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

Lifecycle Methods

Read maintenance.

EXEC azure.mysql_flexible_servers.maintenances.read 
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@maintenance_name='{{ maintenance_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;