1. Packages
  2. Azure Native
  3. API Docs
  4. maintenance
  5. ConfigurationAssignment
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi

azure-native.maintenance.ConfigurationAssignment

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi

    Configuration Assignment Azure REST API version: 2022-11-01-preview. Prior API version in Azure Native 1.x: 2021-04-01-preview.

    Other available API versions: 2023-04-01, 2023-09-01-preview, 2023-10-01-preview.

    Example Usage

    ConfigurationAssignments_CreateOrUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var configurationAssignment = new AzureNative.Maintenance.ConfigurationAssignment("configurationAssignment", new()
        {
            ConfigurationAssignmentName = "workervmConfiguration",
            MaintenanceConfigurationId = "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
            ProviderName = "Microsoft.Compute",
            ResourceGroupName = "examplerg",
            ResourceName = "smdtest1",
            ResourceType = "virtualMachineScaleSets",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/maintenance/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := maintenance.NewConfigurationAssignment(ctx, "configurationAssignment", &maintenance.ConfigurationAssignmentArgs{
    			ConfigurationAssignmentName: pulumi.String("workervmConfiguration"),
    			MaintenanceConfigurationId:  pulumi.String("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1"),
    			ProviderName:                pulumi.String("Microsoft.Compute"),
    			ResourceGroupName:           pulumi.String("examplerg"),
    			ResourceName:                pulumi.String("smdtest1"),
    			ResourceType:                pulumi.String("virtualMachineScaleSets"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.maintenance.ConfigurationAssignment;
    import com.pulumi.azurenative.maintenance.ConfigurationAssignmentArgs;
    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) {
            var configurationAssignment = new ConfigurationAssignment("configurationAssignment", ConfigurationAssignmentArgs.builder()        
                .configurationAssignmentName("workervmConfiguration")
                .maintenanceConfigurationId("/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1")
                .providerName("Microsoft.Compute")
                .resourceGroupName("examplerg")
                .resourceName("smdtest1")
                .resourceType("virtualMachineScaleSets")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    configuration_assignment = azure_native.maintenance.ConfigurationAssignment("configurationAssignment",
        configuration_assignment_name="workervmConfiguration",
        maintenance_configuration_id="/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
        provider_name="Microsoft.Compute",
        resource_group_name="examplerg",
        resource_name_="smdtest1",
        resource_type="virtualMachineScaleSets")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const configurationAssignment = new azure_native.maintenance.ConfigurationAssignment("configurationAssignment", {
        configurationAssignmentName: "workervmConfiguration",
        maintenanceConfigurationId: "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1",
        providerName: "Microsoft.Compute",
        resourceGroupName: "examplerg",
        resourceName: "smdtest1",
        resourceType: "virtualMachineScaleSets",
    });
    
    resources:
      configurationAssignment:
        type: azure-native:maintenance:ConfigurationAssignment
        properties:
          configurationAssignmentName: workervmConfiguration
          maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
          providerName: Microsoft.Compute
          resourceGroupName: examplerg
          resourceName: smdtest1
          resourceType: virtualMachineScaleSets
    

    Create ConfigurationAssignment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ConfigurationAssignment(name: string, args: ConfigurationAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def ConfigurationAssignment(resource_name: str,
                                args: ConfigurationAssignmentArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConfigurationAssignment(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                provider_name: Optional[str] = None,
                                resource_group_name: Optional[str] = None,
                                resource_name_: Optional[str] = None,
                                resource_type: Optional[str] = None,
                                configuration_assignment_name: Optional[str] = None,
                                location: Optional[str] = None,
                                maintenance_configuration_id: Optional[str] = None,
                                resource_id: Optional[str] = None)
    func NewConfigurationAssignment(ctx *Context, name string, args ConfigurationAssignmentArgs, opts ...ResourceOption) (*ConfigurationAssignment, error)
    public ConfigurationAssignment(string name, ConfigurationAssignmentArgs args, CustomResourceOptions? opts = null)
    public ConfigurationAssignment(String name, ConfigurationAssignmentArgs args)
    public ConfigurationAssignment(String name, ConfigurationAssignmentArgs args, CustomResourceOptions options)
    
    type: azure-native:maintenance:ConfigurationAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConfigurationAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConfigurationAssignmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConfigurationAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigurationAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigurationAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var configurationAssignmentResource = new AzureNative.Maintenance.ConfigurationAssignment("configurationAssignmentResource", new()
    {
        ProviderName = "string",
        ResourceGroupName = "string",
        ResourceName = "string",
        ResourceType = "string",
        ConfigurationAssignmentName = "string",
        Location = "string",
        MaintenanceConfigurationId = "string",
        ResourceId = "string",
    });
    
    example, err := maintenance.NewConfigurationAssignment(ctx, "configurationAssignmentResource", &maintenance.ConfigurationAssignmentArgs{
    ProviderName: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    ResourceName: pulumi.String("string"),
    ResourceType: pulumi.String("string"),
    ConfigurationAssignmentName: pulumi.String("string"),
    Location: pulumi.String("string"),
    MaintenanceConfigurationId: pulumi.String("string"),
    ResourceId: pulumi.String("string"),
    })
    
    var configurationAssignmentResource = new ConfigurationAssignment("configurationAssignmentResource", ConfigurationAssignmentArgs.builder()        
        .providerName("string")
        .resourceGroupName("string")
        .resourceName("string")
        .resourceType("string")
        .configurationAssignmentName("string")
        .location("string")
        .maintenanceConfigurationId("string")
        .resourceId("string")
        .build());
    
    configuration_assignment_resource = azure_native.maintenance.ConfigurationAssignment("configurationAssignmentResource",
        provider_name="string",
        resource_group_name="string",
        resource_name_="string",
        resource_type="string",
        configuration_assignment_name="string",
        location="string",
        maintenance_configuration_id="string",
        resource_id="string")
    
    const configurationAssignmentResource = new azure_native.maintenance.ConfigurationAssignment("configurationAssignmentResource", {
        providerName: "string",
        resourceGroupName: "string",
        resourceName: "string",
        resourceType: "string",
        configurationAssignmentName: "string",
        location: "string",
        maintenanceConfigurationId: "string",
        resourceId: "string",
    });
    
    type: azure-native:maintenance:ConfigurationAssignment
    properties:
        configurationAssignmentName: string
        location: string
        maintenanceConfigurationId: string
        providerName: string
        resourceGroupName: string
        resourceId: string
        resourceName: string
        resourceType: string
    

    ConfigurationAssignment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ConfigurationAssignment resource accepts the following input properties:

    ProviderName string
    Resource provider name
    ResourceGroupName string
    Resource group name
    ResourceName string
    Resource identifier
    ResourceType string
    Resource type
    ConfigurationAssignmentName string
    Configuration assignment name
    Location string
    Location of the resource
    MaintenanceConfigurationId string
    The maintenance configuration Id
    ResourceId string
    The unique resourceId
    ProviderName string
    Resource provider name
    ResourceGroupName string
    Resource group name
    ResourceName string
    Resource identifier
    ResourceType string
    Resource type
    ConfigurationAssignmentName string
    Configuration assignment name
    Location string
    Location of the resource
    MaintenanceConfigurationId string
    The maintenance configuration Id
    ResourceId string
    The unique resourceId
    providerName String
    Resource provider name
    resourceGroupName String
    Resource group name
    resourceName String
    Resource identifier
    resourceType String
    Resource type
    configurationAssignmentName String
    Configuration assignment name
    location String
    Location of the resource
    maintenanceConfigurationId String
    The maintenance configuration Id
    resourceId String
    The unique resourceId
    providerName string
    Resource provider name
    resourceGroupName string
    Resource group name
    resourceName string
    Resource identifier
    resourceType string
    Resource type
    configurationAssignmentName string
    Configuration assignment name
    location string
    Location of the resource
    maintenanceConfigurationId string
    The maintenance configuration Id
    resourceId string
    The unique resourceId
    provider_name str
    Resource provider name
    resource_group_name str
    Resource group name
    resource_name str
    Resource identifier
    resource_type str
    Resource type
    configuration_assignment_name str
    Configuration assignment name
    location str
    Location of the resource
    maintenance_configuration_id str
    The maintenance configuration Id
    resource_id str
    The unique resourceId
    providerName String
    Resource provider name
    resourceGroupName String
    Resource group name
    resourceName String
    Resource identifier
    resourceType String
    Resource type
    configurationAssignmentName String
    Configuration assignment name
    location String
    Location of the resource
    maintenanceConfigurationId String
    The maintenance configuration Id
    resourceId String
    The unique resourceId

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ConfigurationAssignment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the resource
    SystemData Pulumi.AzureNative.Maintenance.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    Type of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the resource
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    Type of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    Type of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the resource
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    Type of the resource
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the resource
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    Type of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the resource
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    Type of the resource

    Supporting Types

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    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 string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    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 string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    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 String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    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 string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    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 String
    The type of identity that last modified the resource.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:maintenance:ConfigurationAssignment workervmConfiguration /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi