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

com.pulumi.azurenative.kusto.Script Maven / Gradle / Ivy

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

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.kusto.ScriptArgs;
import com.pulumi.azurenative.kusto.outputs.SystemDataResponse;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Class representing a database script.
 * Azure REST API version: 2022-12-29. Prior API version in Azure Native 1.x: 2021-01-01.
 * 
 * Other available API versions: 2021-08-27, 2023-05-02, 2023-08-15.
 * 
 * ## Example Usage
 * ### KustoScriptsCreateOrUpdate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.kusto.Script;
 * import com.pulumi.azurenative.kusto.ScriptArgs;
 * 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 {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var script = new Script("script", ScriptArgs.builder()
 *             .clusterName("kustoCluster")
 *             .continueOnErrors(true)
 *             .databaseName("KustoDatabase8")
 *             .forceUpdateTag("2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe")
 *             .resourceGroupName("kustorptest")
 *             .scriptName("kustoScript")
 *             .scriptUrl("https://mysa.blob.core.windows.net/container/script.txt")
 *             .scriptUrlSasToken("?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:kusto:Script kustoCluster/KustoDatabase8/kustoScript /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName} * ``` * */ @ResourceType(type="azure-native:kusto:Script") public class Script extends com.pulumi.resources.CustomResource { /** * Flag that indicates whether to continue if one of the command fails. * */ @Export(name="continueOnErrors", refs={Boolean.class}, tree="[0]") private Output continueOnErrors; /** * @return Flag that indicates whether to continue if one of the command fails. * */ public Output> continueOnErrors() { return Codegen.optional(this.continueOnErrors); } /** * A unique string. If changed the script will be applied again. * */ @Export(name="forceUpdateTag", refs={String.class}, tree="[0]") private Output forceUpdateTag; /** * @return A unique string. If changed the script will be applied again. * */ public Output> forceUpdateTag() { return Codegen.optional(this.forceUpdateTag); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * The provisioned state of the resource. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The provisioned state of the resource. * */ public Output provisioningState() { return this.provisioningState; } /** * The url to the KQL script blob file. Must not be used together with scriptContent property * */ @Export(name="scriptUrl", refs={String.class}, tree="[0]") private Output scriptUrl; /** * @return The url to the KQL script blob file. Must not be used together with scriptContent property * */ public Output> scriptUrl() { return Codegen.optional(this.scriptUrl); } /** * Metadata pertaining to creation and last modification of the resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Metadata pertaining to creation and last modification of the resource. * */ public Output systemData() { return this.systemData; } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public Script(java.lang.String name) { this(name, ScriptArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Script(java.lang.String name, ScriptArgs 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 Script(java.lang.String name, ScriptArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:kusto:Script", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Script(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:kusto:Script", name, null, makeResourceOptions(options, id), false); } private static ScriptArgs makeArgs(ScriptArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ScriptArgs.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:kusto/v20210101:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20210827:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20220201:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20220707:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20221111:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20221229:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20230502:Script").build()), Output.of(Alias.builder().type("azure-native:kusto/v20230815:Script").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 Script get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Script(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy