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

com.pulumi.azure.devtest.kotlin.LinuxVirtualMachineArgs.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.devtest.kotlin

import com.pulumi.azure.devtest.LinuxVirtualMachineArgs.builder
import com.pulumi.azure.devtest.kotlin.inputs.LinuxVirtualMachineGalleryImageReferenceArgs
import com.pulumi.azure.devtest.kotlin.inputs.LinuxVirtualMachineGalleryImageReferenceArgsBuilder
import com.pulumi.azure.devtest.kotlin.inputs.LinuxVirtualMachineInboundNatRuleArgs
import com.pulumi.azure.devtest.kotlin.inputs.LinuxVirtualMachineInboundNatRuleArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Linux Virtual Machine within a Dev Test Lab.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as std from "@pulumi/std";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleLab = new azure.devtest.Lab("example", {
 *     name: "example-devtestlab",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     tags: {
 *         Sydney: "Australia",
 *     },
 * });
 * const exampleVirtualNetwork = new azure.devtest.VirtualNetwork("example", {
 *     name: "example-network",
 *     labName: exampleLab.name,
 *     resourceGroupName: example.name,
 *     subnet: {
 *         usePublicIpAddress: "Allow",
 *         useInVirtualMachineCreation: "Allow",
 *     },
 * });
 * const exampleLinuxVirtualMachine = new azure.devtest.LinuxVirtualMachine("example", {
 *     name: "example-vm03",
 *     labName: exampleLab.name,
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     size: "Standard_DS2",
 *     username: "exampleuser99",
 *     sshKey: std.file({
 *         input: "~/.ssh/id_rsa.pub",
 *     }).then(invoke => invoke.result),
 *     labVirtualNetworkId: exampleVirtualNetwork.id,
 *     labSubnetName: exampleVirtualNetwork.subnet.apply(subnet => subnet.name),
 *     storageType: "Premium",
 *     notes: "Some notes about this Virtual Machine.",
 *     galleryImageReference: {
 *         publisher: "Canonical",
 *         offer: "0001-com-ubuntu-server-jammy",
 *         sku: "22_04-lts",
 *         version: "latest",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumi_std as std
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_lab = azure.devtest.Lab("example",
 *     name="example-devtestlab",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     tags={
 *         "Sydney": "Australia",
 *     })
 * example_virtual_network = azure.devtest.VirtualNetwork("example",
 *     name="example-network",
 *     lab_name=example_lab.name,
 *     resource_group_name=example.name,
 *     subnet=azure.devtest.VirtualNetworkSubnetArgs(
 *         use_public_ip_address="Allow",
 *         use_in_virtual_machine_creation="Allow",
 *     ))
 * example_linux_virtual_machine = azure.devtest.LinuxVirtualMachine("example",
 *     name="example-vm03",
 *     lab_name=example_lab.name,
 *     resource_group_name=example.name,
 *     location=example.location,
 *     size="Standard_DS2",
 *     username="exampleuser99",
 *     ssh_key=std.file(input="~/.ssh/id_rsa.pub").result,
 *     lab_virtual_network_id=example_virtual_network.id,
 *     lab_subnet_name=example_virtual_network.subnet.name,
 *     storage_type="Premium",
 *     notes="Some notes about this Virtual Machine.",
 *     gallery_image_reference=azure.devtest.LinuxVirtualMachineGalleryImageReferenceArgs(
 *         publisher="Canonical",
 *         offer="0001-com-ubuntu-server-jammy",
 *         sku="22_04-lts",
 *         version="latest",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleLab = new Azure.DevTest.Lab("example", new()
 *     {
 *         Name = "example-devtestlab",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Tags =
 *         {
 *             { "Sydney", "Australia" },
 *         },
 *     });
 *     var exampleVirtualNetwork = new Azure.DevTest.VirtualNetwork("example", new()
 *     {
 *         Name = "example-network",
 *         LabName = exampleLab.Name,
 *         ResourceGroupName = example.Name,
 *         Subnet = new Azure.DevTest.Inputs.VirtualNetworkSubnetArgs
 *         {
 *             UsePublicIpAddress = "Allow",
 *             UseInVirtualMachineCreation = "Allow",
 *         },
 *     });
 *     var exampleLinuxVirtualMachine = new Azure.DevTest.LinuxVirtualMachine("example", new()
 *     {
 *         Name = "example-vm03",
 *         LabName = exampleLab.Name,
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Size = "Standard_DS2",
 *         Username = "exampleuser99",
 *         SshKey = Std.File.Invoke(new()
 *         {
 *             Input = "~/.ssh/id_rsa.pub",
 *         }).Apply(invoke => invoke.Result),
 *         LabVirtualNetworkId = exampleVirtualNetwork.Id,
 *         LabSubnetName = exampleVirtualNetwork.Subnet.Apply(subnet => subnet.Name),
 *         StorageType = "Premium",
 *         Notes = "Some notes about this Virtual Machine.",
 *         GalleryImageReference = new Azure.DevTest.Inputs.LinuxVirtualMachineGalleryImageReferenceArgs
 *         {
 *             Publisher = "Canonical",
 *             Offer = "0001-com-ubuntu-server-jammy",
 *             Sku = "22_04-lts",
 *             Version = "latest",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/devtest"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"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 := devtest.NewLab(ctx, "example", &devtest.LabArgs{
 * 			Name:              pulumi.String("example-devtestlab"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Tags: pulumi.StringMap{
 * 				"Sydney": pulumi.String("Australia"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := devtest.NewVirtualNetwork(ctx, "example", &devtest.VirtualNetworkArgs{
 * 			Name:              pulumi.String("example-network"),
 * 			LabName:           exampleLab.Name,
 * 			ResourceGroupName: example.Name,
 * 			Subnet: &devtest.VirtualNetworkSubnetArgs{
 * 				UsePublicIpAddress:          pulumi.String("Allow"),
 * 				UseInVirtualMachineCreation: pulumi.String("Allow"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "~/.ssh/id_rsa.pub",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = devtest.NewLinuxVirtualMachine(ctx, "example", &devtest.LinuxVirtualMachineArgs{
 * 			Name:                pulumi.String("example-vm03"),
 * 			LabName:             exampleLab.Name,
 * 			ResourceGroupName:   example.Name,
 * 			Location:            example.Location,
 * 			Size:                pulumi.String("Standard_DS2"),
 * 			Username:            pulumi.String("exampleuser99"),
 * 			SshKey:              invokeFile.Result,
 * 			LabVirtualNetworkId: exampleVirtualNetwork.ID(),
 * 			LabSubnetName: exampleVirtualNetwork.Subnet.ApplyT(func(subnet devtest.VirtualNetworkSubnet) (*string, error) {
 * 				return &subnet.Name, nil
 * 			}).(pulumi.StringPtrOutput),
 * 			StorageType: pulumi.String("Premium"),
 * 			Notes:       pulumi.String("Some notes about this Virtual Machine."),
 * 			GalleryImageReference: &devtest.LinuxVirtualMachineGalleryImageReferenceArgs{
 * 				Publisher: pulumi.String("Canonical"),
 * 				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
 * 				Sku:       pulumi.String("22_04-lts"),
 * 				Version:   pulumi.String("latest"),
 * 			},
 * 		})
 * 		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.devtest.Lab;
 * import com.pulumi.azure.devtest.LabArgs;
 * import com.pulumi.azure.devtest.VirtualNetwork;
 * import com.pulumi.azure.devtest.VirtualNetworkArgs;
 * import com.pulumi.azure.devtest.inputs.VirtualNetworkSubnetArgs;
 * import com.pulumi.azure.devtest.LinuxVirtualMachine;
 * import com.pulumi.azure.devtest.LinuxVirtualMachineArgs;
 * import com.pulumi.azure.devtest.inputs.LinuxVirtualMachineGalleryImageReferenceArgs;
 * 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-devtestlab")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .tags(Map.of("Sydney", "Australia"))
 *             .build());
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-network")
 *             .labName(exampleLab.name())
 *             .resourceGroupName(example.name())
 *             .subnet(VirtualNetworkSubnetArgs.builder()
 *                 .usePublicIpAddress("Allow")
 *                 .useInVirtualMachineCreation("Allow")
 *                 .build())
 *             .build());
 *         var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()
 *             .name("example-vm03")
 *             .labName(exampleLab.name())
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .size("Standard_DS2")
 *             .username("exampleuser99")
 *             .sshKey(StdFunctions.file(FileArgs.builder()
 *                 .input("~/.ssh/id_rsa.pub")
 *                 .build()).result())
 *             .labVirtualNetworkId(exampleVirtualNetwork.id())
 *             .labSubnetName(exampleVirtualNetwork.subnet().applyValue(subnet -> subnet.name()))
 *             .storageType("Premium")
 *             .notes("Some notes about this Virtual Machine.")
 *             .galleryImageReference(LinuxVirtualMachineGalleryImageReferenceArgs.builder()
 *                 .publisher("Canonical")
 *                 .offer("0001-com-ubuntu-server-jammy")
 *                 .sku("22_04-lts")
 *                 .version("latest")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleLab:
 *     type: azure:devtest:Lab
 *     name: example
 *     properties:
 *       name: example-devtestlab
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       tags:
 *         Sydney: Australia
 *   exampleVirtualNetwork:
 *     type: azure:devtest:VirtualNetwork
 *     name: example
 *     properties:
 *       name: example-network
 *       labName: ${exampleLab.name}
 *       resourceGroupName: ${example.name}
 *       subnet:
 *         usePublicIpAddress: Allow
 *         useInVirtualMachineCreation: Allow
 *   exampleLinuxVirtualMachine:
 *     type: azure:devtest:LinuxVirtualMachine
 *     name: example
 *     properties:
 *       name: example-vm03
 *       labName: ${exampleLab.name}
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       size: Standard_DS2
 *       username: exampleuser99
 *       sshKey:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: ~/.ssh/id_rsa.pub
 *           Return: result
 *       labVirtualNetworkId: ${exampleVirtualNetwork.id}
 *       labSubnetName: ${exampleVirtualNetwork.subnet.name}
 *       storageType: Premium
 *       notes: Some notes about this Virtual Machine.
 *       galleryImageReference:
 *         publisher: Canonical
 *         offer: 0001-com-ubuntu-server-jammy
 *         sku: 22_04-lts
 *         version: latest
 * ```
 * 
 * ## Import
 * Dev Test Linux Virtual Machines can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:devtest/linuxVirtualMachine:LinuxVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1
 * ```
 * @property allowClaim Can this Virtual Machine be claimed by users? Defaults to `true`.
 * @property disallowPublicIpAddress Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
 * @property galleryImageReference A `gallery_image_reference` block as defined below.
 * @property inboundNatRules One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
 * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
 * @property labName Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
 * @property labSubnetName The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
 * @property labVirtualNetworkId The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
 * @property location Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
 * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
 * @property notes Any notes about the Virtual Machine.
 * @property password The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
 * @property size The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
 * @property sshKey The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
 * > **NOTE:** One or either `password` or `ssh_key` must be specified.
 * @property storageType The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 * @property username The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
 */
public data class LinuxVirtualMachineArgs(
    public val allowClaim: Output? = null,
    public val disallowPublicIpAddress: Output? = null,
    public val galleryImageReference: Output? = null,
    public val inboundNatRules: Output>? = null,
    public val labName: Output? = null,
    public val labSubnetName: Output? = null,
    public val labVirtualNetworkId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val notes: Output? = null,
    public val password: Output? = null,
    public val resourceGroupName: Output? = null,
    public val size: Output? = null,
    public val sshKey: Output? = null,
    public val storageType: Output? = null,
    public val tags: Output>? = null,
    public val username: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.devtest.LinuxVirtualMachineArgs =
        com.pulumi.azure.devtest.LinuxVirtualMachineArgs.builder()
            .allowClaim(allowClaim?.applyValue({ args0 -> args0 }))
            .disallowPublicIpAddress(disallowPublicIpAddress?.applyValue({ args0 -> args0 }))
            .galleryImageReference(
                galleryImageReference?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .inboundNatRules(
                inboundNatRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .labName(labName?.applyValue({ args0 -> args0 }))
            .labSubnetName(labSubnetName?.applyValue({ args0 -> args0 }))
            .labVirtualNetworkId(labVirtualNetworkId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .notes(notes?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .size(size?.applyValue({ args0 -> args0 }))
            .sshKey(sshKey?.applyValue({ args0 -> args0 }))
            .storageType(storageType?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .username(username?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LinuxVirtualMachineArgs].
 */
@PulumiTagMarker
public class LinuxVirtualMachineArgsBuilder internal constructor() {
    private var allowClaim: Output? = null

    private var disallowPublicIpAddress: Output? = null

    private var galleryImageReference: Output? = null

    private var inboundNatRules: Output>? = null

    private var labName: Output? = null

    private var labSubnetName: Output? = null

    private var labVirtualNetworkId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var notes: Output? = null

    private var password: Output? = null

    private var resourceGroupName: Output? = null

    private var size: Output? = null

    private var sshKey: Output? = null

    private var storageType: Output? = null

    private var tags: Output>? = null

    private var username: Output? = null

    /**
     * @param value Can this Virtual Machine be claimed by users? Defaults to `true`.
     */
    @JvmName("bmeqxajvlkgpbtjp")
    public suspend fun allowClaim(`value`: Output) {
        this.allowClaim = value
    }

    /**
     * @param value Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     */
    @JvmName("bbrvofixnbmoramk")
    public suspend fun disallowPublicIpAddress(`value`: Output) {
        this.disallowPublicIpAddress = value
    }

    /**
     * @param value A `gallery_image_reference` block as defined below.
     */
    @JvmName("tpqxsrgenouhdbun")
    public suspend
    fun galleryImageReference(`value`: Output) {
        this.galleryImageReference = value
    }

    /**
     * @param value One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("kntyjydywugaopcs")
    public suspend fun inboundNatRules(`value`: Output>) {
        this.inboundNatRules = value
    }

    @JvmName("cblxidgquoifucuy")
    public suspend fun inboundNatRules(vararg values: Output) {
        this.inboundNatRules = Output.all(values.asList())
    }

    /**
     * @param values One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("novwxxuqogdtxttb")
    public suspend fun inboundNatRules(values: List>) {
        this.inboundNatRules = Output.all(values)
    }

    /**
     * @param value Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     */
    @JvmName("jwwcgjfjedyqvrqi")
    public suspend fun labName(`value`: Output) {
        this.labName = value
    }

    /**
     * @param value The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     */
    @JvmName("twtmexyktgrvllph")
    public suspend fun labSubnetName(`value`: Output) {
        this.labSubnetName = value
    }

    /**
     * @param value The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     */
    @JvmName("rrfidnustnwtvutj")
    public suspend fun labVirtualNetworkId(`value`: Output) {
        this.labVirtualNetworkId = value
    }

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

    /**
     * @param value Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.
     * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     */
    @JvmName("yutqgxqwwiqflujp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Any notes about the Virtual Machine.
     */
    @JvmName("wugugsjwejtpoufs")
    public suspend fun notes(`value`: Output) {
        this.notes = value
    }

    /**
     * @param value The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("pqkxrrulqbmqslbp")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("hvkjwkuyusncvmyc")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     */
    @JvmName("aaceaucipnbhltxe")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

    /**
     * @param value The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * > **NOTE:** One or either `password` or `ssh_key` must be specified.
     */
    @JvmName("jmojkhitbbhvpemo")
    public suspend fun sshKey(`value`: Output) {
        this.sshKey = value
    }

    /**
     * @param value The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
     */
    @JvmName("hbghnjsumyvtfpnk")
    public suspend fun storageType(`value`: Output) {
        this.storageType = value
    }

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

    /**
     * @param value The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("swnwrjrqkpsdlxap")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value Can this Virtual Machine be claimed by users? Defaults to `true`.
     */
    @JvmName("tijbgxhjsybfgkqn")
    public suspend fun allowClaim(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowClaim = mapped
    }

    /**
     * @param value Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.
     */
    @JvmName("nvlxbaikcngurnkn")
    public suspend fun disallowPublicIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disallowPublicIpAddress = mapped
    }

    /**
     * @param value A `gallery_image_reference` block as defined below.
     */
    @JvmName("sfqyelymvkdibjaj")
    public suspend fun galleryImageReference(`value`: LinuxVirtualMachineGalleryImageReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.galleryImageReference = mapped
    }

    /**
     * @param argument A `gallery_image_reference` block as defined below.
     */
    @JvmName("bwalglwhrcftahhc")
    public suspend
    fun galleryImageReference(argument: suspend LinuxVirtualMachineGalleryImageReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = LinuxVirtualMachineGalleryImageReferenceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.galleryImageReference = mapped
    }

    /**
     * @param value One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("onrupmsnixcrissm")
    public suspend fun inboundNatRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inboundNatRules = mapped
    }

    /**
     * @param argument One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("cektcsaipqyojsyd")
    public suspend
    fun inboundNatRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LinuxVirtualMachineInboundNatRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundNatRules = mapped
    }

    /**
     * @param argument One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("awhmblplkmcbwjlf")
    public suspend fun inboundNatRules(
        vararg
        argument: suspend LinuxVirtualMachineInboundNatRuleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            LinuxVirtualMachineInboundNatRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inboundNatRules = mapped
    }

    /**
     * @param argument One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("wwwwvtudwgajprbw")
    public suspend
    fun inboundNatRules(argument: suspend LinuxVirtualMachineInboundNatRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LinuxVirtualMachineInboundNatRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.inboundNatRules = mapped
    }

    /**
     * @param values One or more `inbound_nat_rule` blocks as defined below. Changing this forces a new resource to be created.
     * > **NOTE:** If any `inbound_nat_rule` blocks are specified then `disallow_public_ip_address` must be set to `true`.
     */
    @JvmName("kuhmubdkwrdpjhil")
    public suspend fun inboundNatRules(vararg values: LinuxVirtualMachineInboundNatRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inboundNatRules = mapped
    }

    /**
     * @param value Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.
     */
    @JvmName("lgjydjmepkrpodlu")
    public suspend fun labName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labName = mapped
    }

    /**
     * @param value The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.
     */
    @JvmName("fnktnaqnggjuhoqo")
    public suspend fun labSubnetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labSubnetName = mapped
    }

    /**
     * @param value The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.
     */
    @JvmName("mqpdgjminnwrycgj")
    public suspend fun labVirtualNetworkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labVirtualNetworkId = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.
     */
    @JvmName("rjgdeebhuhvgxgne")
    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 the Dev Test Machine. Changing this forces a new resource to be created.
     * > **NOTE:** The validation requirements for the Name change based on the `os_type` used in this Virtual Machine. For a Linux VM the name must be between 1-62 characters, and for a Windows VM the name must be between 1-15 characters. It must begin and end with a letter or number, and cannot be all numbers.
     */
    @JvmName("hgvbyrfbgqbptkku")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Any notes about the Virtual Machine.
     */
    @JvmName("bluvdujekkpdnnpq")
    public suspend fun notes(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notes = mapped
    }

    /**
     * @param value The Password associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("tlhkndxdxbkfagmc")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

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

    /**
     * @param value The Machine Size to use for this Virtual Machine, such as `Standard_F2`. Changing this forces a new resource to be created.
     */
    @JvmName("ojchlhnjnkvtekjg")
    public suspend fun size(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

    /**
     * @param value The SSH Key associated with the `username` used to login to this Virtual Machine. Changing this forces a new resource to be created.
     * > **NOTE:** One or either `password` or `ssh_key` must be specified.
     */
    @JvmName("cmxwgjtvtrhayirx")
    public suspend fun sshKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sshKey = mapped
    }

    /**
     * @param value The type of Storage to use on this Virtual Machine. Possible values are `Standard` and `Premium`. Changing this forces a new resource to be created.
     */
    @JvmName("ohnfhfdokfilylaj")
    public suspend fun storageType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

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

    /**
     * @param value The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("xnluomqvnnydrmng")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): LinuxVirtualMachineArgs = LinuxVirtualMachineArgs(
        allowClaim = allowClaim,
        disallowPublicIpAddress = disallowPublicIpAddress,
        galleryImageReference = galleryImageReference,
        inboundNatRules = inboundNatRules,
        labName = labName,
        labSubnetName = labSubnetName,
        labVirtualNetworkId = labVirtualNetworkId,
        location = location,
        name = name,
        notes = notes,
        password = password,
        resourceGroupName = resourceGroupName,
        size = size,
        sshKey = sshKey,
        storageType = storageType,
        tags = tags,
        username = username,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy