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

com.pulumi.azure.desktopvirtualization.kotlin.WorkspaceArgs.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.WorkspaceArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Virtual Desktop Workspace.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "rg-example-virtualdesktop",
 *     location: "West Europe",
 * });
 * const workspace = new azure.desktopvirtualization.Workspace("workspace", {
 *     name: "workspace",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     friendlyName: "FriendlyName",
 *     description: "A description of my workspace",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="rg-example-virtualdesktop",
 *     location="West Europe")
 * workspace = azure.desktopvirtualization.Workspace("workspace",
 *     name="workspace",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     friendly_name="FriendlyName",
 *     description="A description of my workspace")
 * ```
 * ```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 = "rg-example-virtualdesktop",
 *         Location = "West Europe",
 *     });
 *     var workspace = new Azure.DesktopVirtualization.Workspace("workspace", new()
 *     {
 *         Name = "workspace",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         FriendlyName = "FriendlyName",
 *         Description = "A description of my workspace",
 *     });
 * });
 * ```
 * ```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("rg-example-virtualdesktop"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = desktopvirtualization.NewWorkspace(ctx, "workspace", &desktopvirtualization.WorkspaceArgs{
 * 			Name:              pulumi.String("workspace"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			FriendlyName:      pulumi.String("FriendlyName"),
 * 			Description:       pulumi.String("A description of my workspace"),
 * 		})
 * 		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.Workspace;
 * import com.pulumi.azure.desktopvirtualization.WorkspaceArgs;
 * 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("rg-example-virtualdesktop")
 *             .location("West Europe")
 *             .build());
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .name("workspace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .friendlyName("FriendlyName")
 *             .description("A description of my workspace")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: rg-example-virtualdesktop
 *       location: West Europe
 *   workspace:
 *     type: azure:desktopvirtualization:Workspace
 *     properties:
 *       name: workspace
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       friendlyName: FriendlyName
 *       description: A description of my workspace
 * ```
 * 
 * ## Import
 * Virtual Desktop Workspaces can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:desktopvirtualization/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/workspaces/myworkspace
 * ```
 * @property description A description for the Virtual Desktop Workspace.
 * @property friendlyName A friendly name for the Virtual Desktop Workspace.
 * @property location The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
 * @property name The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
 * @property publicNetworkAccessEnabled Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
 * @property resourceGroupName The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class WorkspaceArgs(
    public val description: Output? = null,
    public val friendlyName: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.desktopvirtualization.WorkspaceArgs =
        com.pulumi.azure.desktopvirtualization.WorkspaceArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .friendlyName(friendlyName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [WorkspaceArgs].
 */
@PulumiTagMarker
public class WorkspaceArgsBuilder internal constructor() {
    private var description: Output? = null

    private var friendlyName: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

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

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

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

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

    /**
     * @param value Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
     */
    @JvmName("biqkhwgyrvifnimd")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

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

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

    /**
     * @param value A description for the Virtual Desktop Workspace.
     */
    @JvmName("yanhjcycujcehcoc")
    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 Workspace.
     */
    @JvmName("rgkeyqprwxouhwha")
    public suspend fun friendlyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.friendlyName = mapped
    }

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

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

    /**
     * @param value Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
     */
    @JvmName("rvuiyokydastxoxw")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

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

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

    internal fun build(): WorkspaceArgs = WorkspaceArgs(
        description = description,
        friendlyName = friendlyName,
        location = location,
        name = name,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy