// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.maintenance;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.maintenance.AssignmentDedicatedHostArgs;
import com.pulumi.azure.maintenance.inputs.AssignmentDedicatedHostState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * Manages a maintenance assignment to Dedicated Host.
 * 
 * ## Example Usage
 * ```java
 * 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(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleDedicatedHostGroup = new DedicatedHostGroup(&#34;exampleDedicatedHostGroup&#34;, DedicatedHostGroupArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .platformFaultDomainCount(2)
 *             .build());
 * 
 *         var exampleDedicatedHost = new DedicatedHost(&#34;exampleDedicatedHost&#34;, DedicatedHostArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .dedicatedHostGroupId(exampleDedicatedHostGroup.id())
 *             .skuName(&#34;DSv3-Type1&#34;)
 *             .platformFaultDomain(1)
 *             .build());
 * 
 *         var exampleConfiguration = new Configuration(&#34;exampleConfiguration&#34;, ConfigurationArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .scope(&#34;Host&#34;)
 *             .build());
 * 
 *         var exampleAssignmentDedicatedHost = new AssignmentDedicatedHost(&#34;exampleAssignmentDedicatedHost&#34;, AssignmentDedicatedHostArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .maintenanceConfigurationId(exampleConfiguration.id())
 *             .dedicatedHostId(exampleDedicatedHost.id())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Maintenance Assignment can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ 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
 * ```
 * 
 */
@ResourceType(type="azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost")
public class AssignmentDedicatedHost extends com.pulumi.resources.CustomResource {
    /**
     * Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="dedicatedHostId", refs={String.class}, tree="[0]")
    private Output<String> dedicatedHostId;

    /**
     * @return Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> dedicatedHostId() {
        return this.dedicatedHostId;
    }
    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="maintenanceConfigurationId", refs={String.class}, tree="[0]")
    private Output<String> maintenanceConfigurationId;

    /**
     * @return Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> maintenanceConfigurationId() {
        return this.maintenanceConfigurationId;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public AssignmentDedicatedHost(String name) {
        this(name, AssignmentDedicatedHostArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public AssignmentDedicatedHost(String name, AssignmentDedicatedHostArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public AssignmentDedicatedHost(String name, AssignmentDedicatedHostArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost", name, args == null ? AssignmentDedicatedHostArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private AssignmentDedicatedHost(String name, Output<String> id, @Nullable AssignmentDedicatedHostState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static AssignmentDedicatedHost get(String name, Output<String> id, @Nullable AssignmentDedicatedHostState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new AssignmentDedicatedHost(name, id, state, options);
    }
}
