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

com.pulumi.azure.lab.kotlin.UserArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.lab.kotlin

import com.pulumi.azure.lab.UserArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages a Lab Service User.
 * !> **Note:** This resource is being [deprecated by Azure](https://learn.microsoft.com/en-us/azure/lab-services/retirement-guide). This resource will be removed in version 4.0 of the provider.
 * ## 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 exampleLab = new azure.lab.Lab("example", {
 *     name: "example-lab",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     title: "Test Title",
 *     security: {
 *         openAccessEnabled: false,
 *     },
 *     virtualMachine: {
 *         adminUser: {
 *             username: "testadmin",
 *             password: "Password1234!",
 *         },
 *         imageReference: {
 *             publisher: "Canonical",
 *             offer: "0001-com-ubuntu-server-jammy",
 *             sku: "22_04-lts",
 *             version: "latest",
 *         },
 *         sku: {
 *             name: "Classic_Fsv2_2_4GB_128_S_SSD",
 *             capacity: 1,
 *         },
 *     },
 * });
 * const exampleUser = new azure.lab.User("example", {
 *     name: "example-labuser",
 *     labId: exampleLab.id,
 *     email: "[email protected]",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_lab = azure.lab.Lab("example",
 *     name="example-lab",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     title="Test Title",
 *     security={
 *         "open_access_enabled": False,
 *     },
 *     virtual_machine={
 *         "admin_user": {
 *             "username": "testadmin",
 *             "password": "Password1234!",
 *         },
 *         "image_reference": {
 *             "publisher": "Canonical",
 *             "offer": "0001-com-ubuntu-server-jammy",
 *             "sku": "22_04-lts",
 *             "version": "latest",
 *         },
 *         "sku": {
 *             "name": "Classic_Fsv2_2_4GB_128_S_SSD",
 *             "capacity": 1,
 *         },
 *     })
 * example_user = azure.lab.User("example",
 *     name="example-labuser",
 *     lab_id=example_lab.id,
 *     email="[email protected]")
 * ```
 * ```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 exampleLab = new Azure.Lab.Lab("example", new()
 *     {
 *         Name = "example-lab",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Title = "Test Title",
 *         Security = new Azure.Lab.Inputs.LabSecurityArgs
 *         {
 *             OpenAccessEnabled = false,
 *         },
 *         VirtualMachine = new Azure.Lab.Inputs.LabVirtualMachineArgs
 *         {
 *             AdminUser = new Azure.Lab.Inputs.LabVirtualMachineAdminUserArgs
 *             {
 *                 Username = "testadmin",
 *                 Password = "Password1234!",
 *             },
 *             ImageReference = new Azure.Lab.Inputs.LabVirtualMachineImageReferenceArgs
 *             {
 *                 Publisher = "Canonical",
 *                 Offer = "0001-com-ubuntu-server-jammy",
 *                 Sku = "22_04-lts",
 *                 Version = "latest",
 *             },
 *             Sku = new Azure.Lab.Inputs.LabVirtualMachineSkuArgs
 *             {
 *                 Name = "Classic_Fsv2_2_4GB_128_S_SSD",
 *                 Capacity = 1,
 *             },
 *         },
 *     });
 *     var exampleUser = new Azure.Lab.User("example", new()
 *     {
 *         Name = "example-labuser",
 *         LabId = exampleLab.Id,
 *         Email = "[email protected]",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lab"
 * 	"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
 * 		}
 * 		exampleLab, err := lab.NewLab(ctx, "example", &lab.LabArgs{
 * 			Name:              pulumi.String("example-lab"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			Title:             pulumi.String("Test Title"),
 * 			Security: &lab.LabSecurityArgs{
 * 				OpenAccessEnabled: pulumi.Bool(false),
 * 			},
 * 			VirtualMachine: &lab.LabVirtualMachineArgs{
 * 				AdminUser: &lab.LabVirtualMachineAdminUserArgs{
 * 					Username: pulumi.String("testadmin"),
 * 					Password: pulumi.String("Password1234!"),
 * 				},
 * 				ImageReference: &lab.LabVirtualMachineImageReferenceArgs{
 * 					Publisher: pulumi.String("Canonical"),
 * 					Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
 * 					Sku:       pulumi.String("22_04-lts"),
 * 					Version:   pulumi.String("latest"),
 * 				},
 * 				Sku: &lab.LabVirtualMachineSkuArgs{
 * 					Name:     pulumi.String("Classic_Fsv2_2_4GB_128_S_SSD"),
 * 					Capacity: pulumi.Int(1),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = lab.NewUser(ctx, "example", &lab.UserArgs{
 * 			Name:  pulumi.String("example-labuser"),
 * 			LabId: exampleLab.ID(),
 * 			Email: pulumi.String("[email protected]"),
 * 		})
 * 		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.lab.Lab;
 * import com.pulumi.azure.lab.LabArgs;
 * import com.pulumi.azure.lab.inputs.LabSecurityArgs;
 * import com.pulumi.azure.lab.inputs.LabVirtualMachineArgs;
 * import com.pulumi.azure.lab.inputs.LabVirtualMachineAdminUserArgs;
 * import com.pulumi.azure.lab.inputs.LabVirtualMachineImageReferenceArgs;
 * import com.pulumi.azure.lab.inputs.LabVirtualMachineSkuArgs;
 * import com.pulumi.azure.lab.User;
 * import com.pulumi.azure.lab.UserArgs;
 * 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 exampleLab = new Lab("exampleLab", LabArgs.builder()
 *             .name("example-lab")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .title("Test Title")
 *             .security(LabSecurityArgs.builder()
 *                 .openAccessEnabled(false)
 *                 .build())
 *             .virtualMachine(LabVirtualMachineArgs.builder()
 *                 .adminUser(LabVirtualMachineAdminUserArgs.builder()
 *                     .username("testadmin")
 *                     .password("Password1234!")
 *                     .build())
 *                 .imageReference(LabVirtualMachineImageReferenceArgs.builder()
 *                     .publisher("Canonical")
 *                     .offer("0001-com-ubuntu-server-jammy")
 *                     .sku("22_04-lts")
 *                     .version("latest")
 *                     .build())
 *                 .sku(LabVirtualMachineSkuArgs.builder()
 *                     .name("Classic_Fsv2_2_4GB_128_S_SSD")
 *                     .capacity(1)
 *                     .build())
 *                 .build())
 *             .build());
 *         var exampleUser = new User("exampleUser", UserArgs.builder()
 *             .name("example-labuser")
 *             .labId(exampleLab.id())
 *             .email("[email protected]")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleLab:
 *     type: azure:lab:Lab
 *     name: example
 *     properties:
 *       name: example-lab
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       title: Test Title
 *       security:
 *         openAccessEnabled: false
 *       virtualMachine:
 *         adminUser:
 *           username: testadmin
 *           password: Password1234!
 *         imageReference:
 *           publisher: Canonical
 *           offer: 0001-com-ubuntu-server-jammy
 *           sku: 22_04-lts
 *           version: latest
 *         sku:
 *           name: Classic_Fsv2_2_4GB_128_S_SSD
 *           capacity: 1
 *   exampleUser:
 *     type: azure:lab:User
 *     name: example
 *     properties:
 *       name: example-labuser
 *       labId: ${exampleLab.id}
 *       email: [email protected]
 * ```
 * 
 * ## Import
 * Lab Service Users can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:lab/user:User example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.LabServices/labs/lab1/users/user1
 * ```
 * @property additionalUsageQuota The amount of usage quota time the Lab Service User gets in addition to the lab usage quota. Defaults to `PT0S`.
 * @property email The email address of the Lab Service User. Changing this forces a new resource to be created.
 * @property labId The resource ID of the Lab Service Lab. Changing this forces a new resource to be created.
 * @property name The name which should be used for this Lab Service User. Changing this forces a new resource to be created.
 */
public data class UserArgs(
    public val additionalUsageQuota: Output? = null,
    public val email: Output? = null,
    public val labId: Output? = null,
    public val name: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.lab.UserArgs = com.pulumi.azure.lab.UserArgs.builder()
        .additionalUsageQuota(additionalUsageQuota?.applyValue({ args0 -> args0 }))
        .email(email?.applyValue({ args0 -> args0 }))
        .labId(labId?.applyValue({ args0 -> args0 }))
        .name(name?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [UserArgs].
 */
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
    private var additionalUsageQuota: Output? = null

    private var email: Output? = null

    private var labId: Output? = null

    private var name: Output? = null

    /**
     * @param value The amount of usage quota time the Lab Service User gets in addition to the lab usage quota. Defaults to `PT0S`.
     */
    @JvmName("lncfichbwercrfkp")
    public suspend fun additionalUsageQuota(`value`: Output) {
        this.additionalUsageQuota = value
    }

    /**
     * @param value The email address of the Lab Service User. Changing this forces a new resource to be created.
     */
    @JvmName("guiintijrbwqvxpo")
    public suspend fun email(`value`: Output) {
        this.email = value
    }

    /**
     * @param value The resource ID of the Lab Service Lab. Changing this forces a new resource to be created.
     */
    @JvmName("vnkgfurkkxqlkfjk")
    public suspend fun labId(`value`: Output) {
        this.labId = value
    }

    /**
     * @param value The name which should be used for this Lab Service User. Changing this forces a new resource to be created.
     */
    @JvmName("ovnelmqfbvssujcg")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The amount of usage quota time the Lab Service User gets in addition to the lab usage quota. Defaults to `PT0S`.
     */
    @JvmName("swssguddgseqxmgl")
    public suspend fun additionalUsageQuota(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalUsageQuota = mapped
    }

    /**
     * @param value The email address of the Lab Service User. Changing this forces a new resource to be created.
     */
    @JvmName("lpnpwppviojpmvvx")
    public suspend fun email(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.email = mapped
    }

    /**
     * @param value The resource ID of the Lab Service Lab. Changing this forces a new resource to be created.
     */
    @JvmName("dvwwogphghqienqd")
    public suspend fun labId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labId = mapped
    }

    /**
     * @param value The name which should be used for this Lab Service User. Changing this forces a new resource to be created.
     */
    @JvmName("vjfcxfykencgopox")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): UserArgs = UserArgs(
        additionalUsageQuota = additionalUsageQuota,
        email = email,
        labId = labId,
        name = name,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy