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

com.pulumi.azure.desktopvirtualization.kotlin.HostPoolArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.desktopvirtualization.kotlin

import com.pulumi.azure.desktopvirtualization.HostPoolArgs.builder
import com.pulumi.azure.desktopvirtualization.kotlin.inputs.HostPoolScheduledAgentUpdatesArgs
import com.pulumi.azure.desktopvirtualization.kotlin.inputs.HostPoolScheduledAgentUpdatesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Virtual Desktop Host Pool.
 * ## 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 exampleHostPool = new azure.desktopvirtualization.HostPool("example", {
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     name: "pooleddepthfirst",
 *     friendlyName: "pooleddepthfirst",
 *     validateEnvironment: true,
 *     startVmOnConnect: true,
 *     customRdpProperties: "audiocapturemode:i:1;audiomode:i:0;",
 *     description: "Acceptance Test: A pooled host pool - pooleddepthfirst",
 *     type: "Pooled",
 *     maximumSessionsAllowed: 50,
 *     loadBalancerType: "DepthFirst",
 *     scheduledAgentUpdates: {
 *         enabled: true,
 *         schedules: [{
 *             dayOfWeek: "Saturday",
 *             hourOfDay: 2,
 *         }],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_host_pool = azure.desktopvirtualization.HostPool("example",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     name="pooleddepthfirst",
 *     friendly_name="pooleddepthfirst",
 *     validate_environment=True,
 *     start_vm_on_connect=True,
 *     custom_rdp_properties="audiocapturemode:i:1;audiomode:i:0;",
 *     description="Acceptance Test: A pooled host pool - pooleddepthfirst",
 *     type="Pooled",
 *     maximum_sessions_allowed=50,
 *     load_balancer_type="DepthFirst",
 *     scheduled_agent_updates=azure.desktopvirtualization.HostPoolScheduledAgentUpdatesArgs(
 *         enabled=True,
 *         schedules=[azure.desktopvirtualization.HostPoolScheduledAgentUpdatesScheduleArgs(
 *             day_of_week="Saturday",
 *             hour_of_day=2,
 *         )],
 *     ))
 * ```
 * ```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 exampleHostPool = new Azure.DesktopVirtualization.HostPool("example", new()
 *     {
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Name = "pooleddepthfirst",
 *         FriendlyName = "pooleddepthfirst",
 *         ValidateEnvironment = true,
 *         StartVmOnConnect = true,
 *         CustomRdpProperties = "audiocapturemode:i:1;audiomode:i:0;",
 *         Description = "Acceptance Test: A pooled host pool - pooleddepthfirst",
 *         Type = "Pooled",
 *         MaximumSessionsAllowed = 50,
 *         LoadBalancerType = "DepthFirst",
 *         ScheduledAgentUpdates = new Azure.DesktopVirtualization.Inputs.HostPoolScheduledAgentUpdatesArgs
 *         {
 *             Enabled = true,
 *             Schedules = new[]
 *             {
 *                 new Azure.DesktopVirtualization.Inputs.HostPoolScheduledAgentUpdatesScheduleArgs
 *                 {
 *                     DayOfWeek = "Saturday",
 *                     HourOfDay = 2,
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/desktopvirtualization"
 * 	"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
 * 		}
 * 		_, err = desktopvirtualization.NewHostPool(ctx, "example", &desktopvirtualization.HostPoolArgs{
 * 			Location:               example.Location,
 * 			ResourceGroupName:      example.Name,
 * 			Name:                   pulumi.String("pooleddepthfirst"),
 * 			FriendlyName:           pulumi.String("pooleddepthfirst"),
 * 			ValidateEnvironment:    pulumi.Bool(true),
 * 			StartVmOnConnect:       pulumi.Bool(true),
 * 			CustomRdpProperties:    pulumi.String("audiocapturemode:i:1;audiomode:i:0;"),
 * 			Description:            pulumi.String("Acceptance Test: A pooled host pool - pooleddepthfirst"),
 * 			Type:                   pulumi.String("Pooled"),
 * 			MaximumSessionsAllowed: pulumi.Int(50),
 * 			LoadBalancerType:       pulumi.String("DepthFirst"),
 * 			ScheduledAgentUpdates: &desktopvirtualization.HostPoolScheduledAgentUpdatesArgs{
 * 				Enabled: pulumi.Bool(true),
 * 				Schedules: desktopvirtualization.HostPoolScheduledAgentUpdatesScheduleArray{
 * 					&desktopvirtualization.HostPoolScheduledAgentUpdatesScheduleArgs{
 * 						DayOfWeek: pulumi.String("Saturday"),
 * 						HourOfDay: pulumi.Int(2),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.desktopvirtualization.HostPool;
 * import com.pulumi.azure.desktopvirtualization.HostPoolArgs;
 * import com.pulumi.azure.desktopvirtualization.inputs.HostPoolScheduledAgentUpdatesArgs;
 * 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 exampleHostPool = new HostPool("exampleHostPool", HostPoolArgs.builder()
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .name("pooleddepthfirst")
 *             .friendlyName("pooleddepthfirst")
 *             .validateEnvironment(true)
 *             .startVmOnConnect(true)
 *             .customRdpProperties("audiocapturemode:i:1;audiomode:i:0;")
 *             .description("Acceptance Test: A pooled host pool - pooleddepthfirst")
 *             .type("Pooled")
 *             .maximumSessionsAllowed(50)
 *             .loadBalancerType("DepthFirst")
 *             .scheduledAgentUpdates(HostPoolScheduledAgentUpdatesArgs.builder()
 *                 .enabled(true)
 *                 .schedules(HostPoolScheduledAgentUpdatesScheduleArgs.builder()
 *                     .dayOfWeek("Saturday")
 *                     .hourOfDay(2)
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleHostPool:
 *     type: azure:desktopvirtualization:HostPool
 *     name: example
 *     properties:
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       name: pooleddepthfirst
 *       friendlyName: pooleddepthfirst
 *       validateEnvironment: true
 *       startVmOnConnect: true
 *       customRdpProperties: audiocapturemode:i:1;audiomode:i:0;
 *       description: 'Acceptance Test: A pooled host pool - pooleddepthfirst'
 *       type: Pooled
 *       maximumSessionsAllowed: 50
 *       loadBalancerType: DepthFirst
 *       scheduledAgentUpdates:
 *         enabled: true
 *         schedules:
 *           - dayOfWeek: Saturday
 *             hourOfDay: 2
 * ```
 * 
 * ## Import
 * Virtual Desktop Host Pools can be imported using the `resource id`, e.g.
 * text
 * ```sh
 * $ pulumi import azure:desktopvirtualization/hostPool:HostPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/hostPools/myhostpool
 * ```
 * @property customRdpProperties A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
 * @property description A description for the Virtual Desktop Host Pool.
 * @property friendlyName A friendly name for the Virtual Desktop Host Pool.
 * @property loadBalancerType `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
 * `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
 * `Persistent` should be used if the host pool type is `Personal`
 * @property location The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
 * @property maximumSessionsAllowed A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
 * Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
 * @property name The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
 * @property personalDesktopAssignmentType `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
 * > **NOTE:** `personal_desktop_assignment_type` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
 * @property preferredAppGroupType Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`. Changing this forces a new resource to be created.
 * @property publicNetworkAccess Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
 * @property resourceGroupName The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
 * @property scheduledAgentUpdates A `scheduled_agent_updates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
 * @property startVmOnConnect Enables or disables the Start VM on Connection Feature. Defaults to `false`.
 * @property tags A mapping of tags to assign to the resource.
 * @property type The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
 * @property validateEnvironment Allows you to test service changes before they are deployed to production. Defaults to `false`.
 * @property vmTemplate A VM template for session hosts configuration within hostpool. This is a JSON string.
 */
public data class HostPoolArgs(
    public val customRdpProperties: Output? = null,
    public val description: Output? = null,
    public val friendlyName: Output? = null,
    public val loadBalancerType: Output? = null,
    public val location: Output? = null,
    public val maximumSessionsAllowed: Output? = null,
    public val name: Output? = null,
    public val personalDesktopAssignmentType: Output? = null,
    public val preferredAppGroupType: Output? = null,
    public val publicNetworkAccess: Output? = null,
    public val resourceGroupName: Output? = null,
    public val scheduledAgentUpdates: Output? = null,
    public val startVmOnConnect: Output? = null,
    public val tags: Output>? = null,
    public val type: Output? = null,
    public val validateEnvironment: Output? = null,
    public val vmTemplate: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.desktopvirtualization.HostPoolArgs =
        com.pulumi.azure.desktopvirtualization.HostPoolArgs.builder()
            .customRdpProperties(customRdpProperties?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .friendlyName(friendlyName?.applyValue({ args0 -> args0 }))
            .loadBalancerType(loadBalancerType?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .maximumSessionsAllowed(maximumSessionsAllowed?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .personalDesktopAssignmentType(personalDesktopAssignmentType?.applyValue({ args0 -> args0 }))
            .preferredAppGroupType(preferredAppGroupType?.applyValue({ args0 -> args0 }))
            .publicNetworkAccess(publicNetworkAccess?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .scheduledAgentUpdates(
                scheduledAgentUpdates?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .startVmOnConnect(startVmOnConnect?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .type(type?.applyValue({ args0 -> args0 }))
            .validateEnvironment(validateEnvironment?.applyValue({ args0 -> args0 }))
            .vmTemplate(vmTemplate?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HostPoolArgs].
 */
@PulumiTagMarker
public class HostPoolArgsBuilder internal constructor() {
    private var customRdpProperties: Output? = null

    private var description: Output? = null

    private var friendlyName: Output? = null

    private var loadBalancerType: Output? = null

    private var location: Output? = null

    private var maximumSessionsAllowed: Output? = null

    private var name: Output? = null

    private var personalDesktopAssignmentType: Output? = null

    private var preferredAppGroupType: Output? = null

    private var publicNetworkAccess: Output? = null

    private var resourceGroupName: Output? = null

    private var scheduledAgentUpdates: Output? = null

    private var startVmOnConnect: Output? = null

    private var tags: Output>? = null

    private var type: Output? = null

    private var validateEnvironment: Output? = null

    private var vmTemplate: Output? = null

    /**
     * @param value A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
     */
    @JvmName("moubvocwonlkkoov")
    public suspend fun customRdpProperties(`value`: Output) {
        this.customRdpProperties = value
    }

    /**
     * @param value A description for the Virtual Desktop Host Pool.
     */
    @JvmName("xssptvrrglqrxxxn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A friendly name for the Virtual Desktop Host Pool.
     */
    @JvmName("kfemmpoealxhkryj")
    public suspend fun friendlyName(`value`: Output) {
        this.friendlyName = value
    }

    /**
     * @param value `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
     * `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
     * `Persistent` should be used if the host pool type is `Personal`
     */
    @JvmName("isfmxrjtmmwrejig")
    public suspend fun loadBalancerType(`value`: Output) {
        this.loadBalancerType = value
    }

    /**
     * @param value The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
     */
    @JvmName("skofjqxbiooefnbi")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
     * Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
     */
    @JvmName("edscednpsioctqwg")
    public suspend fun maximumSessionsAllowed(`value`: Output) {
        this.maximumSessionsAllowed = value
    }

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

    /**
     * @param value `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
     * > **NOTE:** `personal_desktop_assignment_type` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
     */
    @JvmName("kmfrppsbgrpidieb")
    public suspend fun personalDesktopAssignmentType(`value`: Output) {
        this.personalDesktopAssignmentType = value
    }

    /**
     * @param value Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`. Changing this forces a new resource to be created.
     */
    @JvmName("qktffvgfkndnbgcx")
    public suspend fun preferredAppGroupType(`value`: Output) {
        this.preferredAppGroupType = value
    }

    /**
     * @param value Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
     */
    @JvmName("hidfjkoowqjegsyd")
    public suspend fun publicNetworkAccess(`value`: Output) {
        this.publicNetworkAccess = value
    }

    /**
     * @param value The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
     */
    @JvmName("gjidfllqohcpysex")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `scheduled_agent_updates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
     */
    @JvmName("ndddavxeratehcxp")
    public suspend fun scheduledAgentUpdates(`value`: Output) {
        this.scheduledAgentUpdates = value
    }

    /**
     * @param value Enables or disables the Start VM on Connection Feature. Defaults to `false`.
     */
    @JvmName("nxibmmgwswvpxmlh")
    public suspend fun startVmOnConnect(`value`: Output) {
        this.startVmOnConnect = value
    }

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

    /**
     * @param value The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
     */
    @JvmName("suwrsxjecllmxlmm")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Allows you to test service changes before they are deployed to production. Defaults to `false`.
     */
    @JvmName("edsivfponjlucbqa")
    public suspend fun validateEnvironment(`value`: Output) {
        this.validateEnvironment = value
    }

    /**
     * @param value A VM template for session hosts configuration within hostpool. This is a JSON string.
     */
    @JvmName("swqigblwsxnetcvx")
    public suspend fun vmTemplate(`value`: Output) {
        this.vmTemplate = value
    }

    /**
     * @param value A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
     */
    @JvmName("pwbibbcgsxsoqrfa")
    public suspend fun customRdpProperties(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customRdpProperties = mapped
    }

    /**
     * @param value A description for the Virtual Desktop Host Pool.
     */
    @JvmName("jjhklioqqjccvwif")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A friendly name for the Virtual Desktop Host Pool.
     */
    @JvmName("dkeedamwoolyshfg")
    public suspend fun friendlyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.friendlyName = mapped
    }

    /**
     * @param value `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
     * `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
     * `Persistent` should be used if the host pool type is `Personal`
     */
    @JvmName("odcnkwogtscsfbra")
    public suspend fun loadBalancerType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadBalancerType = mapped
    }

    /**
     * @param value The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
     */
    @JvmName("rssxyyjsqbodbgmv")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
     * Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
     */
    @JvmName("jblwrdgqfnpklwoo")
    public suspend fun maximumSessionsAllowed(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumSessionsAllowed = mapped
    }

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

    /**
     * @param value `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
     * > **NOTE:** `personal_desktop_assignment_type` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
     */
    @JvmName("kyeolgfbyjnnlqww")
    public suspend fun personalDesktopAssignmentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.personalDesktopAssignmentType = mapped
    }

    /**
     * @param value Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`. Changing this forces a new resource to be created.
     */
    @JvmName("lqfqogpnaoeyqdyx")
    public suspend fun preferredAppGroupType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredAppGroupType = mapped
    }

    /**
     * @param value Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
     */
    @JvmName("fwllhfpuqbhxcoip")
    public suspend fun publicNetworkAccess(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccess = mapped
    }

    /**
     * @param value The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
     */
    @JvmName("ipvmboojevyqkqwt")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `scheduled_agent_updates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
     */
    @JvmName("lyqhixjktysimkca")
    public suspend fun scheduledAgentUpdates(`value`: HostPoolScheduledAgentUpdatesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduledAgentUpdates = mapped
    }

    /**
     * @param argument A `scheduled_agent_updates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
     */
    @JvmName("xjxftfgjsiyxpfly")
    public suspend
    fun scheduledAgentUpdates(argument: suspend HostPoolScheduledAgentUpdatesArgsBuilder.() -> Unit) {
        val toBeMapped = HostPoolScheduledAgentUpdatesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scheduledAgentUpdates = mapped
    }

    /**
     * @param value Enables or disables the Start VM on Connection Feature. Defaults to `false`.
     */
    @JvmName("htwyyspjkveixobj")
    public suspend fun startVmOnConnect(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startVmOnConnect = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("mfeiqaceildlwnhd")
    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("jkyovwqsvbbivltn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
     */
    @JvmName("wrxfhbjutdvsxado")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Allows you to test service changes before they are deployed to production. Defaults to `false`.
     */
    @JvmName("peictokrnsqqybxe")
    public suspend fun validateEnvironment(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validateEnvironment = mapped
    }

    /**
     * @param value A VM template for session hosts configuration within hostpool. This is a JSON string.
     */
    @JvmName("emommodbdiushdpq")
    public suspend fun vmTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmTemplate = mapped
    }

    internal fun build(): HostPoolArgs = HostPoolArgs(
        customRdpProperties = customRdpProperties,
        description = description,
        friendlyName = friendlyName,
        loadBalancerType = loadBalancerType,
        location = location,
        maximumSessionsAllowed = maximumSessionsAllowed,
        name = name,
        personalDesktopAssignmentType = personalDesktopAssignmentType,
        preferredAppGroupType = preferredAppGroupType,
        publicNetworkAccess = publicNetworkAccess,
        resourceGroupName = resourceGroupName,
        scheduledAgentUpdates = scheduledAgentUpdates,
        startVmOnConnect = startVmOnConnect,
        tags = tags,
        type = type,
        validateEnvironment = validateEnvironment,
        vmTemplate = vmTemplate,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy