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

com.pulumi.azurenative.hybridcompute.MachineRunCommandArgs 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.hybridcompute;

import com.pulumi.azurenative.hybridcompute.inputs.MachineRunCommandScriptSourceArgs;
import com.pulumi.azurenative.hybridcompute.inputs.RunCommandInputParameterArgs;
import com.pulumi.azurenative.hybridcompute.inputs.RunCommandManagedIdentityArgs;
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.Boolean;
import java.lang.Integer;
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 MachineRunCommandArgs extends com.pulumi.resources.ResourceArgs {

    public static final MachineRunCommandArgs Empty = new MachineRunCommandArgs();

    /**
     * Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
     * 
     */
    @Import(name="asyncExecution")
    private @Nullable Output asyncExecution;

    /**
     * @return Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
     * 
     */
    public Optional> asyncExecution() {
        return Optional.ofNullable(this.asyncExecution);
    }

    /**
     * User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     * 
     */
    @Import(name="errorBlobManagedIdentity")
    private @Nullable Output errorBlobManagedIdentity;

    /**
     * @return User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     * 
     */
    public Optional> errorBlobManagedIdentity() {
        return Optional.ofNullable(this.errorBlobManagedIdentity);
    }

    /**
     * Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
     * 
     */
    @Import(name="errorBlobUri")
    private @Nullable Output errorBlobUri;

    /**
     * @return Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
     * 
     */
    public Optional> errorBlobUri() {
        return Optional.ofNullable(this.errorBlobUri);
    }

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

    /**
     * The name of the hybrid machine.
     * 
     */
    @Import(name="machineName", required=true)
    private Output machineName;

    /**
     * @return The name of the hybrid machine.
     * 
     */
    public Output machineName() {
        return this.machineName;
    }

    /**
     * User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     * 
     */
    @Import(name="outputBlobManagedIdentity")
    private @Nullable Output outputBlobManagedIdentity;

    /**
     * @return User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     * 
     */
    public Optional> outputBlobManagedIdentity() {
        return Optional.ofNullable(this.outputBlobManagedIdentity);
    }

    /**
     * Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
     * 
     */
    @Import(name="outputBlobUri")
    private @Nullable Output outputBlobUri;

    /**
     * @return Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
     * 
     */
    public Optional> outputBlobUri() {
        return Optional.ofNullable(this.outputBlobUri);
    }

    /**
     * The parameters used by the script.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return The parameters used by the script.
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The parameters used by the script.
     * 
     */
    @Import(name="protectedParameters")
    private @Nullable Output> protectedParameters;

    /**
     * @return The parameters used by the script.
     * 
     */
    public Optional>> protectedParameters() {
        return Optional.ofNullable(this.protectedParameters);
    }

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

    /**
     * Specifies the user account password on the machine when executing the run command.
     * 
     */
    @Import(name="runAsPassword")
    private @Nullable Output runAsPassword;

    /**
     * @return Specifies the user account password on the machine when executing the run command.
     * 
     */
    public Optional> runAsPassword() {
        return Optional.ofNullable(this.runAsPassword);
    }

    /**
     * Specifies the user account on the machine when executing the run command.
     * 
     */
    @Import(name="runAsUser")
    private @Nullable Output runAsUser;

    /**
     * @return Specifies the user account on the machine when executing the run command.
     * 
     */
    public Optional> runAsUser() {
        return Optional.ofNullable(this.runAsUser);
    }

    /**
     * The name of the run command.
     * 
     */
    @Import(name="runCommandName")
    private @Nullable Output runCommandName;

    /**
     * @return The name of the run command.
     * 
     */
    public Optional> runCommandName() {
        return Optional.ofNullable(this.runCommandName);
    }

    /**
     * The source of the run command script.
     * 
     */
    @Import(name="source")
    private @Nullable Output source;

    /**
     * @return The source of the run command script.
     * 
     */
    public Optional> source() {
        return Optional.ofNullable(this.source);
    }

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

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

    /**
     * The timeout in seconds to execute the run command.
     * 
     */
    @Import(name="timeoutInSeconds")
    private @Nullable Output timeoutInSeconds;

    /**
     * @return The timeout in seconds to execute the run command.
     * 
     */
    public Optional> timeoutInSeconds() {
        return Optional.ofNullable(this.timeoutInSeconds);
    }

    private MachineRunCommandArgs() {}

    private MachineRunCommandArgs(MachineRunCommandArgs $) {
        this.asyncExecution = $.asyncExecution;
        this.errorBlobManagedIdentity = $.errorBlobManagedIdentity;
        this.errorBlobUri = $.errorBlobUri;
        this.location = $.location;
        this.machineName = $.machineName;
        this.outputBlobManagedIdentity = $.outputBlobManagedIdentity;
        this.outputBlobUri = $.outputBlobUri;
        this.parameters = $.parameters;
        this.protectedParameters = $.protectedParameters;
        this.resourceGroupName = $.resourceGroupName;
        this.runAsPassword = $.runAsPassword;
        this.runAsUser = $.runAsUser;
        this.runCommandName = $.runCommandName;
        this.source = $.source;
        this.tags = $.tags;
        this.timeoutInSeconds = $.timeoutInSeconds;
    }

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

    public static final class Builder {
        private MachineRunCommandArgs $;

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

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

        /**
         * @param asyncExecution Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
         * 
         * @return builder
         * 
         */
        public Builder asyncExecution(@Nullable Output asyncExecution) {
            $.asyncExecution = asyncExecution;
            return this;
        }

        /**
         * @param asyncExecution Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
         * 
         * @return builder
         * 
         */
        public Builder asyncExecution(Boolean asyncExecution) {
            return asyncExecution(Output.of(asyncExecution));
        }

        /**
         * @param errorBlobManagedIdentity User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
         * 
         * @return builder
         * 
         */
        public Builder errorBlobManagedIdentity(@Nullable Output errorBlobManagedIdentity) {
            $.errorBlobManagedIdentity = errorBlobManagedIdentity;
            return this;
        }

        /**
         * @param errorBlobManagedIdentity User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
         * 
         * @return builder
         * 
         */
        public Builder errorBlobManagedIdentity(RunCommandManagedIdentityArgs errorBlobManagedIdentity) {
            return errorBlobManagedIdentity(Output.of(errorBlobManagedIdentity));
        }

        /**
         * @param errorBlobUri Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
         * 
         * @return builder
         * 
         */
        public Builder errorBlobUri(@Nullable Output errorBlobUri) {
            $.errorBlobUri = errorBlobUri;
            return this;
        }

        /**
         * @param errorBlobUri Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
         * 
         * @return builder
         * 
         */
        public Builder errorBlobUri(String errorBlobUri) {
            return errorBlobUri(Output.of(errorBlobUri));
        }

        /**
         * @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 machineName The name of the hybrid machine.
         * 
         * @return builder
         * 
         */
        public Builder machineName(Output machineName) {
            $.machineName = machineName;
            return this;
        }

        /**
         * @param machineName The name of the hybrid machine.
         * 
         * @return builder
         * 
         */
        public Builder machineName(String machineName) {
            return machineName(Output.of(machineName));
        }

        /**
         * @param outputBlobManagedIdentity User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
         * 
         * @return builder
         * 
         */
        public Builder outputBlobManagedIdentity(@Nullable Output outputBlobManagedIdentity) {
            $.outputBlobManagedIdentity = outputBlobManagedIdentity;
            return this;
        }

        /**
         * @param outputBlobManagedIdentity User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
         * 
         * @return builder
         * 
         */
        public Builder outputBlobManagedIdentity(RunCommandManagedIdentityArgs outputBlobManagedIdentity) {
            return outputBlobManagedIdentity(Output.of(outputBlobManagedIdentity));
        }

        /**
         * @param outputBlobUri Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
         * 
         * @return builder
         * 
         */
        public Builder outputBlobUri(@Nullable Output outputBlobUri) {
            $.outputBlobUri = outputBlobUri;
            return this;
        }

        /**
         * @param outputBlobUri Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
         * 
         * @return builder
         * 
         */
        public Builder outputBlobUri(String outputBlobUri) {
            return outputBlobUri(Output.of(outputBlobUri));
        }

        /**
         * @param parameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder parameters(List parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param parameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder parameters(RunCommandInputParameterArgs... parameters) {
            return parameters(List.of(parameters));
        }

        /**
         * @param protectedParameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder protectedParameters(@Nullable Output> protectedParameters) {
            $.protectedParameters = protectedParameters;
            return this;
        }

        /**
         * @param protectedParameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder protectedParameters(List protectedParameters) {
            return protectedParameters(Output.of(protectedParameters));
        }

        /**
         * @param protectedParameters The parameters used by the script.
         * 
         * @return builder
         * 
         */
        public Builder protectedParameters(RunCommandInputParameterArgs... protectedParameters) {
            return protectedParameters(List.of(protectedParameters));
        }

        /**
         * @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 runAsPassword Specifies the user account password on the machine when executing the run command.
         * 
         * @return builder
         * 
         */
        public Builder runAsPassword(@Nullable Output runAsPassword) {
            $.runAsPassword = runAsPassword;
            return this;
        }

        /**
         * @param runAsPassword Specifies the user account password on the machine when executing the run command.
         * 
         * @return builder
         * 
         */
        public Builder runAsPassword(String runAsPassword) {
            return runAsPassword(Output.of(runAsPassword));
        }

        /**
         * @param runAsUser Specifies the user account on the machine when executing the run command.
         * 
         * @return builder
         * 
         */
        public Builder runAsUser(@Nullable Output runAsUser) {
            $.runAsUser = runAsUser;
            return this;
        }

        /**
         * @param runAsUser Specifies the user account on the machine when executing the run command.
         * 
         * @return builder
         * 
         */
        public Builder runAsUser(String runAsUser) {
            return runAsUser(Output.of(runAsUser));
        }

        /**
         * @param runCommandName The name of the run command.
         * 
         * @return builder
         * 
         */
        public Builder runCommandName(@Nullable Output runCommandName) {
            $.runCommandName = runCommandName;
            return this;
        }

        /**
         * @param runCommandName The name of the run command.
         * 
         * @return builder
         * 
         */
        public Builder runCommandName(String runCommandName) {
            return runCommandName(Output.of(runCommandName));
        }

        /**
         * @param source The source of the run command script.
         * 
         * @return builder
         * 
         */
        public Builder source(@Nullable Output source) {
            $.source = source;
            return this;
        }

        /**
         * @param source The source of the run command script.
         * 
         * @return builder
         * 
         */
        public Builder source(MachineRunCommandScriptSourceArgs source) {
            return source(Output.of(source));
        }

        /**
         * @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 timeoutInSeconds The timeout in seconds to execute the run command.
         * 
         * @return builder
         * 
         */
        public Builder timeoutInSeconds(@Nullable Output timeoutInSeconds) {
            $.timeoutInSeconds = timeoutInSeconds;
            return this;
        }

        /**
         * @param timeoutInSeconds The timeout in seconds to execute the run command.
         * 
         * @return builder
         * 
         */
        public Builder timeoutInSeconds(Integer timeoutInSeconds) {
            return timeoutInSeconds(Output.of(timeoutInSeconds));
        }

        public MachineRunCommandArgs build() {
            $.asyncExecution = Codegen.booleanProp("asyncExecution").output().arg($.asyncExecution).def(false).getNullable();
            if ($.machineName == null) {
                throw new MissingRequiredPropertyException("MachineRunCommandArgs", "machineName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("MachineRunCommandArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy