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

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

import com.pulumi.azurenative.hybridcompute.inputs.RunCommandManagedIdentityArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Describes the script sources for run command. Use only one of script, scriptUri, commandId.
 * 
 */
public final class MachineRunCommandScriptSourceArgs extends com.pulumi.resources.ResourceArgs {

    public static final MachineRunCommandScriptSourceArgs Empty = new MachineRunCommandScriptSourceArgs();

    /**
     * Specifies the commandId of predefined built-in script.
     * 
     */
    @Import(name="commandId")
    private @Nullable Output commandId;

    /**
     * @return Specifies the commandId of predefined built-in script.
     * 
     */
    public Optional> commandId() {
        return Optional.ofNullable(this.commandId);
    }

    /**
     * Specifies the script content to be executed on the machine.
     * 
     */
    @Import(name="script")
    private @Nullable Output script;

    /**
     * @return Specifies the script content to be executed on the machine.
     * 
     */
    public Optional> script() {
        return Optional.ofNullable(this.script);
    }

    /**
     * Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
     * 
     */
    @Import(name="scriptUri")
    private @Nullable Output scriptUri;

    /**
     * @return Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
     * 
     */
    public Optional> scriptUri() {
        return Optional.ofNullable(this.scriptUri);
    }

    /**
     * User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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="scriptUriManagedIdentity")
    private @Nullable Output scriptUriManagedIdentity;

    /**
     * @return User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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> scriptUriManagedIdentity() {
        return Optional.ofNullable(this.scriptUriManagedIdentity);
    }

    private MachineRunCommandScriptSourceArgs() {}

    private MachineRunCommandScriptSourceArgs(MachineRunCommandScriptSourceArgs $) {
        this.commandId = $.commandId;
        this.script = $.script;
        this.scriptUri = $.scriptUri;
        this.scriptUriManagedIdentity = $.scriptUriManagedIdentity;
    }

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

    public static final class Builder {
        private MachineRunCommandScriptSourceArgs $;

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

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

        /**
         * @param commandId Specifies the commandId of predefined built-in script.
         * 
         * @return builder
         * 
         */
        public Builder commandId(@Nullable Output commandId) {
            $.commandId = commandId;
            return this;
        }

        /**
         * @param commandId Specifies the commandId of predefined built-in script.
         * 
         * @return builder
         * 
         */
        public Builder commandId(String commandId) {
            return commandId(Output.of(commandId));
        }

        /**
         * @param script Specifies the script content to be executed on the machine.
         * 
         * @return builder
         * 
         */
        public Builder script(@Nullable Output script) {
            $.script = script;
            return this;
        }

        /**
         * @param script Specifies the script content to be executed on the machine.
         * 
         * @return builder
         * 
         */
        public Builder script(String script) {
            return script(Output.of(script));
        }

        /**
         * @param scriptUri Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
         * 
         * @return builder
         * 
         */
        public Builder scriptUri(@Nullable Output scriptUri) {
            $.scriptUri = scriptUri;
            return this;
        }

        /**
         * @param scriptUri Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
         * 
         * @return builder
         * 
         */
        public Builder scriptUri(String scriptUri) {
            return scriptUri(Output.of(scriptUri));
        }

        /**
         * @param scriptUriManagedIdentity User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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 scriptUriManagedIdentity(@Nullable Output scriptUriManagedIdentity) {
            $.scriptUriManagedIdentity = scriptUriManagedIdentity;
            return this;
        }

        /**
         * @param scriptUriManagedIdentity User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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 scriptUriManagedIdentity(RunCommandManagedIdentityArgs scriptUriManagedIdentity) {
            return scriptUriManagedIdentity(Output.of(scriptUriManagedIdentity));
        }

        public MachineRunCommandScriptSourceArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy