
com.pulumi.vsphere.GuestOsCustomization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vsphere Show documentation
Show all versions of vsphere Show documentation
A Pulumi package for creating vsphere 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.vsphere;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.vsphere.GuestOsCustomizationArgs;
import com.pulumi.vsphere.Utilities;
import com.pulumi.vsphere.inputs.GuestOsCustomizationState;
import com.pulumi.vsphere.outputs.GuestOsCustomizationSpec;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The `vsphere.GuestOsCustomization` resource can be used to a customization specification for a guest operating system.
*
* > **NOTE:** The name attribute is unique identifier for the guest OS spec per VC.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.vsphere.GuestOsCustomization;
* import com.pulumi.vsphere.GuestOsCustomizationArgs;
* import com.pulumi.vsphere.inputs.GuestOsCustomizationSpecArgs;
* import com.pulumi.vsphere.inputs.GuestOsCustomizationSpecWindowsOptionsArgs;
* 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 windows = new GuestOsCustomization("windows", GuestOsCustomizationArgs.builder()
* .name("windows")
* .type("Windows")
* .spec(GuestOsCustomizationSpecArgs.builder()
* .windowsOptions(GuestOsCustomizationSpecWindowsOptionsArgs.builder()
* .runOnceCommandLists(
* "command-1",
* "command-2")
* .computerName("windows")
* .autoLogon(false)
* .autoLogonCount(0)
* .adminPassword("VMware1!")
* .timeZone(4)
* .workgroup("workgroup")
* .build())
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
@ResourceType(type="vsphere:index/guestOsCustomization:GuestOsCustomization")
public class GuestOsCustomization extends com.pulumi.resources.CustomResource {
/**
* The number of last changed version to the customization specification.
*
*/
@Export(name="changeVersion", refs={String.class}, tree="[0]")
private Output changeVersion;
/**
* @return The number of last changed version to the customization specification.
*
*/
public Output changeVersion() {
return this.changeVersion;
}
/**
* The description for the customization specification.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description for the customization specification.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The time of last modification to the customization specification.
*
*/
@Export(name="lastUpdateTime", refs={String.class}, tree="[0]")
private Output lastUpdateTime;
/**
* @return The time of last modification to the customization specification.
*
*/
public Output lastUpdateTime() {
return this.lastUpdateTime;
}
/**
* The name of the customization specification is the unique identifier per vCenter Server instance.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the customization specification is the unique identifier per vCenter Server instance.
*
*/
public Output name() {
return this.name;
}
/**
* Container object for the Guest OS properties about to be customized . See virtual machine customizations
*
*/
@Export(name="spec", refs={GuestOsCustomizationSpec.class}, tree="[0]")
private Output spec;
/**
* @return Container object for the Guest OS properties about to be customized . See virtual machine customizations
*
*/
public Output spec() {
return this.spec;
}
/**
* The type of customization specification: One among: Windows, Linux.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of customization specification: One among: Windows, Linux.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public GuestOsCustomization(java.lang.String name) {
this(name, GuestOsCustomizationArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GuestOsCustomization(java.lang.String name, GuestOsCustomizationArgs 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 GuestOsCustomization(java.lang.String name, GuestOsCustomizationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("vsphere:index/guestOsCustomization:GuestOsCustomization", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GuestOsCustomization(java.lang.String name, Output id, @Nullable GuestOsCustomizationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("vsphere:index/guestOsCustomization:GuestOsCustomization", name, state, makeResourceOptions(options, id), false);
}
private static GuestOsCustomizationArgs makeArgs(GuestOsCustomizationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GuestOsCustomizationArgs.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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static GuestOsCustomization get(java.lang.String name, Output id, @Nullable GuestOsCustomizationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GuestOsCustomization(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy