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

com.pulumi.azurenative.virtualmachineimages.VirtualMachineImageTemplate Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.virtualmachineimages;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.virtualmachineimages.VirtualMachineImageTemplateArgs;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateFileCustomizerResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateIdentityResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateLastRunStatusResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateManagedImageDistributorResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateManagedImageSourceResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplatePlatformImageSourceResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplatePowerShellCustomizerResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplatePropertiesResponseOptimize;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplatePropertiesResponseValidate;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateRestartCustomizerResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateSharedImageDistributorResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateSharedImageVersionSourceResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateShellCustomizerResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateVhdDistributorResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateVmProfileResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ImageTemplateWindowsUpdateCustomizerResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.ProvisioningErrorResponse;
import com.pulumi.azurenative.virtualmachineimages.outputs.SystemDataResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider
 * Azure REST API version: 2022-07-01. Prior API version in Azure Native 1.x: 2020-02-14.
 * 
 * Other available API versions: 2018-02-01-preview, 2019-05-01-preview, 2023-07-01, 2024-02-01.
 * ## Import
 * 
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * 
 * ```sh
 * $ pulumi import azure-native:virtualmachineimages:VirtualMachineImageTemplate myImageTemplate /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName} 
 * ```
 * 
 */
@ResourceType(type="azure-native:virtualmachineimages:VirtualMachineImageTemplate")
public class VirtualMachineImageTemplate extends com.pulumi.resources.CustomResource {
    /**
     * Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions). Omit or specify 0 to use the default (4 hours).
     * 
     */
    @Export(name="buildTimeoutInMinutes", refs={Integer.class}, tree="[0]")
    private Output buildTimeoutInMinutes;

    /**
     * @return Maximum duration to wait while building the image template (includes all customizations, optimization, validations, and distributions). Omit or specify 0 to use the default (4 hours).
     * 
     */
    public Output> buildTimeoutInMinutes() {
        return Codegen.optional(this.buildTimeoutInMinutes);
    }
    /**
     * Specifies the properties used to describe the customization steps of the image, like Image source etc
     * 
     */
    @Export(name="customize", refs={List.class,Object.class}, tree="[0,1]")
    private Output> customize;

    /**
     * @return Specifies the properties used to describe the customization steps of the image, like Image source etc
     * 
     */
    public Output>> customize() {
        return Codegen.optional(this.customize);
    }
    /**
     * The distribution targets where the image output needs to go to.
     * 
     */
    @Export(name="distribute", refs={List.class,Object.class}, tree="[0,1]")
    private Output> distribute;

    /**
     * @return The distribution targets where the image output needs to go to.
     * 
     */
    public Output> distribute() {
        return this.distribute;
    }
    /**
     * The staging resource group id in the same subscription as the image template that will be used to build the image. This read-only field differs from 'stagingResourceGroup' only if the value specified in the 'stagingResourceGroup' field is empty.
     * 
     */
    @Export(name="exactStagingResourceGroup", refs={String.class}, tree="[0]")
    private Output exactStagingResourceGroup;

    /**
     * @return The staging resource group id in the same subscription as the image template that will be used to build the image. This read-only field differs from 'stagingResourceGroup' only if the value specified in the 'stagingResourceGroup' field is empty.
     * 
     */
    public Output exactStagingResourceGroup() {
        return this.exactStagingResourceGroup;
    }
    /**
     * The identity of the image template, if configured.
     * 
     */
    @Export(name="identity", refs={ImageTemplateIdentityResponse.class}, tree="[0]")
    private Output identity;

    /**
     * @return The identity of the image template, if configured.
     * 
     */
    public Output identity() {
        return this.identity;
    }
    /**
     * State of 'run' that is currently executing or was last executed.
     * 
     */
    @Export(name="lastRunStatus", refs={ImageTemplateLastRunStatusResponse.class}, tree="[0]")
    private Output lastRunStatus;

    /**
     * @return State of 'run' that is currently executing or was last executed.
     * 
     */
    public Output lastRunStatus() {
        return this.lastRunStatus;
    }
    /**
     * The geo-location where the resource lives
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output location;

    /**
     * @return The geo-location where the resource lives
     * 
     */
    public Output location() {
        return this.location;
    }
    /**
     * The name of the resource
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output name;

    /**
     * @return The name of the resource
     * 
     */
    public Output name() {
        return this.name;
    }
    /**
     * Specifies optimization to be performed on image.
     * 
     */
    @Export(name="optimize", refs={ImageTemplatePropertiesResponseOptimize.class}, tree="[0]")
    private Output optimize;

    /**
     * @return Specifies optimization to be performed on image.
     * 
     */
    public Output> optimize() {
        return Codegen.optional(this.optimize);
    }
    /**
     * Provisioning error, if any
     * 
     */
    @Export(name="provisioningError", refs={ProvisioningErrorResponse.class}, tree="[0]")
    private Output provisioningError;

    /**
     * @return Provisioning error, if any
     * 
     */
    public Output provisioningError() {
        return this.provisioningError;
    }
    /**
     * Provisioning state of the resource
     * 
     */
    @Export(name="provisioningState", refs={String.class}, tree="[0]")
    private Output provisioningState;

    /**
     * @return Provisioning state of the resource
     * 
     */
    public Output provisioningState() {
        return this.provisioningState;
    }
    /**
     * Specifies the properties used to describe the source image.
     * 
     */
    @Export(name="source", refs={Object.class}, tree="[0]")
    private Output source;

    /**
     * @return Specifies the properties used to describe the source image.
     * 
     */
    public Output source() {
        return this.source;
    }
    /**
     * The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain.
     * 
     */
    @Export(name="stagingResourceGroup", refs={String.class}, tree="[0]")
    private Output stagingResourceGroup;

    /**
     * @return The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain.
     * 
     */
    public Output> stagingResourceGroup() {
        return Codegen.optional(this.stagingResourceGroup);
    }
    /**
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     * 
     */
    @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
    private Output systemData;

    /**
     * @return Azure Resource Manager metadata containing createdBy and modifiedBy information.
     * 
     */
    public Output systemData() {
        return this.systemData;
    }
    /**
     * Resource tags.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Output>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
     * 
     */
    @Export(name="type", refs={String.class}, tree="[0]")
    private Output type;

    /**
     * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
     * 
     */
    public Output type() {
        return this.type;
    }
    /**
     * Configuration options and list of validations to be performed on the resulting image.
     * 
     */
    @Export(name="validate", refs={ImageTemplatePropertiesResponseValidate.class}, tree="[0]")
    private Output validate;

    /**
     * @return Configuration options and list of validations to be performed on the resulting image.
     * 
     */
    public Output> validate() {
        return Codegen.optional(this.validate);
    }
    /**
     * Describes how virtual machine is set up to build images
     * 
     */
    @Export(name="vmProfile", refs={ImageTemplateVmProfileResponse.class}, tree="[0]")
    private Output vmProfile;

    /**
     * @return Describes how virtual machine is set up to build images
     * 
     */
    public Output> vmProfile() {
        return Codegen.optional(this.vmProfile);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public VirtualMachineImageTemplate(java.lang.String name) {
        this(name, VirtualMachineImageTemplateArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public VirtualMachineImageTemplate(java.lang.String name, VirtualMachineImageTemplateArgs 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 VirtualMachineImageTemplate(java.lang.String name, VirtualMachineImageTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure-native:virtualmachineimages:VirtualMachineImageTemplate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private VirtualMachineImageTemplate(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure-native:virtualmachineimages:VirtualMachineImageTemplate", name, null, makeResourceOptions(options, id), false);
    }

    private static VirtualMachineImageTemplateArgs makeArgs(VirtualMachineImageTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? VirtualMachineImageTemplateArgs.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:virtualmachineimages/v20180201preview:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20190201preview:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20190501preview:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20200214:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20211001:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20220214:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20220701:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20230701:VirtualMachineImageTemplate").build()),
                Output.of(Alias.builder().type("azure-native:virtualmachineimages/v20240201:VirtualMachineImageTemplate").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 VirtualMachineImageTemplate get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new VirtualMachineImageTemplate(name, id, options);
    }
}