All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.compute.kotlin.DedicatedHostArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin

import com.pulumi.azure.compute.DedicatedHostArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manage a Dedicated Host within a Dedicated Host Group.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleDedicatedHostGroup = new azure.compute.DedicatedHostGroup("example", {
 *     name: "example-host-group",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     platformFaultDomainCount: 2,
 * });
 * const exampleDedicatedHost = new azure.compute.DedicatedHost("example", {
 *     name: "example-host",
 *     location: example.location,
 *     dedicatedHostGroupId: exampleDedicatedHostGroup.id,
 *     skuName: "DSv3-Type3",
 *     platformFaultDomain: 1,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_dedicated_host_group = azure.compute.DedicatedHostGroup("example",
 *     name="example-host-group",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     platform_fault_domain_count=2)
 * example_dedicated_host = azure.compute.DedicatedHost("example",
 *     name="example-host",
 *     location=example.location,
 *     dedicated_host_group_id=example_dedicated_host_group.id,
 *     sku_name="DSv3-Type3",
 *     platform_fault_domain=1)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleDedicatedHostGroup = new Azure.Compute.DedicatedHostGroup("example", new()
 *     {
 *         Name = "example-host-group",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         PlatformFaultDomainCount = 2,
 *     });
 *     var exampleDedicatedHost = new Azure.Compute.DedicatedHost("example", new()
 *     {
 *         Name = "example-host",
 *         Location = example.Location,
 *         DedicatedHostGroupId = exampleDedicatedHostGroup.Id,
 *         SkuName = "DSv3-Type3",
 *         PlatformFaultDomain = 1,
 *     });
 * });
 * ```
 * ```go
 * 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/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleDedicatedHostGroup, err := compute.NewDedicatedHostGroup(ctx, "example", &compute.DedicatedHostGroupArgs{
 * 			Name:                     pulumi.String("example-host-group"),
 * 			ResourceGroupName:        example.Name,
 * 			Location:                 example.Location,
 * 			PlatformFaultDomainCount: pulumi.Int(2),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewDedicatedHost(ctx, "example", &compute.DedicatedHostArgs{
 * 			Name:                 pulumi.String("example-host"),
 * 			Location:             example.Location,
 * 			DedicatedHostGroupId: exampleDedicatedHostGroup.ID(),
 * 			SkuName:              pulumi.String("DSv3-Type3"),
 * 			PlatformFaultDomain:  pulumi.Int(1),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```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 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleDedicatedHostGroup = new DedicatedHostGroup("exampleDedicatedHostGroup", DedicatedHostGroupArgs.builder()
 *             .name("example-host-group")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .platformFaultDomainCount(2)
 *             .build());
 *         var exampleDedicatedHost = new DedicatedHost("exampleDedicatedHost", DedicatedHostArgs.builder()
 *             .name("example-host")
 *             .location(example.location())
 *             .dedicatedHostGroupId(exampleDedicatedHostGroup.id())
 *             .skuName("DSv3-Type3")
 *             .platformFaultDomain(1)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleDedicatedHostGroup:
 *     type: azure:compute:DedicatedHostGroup
 *     name: example
 *     properties:
 *       name: example-host-group
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       platformFaultDomainCount: 2
 *   exampleDedicatedHost:
 *     type: azure:compute:DedicatedHost
 *     name: example
 *     properties:
 *       name: example-host
 *       location: ${example.location}
 *       dedicatedHostGroupId: ${exampleDedicatedHostGroup.id}
 *       skuName: DSv3-Type3
 *       platformFaultDomain: 1
 * ```
 * 
 * ## Import
 * Dedicated Hosts can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:compute/dedicatedHost:DedicatedHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/hostGroups/group1/hosts/host1
 * ```
 * @property autoReplaceOnFailure Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`.
 * @property dedicatedHostGroupId Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created.
 * @property licenseType Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`.
 * @property location Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of this Dedicated Host. Changing this forces a new resource to be created.
 * @property platformFaultDomain Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created.
 * @property skuName Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class DedicatedHostArgs(
    public val autoReplaceOnFailure: Output? = null,
    public val dedicatedHostGroupId: Output? = null,
    public val licenseType: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val platformFaultDomain: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.DedicatedHostArgs =
        com.pulumi.azure.compute.DedicatedHostArgs.builder()
            .autoReplaceOnFailure(autoReplaceOnFailure?.applyValue({ args0 -> args0 }))
            .dedicatedHostGroupId(dedicatedHostGroupId?.applyValue({ args0 -> args0 }))
            .licenseType(licenseType?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .platformFaultDomain(platformFaultDomain?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [DedicatedHostArgs].
 */
@PulumiTagMarker
public class DedicatedHostArgsBuilder internal constructor() {
    private var autoReplaceOnFailure: Output? = null

    private var dedicatedHostGroupId: Output? = null

    private var licenseType: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var platformFaultDomain: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`.
     */
    @JvmName("sdndkvmbmwslkxpt")
    public suspend fun autoReplaceOnFailure(`value`: Output) {
        this.autoReplaceOnFailure = value
    }

    /**
     * @param value Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created.
     */
    @JvmName("inwuifafvrqhgvgv")
    public suspend fun dedicatedHostGroupId(`value`: Output) {
        this.dedicatedHostGroupId = value
    }

    /**
     * @param value Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`.
     */
    @JvmName("aavpwjukymmbusae")
    public suspend fun licenseType(`value`: Output) {
        this.licenseType = value
    }

    /**
     * @param value Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("fjuheesuncmfxtra")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of this Dedicated Host. Changing this forces a new resource to be created.
     */
    @JvmName("exbjbkfvqnqahnrl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created.
     */
    @JvmName("juxixiaqlcajrhwx")
    public suspend fun platformFaultDomain(`value`: Output) {
        this.platformFaultDomain = value
    }

    /**
     * @param value Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created.
     */
    @JvmName("gwtnajfbbglfjxnq")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("olwemlnaxkaupjvy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`.
     */
    @JvmName("okqfdmaqqkgefsdm")
    public suspend fun autoReplaceOnFailure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoReplaceOnFailure = mapped
    }

    /**
     * @param value Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created.
     */
    @JvmName("xcppcsjwdvqaflwp")
    public suspend fun dedicatedHostGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dedicatedHostGroupId = mapped
    }

    /**
     * @param value Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`.
     */
    @JvmName("fcqtggwqxiqmfvim")
    public suspend fun licenseType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseType = mapped
    }

    /**
     * @param value Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("wdqucltixthfqdbu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of this Dedicated Host. Changing this forces a new resource to be created.
     */
    @JvmName("icyxbickieeucrlv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created.
     */
    @JvmName("tjdkdvmopgbumrpv")
    public suspend fun platformFaultDomain(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.platformFaultDomain = mapped
    }

    /**
     * @param value Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created.
     */
    @JvmName("salqcjxspmqthmdn")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("gkuundhrguhfucxn")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("msjxcxdloptxanmi")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DedicatedHostArgs = DedicatedHostArgs(
        autoReplaceOnFailure = autoReplaceOnFailure,
        dedicatedHostGroupId = dedicatedHostGroupId,
        licenseType = licenseType,
        location = location,
        name = name,
        platformFaultDomain = platformFaultDomain,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy