1. Packages
  2. Azure Classic
  3. API Docs
  4. maintenance
  5. AssignmentDedicatedHost

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.maintenance.AssignmentDedicatedHost

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages a maintenance assignment to Dedicated Host.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleDedicatedHostGroup = new Azure.Compute.DedicatedHostGroup("exampleDedicatedHostGroup", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            PlatformFaultDomainCount = 2,
        });
    
        var exampleDedicatedHost = new Azure.Compute.DedicatedHost("exampleDedicatedHost", new()
        {
            Location = exampleResourceGroup.Location,
            DedicatedHostGroupId = exampleDedicatedHostGroup.Id,
            SkuName = "DSv3-Type1",
            PlatformFaultDomain = 1,
        });
    
        var exampleConfiguration = new Azure.Maintenance.Configuration("exampleConfiguration", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            Scope = "Host",
        });
    
        var exampleAssignmentDedicatedHost = new Azure.Maintenance.AssignmentDedicatedHost("exampleAssignmentDedicatedHost", new()
        {
            Location = exampleResourceGroup.Location,
            MaintenanceConfigurationId = exampleConfiguration.Id,
            DedicatedHostId = exampleDedicatedHost.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/maintenance"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDedicatedHostGroup, err := compute.NewDedicatedHostGroup(ctx, "exampleDedicatedHostGroup", &compute.DedicatedHostGroupArgs{
    			ResourceGroupName:        exampleResourceGroup.Name,
    			Location:                 exampleResourceGroup.Location,
    			PlatformFaultDomainCount: pulumi.Int(2),
    		})
    		if err != nil {
    			return err
    		}
    		exampleDedicatedHost, err := compute.NewDedicatedHost(ctx, "exampleDedicatedHost", &compute.DedicatedHostArgs{
    			Location:             exampleResourceGroup.Location,
    			DedicatedHostGroupId: exampleDedicatedHostGroup.ID(),
    			SkuName:              pulumi.String("DSv3-Type1"),
    			PlatformFaultDomain:  pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		exampleConfiguration, err := maintenance.NewConfiguration(ctx, "exampleConfiguration", &maintenance.ConfigurationArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			Scope:             pulumi.String("Host"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = maintenance.NewAssignmentDedicatedHost(ctx, "exampleAssignmentDedicatedHost", &maintenance.AssignmentDedicatedHostArgs{
    			Location:                   exampleResourceGroup.Location,
    			MaintenanceConfigurationId: exampleConfiguration.ID(),
    			DedicatedHostId:            exampleDedicatedHost.ID(),
    		})
    		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.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.compute.DedicatedHostGroup;
    import com.pulumi.azure.compute.DedicatedHostGroupArgs;
    import com.pulumi.azure.compute.DedicatedHost;
    import com.pulumi.azure.compute.DedicatedHostArgs;
    import com.pulumi.azure.maintenance.Configuration;
    import com.pulumi.azure.maintenance.ConfigurationArgs;
    import com.pulumi.azure.maintenance.AssignmentDedicatedHost;
    import com.pulumi.azure.maintenance.AssignmentDedicatedHostArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleDedicatedHostGroup = new DedicatedHostGroup("exampleDedicatedHostGroup", DedicatedHostGroupArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .platformFaultDomainCount(2)
                .build());
    
            var exampleDedicatedHost = new DedicatedHost("exampleDedicatedHost", DedicatedHostArgs.builder()        
                .location(exampleResourceGroup.location())
                .dedicatedHostGroupId(exampleDedicatedHostGroup.id())
                .skuName("DSv3-Type1")
                .platformFaultDomain(1)
                .build());
    
            var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .scope("Host")
                .build());
    
            var exampleAssignmentDedicatedHost = new AssignmentDedicatedHost("exampleAssignmentDedicatedHost", AssignmentDedicatedHostArgs.builder()        
                .location(exampleResourceGroup.location())
                .maintenanceConfigurationId(exampleConfiguration.id())
                .dedicatedHostId(exampleDedicatedHost.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_dedicated_host_group = azure.compute.DedicatedHostGroup("exampleDedicatedHostGroup",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        platform_fault_domain_count=2)
    example_dedicated_host = azure.compute.DedicatedHost("exampleDedicatedHost",
        location=example_resource_group.location,
        dedicated_host_group_id=example_dedicated_host_group.id,
        sku_name="DSv3-Type1",
        platform_fault_domain=1)
    example_configuration = azure.maintenance.Configuration("exampleConfiguration",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        scope="Host")
    example_assignment_dedicated_host = azure.maintenance.AssignmentDedicatedHost("exampleAssignmentDedicatedHost",
        location=example_resource_group.location,
        maintenance_configuration_id=example_configuration.id,
        dedicated_host_id=example_dedicated_host.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleDedicatedHostGroup = new azure.compute.DedicatedHostGroup("exampleDedicatedHostGroup", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        platformFaultDomainCount: 2,
    });
    const exampleDedicatedHost = new azure.compute.DedicatedHost("exampleDedicatedHost", {
        location: exampleResourceGroup.location,
        dedicatedHostGroupId: exampleDedicatedHostGroup.id,
        skuName: "DSv3-Type1",
        platformFaultDomain: 1,
    });
    const exampleConfiguration = new azure.maintenance.Configuration("exampleConfiguration", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        scope: "Host",
    });
    const exampleAssignmentDedicatedHost = new azure.maintenance.AssignmentDedicatedHost("exampleAssignmentDedicatedHost", {
        location: exampleResourceGroup.location,
        maintenanceConfigurationId: exampleConfiguration.id,
        dedicatedHostId: exampleDedicatedHost.id,
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleDedicatedHostGroup:
        type: azure:compute:DedicatedHostGroup
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          platformFaultDomainCount: 2
      exampleDedicatedHost:
        type: azure:compute:DedicatedHost
        properties:
          location: ${exampleResourceGroup.location}
          dedicatedHostGroupId: ${exampleDedicatedHostGroup.id}
          skuName: DSv3-Type1
          platformFaultDomain: 1
      exampleConfiguration:
        type: azure:maintenance:Configuration
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          scope: Host
      exampleAssignmentDedicatedHost:
        type: azure:maintenance:AssignmentDedicatedHost
        properties:
          location: ${exampleResourceGroup.location}
          maintenanceConfigurationId: ${exampleConfiguration.id}
          dedicatedHostId: ${exampleDedicatedHost.id}
    

    Create AssignmentDedicatedHost Resource

    new AssignmentDedicatedHost(name: string, args: AssignmentDedicatedHostArgs, opts?: CustomResourceOptions);
    @overload
    def AssignmentDedicatedHost(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                dedicated_host_id: Optional[str] = None,
                                location: Optional[str] = None,
                                maintenance_configuration_id: Optional[str] = None)
    @overload
    def AssignmentDedicatedHost(resource_name: str,
                                args: AssignmentDedicatedHostArgs,
                                opts: Optional[ResourceOptions] = None)
    func NewAssignmentDedicatedHost(ctx *Context, name string, args AssignmentDedicatedHostArgs, opts ...ResourceOption) (*AssignmentDedicatedHost, error)
    public AssignmentDedicatedHost(string name, AssignmentDedicatedHostArgs args, CustomResourceOptions? opts = null)
    public AssignmentDedicatedHost(String name, AssignmentDedicatedHostArgs args)
    public AssignmentDedicatedHost(String name, AssignmentDedicatedHostArgs args, CustomResourceOptions options)
    
    type: azure:maintenance:AssignmentDedicatedHost
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AssignmentDedicatedHostArgs
    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 AssignmentDedicatedHostArgs
    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 AssignmentDedicatedHostArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AssignmentDedicatedHostArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AssignmentDedicatedHostArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    AssignmentDedicatedHost 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 AssignmentDedicatedHost resource accepts the following input properties:

    DedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    MaintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    DedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    MaintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    dedicatedHostId String

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    maintenanceConfigurationId String

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    dedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    maintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    dedicated_host_id str

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    maintenance_configuration_id str

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    location str

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    dedicatedHostId String

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    maintenanceConfigurationId String

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing AssignmentDedicatedHost Resource

    Get an existing AssignmentDedicatedHost resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AssignmentDedicatedHostState, opts?: CustomResourceOptions): AssignmentDedicatedHost
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dedicated_host_id: Optional[str] = None,
            location: Optional[str] = None,
            maintenance_configuration_id: Optional[str] = None) -> AssignmentDedicatedHost
    func GetAssignmentDedicatedHost(ctx *Context, name string, id IDInput, state *AssignmentDedicatedHostState, opts ...ResourceOption) (*AssignmentDedicatedHost, error)
    public static AssignmentDedicatedHost Get(string name, Input<string> id, AssignmentDedicatedHostState? state, CustomResourceOptions? opts = null)
    public static AssignmentDedicatedHost get(String name, Output<String> id, AssignmentDedicatedHostState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    DedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    Location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    MaintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    dedicatedHostId String

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationId String

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    dedicatedHostId string

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    location string

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationId string

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    dedicated_host_id str

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    location str

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenance_configuration_id str

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    dedicatedHostId String

    Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.

    location String

    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

    maintenanceConfigurationId String

    Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.

    Import

    Maintenance Assignment can be imported using the resource id, e.g.

     $ pulumi import azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/group1/hosts/host1/providers/Microsoft.Maintenance/configurationAssignments/assign1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi