Microsoft. OnderhoudsconfiguratieToewijzingen 2025-10-01-preview

Bicep-resourcedefinitie

Het resourcetype configurationAssignments kan worden geïmplementeerd met bewerkingen die zijn gericht op:

Zie wijzigingslogboek voor een lijst met gewijzigde eigenschappen in elke API-versie.

Gebruiksvoorbeelden

Voorbeelden van Bicep

Een eenvoudig voorbeeld van het implementeren van Maintenance Assignment.

param resourceName string = 'acctest0001'
param location string = 'westeurope'
@secure()
@description('The administrator password for the virtual machine')
param adminPassword string

resource virtualMachine 'Microsoft.Compute/virtualMachines@2023-03-01' = {
  name: resourceName
  location: location
  properties: {
    additionalCapabilities: {}
    applicationProfile: {
      galleryApplications: []
    }
    diagnosticsProfile: {
      bootDiagnostics: {
        enabled: false
        storageUri: ''
      }
    }
    extensionsTimeBudget: 'PT1H30M'
    hardwareProfile: {
      vmSize: 'Standard_F2'
    }
    networkProfile: {
      networkInterfaces: [
        {
          id: networkInterface.id
          properties: {
            primary: true
          }
        }
      ]
    }
    osProfile: {
      adminPassword: adminPassword
      adminUsername: 'adminuser'
      allowExtensionOperations: true
      computerName: resourceName
      linuxConfiguration: {
        disablePasswordAuthentication: false
        patchSettings: {
          assessmentMode: 'ImageDefault'
          patchMode: 'ImageDefault'
        }
        provisionVMAgent: true
        ssh: {
          publicKeys: []
        }
      }
      secrets: []
    }
    priority: 'Regular'
    storageProfile: {
      dataDisks: []
      imageReference: {
        offer: 'UbuntuServer'
        publisher: 'Canonical'
        sku: '16.04-LTS'
        version: 'latest'
      }
      osDisk: {
        caching: 'ReadWrite'
        createOption: 'FromImage'
        managedDisk: {
          storageAccountType: 'Standard_LRS'
        }
        osType: 'Linux'
        writeAcceleratorEnabled: false
      }
    }
  }
}

resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    addressSpace: {
      addressPrefixes: [
        '10.0.0.0/16'
      ]
    }
    dhcpOptions: {
      dnsServers: []
    }
    subnets: []
  }
}

resource subnet 'Microsoft.Network/virtualNetworks/subnets@2022-07-01' = {
  name: 'internal'
  parent: virtualNetwork
  properties: {
    addressPrefix: '10.0.2.0/24'
    delegations: []
    privateEndpointNetworkPolicies: 'Enabled'
    privateLinkServiceNetworkPolicies: 'Enabled'
    serviceEndpointPolicies: []
    serviceEndpoints: []
  }
}

resource configurationAssignment 'Microsoft.Maintenance/configurationAssignments@2022-07-01-preview' = {
  name: resourceName
  scope: virtualMachine
  properties: {
    maintenanceConfigurationId: maintenanceConfiguration.id
    resourceId: virtualMachine.id
  }
}

resource maintenanceConfiguration 'Microsoft.Maintenance/maintenanceConfigurations@2022-07-01-preview' = {
  name: resourceName
  location: location
  properties: {
    extensionProperties: {}
    maintenanceScope: 'SQLDB'
    namespace: 'Microsoft.Maintenance'
    visibility: 'Custom'
  }
}

resource networkInterface 'Microsoft.Network/networkInterfaces@2022-07-01' = {
  name: resourceName
  location: location
  properties: {
    enableAcceleratedNetworking: false
    enableIPForwarding: false
    ipConfigurations: [
      {
        name: 'testconfiguration1'
        properties: {
          primary: true
          privateIPAddressVersion: 'IPv4'
          privateIPAllocationMethod: 'Dynamic'
          subnet: {
            id: subnet.id
          }
        }
      }
    ]
  }
}

Geverifieerde Azure-modules

De volgende Azure Geverifieerde modules kunnen worden gebruikt om dit resourcetype uit te voeren.

Module Description
configuratietoewijzing voor onderhoud AVM-resourcemodule voor toewijzing van onderhoudsconfiguratie

Resource-indeling

Als u een Resource Microsoft.Maintenance/configurationAssignments wilt maken, voegt u de volgende Bicep toe aan uw sjabloon.

resource symbolicname 'Microsoft.Maintenance/configurationAssignments@2025-10-01-preview' = {
  scope: resourceSymbolicName or scope
  location: 'string'
  name: 'string'
  properties: {
    filter: {
      locations: [
        'string'
      ]
      osTypes: [
        'string'
      ]
      resourceGroups: [
        'string'
      ]
      resourceTypes: [
        'string'
      ]
      tagSettings: {
        filterOperator: 'string'
        tags: {
          {customized property}: [
            'string'
          ]
        }
      }
    }
    maintenanceConfigurationId: 'string'
    resourceId: 'string'
  }
}

Eigenschapswaarden

Microsoft.Maintenance/configurationAssignments

Naam Description Value
locatie Locatie van de resource string
naam De resourcenaam tekenreeks (vereist)
properties Eigenschappen van de configuratietoewijzing ConfigurationAssignmentProperties
scope Gebruik deze functie bij het maken van een resource in een bereik dat anders is dan het implementatiebereik. Stel deze eigenschap in op de symbolische naam van een bron om de extensie resource toe te passen.

ConfigurationAssignmentFilterProperties

Naam Description Value
locations Lijst met locaties voor het bereik van de query. string[]
osSoorten Lijst met toegestane besturingssystemen. string[]
resourceGroups Lijst met toegestane resourcegroepen. string[]
resourcetypen Lijst met toegestane resources. string[]
tagInstellingen Tag-instellingen voor de virtuele machine. TagSettingsEigenschappen

ConfigurationAssignmentProperties

Naam Description Value
filter Eigenschappen van de configuratietoewijzing ConfigurationAssignmentFilterProperties
maintenanceConfigurationId De onderhoudsconfiguratie-id string
bron-ID De unieke resourceId string

TagSettingsEigenschappen

Naam Description Value
filterOperator Filter VM's op alle opgegeven tags of alle opgegeven tags. 'All'
'Alle'
tags Woordenlijst met tags met de lijst met waarden. TagSettingsPropertiesTags

TagSettingsPropertiesTags

Naam Description Value

Resourcedefinitie van ARM-sjabloon

Het resourcetype configurationAssignments kan worden geïmplementeerd met bewerkingen die zijn gericht op:

Gebruiksvoorbeelden

Resource-indeling

Als u een Microsoft.Maintenance/configurationAssignments-resource wilt maken, voegt u de volgende JSON toe aan uw sjabloon.

{
  "type": "Microsoft.Maintenance/configurationAssignments",
  "apiVersion": "2025-10-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "filter": {
      "locations": [ "string" ],
      "osTypes": [ "string" ],
      "resourceGroups": [ "string" ],
      "resourceTypes": [ "string" ],
      "tagSettings": {
        "filterOperator": "string",
        "tags": {
          "{customized property}": [ "string" ]
        }
      }
    },
    "maintenanceConfigurationId": "string",
    "resourceId": "string"
  }
}

Eigenschapswaarden

Microsoft.Maintenance/configurationAssignments

Naam Description Value
apiVersion De API-versie '2025-10-01-voorbeschouwing'
locatie Locatie van de resource string
naam De resourcenaam tekenreeks (vereist)
properties Eigenschappen van de configuratietoewijzing ConfigurationAssignmentProperties
type Het brontype 'Microsoft.Maintenance/configurationAssignments'

ConfigurationAssignmentFilterProperties

Naam Description Value
locations Lijst met locaties voor het bereik van de query. string[]
osSoorten Lijst met toegestane besturingssystemen. string[]
resourceGroups Lijst met toegestane resourcegroepen. string[]
resourcetypen Lijst met toegestane resources. string[]
tagInstellingen Tag-instellingen voor de virtuele machine. TagSettingsEigenschappen

ConfigurationAssignmentProperties

Naam Description Value
filter Eigenschappen van de configuratietoewijzing ConfigurationAssignmentFilterProperties
maintenanceConfigurationId De onderhoudsconfiguratie-id string
bron-ID De unieke resourceId string

TagSettingsEigenschappen

Naam Description Value
filterOperator Filter VM's op alle opgegeven tags of alle opgegeven tags. 'All'
'Alle'
tags Woordenlijst met tags met de lijst met waarden. TagSettingsPropertiesTags

TagSettingsPropertiesTags

Naam Description Value

Resourcedefinitie van Terraform (AzAPI-provider)

Het resourcetype configurationAssignments kan worden geïmplementeerd met bewerkingen die zijn gericht op:

  • Abonnement* Resourcegroepen Voor een lijst van gewijzigde eigenschappen in elke API-versie, zie wijzigingslogboek.

Gebruiksvoorbeelden

Terraform-voorbeelden

Een eenvoudig voorbeeld van het implementeren van Maintenance Assignment.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

variable "admin_password" {
  type        = string
  description = "The administrator password for the virtual machine"
  sensitive   = true
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "maintenanceConfiguration" {
  type      = "Microsoft.Maintenance/maintenanceConfigurations@2022-07-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      extensionProperties = {
      }
      maintenanceScope = "SQLDB"
      namespace        = "Microsoft.Maintenance"
      visibility       = "Custom"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "virtualNetwork" {
  type      = "Microsoft.Network/virtualNetworks@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      addressSpace = {
        addressPrefixes = [
          "10.0.0.0/16",
        ]
      }
      dhcpOptions = {
        dnsServers = [
        ]
      }
      subnets = [
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
  lifecycle {
    ignore_changes = [body.properties.subnets]
  }
}

resource "azapi_resource" "subnet" {
  type      = "Microsoft.Network/virtualNetworks/subnets@2022-07-01"
  parent_id = azapi_resource.virtualNetwork.id
  name      = "internal"
  body = {
    properties = {
      addressPrefix = "10.0.2.0/24"
      delegations = [
      ]
      privateEndpointNetworkPolicies    = "Enabled"
      privateLinkServiceNetworkPolicies = "Enabled"
      serviceEndpointPolicies = [
      ]
      serviceEndpoints = [
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "networkInterface" {
  type      = "Microsoft.Network/networkInterfaces@2022-07-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      enableAcceleratedNetworking = false
      enableIPForwarding          = false
      ipConfigurations = [
        {
          name = "testconfiguration1"
          properties = {
            primary                   = true
            privateIPAddressVersion   = "IPv4"
            privateIPAllocationMethod = "Dynamic"
            subnet = {
              id = azapi_resource.subnet.id
            }
          }
        },
      ]
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "virtualMachine" {
  type      = "Microsoft.Compute/virtualMachines@2023-03-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      additionalCapabilities = {
      }
      applicationProfile = {
        galleryApplications = [
        ]
      }
      diagnosticsProfile = {
        bootDiagnostics = {
          enabled    = false
          storageUri = ""
        }
      }
      extensionsTimeBudget = "PT1H30M"
      hardwareProfile = {
        vmSize = "Standard_F2"
      }
      networkProfile = {
        networkInterfaces = [
          {
            id = azapi_resource.networkInterface.id
            properties = {
              primary = true
            }
          },
        ]
      }
      osProfile = {
        adminPassword            = var.admin_password
        adminUsername            = "adminuser"
        allowExtensionOperations = true
        computerName             = var.resource_name
        linuxConfiguration = {
          disablePasswordAuthentication = false
          patchSettings = {
            assessmentMode = "ImageDefault"
            patchMode      = "ImageDefault"
          }
          provisionVMAgent = true
          ssh = {
            publicKeys = [
            ]
          }
        }
        secrets = [
        ]
      }
      priority = "Regular"
      storageProfile = {
        dataDisks = [
        ]
        imageReference = {
          offer     = "UbuntuServer"
          publisher = "Canonical"
          sku       = "16.04-LTS"
          version   = "latest"
        }
        osDisk = {
          caching      = "ReadWrite"
          createOption = "FromImage"
          managedDisk = {
            storageAccountType = "Standard_LRS"
          }
          osType                  = "Linux"
          writeAcceleratorEnabled = false
        }
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "configurationAssignment" {
  type      = "Microsoft.Maintenance/configurationAssignments@2022-07-01-preview"
  parent_id = azapi_resource.virtualMachine.id
  name      = var.resource_name
  body = {
    location = "westeurope"
    properties = {
      maintenanceConfigurationId = azapi_resource.maintenanceConfiguration.id
      resourceId                 = azapi_resource.virtualMachine.id
    }
  }
  ignore_casing             = true
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

Resource-indeling

Als u een Microsoft.Maintenance/configurationAssignments-resource wilt maken, voegt u de volgende Terraform toe aan uw sjabloon.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Maintenance/configurationAssignments@2025-10-01-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  body = {
    properties = {
      filter = {
        locations = [
          "string"
        ]
        osTypes = [
          "string"
        ]
        resourceGroups = [
          "string"
        ]
        resourceTypes = [
          "string"
        ]
        tagSettings = {
          filterOperator = "string"
          tags = {
            {customized property} = [
              "string"
            ]
          }
        }
      }
      maintenanceConfigurationId = "string"
      resourceId = "string"
    }
  }
}

Eigenschapswaarden

Microsoft.Maintenance/configurationAssignments

Naam Description Value
locatie Locatie van de resource string
naam De resourcenaam tekenreeks (vereist)
parent_id De id van de resource waar deze extensieresource op moet worden toegepast. tekenreeks (vereist)
properties Eigenschappen van de configuratietoewijzing ConfigurationAssignmentProperties
type Het brontype "Microsoft. Onderhoud/configurationAssignments@2025-10-01-preview"

ConfigurationAssignmentFilterProperties

Naam Description Value
locations Lijst met locaties voor het bereik van de query. string[]
osSoorten Lijst met toegestane besturingssystemen. string[]
resourceGroups Lijst met toegestane resourcegroepen. string[]
resourcetypen Lijst met toegestane resources. string[]
tagInstellingen Tag-instellingen voor de virtuele machine. TagSettingsEigenschappen

ConfigurationAssignmentProperties

Naam Description Value
filter Eigenschappen van de configuratietoewijzing ConfigurationAssignmentFilterProperties
maintenanceConfigurationId De onderhoudsconfiguratie-id string
bron-ID De unieke resourceId string

TagSettingsEigenschappen

Naam Description Value
filterOperator Filter VM's op alle opgegeven tags of alle opgegeven tags. 'All'
'Alle'
tags Woordenlijst met tags met de lijst met waarden. TagSettingsPropertiesTags

TagSettingsPropertiesTags

Naam Description Value