com.pulumi.azurenative.scvmm.VirtualMachineTemplate 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.scvmm;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.scvmm.VirtualMachineTemplateArgs;
import com.pulumi.azurenative.scvmm.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.scvmm.outputs.NetworkInterfacesResponse;
import com.pulumi.azurenative.scvmm.outputs.SystemDataResponse;
import com.pulumi.azurenative.scvmm.outputs.VirtualDiskResponse;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The VirtualMachineTemplates resource definition.
* Azure REST API version: 2022-05-21-preview. Prior API version in Azure Native 1.x: 2020-06-05-preview.
*
* Other available API versions: 2023-04-01-preview, 2023-10-07, 2024-06-01.
*
* ## Example Usage
* ### CreateVirtualMachineTemplate
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.scvmm.VirtualMachineTemplate;
* import com.pulumi.azurenative.scvmm.VirtualMachineTemplateArgs;
* import com.pulumi.azurenative.scvmm.inputs.ExtendedLocationArgs;
* 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 virtualMachineTemplate = new VirtualMachineTemplate("virtualMachineTemplate", VirtualMachineTemplateArgs.builder()
* .extendedLocation(ExtendedLocationArgs.builder()
* .name("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso")
* .type("customLocation")
* .build())
* .location("East US")
* .resourceGroupName("testrg")
* .uuid("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
* .virtualMachineTemplateName("HRVirtualMachineTemplate")
* .vmmServerId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:scvmm:VirtualMachineTemplate HRVirtualMachineTemplate /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}
* ```
*
*/
@ResourceType(type="azure-native:scvmm:VirtualMachineTemplate")
public class VirtualMachineTemplate extends com.pulumi.resources.CustomResource {
/**
* Gets or sets computer name.
*
*/
@Export(name="computerName", refs={String.class}, tree="[0]")
private Output computerName;
/**
* @return Gets or sets computer name.
*
*/
public Output computerName() {
return this.computerName;
}
/**
* Gets or sets the desired number of vCPUs for the vm.
*
*/
@Export(name="cpuCount", refs={Integer.class}, tree="[0]")
private Output cpuCount;
/**
* @return Gets or sets the desired number of vCPUs for the vm.
*
*/
public Output cpuCount() {
return this.cpuCount;
}
/**
* Gets or sets the disks of the template.
*
*/
@Export(name="disks", refs={List.class,VirtualDiskResponse.class}, tree="[0,1]")
private Output> disks;
/**
* @return Gets or sets the disks of the template.
*
*/
public Output> disks() {
return this.disks;
}
/**
* Gets or sets a value indicating whether to enable dynamic memory or not.
*
*/
@Export(name="dynamicMemoryEnabled", refs={String.class}, tree="[0]")
private Output dynamicMemoryEnabled;
/**
* @return Gets or sets a value indicating whether to enable dynamic memory or not.
*
*/
public Output dynamicMemoryEnabled() {
return this.dynamicMemoryEnabled;
}
/**
* Gets or sets the max dynamic memory for the vm.
*
*/
@Export(name="dynamicMemoryMaxMB", refs={Integer.class}, tree="[0]")
private Output dynamicMemoryMaxMB;
/**
* @return Gets or sets the max dynamic memory for the vm.
*
*/
public Output dynamicMemoryMaxMB() {
return this.dynamicMemoryMaxMB;
}
/**
* Gets or sets the min dynamic memory for the vm.
*
*/
@Export(name="dynamicMemoryMinMB", refs={Integer.class}, tree="[0]")
private Output dynamicMemoryMinMB;
/**
* @return Gets or sets the min dynamic memory for the vm.
*
*/
public Output dynamicMemoryMinMB() {
return this.dynamicMemoryMinMB;
}
/**
* The extended location.
*
*/
@Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]")
private Output extendedLocation;
/**
* @return The extended location.
*
*/
public Output extendedLocation() {
return this.extendedLocation;
}
/**
* Gets or sets the generation for the vm.
*
*/
@Export(name="generation", refs={Integer.class}, tree="[0]")
private Output generation;
/**
* @return Gets or sets the generation for the vm.
*
*/
public Output generation() {
return this.generation;
}
/**
* Gets or sets the inventory Item ID for the resource.
*
*/
@Export(name="inventoryItemId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> inventoryItemId;
/**
* @return Gets or sets the inventory Item ID for the resource.
*
*/
public Output> inventoryItemId() {
return Codegen.optional(this.inventoryItemId);
}
/**
* Gets or sets a value indicating whether the vm template is customizable or not.
*
*/
@Export(name="isCustomizable", refs={String.class}, tree="[0]")
private Output isCustomizable;
/**
* @return Gets or sets a value indicating whether the vm template is customizable or not.
*
*/
public Output isCustomizable() {
return this.isCustomizable;
}
/**
* Gets highly available property.
*
*/
@Export(name="isHighlyAvailable", refs={String.class}, tree="[0]")
private Output isHighlyAvailable;
/**
* @return Gets highly available property.
*
*/
public Output isHighlyAvailable() {
return this.isHighlyAvailable;
}
/**
* Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs.
*
*/
@Export(name="limitCpuForMigration", refs={String.class}, tree="[0]")
private Output limitCpuForMigration;
/**
* @return Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs.
*
*/
public Output limitCpuForMigration() {
return this.limitCpuForMigration;
}
/**
* Gets or sets the location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Gets or sets the location.
*
*/
public Output location() {
return this.location;
}
/**
* MemoryMB is the desired size of a virtual machine's memory, in MB.
*
*/
@Export(name="memoryMB", refs={Integer.class}, tree="[0]")
private Output memoryMB;
/**
* @return MemoryMB is the desired size of a virtual machine's memory, in MB.
*
*/
public Output memoryMB() {
return this.memoryMB;
}
/**
* Resource Name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource Name
*
*/
public Output name() {
return this.name;
}
/**
* Gets or sets the network interfaces of the template.
*
*/
@Export(name="networkInterfaces", refs={List.class,NetworkInterfacesResponse.class}, tree="[0,1]")
private Output> networkInterfaces;
/**
* @return Gets or sets the network interfaces of the template.
*
*/
public Output> networkInterfaces() {
return this.networkInterfaces;
}
/**
* Gets or sets os name.
*
*/
@Export(name="osName", refs={String.class}, tree="[0]")
private Output osName;
/**
* @return Gets or sets os name.
*
*/
public Output osName() {
return this.osName;
}
/**
* Gets or sets the type of the os.
*
*/
@Export(name="osType", refs={String.class}, tree="[0]")
private Output osType;
/**
* @return Gets or sets the type of the os.
*
*/
public Output osType() {
return this.osType;
}
/**
* Gets or sets the provisioning state.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Gets or sets the provisioning state.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The system data.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return The system data.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource tags
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Resource Type
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource Type
*
*/
public Output type() {
return this.type;
}
/**
* Unique ID of the virtual machine template.
*
*/
@Export(name="uuid", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> uuid;
/**
* @return Unique ID of the virtual machine template.
*
*/
public Output> uuid() {
return Codegen.optional(this.uuid);
}
/**
* ARM Id of the vmmServer resource in which this resource resides.
*
*/
@Export(name="vmmServerId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> vmmServerId;
/**
* @return ARM Id of the vmmServer resource in which this resource resides.
*
*/
public Output> vmmServerId() {
return Codegen.optional(this.vmmServerId);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public VirtualMachineTemplate(java.lang.String name) {
this(name, VirtualMachineTemplateArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public VirtualMachineTemplate(java.lang.String name, VirtualMachineTemplateArgs 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 VirtualMachineTemplate(java.lang.String name, VirtualMachineTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:scvmm:VirtualMachineTemplate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private VirtualMachineTemplate(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:scvmm:VirtualMachineTemplate", name, null, makeResourceOptions(options, id), false);
}
private static VirtualMachineTemplateArgs makeArgs(VirtualMachineTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? VirtualMachineTemplateArgs.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:scvmm/v20200605preview:VirtualMachineTemplate").build()),
Output.of(Alias.builder().type("azure-native:scvmm/v20220521preview:VirtualMachineTemplate").build()),
Output.of(Alias.builder().type("azure-native:scvmm/v20230401preview:VirtualMachineTemplate").build()),
Output.of(Alias.builder().type("azure-native:scvmm/v20231007:VirtualMachineTemplate").build()),
Output.of(Alias.builder().type("azure-native:scvmm/v20240601:VirtualMachineTemplate").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 VirtualMachineTemplate get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new VirtualMachineTemplate(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy