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

com.pulumi.azurenative.avs.ScriptExecutionArgs 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.avs;

import com.pulumi.azurenative.avs.inputs.PSCredentialExecutionParameterArgs;
import com.pulumi.azurenative.avs.inputs.ScriptSecureStringExecutionParameterArgs;
import com.pulumi.azurenative.avs.inputs.ScriptStringExecutionParameterArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 ScriptExecutionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ScriptExecutionArgs Empty = new ScriptExecutionArgs();

    /**
     * Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
     * 
     */
    @Import(name="failureReason")
    private @Nullable Output failureReason;

    /**
     * @return Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
     * 
     */
    public Optional> failureReason() {
        return Optional.ofNullable(this.failureReason);
    }

    /**
     * Parameters that will be hidden/not visible to ARM, such as passwords and credentials
     * 
     */
    @Import(name="hiddenParameters")
    private @Nullable Output> hiddenParameters;

    /**
     * @return Parameters that will be hidden/not visible to ARM, such as passwords and credentials
     * 
     */
    public Optional>> hiddenParameters() {
        return Optional.ofNullable(this.hiddenParameters);
    }

    /**
     * User-defined dictionary.
     * 
     */
    @Import(name="namedOutputs")
    private @Nullable Output> namedOutputs;

    /**
     * @return User-defined dictionary.
     * 
     */
    public Optional>> namedOutputs() {
        return Optional.ofNullable(this.namedOutputs);
    }

    /**
     * Standard output stream from the powershell execution
     * 
     */
    @Import(name="output")
    private @Nullable Output> output;

    /**
     * @return Standard output stream from the powershell execution
     * 
     */
    public Optional>> output() {
        return Optional.ofNullable(this.output);
    }

    /**
     * Parameters the script will accept
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return Parameters the script will accept
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The name of the private cloud.
     * 
     */
    @Import(name="privateCloudName", required=true)
    private Output privateCloudName;

    /**
     * @return The name of the private cloud.
     * 
     */
    public Output privateCloudName() {
        return this.privateCloudName;
    }

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

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

    /**
     * Time to live for the resource. If not provided, will be available for 60 days
     * 
     */
    @Import(name="retention")
    private @Nullable Output retention;

    /**
     * @return Time to live for the resource. If not provided, will be available for 60 days
     * 
     */
    public Optional> retention() {
        return Optional.ofNullable(this.retention);
    }

    /**
     * A reference to the script cmdlet resource if user is running a AVS script
     * 
     */
    @Import(name="scriptCmdletId")
    private @Nullable Output scriptCmdletId;

    /**
     * @return A reference to the script cmdlet resource if user is running a AVS script
     * 
     */
    public Optional> scriptCmdletId() {
        return Optional.ofNullable(this.scriptCmdletId);
    }

    /**
     * Name of the user-invoked script execution resource
     * 
     */
    @Import(name="scriptExecutionName")
    private @Nullable Output scriptExecutionName;

    /**
     * @return Name of the user-invoked script execution resource
     * 
     */
    public Optional> scriptExecutionName() {
        return Optional.ofNullable(this.scriptExecutionName);
    }

    /**
     * Time limit for execution
     * 
     */
    @Import(name="timeout", required=true)
    private Output timeout;

    /**
     * @return Time limit for execution
     * 
     */
    public Output timeout() {
        return this.timeout;
    }

    private ScriptExecutionArgs() {}

    private ScriptExecutionArgs(ScriptExecutionArgs $) {
        this.failureReason = $.failureReason;
        this.hiddenParameters = $.hiddenParameters;
        this.namedOutputs = $.namedOutputs;
        this.output = $.output;
        this.parameters = $.parameters;
        this.privateCloudName = $.privateCloudName;
        this.resourceGroupName = $.resourceGroupName;
        this.retention = $.retention;
        this.scriptCmdletId = $.scriptCmdletId;
        this.scriptExecutionName = $.scriptExecutionName;
        this.timeout = $.timeout;
    }

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

    public static final class Builder {
        private ScriptExecutionArgs $;

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

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

        /**
         * @param failureReason Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
         * 
         * @return builder
         * 
         */
        public Builder failureReason(@Nullable Output failureReason) {
            $.failureReason = failureReason;
            return this;
        }

        /**
         * @param failureReason Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
         * 
         * @return builder
         * 
         */
        public Builder failureReason(String failureReason) {
            return failureReason(Output.of(failureReason));
        }

        /**
         * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and credentials
         * 
         * @return builder
         * 
         */
        public Builder hiddenParameters(@Nullable Output> hiddenParameters) {
            $.hiddenParameters = hiddenParameters;
            return this;
        }

        /**
         * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and credentials
         * 
         * @return builder
         * 
         */
        public Builder hiddenParameters(List hiddenParameters) {
            return hiddenParameters(Output.of(hiddenParameters));
        }

        /**
         * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and credentials
         * 
         * @return builder
         * 
         */
        public Builder hiddenParameters(Object... hiddenParameters) {
            return hiddenParameters(List.of(hiddenParameters));
        }

        /**
         * @param namedOutputs User-defined dictionary.
         * 
         * @return builder
         * 
         */
        public Builder namedOutputs(@Nullable Output> namedOutputs) {
            $.namedOutputs = namedOutputs;
            return this;
        }

        /**
         * @param namedOutputs User-defined dictionary.
         * 
         * @return builder
         * 
         */
        public Builder namedOutputs(Map namedOutputs) {
            return namedOutputs(Output.of(namedOutputs));
        }

        /**
         * @param output Standard output stream from the powershell execution
         * 
         * @return builder
         * 
         */
        public Builder output(@Nullable Output> output) {
            $.output = output;
            return this;
        }

        /**
         * @param output Standard output stream from the powershell execution
         * 
         * @return builder
         * 
         */
        public Builder output(List output) {
            return output(Output.of(output));
        }

        /**
         * @param output Standard output stream from the powershell execution
         * 
         * @return builder
         * 
         */
        public Builder output(String... output) {
            return output(List.of(output));
        }

        /**
         * @param parameters Parameters the script will accept
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters Parameters the script will accept
         * 
         * @return builder
         * 
         */
        public Builder parameters(List parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param parameters Parameters the script will accept
         * 
         * @return builder
         * 
         */
        public Builder parameters(Object... parameters) {
            return parameters(List.of(parameters));
        }

        /**
         * @param privateCloudName The name of the private cloud.
         * 
         * @return builder
         * 
         */
        public Builder privateCloudName(Output privateCloudName) {
            $.privateCloudName = privateCloudName;
            return this;
        }

        /**
         * @param privateCloudName The name of the private cloud.
         * 
         * @return builder
         * 
         */
        public Builder privateCloudName(String privateCloudName) {
            return privateCloudName(Output.of(privateCloudName));
        }

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

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

        /**
         * @param retention Time to live for the resource. If not provided, will be available for 60 days
         * 
         * @return builder
         * 
         */
        public Builder retention(@Nullable Output retention) {
            $.retention = retention;
            return this;
        }

        /**
         * @param retention Time to live for the resource. If not provided, will be available for 60 days
         * 
         * @return builder
         * 
         */
        public Builder retention(String retention) {
            return retention(Output.of(retention));
        }

        /**
         * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script
         * 
         * @return builder
         * 
         */
        public Builder scriptCmdletId(@Nullable Output scriptCmdletId) {
            $.scriptCmdletId = scriptCmdletId;
            return this;
        }

        /**
         * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script
         * 
         * @return builder
         * 
         */
        public Builder scriptCmdletId(String scriptCmdletId) {
            return scriptCmdletId(Output.of(scriptCmdletId));
        }

        /**
         * @param scriptExecutionName Name of the user-invoked script execution resource
         * 
         * @return builder
         * 
         */
        public Builder scriptExecutionName(@Nullable Output scriptExecutionName) {
            $.scriptExecutionName = scriptExecutionName;
            return this;
        }

        /**
         * @param scriptExecutionName Name of the user-invoked script execution resource
         * 
         * @return builder
         * 
         */
        public Builder scriptExecutionName(String scriptExecutionName) {
            return scriptExecutionName(Output.of(scriptExecutionName));
        }

        /**
         * @param timeout Time limit for execution
         * 
         * @return builder
         * 
         */
        public Builder timeout(Output timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout Time limit for execution
         * 
         * @return builder
         * 
         */
        public Builder timeout(String timeout) {
            return timeout(Output.of(timeout));
        }

        public ScriptExecutionArgs build() {
            if ($.privateCloudName == null) {
                throw new MissingRequiredPropertyException("ScriptExecutionArgs", "privateCloudName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ScriptExecutionArgs", "resourceGroupName");
            }
            if ($.timeout == null) {
                throw new MissingRequiredPropertyException("ScriptExecutionArgs", "timeout");
            }
            return $;
        }
    }

}