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

com.pulumi.azurenative.resources.AzurePowerShellScriptArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.resources;

import com.pulumi.azurenative.resources.enums.CleanupOptions;
import com.pulumi.azurenative.resources.inputs.ContainerConfigurationArgs;
import com.pulumi.azurenative.resources.inputs.EnvironmentVariableArgs;
import com.pulumi.azurenative.resources.inputs.ManagedServiceIdentityArgs;
import com.pulumi.azurenative.resources.inputs.StorageAccountConfigurationArgs;
import com.pulumi.core.Either;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AzurePowerShellScriptArgs Empty = new AzurePowerShellScriptArgs();

    /**
     * Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
     * 
     */
    @Import(name="arguments")
    private @Nullable Output arguments;

    /**
     * @return Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
     * 
     */
    public Optional> arguments() {
        return Optional.ofNullable(this.arguments);
    }

    /**
     * Azure PowerShell module version to be used.
     * 
     */
    @Import(name="azPowerShellVersion", required=true)
    private Output azPowerShellVersion;

    /**
     * @return Azure PowerShell module version to be used.
     * 
     */
    public Output azPowerShellVersion() {
        return this.azPowerShellVersion;
    }

    /**
     * The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
     * 
     */
    @Import(name="cleanupPreference")
    private @Nullable Output> cleanupPreference;

    /**
     * @return The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
     * 
     */
    public Optional>> cleanupPreference() {
        return Optional.ofNullable(this.cleanupPreference);
    }

    /**
     * Container settings.
     * 
     */
    @Import(name="containerSettings")
    private @Nullable Output containerSettings;

    /**
     * @return Container settings.
     * 
     */
    public Optional> containerSettings() {
        return Optional.ofNullable(this.containerSettings);
    }

    /**
     * The environment variables to pass over to the script.
     * 
     */
    @Import(name="environmentVariables")
    private @Nullable Output> environmentVariables;

    /**
     * @return The environment variables to pass over to the script.
     * 
     */
    public Optional>> environmentVariables() {
        return Optional.ofNullable(this.environmentVariables);
    }

    /**
     * Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID.
     * 
     */
    @Import(name="forceUpdateTag")
    private @Nullable Output forceUpdateTag;

    /**
     * @return Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID.
     * 
     */
    public Optional> forceUpdateTag() {
        return Optional.ofNullable(this.forceUpdateTag);
    }

    /**
     * Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * Type of the script.
     * Expected value is 'AzurePowerShell'.
     * 
     */
    @Import(name="kind", required=true)
    private Output kind;

    /**
     * @return Type of the script.
     * Expected value is 'AzurePowerShell'.
     * 
     */
    public Output kind() {
        return this.kind;
    }

    /**
     * The location of the ACI and the storage account for the deployment script.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location of the ACI and the storage account for the deployment script.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Uri for the script. This is the entry point for the external script.
     * 
     */
    @Import(name="primaryScriptUri")
    private @Nullable Output primaryScriptUri;

    /**
     * @return Uri for the script. This is the entry point for the external script.
     * 
     */
    public Optional> primaryScriptUri() {
        return Optional.ofNullable(this.primaryScriptUri);
    }

    /**
     * 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;
    }

    /**
     * Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day).
     * 
     */
    @Import(name="retentionInterval", required=true)
    private Output retentionInterval;

    /**
     * @return Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day).
     * 
     */
    public Output retentionInterval() {
        return this.retentionInterval;
    }

    /**
     * Script body.
     * 
     */
    @Import(name="scriptContent")
    private @Nullable Output scriptContent;

    /**
     * @return Script body.
     * 
     */
    public Optional> scriptContent() {
        return Optional.ofNullable(this.scriptContent);
    }

    /**
     * Name of the deployment script.
     * 
     */
    @Import(name="scriptName")
    private @Nullable Output scriptName;

    /**
     * @return Name of the deployment script.
     * 
     */
    public Optional> scriptName() {
        return Optional.ofNullable(this.scriptName);
    }

    /**
     * Storage Account settings.
     * 
     */
    @Import(name="storageAccountSettings")
    private @Nullable Output storageAccountSettings;

    /**
     * @return Storage Account settings.
     * 
     */
    public Optional> storageAccountSettings() {
        return Optional.ofNullable(this.storageAccountSettings);
    }

    /**
     * Supporting files for the external script.
     * 
     */
    @Import(name="supportingScriptUris")
    private @Nullable Output> supportingScriptUris;

    /**
     * @return Supporting files for the external script.
     * 
     */
    public Optional>> supportingScriptUris() {
        return Optional.ofNullable(this.supportingScriptUris);
    }

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

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

    /**
     * Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
     * 
     */
    @Import(name="timeout")
    private @Nullable Output timeout;

    /**
     * @return Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
     * 
     */
    public Optional> timeout() {
        return Optional.ofNullable(this.timeout);
    }

    private AzurePowerShellScriptArgs() {}

    private AzurePowerShellScriptArgs(AzurePowerShellScriptArgs $) {
        this.arguments = $.arguments;
        this.azPowerShellVersion = $.azPowerShellVersion;
        this.cleanupPreference = $.cleanupPreference;
        this.containerSettings = $.containerSettings;
        this.environmentVariables = $.environmentVariables;
        this.forceUpdateTag = $.forceUpdateTag;
        this.identity = $.identity;
        this.kind = $.kind;
        this.location = $.location;
        this.primaryScriptUri = $.primaryScriptUri;
        this.resourceGroupName = $.resourceGroupName;
        this.retentionInterval = $.retentionInterval;
        this.scriptContent = $.scriptContent;
        this.scriptName = $.scriptName;
        this.storageAccountSettings = $.storageAccountSettings;
        this.supportingScriptUris = $.supportingScriptUris;
        this.tags = $.tags;
        this.timeout = $.timeout;
    }

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

    public static final class Builder {
        private AzurePowerShellScriptArgs $;

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

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

        /**
         * @param arguments Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
         * 
         * @return builder
         * 
         */
        public Builder arguments(@Nullable Output arguments) {
            $.arguments = arguments;
            return this;
        }

        /**
         * @param arguments Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'
         * 
         * @return builder
         * 
         */
        public Builder arguments(String arguments) {
            return arguments(Output.of(arguments));
        }

        /**
         * @param azPowerShellVersion Azure PowerShell module version to be used.
         * 
         * @return builder
         * 
         */
        public Builder azPowerShellVersion(Output azPowerShellVersion) {
            $.azPowerShellVersion = azPowerShellVersion;
            return this;
        }

        /**
         * @param azPowerShellVersion Azure PowerShell module version to be used.
         * 
         * @return builder
         * 
         */
        public Builder azPowerShellVersion(String azPowerShellVersion) {
            return azPowerShellVersion(Output.of(azPowerShellVersion));
        }

        /**
         * @param cleanupPreference The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(@Nullable Output> cleanupPreference) {
            $.cleanupPreference = cleanupPreference;
            return this;
        }

        /**
         * @param cleanupPreference The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(Either cleanupPreference) {
            return cleanupPreference(Output.of(cleanupPreference));
        }

        /**
         * @param cleanupPreference The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(String cleanupPreference) {
            return cleanupPreference(Either.ofLeft(cleanupPreference));
        }

        /**
         * @param cleanupPreference The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(CleanupOptions cleanupPreference) {
            return cleanupPreference(Either.ofRight(cleanupPreference));
        }

        /**
         * @param containerSettings Container settings.
         * 
         * @return builder
         * 
         */
        public Builder containerSettings(@Nullable Output containerSettings) {
            $.containerSettings = containerSettings;
            return this;
        }

        /**
         * @param containerSettings Container settings.
         * 
         * @return builder
         * 
         */
        public Builder containerSettings(ContainerConfigurationArgs containerSettings) {
            return containerSettings(Output.of(containerSettings));
        }

        /**
         * @param environmentVariables The environment variables to pass over to the script.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(@Nullable Output> environmentVariables) {
            $.environmentVariables = environmentVariables;
            return this;
        }

        /**
         * @param environmentVariables The environment variables to pass over to the script.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(List environmentVariables) {
            return environmentVariables(Output.of(environmentVariables));
        }

        /**
         * @param environmentVariables The environment variables to pass over to the script.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(EnvironmentVariableArgs... environmentVariables) {
            return environmentVariables(List.of(environmentVariables));
        }

        /**
         * @param forceUpdateTag Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(@Nullable Output forceUpdateTag) {
            $.forceUpdateTag = forceUpdateTag;
            return this;
        }

        /**
         * @param forceUpdateTag Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(String forceUpdateTag) {
            return forceUpdateTag(Output.of(forceUpdateTag));
        }

        /**
         * @param identity Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.
         * 
         * @return builder
         * 
         */
        public Builder identity(ManagedServiceIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param kind Type of the script.
         * Expected value is 'AzurePowerShell'.
         * 
         * @return builder
         * 
         */
        public Builder kind(Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Type of the script.
         * Expected value is 'AzurePowerShell'.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param location The location of the ACI and the storage account for the deployment script.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the ACI and the storage account for the deployment script.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param primaryScriptUri Uri for the script. This is the entry point for the external script.
         * 
         * @return builder
         * 
         */
        public Builder primaryScriptUri(@Nullable Output primaryScriptUri) {
            $.primaryScriptUri = primaryScriptUri;
            return this;
        }

        /**
         * @param primaryScriptUri Uri for the script. This is the entry point for the external script.
         * 
         * @return builder
         * 
         */
        public Builder primaryScriptUri(String primaryScriptUri) {
            return primaryScriptUri(Output.of(primaryScriptUri));
        }

        /**
         * @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 retentionInterval Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day).
         * 
         * @return builder
         * 
         */
        public Builder retentionInterval(Output retentionInterval) {
            $.retentionInterval = retentionInterval;
            return this;
        }

        /**
         * @param retentionInterval Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day).
         * 
         * @return builder
         * 
         */
        public Builder retentionInterval(String retentionInterval) {
            return retentionInterval(Output.of(retentionInterval));
        }

        /**
         * @param scriptContent Script body.
         * 
         * @return builder
         * 
         */
        public Builder scriptContent(@Nullable Output scriptContent) {
            $.scriptContent = scriptContent;
            return this;
        }

        /**
         * @param scriptContent Script body.
         * 
         * @return builder
         * 
         */
        public Builder scriptContent(String scriptContent) {
            return scriptContent(Output.of(scriptContent));
        }

        /**
         * @param scriptName Name of the deployment script.
         * 
         * @return builder
         * 
         */
        public Builder scriptName(@Nullable Output scriptName) {
            $.scriptName = scriptName;
            return this;
        }

        /**
         * @param scriptName Name of the deployment script.
         * 
         * @return builder
         * 
         */
        public Builder scriptName(String scriptName) {
            return scriptName(Output.of(scriptName));
        }

        /**
         * @param storageAccountSettings Storage Account settings.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountSettings(@Nullable Output storageAccountSettings) {
            $.storageAccountSettings = storageAccountSettings;
            return this;
        }

        /**
         * @param storageAccountSettings Storage Account settings.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountSettings(StorageAccountConfigurationArgs storageAccountSettings) {
            return storageAccountSettings(Output.of(storageAccountSettings));
        }

        /**
         * @param supportingScriptUris Supporting files for the external script.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(@Nullable Output> supportingScriptUris) {
            $.supportingScriptUris = supportingScriptUris;
            return this;
        }

        /**
         * @param supportingScriptUris Supporting files for the external script.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(List supportingScriptUris) {
            return supportingScriptUris(Output.of(supportingScriptUris));
        }

        /**
         * @param supportingScriptUris Supporting files for the external script.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(String... supportingScriptUris) {
            return supportingScriptUris(List.of(supportingScriptUris));
        }

        /**
         * @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 timeout Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
         * 
         * @return builder
         * 
         */
        public Builder timeout(@Nullable Output timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D
         * 
         * @return builder
         * 
         */
        public Builder timeout(String timeout) {
            return timeout(Output.of(timeout));
        }

        public AzurePowerShellScriptArgs build() {
            if ($.azPowerShellVersion == null) {
                throw new MissingRequiredPropertyException("AzurePowerShellScriptArgs", "azPowerShellVersion");
            }
            $.cleanupPreference = Codegen.stringProp("cleanupPreference").left(CleanupOptions.class).output().arg($.cleanupPreference).def("Always").getNullable();
            $.kind = Codegen.stringProp("kind").output().arg($.kind).require();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("AzurePowerShellScriptArgs", "resourceGroupName");
            }
            if ($.retentionInterval == null) {
                throw new MissingRequiredPropertyException("AzurePowerShellScriptArgs", "retentionInterval");
            }
            $.timeout = Codegen.stringProp("timeout").output().arg($.timeout).def("P1D").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy