Maintenance Configurations - Get

Get Configuration record

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}?api-version=2023-09-01-preview

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

Resource Group Name

resourceName
path True

string

Maintenance Configuration Name

subscriptionId
path True

string

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Version of the API to be used with the client request.

Responses

Name Type Description
200 OK

MaintenanceConfiguration

OK

Other Status Codes

MaintenanceError

BadRequest

Examples

MaintenanceConfigurations_GetForResource
MaintenanceConfigurations_GetForResource_GuestOSPatchLinux
MaintenanceConfigurations_GetForResource_GuestOSPatchWindows

MaintenanceConfigurations_GetForResource

Sample Request

GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2023-09-01-preview

Sample Response

{
  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
  "name": "configuration1",
  "location": "westus2",
  "properties": {
    "namespace": "Microsoft.Maintenance",
    "maintenanceScope": "OSImage",
    "visibility": "Custom",
    "maintenanceWindow": {
      "startDateTime": "2020-04-30 08:00",
      "expirationDateTime": "9999-12-31 00:00",
      "duration": "05:00",
      "timeZone": "Pacific Standard Time",
      "recurEvery": "5Days"
    }
  }
}

MaintenanceConfigurations_GetForResource_GuestOSPatchLinux

Sample Request

GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2023-09-01-preview

Sample Response

{
  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
  "name": "configuration1",
  "location": "westus2",
  "properties": {
    "namespace": "Microsoft.Maintenance",
    "maintenanceScope": "InGuestPatch",
    "visibility": "Custom",
    "maintenanceWindow": {
      "startDateTime": "2020-04-30 08:00",
      "expirationDateTime": "9999-12-31 00:00",
      "duration": "05:00",
      "timeZone": "Pacific Standard Time",
      "recurEvery": "5Days"
    },
    "installPatches": {
      "linuxParameters": {
        "classificationsToInclude": [
          "Critical"
        ],
        "packageNameMasksToExclude": [
          "apt",
          "http"
        ],
        "packageNameMasksToInclude": [
          "binutils",
          "bin"
        ]
      },
      "rebootSetting": "Always"
    }
  }
}

MaintenanceConfigurations_GetForResource_GuestOSPatchWindows

Sample Request

GET https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1?api-version=2023-09-01-preview

Sample Response

{
  "id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
  "name": "configuration1",
  "location": "westus2",
  "properties": {
    "namespace": "Microsoft.Maintenance",
    "maintenanceScope": "InGuestPatch",
    "visibility": "Custom",
    "maintenanceWindow": {
      "startDateTime": "2020-04-30 08:00",
      "expirationDateTime": "9999-12-31 00:00",
      "duration": "05:00",
      "timeZone": "Pacific Standard Time",
      "recurEvery": "5Days"
    },
    "installPatches": {
      "windowsParameters": {
        "classificationsToInclude": [
          "Security"
        ],
        "kbNumbersToInclude": [
          "KB123456"
        ],
        "kbNumbersToExclude": [
          "KB234567"
        ],
        "excludeKbsRequiringReboot": false
      },
      "rebootSetting": "Always"
    }
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorDetails

An error response details received from the Azure Maintenance service.

InputLinuxParameters

Input properties for patching a Linux machine.

InputPatchConfiguration

Input configuration for a patch run

InputWindowsParameters

Input properties for patching a Windows machine.

MaintenanceConfiguration

Maintenance configuration record type

MaintenanceError

An error response received from the Azure Maintenance service.

MaintenanceScope

Gets or sets maintenanceScope of the configuration

RebootOptions

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.

systemData

Metadata pertaining to creation and last modification of the resource.

Visibility

Gets or sets the visibility of the configuration. The default value is 'Custom'

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorDetails

An error response details received from the Azure Maintenance service.

Name Type Description
code

string

Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.

message

string

Human-readable representation of the error.

InputLinuxParameters

Input properties for patching a Linux machine.

Name Type Description
classificationsToInclude

string[]

Classification category of patches to be patched

packageNameMasksToExclude

string[]

Package names to be excluded for patching.

packageNameMasksToInclude

string[]

Package names to be included for patching.

InputPatchConfiguration

Input configuration for a patch run

Name Type Default Value Description
linuxParameters

InputLinuxParameters

Input parameters specific to patching Linux machine. For Windows machines, do not pass this property.

rebootSetting

RebootOptions

IfRequired

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

InputWindowsParameters

Input parameters specific to patching a Windows machine. For Linux machines, do not pass this property.

InputWindowsParameters

Input properties for patching a Windows machine.

Name Type Description
classificationsToInclude

string[]

Classification category of patches to be patched

excludeKbsRequiringReboot

boolean

Exclude patches which need reboot

kbNumbersToExclude

string[]

Windows KBID to be excluded for patching.

kbNumbersToInclude

string[]

Windows KBID to be included for patching.

MaintenanceConfiguration

Maintenance configuration record type

Name Type Description
id

string

Fully qualified identifier of the resource

location

string

Gets or sets location of the resource

name

string

Name of the resource

properties.extensionProperties

object

Gets or sets extensionProperties of the maintenanceConfiguration

properties.installPatches

InputPatchConfiguration

The input parameters to be passed to the patch run operation.

properties.maintenanceScope

MaintenanceScope

Gets or sets maintenanceScope of the configuration

properties.maintenanceWindow.duration

string

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.

properties.maintenanceWindow.expirationDateTime

string

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.

properties.maintenanceWindow.recurEvery

string

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.

properties.maintenanceWindow.startDateTime

string

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.

properties.maintenanceWindow.timeZone

string

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.

properties.namespace

string

Gets or sets namespace of the resource

properties.visibility

Visibility

Gets or sets the visibility of the configuration. The default value is 'Custom'

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Gets or sets tags of the resource

type

string

Type of the resource

MaintenanceError

An error response received from the Azure Maintenance service.

Name Type Description
error

ErrorDetails

Details of the error

MaintenanceScope

Gets or sets maintenanceScope of the configuration

Name Type Description
Extension

string

This maintenance scope controls extension installation on VM/VMSS

Host

string

This maintenance scope controls installation of azure platform updates i.e. services on physical nodes hosting customer VMs.

InGuestPatch

string

This maintenance scope controls installation of windows and linux packages on VM/VMSS

OSImage

string

This maintenance scope controls os image installation on VM/VMSS

Resource

string

This maintenance scope controls the default update maintenance of the Azure Resource

SQLDB

string

This maintenance scope controls installation of SQL server platform updates.

SQLManagedInstance

string

This maintenance scope controls installation of SQL managed instance platform update.

RebootOptions

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.

Name Type Description
Always

string

IfRequired

string

Never

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

Visibility

Gets or sets the visibility of the configuration. The default value is 'Custom'

Name Type Description
Custom

string

Only visible to users with permissions.

Public

string

Visible to all users.