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

com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateShellValidatorArgs Maven / Gradle / Ivy

The 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.inputs;

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.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
 * 
 */
public final class ImageTemplateShellValidatorArgs extends com.pulumi.resources.ResourceArgs {

    public static final ImageTemplateShellValidatorArgs Empty = new ImageTemplateShellValidatorArgs();

    /**
     * Array of shell commands to execute
     * 
     */
    @Import(name="inline")
    private @Nullable Output> inline;

    /**
     * @return Array of shell commands to execute
     * 
     */
    public Optional>> inline() {
        return Optional.ofNullable(this.inline);
    }

    /**
     * Friendly Name to provide context on what this validation step does
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Friendly Name to provide context on what this validation step does
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc
     * 
     */
    @Import(name="scriptUri")
    private @Nullable Output scriptUri;

    /**
     * @return URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc
     * 
     */
    public Optional> scriptUri() {
        return Optional.ofNullable(this.scriptUri);
    }

    /**
     * SHA256 checksum of the shell script provided in the scriptUri field
     * 
     */
    @Import(name="sha256Checksum")
    private @Nullable Output sha256Checksum;

    /**
     * @return SHA256 checksum of the shell script provided in the scriptUri field
     * 
     */
    public Optional> sha256Checksum() {
        return Optional.ofNullable(this.sha256Checksum);
    }

    /**
     * The type of validation you want to use on the Image. For example, "Shell" can be shell validation
     * Expected value is 'Shell'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of validation you want to use on the Image. For example, "Shell" can be shell validation
     * Expected value is 'Shell'.
     * 
     */
    public Output type() {
        return this.type;
    }

    private ImageTemplateShellValidatorArgs() {}

    private ImageTemplateShellValidatorArgs(ImageTemplateShellValidatorArgs $) {
        this.inline = $.inline;
        this.name = $.name;
        this.scriptUri = $.scriptUri;
        this.sha256Checksum = $.sha256Checksum;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ImageTemplateShellValidatorArgs $;

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

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

        /**
         * @param inline Array of shell commands to execute
         * 
         * @return builder
         * 
         */
        public Builder inline(@Nullable Output> inline) {
            $.inline = inline;
            return this;
        }

        /**
         * @param inline Array of shell commands to execute
         * 
         * @return builder
         * 
         */
        public Builder inline(List inline) {
            return inline(Output.of(inline));
        }

        /**
         * @param inline Array of shell commands to execute
         * 
         * @return builder
         * 
         */
        public Builder inline(String... inline) {
            return inline(List.of(inline));
        }

        /**
         * @param name Friendly Name to provide context on what this validation step does
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Friendly Name to provide context on what this validation step does
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param scriptUri URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc
         * 
         * @return builder
         * 
         */
        public Builder scriptUri(@Nullable Output scriptUri) {
            $.scriptUri = scriptUri;
            return this;
        }

        /**
         * @param scriptUri URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc
         * 
         * @return builder
         * 
         */
        public Builder scriptUri(String scriptUri) {
            return scriptUri(Output.of(scriptUri));
        }

        /**
         * @param sha256Checksum SHA256 checksum of the shell script provided in the scriptUri field
         * 
         * @return builder
         * 
         */
        public Builder sha256Checksum(@Nullable Output sha256Checksum) {
            $.sha256Checksum = sha256Checksum;
            return this;
        }

        /**
         * @param sha256Checksum SHA256 checksum of the shell script provided in the scriptUri field
         * 
         * @return builder
         * 
         */
        public Builder sha256Checksum(String sha256Checksum) {
            return sha256Checksum(Output.of(sha256Checksum));
        }

        /**
         * @param type The type of validation you want to use on the Image. For example, "Shell" can be shell validation
         * Expected value is 'Shell'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of validation you want to use on the Image. For example, "Shell" can be shell validation
         * Expected value is 'Shell'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public ImageTemplateShellValidatorArgs build() {
            $.sha256Checksum = Codegen.stringProp("sha256Checksum").output().arg($.sha256Checksum).def("").getNullable();
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy