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

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

// *** 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.virtualmachineimages.inputs.ImageTemplateFileCustomizerArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateIdentityArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateManagedImageDistributorArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateManagedImageSourceArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplatePlatformImageSourceArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplatePowerShellCustomizerArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplatePropertiesOptimizeArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplatePropertiesValidateArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateRestartCustomizerArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateSharedImageDistributorArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateSharedImageVersionSourceArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateShellCustomizerArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateVhdDistributorArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateVmProfileArgs;
import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateWindowsUpdateCustomizerArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class VirtualMachineImageTemplateArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualMachineImageTemplateArgs Empty = new VirtualMachineImageTemplateArgs();

    /**
     * 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).
     * 
     */
    @Import(name="buildTimeoutInMinutes")
    private @Nullable 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 Optional> buildTimeoutInMinutes() {
        return Optional.ofNullable(this.buildTimeoutInMinutes);
    }

    /**
     * Specifies the properties used to describe the customization steps of the image, like Image source etc
     * 
     */
    @Import(name="customize")
    private @Nullable Output> customize;

    /**
     * @return Specifies the properties used to describe the customization steps of the image, like Image source etc
     * 
     */
    public Optional>> customize() {
        return Optional.ofNullable(this.customize);
    }

    /**
     * The distribution targets where the image output needs to go to.
     * 
     */
    @Import(name="distribute", required=true)
    private Output> distribute;

    /**
     * @return The distribution targets where the image output needs to go to.
     * 
     */
    public Output> distribute() {
        return this.distribute;
    }

    /**
     * The identity of the image template, if configured.
     * 
     */
    @Import(name="identity", required=true)
    private Output identity;

    /**
     * @return The identity of the image template, if configured.
     * 
     */
    public Output identity() {
        return this.identity;
    }

    /**
     * The name of the image Template
     * 
     */
    @Import(name="imageTemplateName")
    private @Nullable Output imageTemplateName;

    /**
     * @return The name of the image Template
     * 
     */
    public Optional> imageTemplateName() {
        return Optional.ofNullable(this.imageTemplateName);
    }

    /**
     * The geo-location where the resource lives
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The geo-location where the resource lives
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies optimization to be performed on image.
     * 
     */
    @Import(name="optimize")
    private @Nullable Output optimize;

    /**
     * @return Specifies optimization to be performed on image.
     * 
     */
    public Optional> optimize() {
        return Optional.ofNullable(this.optimize);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Specifies the properties used to describe the source image.
     * 
     */
    @Import(name="source", required=true)
    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.
     * 
     */
    @Import(name="stagingResourceGroup")
    private @Nullable 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 Optional> stagingResourceGroup() {
        return Optional.ofNullable(this.stagingResourceGroup);
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Configuration options and list of validations to be performed on the resulting image.
     * 
     */
    @Import(name="validate")
    private @Nullable Output validate;

    /**
     * @return Configuration options and list of validations to be performed on the resulting image.
     * 
     */
    public Optional> validate() {
        return Optional.ofNullable(this.validate);
    }

    /**
     * Describes how virtual machine is set up to build images
     * 
     */
    @Import(name="vmProfile")
    private @Nullable Output vmProfile;

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

    private VirtualMachineImageTemplateArgs() {}

    private VirtualMachineImageTemplateArgs(VirtualMachineImageTemplateArgs $) {
        this.buildTimeoutInMinutes = $.buildTimeoutInMinutes;
        this.customize = $.customize;
        this.distribute = $.distribute;
        this.identity = $.identity;
        this.imageTemplateName = $.imageTemplateName;
        this.location = $.location;
        this.optimize = $.optimize;
        this.resourceGroupName = $.resourceGroupName;
        this.source = $.source;
        this.stagingResourceGroup = $.stagingResourceGroup;
        this.tags = $.tags;
        this.validate = $.validate;
        this.vmProfile = $.vmProfile;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(VirtualMachineImageTemplateArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private VirtualMachineImageTemplateArgs $;

        public Builder() {
            $ = new VirtualMachineImageTemplateArgs();
        }

        public Builder(VirtualMachineImageTemplateArgs defaults) {
            $ = new VirtualMachineImageTemplateArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param buildTimeoutInMinutes 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).
         * 
         * @return builder
         * 
         */
        public Builder buildTimeoutInMinutes(@Nullable Output buildTimeoutInMinutes) {
            $.buildTimeoutInMinutes = buildTimeoutInMinutes;
            return this;
        }

        /**
         * @param buildTimeoutInMinutes 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).
         * 
         * @return builder
         * 
         */
        public Builder buildTimeoutInMinutes(Integer buildTimeoutInMinutes) {
            return buildTimeoutInMinutes(Output.of(buildTimeoutInMinutes));
        }

        /**
         * @param customize Specifies the properties used to describe the customization steps of the image, like Image source etc
         * 
         * @return builder
         * 
         */
        public Builder customize(@Nullable Output> customize) {
            $.customize = customize;
            return this;
        }

        /**
         * @param customize Specifies the properties used to describe the customization steps of the image, like Image source etc
         * 
         * @return builder
         * 
         */
        public Builder customize(List customize) {
            return customize(Output.of(customize));
        }

        /**
         * @param customize Specifies the properties used to describe the customization steps of the image, like Image source etc
         * 
         * @return builder
         * 
         */
        public Builder customize(Object... customize) {
            return customize(List.of(customize));
        }

        /**
         * @param distribute The distribution targets where the image output needs to go to.
         * 
         * @return builder
         * 
         */
        public Builder distribute(Output> distribute) {
            $.distribute = distribute;
            return this;
        }

        /**
         * @param distribute The distribution targets where the image output needs to go to.
         * 
         * @return builder
         * 
         */
        public Builder distribute(List distribute) {
            return distribute(Output.of(distribute));
        }

        /**
         * @param distribute The distribution targets where the image output needs to go to.
         * 
         * @return builder
         * 
         */
        public Builder distribute(Object... distribute) {
            return distribute(List.of(distribute));
        }

        /**
         * @param identity The identity of the image template, if configured.
         * 
         * @return builder
         * 
         */
        public Builder identity(Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity The identity of the image template, if configured.
         * 
         * @return builder
         * 
         */
        public Builder identity(ImageTemplateIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param imageTemplateName The name of the image Template
         * 
         * @return builder
         * 
         */
        public Builder imageTemplateName(@Nullable Output imageTemplateName) {
            $.imageTemplateName = imageTemplateName;
            return this;
        }

        /**
         * @param imageTemplateName The name of the image Template
         * 
         * @return builder
         * 
         */
        public Builder imageTemplateName(String imageTemplateName) {
            return imageTemplateName(Output.of(imageTemplateName));
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The geo-location where the resource lives
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param optimize Specifies optimization to be performed on image.
         * 
         * @return builder
         * 
         */
        public Builder optimize(@Nullable Output optimize) {
            $.optimize = optimize;
            return this;
        }

        /**
         * @param optimize Specifies optimization to be performed on image.
         * 
         * @return builder
         * 
         */
        public Builder optimize(ImageTemplatePropertiesOptimizeArgs optimize) {
            return optimize(Output.of(optimize));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param source Specifies the properties used to describe the source image.
         * 
         * @return builder
         * 
         */
        public Builder source(Output source) {
            $.source = source;
            return this;
        }

        /**
         * @param source Specifies the properties used to describe the source image.
         * 
         * @return builder
         * 
         */
        public Builder source(Object source) {
            return source(Output.of(source));
        }

        /**
         * @param stagingResourceGroup 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.
         * 
         * @return builder
         * 
         */
        public Builder stagingResourceGroup(@Nullable Output stagingResourceGroup) {
            $.stagingResourceGroup = stagingResourceGroup;
            return this;
        }

        /**
         * @param stagingResourceGroup 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.
         * 
         * @return builder
         * 
         */
        public Builder stagingResourceGroup(String stagingResourceGroup) {
            return stagingResourceGroup(Output.of(stagingResourceGroup));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param validate Configuration options and list of validations to be performed on the resulting image.
         * 
         * @return builder
         * 
         */
        public Builder validate(@Nullable Output validate) {
            $.validate = validate;
            return this;
        }

        /**
         * @param validate Configuration options and list of validations to be performed on the resulting image.
         * 
         * @return builder
         * 
         */
        public Builder validate(ImageTemplatePropertiesValidateArgs validate) {
            return validate(Output.of(validate));
        }

        /**
         * @param vmProfile Describes how virtual machine is set up to build images
         * 
         * @return builder
         * 
         */
        public Builder vmProfile(@Nullable Output vmProfile) {
            $.vmProfile = vmProfile;
            return this;
        }

        /**
         * @param vmProfile Describes how virtual machine is set up to build images
         * 
         * @return builder
         * 
         */
        public Builder vmProfile(ImageTemplateVmProfileArgs vmProfile) {
            return vmProfile(Output.of(vmProfile));
        }

        public VirtualMachineImageTemplateArgs build() {
            $.buildTimeoutInMinutes = Codegen.integerProp("buildTimeoutInMinutes").output().arg($.buildTimeoutInMinutes).def(0).getNullable();
            if ($.distribute == null) {
                throw new MissingRequiredPropertyException("VirtualMachineImageTemplateArgs", "distribute");
            }
            if ($.identity == null) {
                throw new MissingRequiredPropertyException("VirtualMachineImageTemplateArgs", "identity");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("VirtualMachineImageTemplateArgs", "resourceGroupName");
            }
            if ($.source == null) {
                throw new MissingRequiredPropertyException("VirtualMachineImageTemplateArgs", "source");
            }
            return $;
        }
    }

}