Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devtestlab.kotlin
import com.pulumi.azurenative.devtestlab.VirtualMachineArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ArtifactInstallPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ArtifactInstallPropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.DataDiskPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.DataDiskPropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.GalleryImageReferenceArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.GalleryImageReferenceArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.NetworkInterfacePropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.NetworkInterfacePropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ScheduleCreationParameterArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ScheduleCreationParameterArgsBuilder
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
/**
* A virtual machine.
* Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
* Other available API versions: 2016-05-15.
* ## Example Usage
* ### VirtualMachines_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var virtualMachine = new AzureNative.DevTestLab.VirtualMachine("virtualMachine", new()
* {
* AllowClaim = true,
* DisallowPublicIpAddress = true,
* GalleryImageReference = new AzureNative.DevTestLab.Inputs.GalleryImageReferenceArgs
* {
* Offer = "UbuntuServer",
* OsType = "Linux",
* Publisher = "Canonical",
* Sku = "16.04-LTS",
* Version = "Latest",
* },
* LabName = "{labName}",
* LabSubnetName = "{virtualNetworkName}Subnet",
* LabVirtualNetworkId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}",
* Location = "{location}",
* Name = "{vmName}",
* Password = "{userPassword}",
* ResourceGroupName = "resourceGroupName",
* Size = "Standard_A2_v2",
* StorageType = "Standard",
* Tags =
* {
* { "tagName1", "tagValue1" },
* },
* UserName = "{userName}",
* });
* });
* ```
* ```go
* package main
* import (
* devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := devtestlab.NewVirtualMachine(ctx, "virtualMachine", &devtestlab.VirtualMachineArgs{
* AllowClaim: pulumi.Bool(true),
* DisallowPublicIpAddress: pulumi.Bool(true),
* GalleryImageReference: &devtestlab.GalleryImageReferenceArgs{
* Offer: pulumi.String("UbuntuServer"),
* OsType: pulumi.String("Linux"),
* Publisher: pulumi.String("Canonical"),
* Sku: pulumi.String("16.04-LTS"),
* Version: pulumi.String("Latest"),
* },
* LabName: pulumi.String("{labName}"),
* LabSubnetName: pulumi.String("{virtualNetworkName}Subnet"),
* LabVirtualNetworkId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}"),
* Location: pulumi.String("{location}"),
* Name: pulumi.String("{vmName}"),
* Password: pulumi.String("{userPassword}"),
* ResourceGroupName: pulumi.String("resourceGroupName"),
* Size: pulumi.String("Standard_A2_v2"),
* StorageType: pulumi.String("Standard"),
* Tags: pulumi.StringMap{
* "tagName1": pulumi.String("tagValue1"),
* },
* UserName: pulumi.String("{userName}"),
* })
* 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.azurenative.devtestlab.VirtualMachine;
* import com.pulumi.azurenative.devtestlab.VirtualMachineArgs;
* import com.pulumi.azurenative.devtestlab.inputs.GalleryImageReferenceArgs;
* 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 virtualMachine = new VirtualMachine("virtualMachine", VirtualMachineArgs.builder()
* .allowClaim(true)
* .disallowPublicIpAddress(true)
* .galleryImageReference(GalleryImageReferenceArgs.builder()
* .offer("UbuntuServer")
* .osType("Linux")
* .publisher("Canonical")
* .sku("16.04-LTS")
* .version("Latest")
* .build())
* .labName("{labName}")
* .labSubnetName("{virtualNetworkName}Subnet")
* .labVirtualNetworkId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}")
* .location("{location}")
* .name("{vmName}")
* .password("{userPassword}")
* .resourceGroupName("resourceGroupName")
* .size("Standard_A2_v2")
* .storageType("Standard")
* .tags(Map.of("tagName1", "tagValue1"))
* .userName("{userName}")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:devtestlab:VirtualMachine {vmName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}
* ```
* @property allowClaim Indicates whether another user can take ownership of the virtual machine
* @property artifacts The artifacts to be installed on the virtual machine.
* @property createdDate The creation date of the virtual machine.
* @property customImageId The custom image identifier of the virtual machine.
* @property dataDiskParameters New or existing data disks to attach to the virtual machine after creation
* @property disallowPublicIpAddress Indicates whether the virtual machine is to be created without a public IP address.
* @property environmentId The resource ID of the environment that contains this virtual machine, if any.
* @property expirationDate The expiration date for VM.
* @property galleryImageReference The Microsoft Azure Marketplace image reference of the virtual machine.
* @property isAuthenticationWithSshKey Indicates whether this virtual machine uses an SSH key for authentication.
* @property labName The name of the lab.
* @property labSubnetName The lab subnet name of the virtual machine.
* @property labVirtualNetworkId The lab virtual network identifier of the virtual machine.
* @property location The location of the resource.
* @property name The name of the virtual machine.
* @property networkInterface The network interface properties.
* @property notes The notes of the virtual machine.
* @property ownerObjectId The object identifier of the owner of the virtual machine.
* @property ownerUserPrincipalName The user principal name of the virtual machine owner.
* @property password The password of the virtual machine administrator.
* @property planId The id of the plan associated with the virtual machine image
* @property resourceGroupName The name of the resource group.
* @property scheduleParameters Virtual Machine schedules to be created
* @property size The size of the virtual machine.
* @property sshKey The SSH key of the virtual machine administrator.
* @property storageType Storage type to use for virtual machine (i.e. Standard, Premium).
* @property tags The tags of the resource.
* @property userName The user name of the virtual machine.
*/
public data class VirtualMachineArgs(
public val allowClaim: Output? = null,
public val artifacts: Output>? = null,
public val createdDate: Output? = null,
public val customImageId: Output? = null,
public val dataDiskParameters: Output>? = null,
public val disallowPublicIpAddress: Output? = null,
public val environmentId: Output? = null,
public val expirationDate: Output? = null,
public val galleryImageReference: Output? = null,
public val isAuthenticationWithSshKey: 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 networkInterface: Output? = null,
public val notes: Output? = null,
public val ownerObjectId: Output? = null,
public val ownerUserPrincipalName: Output? = null,
public val password: Output? = null,
public val planId: Output? = null,
public val resourceGroupName: Output? = null,
public val scheduleParameters: Output>? = null,
public val size: Output? = null,
public val sshKey: Output? = null,
public val storageType: Output? = null,
public val tags: Output