We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.maintenance.getConfiguration
Explore with Pulumi AI
Use this data source to access information about an existing Maintenance Configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const existing = azure.maintenance.getConfiguration({
    name: "example-mc",
    resourceGroupName: "example-resources",
});
export const id = existingAzurermMaintenanceConfiguration.id;
import pulumi
import pulumi_azure as azure
existing = azure.maintenance.get_configuration(name="example-mc",
    resource_group_name="example-resources")
pulumi.export("id", existing_azurerm_maintenance_configuration["id"])
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := maintenance.LookupConfiguration(ctx, &maintenance.LookupConfigurationArgs{
			Name:              "example-mc",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", existingAzurermMaintenanceConfiguration.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var existing = Azure.Maintenance.GetConfiguration.Invoke(new()
    {
        Name = "example-mc",
        ResourceGroupName = "example-resources",
    });
    return new Dictionary<string, object?>
    {
        ["id"] = existingAzurermMaintenanceConfiguration.Id,
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.maintenance.MaintenanceFunctions;
import com.pulumi.azure.maintenance.inputs.GetConfigurationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var existing = MaintenanceFunctions.getConfiguration(GetConfigurationArgs.builder()
            .name("example-mc")
            .resourceGroupName("example-resources")
            .build());
        ctx.export("id", existingAzurermMaintenanceConfiguration.id());
    }
}
variables:
  existing:
    fn::invoke:
      function: azure:maintenance:getConfiguration
      arguments:
        name: example-mc
        resourceGroupName: example-resources
outputs:
  id: ${existingAzurermMaintenanceConfiguration.id}
Using getConfiguration
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getConfiguration(args: GetConfigurationArgs, opts?: InvokeOptions): Promise<GetConfigurationResult>
function getConfigurationOutput(args: GetConfigurationOutputArgs, opts?: InvokeOptions): Output<GetConfigurationResult>def get_configuration(name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetConfigurationResult
def get_configuration_output(name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetConfigurationResult]func LookupConfiguration(ctx *Context, args *LookupConfigurationArgs, opts ...InvokeOption) (*LookupConfigurationResult, error)
func LookupConfigurationOutput(ctx *Context, args *LookupConfigurationOutputArgs, opts ...InvokeOption) LookupConfigurationResultOutput> Note: This function is named LookupConfiguration in the Go SDK.
public static class GetConfiguration 
{
    public static Task<GetConfigurationResult> InvokeAsync(GetConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetConfigurationResult> Invoke(GetConfigurationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
public static Output<GetConfigurationResult> getConfiguration(GetConfigurationArgs args, InvokeOptions options)
fn::invoke:
  function: azure:maintenance/getConfiguration:getConfiguration
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Maintenance Configuration.
- ResourceGroup stringName 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
- Name string
- Specifies the name of the Maintenance Configuration.
- ResourceGroup stringName 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name String
- Specifies the name of the Maintenance Configuration.
- resourceGroup StringName 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name string
- Specifies the name of the Maintenance Configuration.
- resourceGroup stringName 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name str
- Specifies the name of the Maintenance Configuration.
- resource_group_ strname 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
- name String
- Specifies the name of the Maintenance Configuration.
- resourceGroup StringName 
- Specifies the name of the Resource Group where this Maintenance Configuration exists.
getConfiguration Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- InGuest stringUser Patch Mode 
- The in guest user patch mode.
- InstallPatches List<GetConfiguration Install Patch> 
- An install_patchesblock as defined below.
- Location string
- The Azure location where the resource exists.
- Name string
- Properties Dictionary<string, string>
- The properties assigned to the resource.
- ResourceGroup stringName 
- Scope string
- The scope of the Maintenance Configuration.
- Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Visibility string
- The visibility of the Maintenance Configuration.
- Windows
List<GetConfiguration Window> 
- A windowblock as defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- InGuest stringUser Patch Mode 
- The in guest user patch mode.
- InstallPatches []GetConfiguration Install Patch 
- An install_patchesblock as defined below.
- Location string
- The Azure location where the resource exists.
- Name string
- Properties map[string]string
- The properties assigned to the resource.
- ResourceGroup stringName 
- Scope string
- The scope of the Maintenance Configuration.
- map[string]string
- A mapping of tags assigned to the resource.
- Visibility string
- The visibility of the Maintenance Configuration.
- Windows
[]GetConfiguration Window 
- A windowblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- inGuest StringUser Patch Mode 
- The in guest user patch mode.
- installPatches List<GetConfiguration Install Patch> 
- An install_patchesblock as defined below.
- location String
- The Azure location where the resource exists.
- name String
- properties Map<String,String>
- The properties assigned to the resource.
- resourceGroup StringName 
- scope String
- The scope of the Maintenance Configuration.
- Map<String,String>
- A mapping of tags assigned to the resource.
- visibility String
- The visibility of the Maintenance Configuration.
- windows
List<GetConfiguration Window> 
- A windowblock as defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- inGuest stringUser Patch Mode 
- The in guest user patch mode.
- installPatches GetConfiguration Install Patch[] 
- An install_patchesblock as defined below.
- location string
- The Azure location where the resource exists.
- name string
- properties {[key: string]: string}
- The properties assigned to the resource.
- resourceGroup stringName 
- scope string
- The scope of the Maintenance Configuration.
- {[key: string]: string}
- A mapping of tags assigned to the resource.
- visibility string
- The visibility of the Maintenance Configuration.
- windows
GetConfiguration Window[] 
- A windowblock as defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- in_guest_ struser_ patch_ mode 
- The in guest user patch mode.
- install_patches Sequence[GetConfiguration Install Patch] 
- An install_patchesblock as defined below.
- location str
- The Azure location where the resource exists.
- name str
- properties Mapping[str, str]
- The properties assigned to the resource.
- resource_group_ strname 
- scope str
- The scope of the Maintenance Configuration.
- Mapping[str, str]
- A mapping of tags assigned to the resource.
- visibility str
- The visibility of the Maintenance Configuration.
- windows
Sequence[GetConfiguration Window] 
- A windowblock as defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- inGuest StringUser Patch Mode 
- The in guest user patch mode.
- installPatches List<Property Map>
- An install_patchesblock as defined below.
- location String
- The Azure location where the resource exists.
- name String
- properties Map<String>
- The properties assigned to the resource.
- resourceGroup StringName 
- scope String
- The scope of the Maintenance Configuration.
- Map<String>
- A mapping of tags assigned to the resource.
- visibility String
- The visibility of the Maintenance Configuration.
- windows List<Property Map>
- A windowblock as defined below.
Supporting Types
GetConfigurationInstallPatch   
- Linuxes
List<GetConfiguration Install Patch Linux> 
- A linuxblock as defined below.
- Reboot string
- 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.
- Windows
List<GetConfiguration Install Patch Window> 
- A windowsblock as defined below.
- Linuxes
[]GetConfiguration Install Patch Linux 
- A linuxblock as defined below.
- Reboot string
- 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.
- Windows
[]GetConfiguration Install Patch Window 
- A windowsblock as defined below.
- linuxes
List<GetConfiguration Install Patch Linux> 
- A linuxblock as defined below.
- reboot String
- 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.
- windows
List<GetConfiguration Install Patch Window> 
- A windowsblock as defined below.
- linuxes
GetConfiguration Install Patch Linux[] 
- A linuxblock as defined below.
- reboot string
- 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.
- windows
GetConfiguration Install Patch Window[] 
- A windowsblock as defined below.
- linuxes
Sequence[GetConfiguration Install Patch Linux] 
- A linuxblock as defined below.
- reboot str
- 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.
- windows
Sequence[GetConfiguration Install Patch Window] 
- A windowsblock as defined below.
- linuxes List<Property Map>
- A linuxblock as defined below.
- reboot String
- 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.
- windows List<Property Map>
- A windowsblock as defined below.
GetConfigurationInstallPatchLinux    
- ClassificationsTo List<string>Includes 
- List of Classification category of patches to be patched.
- PackageNames List<string>Mask To Excludes 
- List of package names to be excluded from patching.
- PackageNames List<string>Mask To Includes 
- List of package names to be included for patching.
- ClassificationsTo []stringIncludes 
- List of Classification category of patches to be patched.
- PackageNames []stringMask To Excludes 
- List of package names to be excluded from patching.
- PackageNames []stringMask To Includes 
- List of package names to be included for patching.
- classificationsTo List<String>Includes 
- List of Classification category of patches to be patched.
- packageNames List<String>Mask To Excludes 
- List of package names to be excluded from patching.
- packageNames List<String>Mask To Includes 
- List of package names to be included for patching.
- classificationsTo string[]Includes 
- List of Classification category of patches to be patched.
- packageNames string[]Mask To Excludes 
- List of package names to be excluded from patching.
- packageNames string[]Mask To Includes 
- List of package names to be included for patching.
- classifications_to_ Sequence[str]includes 
- List of Classification category of patches to be patched.
- package_names_ Sequence[str]mask_ to_ excludes 
- List of package names to be excluded from patching.
- package_names_ Sequence[str]mask_ to_ includes 
- List of package names to be included for patching.
- classificationsTo List<String>Includes 
- List of Classification category of patches to be patched.
- packageNames List<String>Mask To Excludes 
- List of package names to be excluded from patching.
- packageNames List<String>Mask To Includes 
- List of package names to be included for patching.
GetConfigurationInstallPatchWindow    
- ClassificationsTo List<string>Includes 
- List of Classification category of patches to be patched.
- KbNumbers List<string>To Excludes 
- List of KB numbers to be excluded from patching.
- KbNumbers List<string>To Includes 
- List of KB numbers to be included for patching.
- ClassificationsTo []stringIncludes 
- List of Classification category of patches to be patched.
- KbNumbers []stringTo Excludes 
- List of KB numbers to be excluded from patching.
- KbNumbers []stringTo Includes 
- List of KB numbers to be included for patching.
- classificationsTo List<String>Includes 
- List of Classification category of patches to be patched.
- kbNumbers List<String>To Excludes 
- List of KB numbers to be excluded from patching.
- kbNumbers List<String>To Includes 
- List of KB numbers to be included for patching.
- classificationsTo string[]Includes 
- List of Classification category of patches to be patched.
- kbNumbers string[]To Excludes 
- List of KB numbers to be excluded from patching.
- kbNumbers string[]To Includes 
- List of KB numbers to be included for patching.
- classifications_to_ Sequence[str]includes 
- List of Classification category of patches to be patched.
- kb_numbers_ Sequence[str]to_ excludes 
- List of KB numbers to be excluded from patching.
- kb_numbers_ Sequence[str]to_ includes 
- List of KB numbers to be included for patching.
- classificationsTo List<String>Includes 
- List of Classification category of patches to be patched.
- kbNumbers List<String>To Excludes 
- List of KB numbers to be excluded from patching.
- kbNumbers List<String>To Includes 
- List of KB numbers to be included for patching.
GetConfigurationWindow  
- Duration string
- The duration of the maintenance window.
- ExpirationDate stringTime 
- Effective expiration date of the maintenance window.
- RecurEvery string
- The rate at which a maintenance window is expected to recur.
- StartDate stringTime 
- Effective start date of the maintenance window.
- TimeZone string
- The time zone for the maintenance window.
- Duration string
- The duration of the maintenance window.
- ExpirationDate stringTime 
- Effective expiration date of the maintenance window.
- RecurEvery string
- The rate at which a maintenance window is expected to recur.
- StartDate stringTime 
- Effective start date of the maintenance window.
- TimeZone string
- The time zone for the maintenance window.
- duration String
- The duration of the maintenance window.
- expirationDate StringTime 
- Effective expiration date of the maintenance window.
- recurEvery String
- The rate at which a maintenance window is expected to recur.
- startDate StringTime 
- Effective start date of the maintenance window.
- timeZone String
- The time zone for the maintenance window.
- duration string
- The duration of the maintenance window.
- expirationDate stringTime 
- Effective expiration date of the maintenance window.
- recurEvery string
- The rate at which a maintenance window is expected to recur.
- startDate stringTime 
- Effective start date of the maintenance window.
- timeZone string
- The time zone for the maintenance window.
- duration str
- The duration of the maintenance window.
- expiration_date_ strtime 
- Effective expiration date of the maintenance window.
- recur_every str
- The rate at which a maintenance window is expected to recur.
- start_date_ strtime 
- Effective start date of the maintenance window.
- time_zone str
- The time zone for the maintenance window.
- duration String
- The duration of the maintenance window.
- expirationDate StringTime 
- Effective expiration date of the maintenance window.
- recurEvery String
- The rate at which a maintenance window is expected to recur.
- startDate StringTime 
- Effective start date of the maintenance window.
- timeZone String
- The time zone for the maintenance window.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.