ScriptArgs

data class ScriptArgs(val clusterName: Output<String>? = null, val continueOnErrors: Output<Boolean>? = null, val databaseName: Output<String>? = null, val forceUpdateTag: Output<String>? = null, val principalPermissionsAction: Output<Either<String, PrincipalPermissionsAction>>? = null, val resourceGroupName: Output<String>? = null, val scriptContent: Output<String>? = null, val scriptLevel: Output<Either<String, ScriptLevel>>? = null, val scriptName: Output<String>? = null, val scriptUrl: Output<String>? = null, val scriptUrlSasToken: Output<String>? = null) : ConvertibleToJava<ScriptArgs>

Class representing a database script. Uses Azure REST API version 2024-04-13. In version 2.x of the Azure Native provider, it used API version 2022-12-29. Other available API versions: 2021-01-01, 2021-08-27, 2022-02-01, 2022-07-07, 2022-11-11, 2022-12-29, 2023-05-02, 2023-08-15. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native kusto [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

KustoScriptsCreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var script = new AzureNative.Kusto.Script("script", new()
{
ClusterName = "kustoCluster",
ContinueOnErrors = true,
DatabaseName = "KustoDatabase8",
ForceUpdateTag = "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe",
PrincipalPermissionsAction = AzureNative.Kusto.PrincipalPermissionsAction.RemovePermissionOnScriptCompletion,
ResourceGroupName = "kustorptest",
ScriptLevel = AzureNative.Kusto.ScriptLevel.Database,
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=********************************",
});
});
package main
import (
kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kusto.NewScript(ctx, "script", &kusto.ScriptArgs{
ClusterName: pulumi.String("kustoCluster"),
ContinueOnErrors: pulumi.Bool(true),
DatabaseName: pulumi.String("KustoDatabase8"),
ForceUpdateTag: pulumi.String("2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe"),
PrincipalPermissionsAction: pulumi.String(kusto.PrincipalPermissionsActionRemovePermissionOnScriptCompletion),
ResourceGroupName: pulumi.String("kustorptest"),
ScriptLevel: pulumi.String(kusto.ScriptLevelDatabase),
ScriptName: pulumi.String("kustoScript"),
ScriptUrl: pulumi.String("https://mysa.blob.core.windows.net/container/script.txt"),
ScriptUrlSasToken: pulumi.String("?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=********************************"),
})
if err != nil {
return err
}
return nil
})
}
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")
.principalPermissionsAction("RemovePermissionOnScriptCompletion")
.resourceGroupName("kustorptest")
.scriptLevel("Database")
.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.

$ pulumi import azure-native:kusto:Script kustoCluster/KustoDatabase8/kustoScript /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/scripts/{scriptName}

Constructors

Link copied to clipboard
constructor(clusterName: Output<String>? = null, continueOnErrors: Output<Boolean>? = null, databaseName: Output<String>? = null, forceUpdateTag: Output<String>? = null, principalPermissionsAction: Output<Either<String, PrincipalPermissionsAction>>? = null, resourceGroupName: Output<String>? = null, scriptContent: Output<String>? = null, scriptLevel: Output<Either<String, ScriptLevel>>? = null, scriptName: Output<String>? = null, scriptUrl: Output<String>? = null, scriptUrlSasToken: Output<String>? = null)

Properties

Link copied to clipboard
val clusterName: Output<String>? = null

The name of the Kusto cluster.

Link copied to clipboard
val continueOnErrors: Output<Boolean>? = null

Flag that indicates whether to continue if one of the command fails.

Link copied to clipboard
val databaseName: Output<String>? = null

The name of the database in the Kusto cluster.

Link copied to clipboard
val forceUpdateTag: Output<String>? = null

A unique string. If changed the script will be applied again.

Link copied to clipboard

Indicates if the permissions for the script caller are kept following completion of the script.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val scriptContent: Output<String>? = null

The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with scriptUrl and scriptUrlSasToken properties.

Link copied to clipboard
val scriptLevel: Output<Either<String, ScriptLevel>>? = null

Differentiates between the type of script commands included - Database or Cluster. The default is Database.

Link copied to clipboard
val scriptName: Output<String>? = null

The name of the Kusto database script.

Link copied to clipboard
val scriptUrl: Output<String>? = null

The url to the KQL script blob file. Must not be used together with scriptContent property

Link copied to clipboard
val scriptUrlSasToken: Output<String>? = null

The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.

Functions

Link copied to clipboard
open override fun toJava(): ScriptArgs