Skip to main content

maintenance_window_options

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

Overview

Namemaintenance_window_options
TypeResource
Idazure.sql.maintenance_window_options

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.
allowMultipleMaintenanceWindowsPerCyclebooleanWhether we allow multiple maintenance windows per cycle.
defaultDurationInMinutesintegerDefault duration for maintenance window.
isEnabledbooleanWhether maintenance windows are enabled for the database.
maintenanceWindowCyclesarrayAvailable maintenance cycles e.g. {Saturday, 0, 4860}, {Wednesday, 0, 2460}.
minCyclesintegerMinimum number of maintenance windows cycles to be set on the database.
minDurationInMinutesintegerMinimum duration of maintenance window.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
timeGranularityInMinutesintegerTime granularity in minutes for maintenance windows.
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, database_name, subscription_id, maintenanceWindowOptionsNameGets a list of available maintenance windows.

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
database_namestringThe name of the database. Required.
maintenanceWindowOptionsNamestringMaintenance window options name. 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

Gets a list of available maintenance windows.

SELECT
id,
name,
allowMultipleMaintenanceWindowsPerCycle,
defaultDurationInMinutes,
isEnabled,
maintenanceWindowCycles,
minCycles,
minDurationInMinutes,
systemData,
timeGranularityInMinutes,
type
FROM azure.sql.maintenance_window_options
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND maintenanceWindowOptionsName = '{{ maintenanceWindowOptionsName }}' -- required
;