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

com.pulumi.azurenative.avs.ScriptExecution 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.Utilities;
import com.pulumi.azurenative.avs.ScriptExecutionArgs;
import com.pulumi.azurenative.avs.outputs.PSCredentialExecutionParameterResponse;
import com.pulumi.azurenative.avs.outputs.ScriptSecureStringExecutionParameterResponse;
import com.pulumi.azurenative.avs.outputs.ScriptStringExecutionParameterResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An instance of a script executed by a user - custom or AVS
 * Azure REST API version: 2022-05-01. Prior API version in Azure Native 1.x: 2021-06-01.
 * 
 * Other available API versions: 2023-03-01, 2023-09-01.
 * 
 * ## Example Usage
 * ### ScriptExecutions_CreateOrUpdate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.avs.ScriptExecution;
 * import com.pulumi.azurenative.avs.ScriptExecutionArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var scriptExecution = new ScriptExecution("scriptExecution", ScriptExecutionArgs.builder()
 *             .hiddenParameters(PSCredentialExecutionParameterArgs.builder()
 *                 .name("Password")
 *                 .secureValue("PlaceholderPassword")
 *                 .type("SecureValue")
 *                 .build())
 *             .parameters(            
 *                 PSCredentialExecutionParameterArgs.builder()
 *                     .name("DomainName")
 *                     .type("Value")
 *                     .value("placeholderDomain.local")
 *                     .build(),
 *                 PSCredentialExecutionParameterArgs.builder()
 *                     .name("BaseUserDN")
 *                     .type("Value")
 *                     .value("DC=placeholder, DC=placeholder")
 *                     .build())
 *             .privateCloudName("cloud1")
 *             .resourceGroupName("group1")
 *             .retention("P0Y0M60DT0H60M60S")
 *             .scriptCmdletId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands}{@literal @}{@code 1.0.0/scriptCmdlets/New-SsoExternalIdentitySource")
 *             .scriptExecutionName("addSsoServer")
 *             .timeout("P0Y0M0DT0H60M60S")
 *             .build());
 * 
 *     }}{@code
 * }}{@code
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:avs:ScriptExecution addSsoServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName} * ``` * */ @ResourceType(type="azure-native:avs:ScriptExecution") public class ScriptExecution extends com.pulumi.resources.CustomResource { /** * Standard error output stream from the powershell execution * */ @Export(name="errors", refs={List.class,String.class}, tree="[0,1]") private Output> errors; /** * @return Standard error output stream from the powershell execution * */ public Output> errors() { return this.errors; } /** * Error message if the script was able to run, but if the script itself had errors or powershell threw an exception * */ @Export(name="failureReason", refs={String.class}, tree="[0]") private 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 Output> failureReason() { return Codegen.optional(this.failureReason); } /** * Time the script execution was finished * */ @Export(name="finishedAt", refs={String.class}, tree="[0]") private Output finishedAt; /** * @return Time the script execution was finished * */ public Output finishedAt() { return this.finishedAt; } /** * Parameters that will be hidden/not visible to ARM, such as passwords and credentials * */ @Export(name="hiddenParameters", refs={List.class,Object.class}, tree="[0,1]") private Output> hiddenParameters; /** * @return Parameters that will be hidden/not visible to ARM, such as passwords and credentials * */ public Output>> hiddenParameters() { return Codegen.optional(this.hiddenParameters); } /** * Standard information out stream from the powershell execution * */ @Export(name="information", refs={List.class,String.class}, tree="[0,1]") private Output> information; /** * @return Standard information out stream from the powershell execution * */ public Output> information() { return this.information; } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * User-defined dictionary. * */ @Export(name="namedOutputs", refs={Map.class,String.class,Object.class}, tree="[0,1,2]") private Output> namedOutputs; /** * @return User-defined dictionary. * */ public Output>> namedOutputs() { return Codegen.optional(this.namedOutputs); } /** * Standard output stream from the powershell execution * */ @Export(name="output", refs={List.class,String.class}, tree="[0,1]") private Output> output; /** * @return Standard output stream from the powershell execution * */ public Output>> output() { return Codegen.optional(this.output); } /** * Parameters the script will accept * */ @Export(name="parameters", refs={List.class,Object.class}, tree="[0,1]") private Output> parameters; /** * @return Parameters the script will accept * */ public Output>> parameters() { return Codegen.optional(this.parameters); } /** * The state of the script execution resource * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The state of the script execution resource * */ public Output provisioningState() { return this.provisioningState; } /** * Time to live for the resource. If not provided, will be available for 60 days * */ @Export(name="retention", refs={String.class}, tree="[0]") private Output retention; /** * @return Time to live for the resource. If not provided, will be available for 60 days * */ public Output> retention() { return Codegen.optional(this.retention); } /** * A reference to the script cmdlet resource if user is running a AVS script * */ @Export(name="scriptCmdletId", refs={String.class}, tree="[0]") private Output scriptCmdletId; /** * @return A reference to the script cmdlet resource if user is running a AVS script * */ public Output> scriptCmdletId() { return Codegen.optional(this.scriptCmdletId); } /** * Time the script execution was started * */ @Export(name="startedAt", refs={String.class}, tree="[0]") private Output startedAt; /** * @return Time the script execution was started * */ public Output startedAt() { return this.startedAt; } /** * Time the script execution was submitted * */ @Export(name="submittedAt", refs={String.class}, tree="[0]") private Output submittedAt; /** * @return Time the script execution was submitted * */ public Output submittedAt() { return this.submittedAt; } /** * Time limit for execution * */ @Export(name="timeout", refs={String.class}, tree="[0]") private Output timeout; /** * @return Time limit for execution * */ public Output timeout() { return this.timeout; } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * Standard warning out stream from the powershell execution * */ @Export(name="warnings", refs={List.class,String.class}, tree="[0,1]") private Output> warnings; /** * @return Standard warning out stream from the powershell execution * */ public Output> warnings() { return this.warnings; } /** * * @param name The _unique_ name of the resulting resource. */ public ScriptExecution(java.lang.String name) { this(name, ScriptExecutionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ScriptExecution(java.lang.String name, ScriptExecutionArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ScriptExecution(java.lang.String name, ScriptExecutionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:avs:ScriptExecution", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ScriptExecution(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:avs:ScriptExecution", name, null, makeResourceOptions(options, id), false); } private static ScriptExecutionArgs makeArgs(ScriptExecutionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ScriptExecutionArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:avs/v20210601:ScriptExecution").build()), Output.of(Alias.builder().type("azure-native:avs/v20211201:ScriptExecution").build()), Output.of(Alias.builder().type("azure-native:avs/v20220501:ScriptExecution").build()), Output.of(Alias.builder().type("azure-native:avs/v20230301:ScriptExecution").build()), Output.of(Alias.builder().type("azure-native:avs/v20230901:ScriptExecution").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static ScriptExecution get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ScriptExecution(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy