Script Args
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
Properties
The name of the Kusto cluster.
Flag that indicates whether to continue if one of the command fails.
The name of the database in the Kusto cluster.
A unique string. If changed the script will be applied again.
Indicates if the permissions for the script caller are kept following completion of the script.
The name of the resource group. The name is case insensitive.
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.
Differentiates between the type of script commands included - Database or Cluster. The default is Database.
The name of the Kusto database script.
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.