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

com.pulumi.azure.core.ResourceDeploymentScriptPowerShellArgs 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.azure.core;

import com.pulumi.azure.core.inputs.ResourceDeploymentScriptPowerShellContainerArgs;
import com.pulumi.azure.core.inputs.ResourceDeploymentScriptPowerShellEnvironmentVariableArgs;
import com.pulumi.azure.core.inputs.ResourceDeploymentScriptPowerShellIdentityArgs;
import com.pulumi.azure.core.inputs.ResourceDeploymentScriptPowerShellStorageAccountArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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 ResourceDeploymentScriptPowerShellArgs extends com.pulumi.resources.ResourceArgs {

    public static final ResourceDeploymentScriptPowerShellArgs Empty = new ResourceDeploymentScriptPowerShellArgs();

    /**
     * Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="cleanupPreference")
    private @Nullable Output cleanupPreference;

    /**
     * @return Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> cleanupPreference() {
        return Optional.ofNullable(this.cleanupPreference);
    }

    /**
     * Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="commandLine")
    private @Nullable Output commandLine;

    /**
     * @return Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> commandLine() {
        return Optional.ofNullable(this.commandLine);
    }

    /**
     * A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="container")
    private @Nullable Output container;

    /**
     * @return A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> container() {
        return Optional.ofNullable(this.container);
    }

    /**
     * An `environment_variable` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="environmentVariables")
    private @Nullable Output> environmentVariables;

    /**
     * @return An `environment_variable` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    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. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @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. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> forceUpdateTag() {
        return Optional.ofNullable(this.forceUpdateTag);
    }

    /**
     * An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="primaryScriptUri")
    private @Nullable Output primaryScriptUri;

    /**
     * @return Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> primaryScriptUri() {
        return Optional.ofNullable(this.primaryScriptUri);
    }

    /**
     * Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    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. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @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. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Output retentionInterval() {
        return this.retentionInterval;
    }

    /**
     * Script body. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="scriptContent")
    private @Nullable Output scriptContent;

    /**
     * @return Script body. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> scriptContent() {
        return Optional.ofNullable(this.scriptContent);
    }

    /**
     * A `storage_account` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="storageAccount")
    private @Nullable Output storageAccount;

    /**
     * @return A `storage_account` block as defined below. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> storageAccount() {
        return Optional.ofNullable(this.storageAccount);
    }

    /**
     * Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="supportingScriptUris")
    private @Nullable Output> supportingScriptUris;

    /**
     * @return Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional>> supportingScriptUris() {
        return Optional.ofNullable(this.supportingScriptUris);
    }

    /**
     * A mapping of tags which should be assigned to the Resource Deployment Script.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags which should be assigned to the Resource Deployment Script.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="timeout")
    private @Nullable Output timeout;

    /**
     * @return Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Optional> timeout() {
        return Optional.ofNullable(this.timeout);
    }

    /**
     * Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    @Import(name="version", required=true)
    private Output version;

    /**
     * @return Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created.
     * 
     */
    public Output version() {
        return this.version;
    }

    private ResourceDeploymentScriptPowerShellArgs() {}

    private ResourceDeploymentScriptPowerShellArgs(ResourceDeploymentScriptPowerShellArgs $) {
        this.cleanupPreference = $.cleanupPreference;
        this.commandLine = $.commandLine;
        this.container = $.container;
        this.environmentVariables = $.environmentVariables;
        this.forceUpdateTag = $.forceUpdateTag;
        this.identity = $.identity;
        this.location = $.location;
        this.name = $.name;
        this.primaryScriptUri = $.primaryScriptUri;
        this.resourceGroupName = $.resourceGroupName;
        this.retentionInterval = $.retentionInterval;
        this.scriptContent = $.scriptContent;
        this.storageAccount = $.storageAccount;
        this.supportingScriptUris = $.supportingScriptUris;
        this.tags = $.tags;
        this.timeout = $.timeout;
        this.version = $.version;
    }

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

    public static final class Builder {
        private ResourceDeploymentScriptPowerShellArgs $;

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

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

        /**
         * @param cleanupPreference Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(@Nullable Output cleanupPreference) {
            $.cleanupPreference = cleanupPreference;
            return this;
        }

        /**
         * @param cleanupPreference Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are `Always`, `OnExpiration`, `OnSuccess`. Defaults to `Always`. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder cleanupPreference(String cleanupPreference) {
            return cleanupPreference(Output.of(cleanupPreference));
        }

        /**
         * @param commandLine Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder commandLine(@Nullable Output commandLine) {
            $.commandLine = commandLine;
            return this;
        }

        /**
         * @param commandLine Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder commandLine(String commandLine) {
            return commandLine(Output.of(commandLine));
        }

        /**
         * @param container A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder container(@Nullable Output container) {
            $.container = container;
            return this;
        }

        /**
         * @param container A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder container(ResourceDeploymentScriptPowerShellContainerArgs container) {
            return container(Output.of(container));
        }

        /**
         * @param environmentVariables An `environment_variable` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(@Nullable Output> environmentVariables) {
            $.environmentVariables = environmentVariables;
            return this;
        }

        /**
         * @param environmentVariables An `environment_variable` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(List environmentVariables) {
            return environmentVariables(Output.of(environmentVariables));
        }

        /**
         * @param environmentVariables An `environment_variable` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder environmentVariables(ResourceDeploymentScriptPowerShellEnvironmentVariableArgs... 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. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @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. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder forceUpdateTag(String forceUpdateTag) {
            return forceUpdateTag(Output.of(forceUpdateTag));
        }

        /**
         * @param identity An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder identity(ResourceDeploymentScriptPowerShellIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param location Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param primaryScriptUri Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @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. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder primaryScriptUri(String primaryScriptUri) {
            return primaryScriptUri(Output.of(primaryScriptUri));
        }

        /**
         * @param resourceGroupName Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @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. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @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. The time duration should be between `1` hour and `26` hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder retentionInterval(String retentionInterval) {
            return retentionInterval(Output.of(retentionInterval));
        }

        /**
         * @param scriptContent Script body. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder scriptContent(@Nullable Output scriptContent) {
            $.scriptContent = scriptContent;
            return this;
        }

        /**
         * @param scriptContent Script body. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder scriptContent(String scriptContent) {
            return scriptContent(Output.of(scriptContent));
        }

        /**
         * @param storageAccount A `storage_account` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageAccount(@Nullable Output storageAccount) {
            $.storageAccount = storageAccount;
            return this;
        }

        /**
         * @param storageAccount A `storage_account` block as defined below. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder storageAccount(ResourceDeploymentScriptPowerShellStorageAccountArgs storageAccount) {
            return storageAccount(Output.of(storageAccount));
        }

        /**
         * @param supportingScriptUris Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(@Nullable Output> supportingScriptUris) {
            $.supportingScriptUris = supportingScriptUris;
            return this;
        }

        /**
         * @param supportingScriptUris Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(List supportingScriptUris) {
            return supportingScriptUris(Output.of(supportingScriptUris));
        }

        /**
         * @param supportingScriptUris Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder supportingScriptUris(String... supportingScriptUris) {
            return supportingScriptUris(List.of(supportingScriptUris));
        }

        /**
         * @param tags A mapping of tags which should be assigned to the Resource Deployment Script.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags which should be assigned to the Resource Deployment Script.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param timeout Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder timeout(@Nullable Output timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to `P1D`. Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder timeout(String timeout) {
            return timeout(Output.of(timeout));
        }

        /**
         * @param version Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(Output version) {
            $.version = version;
            return this;
        }

        /**
         * @param version Specifies the version of the Azure PowerShell that should be used in the format `X.Y` (e.g. `9.7`). A canonical list of versions [is available from the Microsoft Container Registry API](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public ResourceDeploymentScriptPowerShellArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ResourceDeploymentScriptPowerShellArgs", "resourceGroupName");
            }
            if ($.retentionInterval == null) {
                throw new MissingRequiredPropertyException("ResourceDeploymentScriptPowerShellArgs", "retentionInterval");
            }
            if ($.version == null) {
                throw new MissingRequiredPropertyException("ResourceDeploymentScriptPowerShellArgs", "version");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy