diff --git a/schemas/2018-05-01/subscriptionDeploymentTemplate.json b/schemas/2018-05-01/subscriptionDeploymentTemplate.json index c95bce41c3..c5ab2df25b 100644 --- a/schemas/2018-05-01/subscriptionDeploymentTemplate.json +++ b/schemas/2018-05-01/subscriptionDeploymentTemplate.json @@ -1097,6 +1097,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-02-01-preview/Microsoft.IoTSecurity.json#/subscription_resourceDefinitions/onPremiseSensors" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-04-01/Microsoft.Maintenance.json#/subscription_resourceDefinitions/configurationAssignments" + }, { "$ref": "https://schema.management.azure.com/schemas/2019-06-01-preview/Microsoft.ManagedNetwork.json#/unknown_resourceDefinitions/scopeAssignments" }, diff --git a/schemas/2023-04-01/Microsoft.Maintenance.json b/schemas/2023-04-01/Microsoft.Maintenance.json new file mode 100644 index 0000000000..a656915429 --- /dev/null +++ b/schemas/2023-04-01/Microsoft.Maintenance.json @@ -0,0 +1,651 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-04-01/Microsoft.Maintenance.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Maintenance", + "description": "Microsoft Maintenance Resource Types", + "resourceDefinitions": { + "configurationAssignments": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-04-01" + ] + }, + "location": { + "type": "string", + "description": "Location of the resource" + }, + "name": { + "type": "string", + "description": "Configuration assignment name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ConfigurationAssignmentProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties for configuration assignment" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Maintenance/configurationAssignments" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Maintenance/configurationAssignments" + }, + "maintenanceConfigurations": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-04-01" + ] + }, + "location": { + "type": "string", + "description": "Gets or sets location of the resource" + }, + "name": { + "type": "string", + "description": "Maintenance Configuration Name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/MaintenanceConfigurationProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties for maintenance configuration" + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets tags of the resource" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Maintenance/maintenanceConfigurations" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Maintenance/maintenanceConfigurations" + } + }, + "subscription_resourceDefinitions": { + "configurationAssignments": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-04-01" + ] + }, + "location": { + "type": "string", + "description": "Location of the resource" + }, + "name": { + "type": "string", + "description": "Configuration assignment name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ConfigurationAssignmentProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties for configuration assignment" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Maintenance/configurationAssignments" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Maintenance/configurationAssignments" + } + }, + "extension_resourceDefinitions": { + "applyUpdates": { + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "name" + ], + "description": "Microsoft.Maintenance/applyUpdates" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "default" + ] + } + }, + "required": [ + "name" + ], + "description": "Microsoft.Maintenance/applyUpdates" + } + ], + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-04-01" + ] + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Maintenance/applyUpdates" + ] + } + }, + "required": [ + "apiVersion", + "type" + ], + "description": "Microsoft.Maintenance/applyUpdates" + }, + "configurationAssignments": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-04-01" + ] + }, + "location": { + "type": "string", + "description": "Location of the resource" + }, + "name": { + "type": "string", + "description": "Configuration assignment name" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ConfigurationAssignmentProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties for configuration assignment" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Maintenance/configurationAssignments" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Maintenance/configurationAssignments" + } + }, + "definitions": { + "ConfigurationAssignmentFilterProperties": { + "type": "object", + "properties": { + "locations": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of locations to scope the query to." + }, + "osTypes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of allowed operating systems." + }, + "resourceGroups": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of allowed resource groups." + }, + "resourceTypes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of allowed resources." + }, + "tagSettings": { + "oneOf": [ + { + "$ref": "#/definitions/TagSettingsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Tag filter information for the VM." + } + }, + "description": "Azure query for the update configuration." + }, + "ConfigurationAssignmentProperties": { + "type": "object", + "properties": { + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/ConfigurationAssignmentFilterProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Azure query for the update configuration." + }, + "maintenanceConfigurationId": { + "type": "string", + "description": "The maintenance configuration Id" + }, + "resourceId": { + "type": "string", + "description": "The unique resourceId" + } + }, + "description": "Properties for configuration assignment" + }, + "InputLinuxParameters": { + "type": "object", + "properties": { + "classificationsToInclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Classification category of patches to be patched" + }, + "packageNameMasksToExclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Package names to be excluded for patching." + }, + "packageNameMasksToInclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Package names to be included for patching." + } + }, + "description": "Input properties for patching a Linux machine." + }, + "InputPatchConfiguration": { + "type": "object", + "properties": { + "linuxParameters": { + "oneOf": [ + { + "$ref": "#/definitions/InputLinuxParameters" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Input properties for patching a Linux machine." + }, + "rebootSetting": { + "oneOf": [ + { + "type": "string", + "enum": [ + "IfRequired", + "Never", + "Always" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed." + }, + "windowsParameters": { + "oneOf": [ + { + "$ref": "#/definitions/InputWindowsParameters" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Input properties for patching a Windows machine." + } + }, + "description": "Input configuration for a patch run" + }, + "InputWindowsParameters": { + "type": "object", + "properties": { + "classificationsToInclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Classification category of patches to be patched" + }, + "excludeKbsRequiringReboot": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Exclude patches which need reboot" + }, + "kbNumbersToExclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Windows KBID to be excluded for patching." + }, + "kbNumbersToInclude": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Windows KBID to be included for patching." + } + }, + "description": "Input properties for patching a Windows machine." + }, + "MaintenanceConfigurationProperties": { + "type": "object", + "properties": { + "extensionProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets extensionProperties of the maintenanceConfiguration" + }, + "installPatches": { + "oneOf": [ + { + "$ref": "#/definitions/InputPatchConfiguration" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Input configuration for a patch run" + }, + "maintenanceScope": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Host", + "Resource", + "OSImage", + "Extension", + "InGuestPatch", + "SQLDB", + "SQLManagedInstance" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets maintenanceScope of the configuration." + }, + "maintenanceWindow": { + "oneOf": [ + { + "$ref": "#/definitions/MaintenanceWindow" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Definition of a MaintenanceWindow" + }, + "namespace": { + "type": "string", + "description": "Gets or sets namespace of the resource" + }, + "visibility": { + "oneOf": [ + { + "type": "string", + "enum": [ + "Custom", + "Public" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Gets or sets the visibility of the configuration. The default value is 'Custom'." + } + }, + "description": "Properties for maintenance configuration" + }, + "MaintenanceWindow": { + "type": "object", + "properties": { + "duration": { + "type": "string", + "description": "Duration of the maintenance window in HH:mm format. If not provided, default value will be used based on maintenance scope provided. Example: 05:00." + }, + "expirationDateTime": { + "type": "string", + "description": "Effective expiration date of the maintenance window in YYYY-MM-DD hh:mm format. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone. Expiration date must be set to a future date. If not provided, it will be set to the maximum datetime 9999-12-31 23:59:59." + }, + "recurEvery": { + "type": "string", + "description": "Rate at which a Maintenance window is expected to recur. The rate can be expressed as daily, weekly, or monthly schedules. Daily schedule are formatted as recurEvery: [Frequency as integer]['Day(s)']. If no frequency is provided, the default frequency is 1. Daily schedule examples are recurEvery: Day, recurEvery: 3Days. Weekly schedule are formatted as recurEvery: [Frequency as integer]['Week(s)'] [Optional comma separated list of weekdays Monday-Sunday]. Weekly schedule examples are recurEvery: 3Weeks, recurEvery: Week Saturday,Sunday. Monthly schedules are formatted as [Frequency as integer]['Month(s)'] [Comma separated list of month days] or [Frequency as integer]['Month(s)'] [Week of Month (First, Second, Third, Fourth, Last)] [Weekday Monday-Sunday] [Optional Offset(No. of days)]. Offset value must be between -6 to 6 inclusive. Monthly schedule examples are recurEvery: Month, recurEvery: 2Months, recurEvery: Month day23,day24, recurEvery: Month Last Sunday, recurEvery: Month Fourth Monday, recurEvery: Month Last Sunday Offset-3, recurEvery: Month Third Sunday Offset6." + }, + "startDateTime": { + "type": "string", + "description": "Effective start date of the maintenance window in YYYY-MM-DD hh:mm format. The start date can be set to either the current date or future date. The window will be created in the time zone provided and adjusted to daylight savings according to that time zone." + }, + "timeZone": { + "type": "string", + "description": "Name of the timezone. List of timezones can be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. Example: Pacific Standard Time, UTC, W. Europe Standard Time, Korea Standard Time, Cen. Australia Standard Time." + } + }, + "description": "Definition of a MaintenanceWindow" + }, + "TagSettingsProperties": { + "type": "object", + "properties": { + "filterOperator": { + "oneOf": [ + { + "type": "string", + "enum": [ + "All", + "Any" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Filter VMs by Any or All specified tags." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Dictionary of tags with its list of values." + } + }, + "description": "Tag filter information for the VM." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index d4926b4c34..cdde805473 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -17443,6 +17443,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2022-11-01-preview/Microsoft.Maintenance.json#/resourceDefinitions/maintenanceConfigurations" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-04-01/Microsoft.Maintenance.json#/resourceDefinitions/configurationAssignments" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-04-01/Microsoft.Maintenance.json#/resourceDefinitions/maintenanceConfigurations" + }, { "$ref": "https://schema.management.azure.com/schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json#/resourceDefinitions/userAssignedIdentities" },