com.pulumi.azurenative.vmwarecloudsimple.VirtualMachine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.vmwarecloudsimple;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.vmwarecloudsimple.VirtualMachineArgs;
import com.pulumi.azurenative.vmwarecloudsimple.outputs.GuestOSCustomizationResponse;
import com.pulumi.azurenative.vmwarecloudsimple.outputs.ResourcePoolResponse;
import com.pulumi.azurenative.vmwarecloudsimple.outputs.VirtualDiskControllerResponse;
import com.pulumi.azurenative.vmwarecloudsimple.outputs.VirtualDiskResponse;
import com.pulumi.azurenative.vmwarecloudsimple.outputs.VirtualNicResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Virtual machine model
* Azure REST API version: 2019-04-01. Prior API version in Azure Native 1.x: 2019-04-01.
*
* ## Example Usage
* ### CreateVirtualMachine
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.vmwarecloudsimple.VirtualMachine;
* import com.pulumi.azurenative.vmwarecloudsimple.VirtualMachineArgs;
* import com.pulumi.azurenative.vmwarecloudsimple.inputs.VirtualDiskArgs;
* import com.pulumi.azurenative.vmwarecloudsimple.inputs.VirtualNicArgs;
* import com.pulumi.azurenative.vmwarecloudsimple.inputs.VirtualNetworkArgs;
* import com.pulumi.azurenative.vmwarecloudsimple.inputs.ResourcePoolArgs;
* 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()
* .amountOfRam(4096)
* .disks(VirtualDiskArgs.builder()
* .controllerId("1000")
* .independenceMode("persistent")
* .totalSize(10485760)
* .virtualDiskId("2000")
* .build())
* .location("westus2")
* .nics(VirtualNicArgs.builder()
* .network(VirtualNetworkArgs.builder()
* .id("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19")
* .build())
* .nicType("E1000")
* .powerOnBoot(true)
* .virtualNicId("4000")
* .build())
* .numberOfCores(2)
* .privateCloudId("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud")
* .resourceGroupName("myResourceGroup")
* .resourcePool(ResourcePoolArgs.builder()
* .id("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26")
* .build())
* .templateId("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34")
* .virtualMachineName("myVirtualMachine")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:vmwarecloudsimple:VirtualMachine myVirtualMachine /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}
* ```
*
*/
@ResourceType(type="azure-native:vmwarecloudsimple:VirtualMachine")
public class VirtualMachine extends com.pulumi.resources.CustomResource {
/**
* The amount of memory
*
*/
@Export(name="amountOfRam", refs={Integer.class}, tree="[0]")
private Output amountOfRam;
/**
* @return The amount of memory
*
*/
public Output amountOfRam() {
return this.amountOfRam;
}
/**
* The list of Virtual Disks' Controllers
*
*/
@Export(name="controllers", refs={List.class,VirtualDiskControllerResponse.class}, tree="[0,1]")
private Output> controllers;
/**
* @return The list of Virtual Disks' Controllers
*
*/
public Output> controllers() {
return this.controllers;
}
/**
* Virtual machine properties
*
*/
@Export(name="customization", refs={GuestOSCustomizationResponse.class}, tree="[0]")
private Output* @Nullable */ GuestOSCustomizationResponse> customization;
/**
* @return Virtual machine properties
*
*/
public Output> customization() {
return Codegen.optional(this.customization);
}
/**
* The list of Virtual Disks
*
*/
@Export(name="disks", refs={List.class,VirtualDiskResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> disks;
/**
* @return The list of Virtual Disks
*
*/
public Output>> disks() {
return Codegen.optional(this.disks);
}
/**
* The DNS name of Virtual Machine in VCenter
*
*/
@Export(name="dnsname", refs={String.class}, tree="[0]")
private Output dnsname;
/**
* @return The DNS name of Virtual Machine in VCenter
*
*/
public Output dnsname() {
return this.dnsname;
}
/**
* Expose Guest OS or not
*
*/
@Export(name="exposeToGuestVM", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> exposeToGuestVM;
/**
* @return Expose Guest OS or not
*
*/
public Output> exposeToGuestVM() {
return Codegen.optional(this.exposeToGuestVM);
}
/**
* The path to virtual machine folder in VCenter
*
*/
@Export(name="folder", refs={String.class}, tree="[0]")
private Output folder;
/**
* @return The path to virtual machine folder in VCenter
*
*/
public Output folder() {
return this.folder;
}
/**
* The name of Guest OS
*
*/
@Export(name="guestOS", refs={String.class}, tree="[0]")
private Output guestOS;
/**
* @return The name of Guest OS
*
*/
public Output guestOS() {
return this.guestOS;
}
/**
* The Guest OS type
*
*/
@Export(name="guestOSType", refs={String.class}, tree="[0]")
private Output guestOSType;
/**
* @return The Guest OS type
*
*/
public Output guestOSType() {
return this.guestOSType;
}
/**
* Azure region
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Azure region
*
*/
public Output location() {
return this.location;
}
/**
* {virtualMachineName}
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return {virtualMachineName}
*
*/
public Output name() {
return this.name;
}
/**
* The list of Virtual NICs
*
*/
@Export(name="nics", refs={List.class,VirtualNicResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> nics;
/**
* @return The list of Virtual NICs
*
*/
public Output>> nics() {
return Codegen.optional(this.nics);
}
/**
* The number of CPU cores
*
*/
@Export(name="numberOfCores", refs={Integer.class}, tree="[0]")
private Output numberOfCores;
/**
* @return The number of CPU cores
*
*/
public Output numberOfCores() {
return this.numberOfCores;
}
/**
* Password for login. Deprecated - use customization property
*
*/
@Export(name="password", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> password;
/**
* @return Password for login. Deprecated - use customization property
*
*/
public Output> password() {
return Codegen.optional(this.password);
}
/**
* Private Cloud Id
*
*/
@Export(name="privateCloudId", refs={String.class}, tree="[0]")
private Output privateCloudId;
/**
* @return Private Cloud Id
*
*/
public Output privateCloudId() {
return this.privateCloudId;
}
/**
* The provisioning status of the resource
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning status of the resource
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The public ip of Virtual Machine
*
*/
@Export(name="publicIP", refs={String.class}, tree="[0]")
private Output publicIP;
/**
* @return The public ip of Virtual Machine
*
*/
public Output publicIP() {
return this.publicIP;
}
/**
* Virtual Machines Resource Pool
*
*/
@Export(name="resourcePool", refs={ResourcePoolResponse.class}, tree="[0]")
private Output* @Nullable */ ResourcePoolResponse> resourcePool;
/**
* @return Virtual Machines Resource Pool
*
*/
public Output> resourcePool() {
return Codegen.optional(this.resourcePool);
}
/**
* The status of Virtual machine
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return The status of Virtual machine
*
*/
public Output status() {
return this.status;
}
/**
* The list of tags
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return The list of tags
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Virtual Machine Template Id
*
*/
@Export(name="templateId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> templateId;
/**
* @return Virtual Machine Template Id
*
*/
public Output> templateId() {
return Codegen.optional(this.templateId);
}
/**
* {resourceProviderNamespace}/{resourceType}
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return {resourceProviderNamespace}/{resourceType}
*
*/
public Output type() {
return this.type;
}
/**
* Username for login. Deprecated - use customization property
*
*/
@Export(name="username", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> username;
/**
* @return Username for login. Deprecated - use customization property
*
*/
public Output> username() {
return Codegen.optional(this.username);
}
/**
* The list of Virtual VSphere Networks
*
*/
@Export(name="vSphereNetworks", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> vSphereNetworks;
/**
* @return The list of Virtual VSphere Networks
*
*/
public Output>> vSphereNetworks() {
return Codegen.optional(this.vSphereNetworks);
}
/**
* The internal id of Virtual Machine in VCenter
*
*/
@Export(name="vmId", refs={String.class}, tree="[0]")
private Output vmId;
/**
* @return The internal id of Virtual Machine in VCenter
*
*/
public Output vmId() {
return this.vmId;
}
/**
* VMware tools version
*
*/
@Export(name="vmwaretools", refs={String.class}, tree="[0]")
private Output vmwaretools;
/**
* @return VMware tools version
*
*/
public Output vmwaretools() {
return this.vmwaretools;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public VirtualMachine(java.lang.String name) {
this(name, VirtualMachineArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public VirtualMachine(java.lang.String name, VirtualMachineArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public VirtualMachine(java.lang.String name, VirtualMachineArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:vmwarecloudsimple:VirtualMachine", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private VirtualMachine(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:vmwarecloudsimple:VirtualMachine", name, null, makeResourceOptions(options, id), false);
}
private static VirtualMachineArgs makeArgs(VirtualMachineArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? VirtualMachineArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:vmwarecloudsimple/v20190401:VirtualMachine").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static VirtualMachine get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new VirtualMachine(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy