1. Packages
  2. Azure Native v2
  3. API Docs
  4. kusto
  5. Script
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.kusto.Script

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

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, 2024-04-13.

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",
        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=********************************",
    });

});
Copy
package main

import (
	kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v2"
	"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"),
			ResourceGroupName: pulumi.String("kustorptest"),
			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
	})
}
Copy
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());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const script = new azure_native.kusto.Script("script", {
    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=********************************",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

script = azure_native.kusto.Script("script",
    cluster_name="kustoCluster",
    continue_on_errors=True,
    database_name="KustoDatabase8",
    force_update_tag="2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe",
    resource_group_name="kustorptest",
    script_name="kustoScript",
    script_url="https://mysa.blob.core.windows.net/container/script.txt",
    script_url_sas_token="?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=********************************")
Copy
resources:
  script:
    type: azure-native:kusto:Script
    properties:
      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=********************************
Copy

Create Script Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Script(name: string, args: ScriptArgs, opts?: CustomResourceOptions);
@overload
def Script(resource_name: str,
           args: ScriptArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Script(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           cluster_name: Optional[str] = None,
           database_name: Optional[str] = None,
           resource_group_name: Optional[str] = None,
           continue_on_errors: Optional[bool] = None,
           force_update_tag: Optional[str] = None,
           script_content: Optional[str] = None,
           script_name: Optional[str] = None,
           script_url: Optional[str] = None,
           script_url_sas_token: Optional[str] = None)
func NewScript(ctx *Context, name string, args ScriptArgs, opts ...ResourceOption) (*Script, error)
public Script(string name, ScriptArgs args, CustomResourceOptions? opts = null)
public Script(String name, ScriptArgs args)
public Script(String name, ScriptArgs args, CustomResourceOptions options)
type: azure-native:kusto:Script
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScriptArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScriptArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScriptArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scriptResource = new AzureNative.Kusto.Script("scriptResource", new()
{
    ClusterName = "string",
    DatabaseName = "string",
    ResourceGroupName = "string",
    ContinueOnErrors = false,
    ForceUpdateTag = "string",
    ScriptContent = "string",
    ScriptName = "string",
    ScriptUrl = "string",
    ScriptUrlSasToken = "string",
});
Copy
example, err := kusto.NewScript(ctx, "scriptResource", &kusto.ScriptArgs{
	ClusterName:       "string",
	DatabaseName:      "string",
	ResourceGroupName: "string",
	ContinueOnErrors:  false,
	ForceUpdateTag:    "string",
	ScriptContent:     "string",
	ScriptName:        "string",
	ScriptUrl:         "string",
	ScriptUrlSasToken: "string",
})
Copy
var scriptResource = new Script("scriptResource", ScriptArgs.builder()
    .clusterName("string")
    .databaseName("string")
    .resourceGroupName("string")
    .continueOnErrors(false)
    .forceUpdateTag("string")
    .scriptContent("string")
    .scriptName("string")
    .scriptUrl("string")
    .scriptUrlSasToken("string")
    .build());
Copy
script_resource = azure_native.kusto.Script("scriptResource",
    cluster_name=string,
    database_name=string,
    resource_group_name=string,
    continue_on_errors=False,
    force_update_tag=string,
    script_content=string,
    script_name=string,
    script_url=string,
    script_url_sas_token=string)
Copy
const scriptResource = new azure_native.kusto.Script("scriptResource", {
    clusterName: "string",
    databaseName: "string",
    resourceGroupName: "string",
    continueOnErrors: false,
    forceUpdateTag: "string",
    scriptContent: "string",
    scriptName: "string",
    scriptUrl: "string",
    scriptUrlSasToken: "string",
});
Copy
type: azure-native:kusto:Script
properties:
    clusterName: string
    continueOnErrors: false
    databaseName: string
    forceUpdateTag: string
    resourceGroupName: string
    scriptContent: string
    scriptName: string
    scriptUrl: string
    scriptUrlSasToken: string
Copy

Script Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Script resource accepts the following input properties:

ClusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto cluster.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto cluster.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group containing the Kusto cluster.
ContinueOnErrors bool
Flag that indicates whether to continue if one of the command fails.
ForceUpdateTag string
A unique string. If changed the script will be applied again.
ScriptContent Changes to this property will trigger replacement. string
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.
ScriptName Changes to this property will trigger replacement. string
The name of the Kusto database script.
ScriptUrl string
The url to the KQL script blob file. Must not be used together with scriptContent property
ScriptUrlSasToken Changes to this property will trigger replacement. string
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
ClusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto cluster.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto cluster.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group containing the Kusto cluster.
ContinueOnErrors bool
Flag that indicates whether to continue if one of the command fails.
ForceUpdateTag string
A unique string. If changed the script will be applied again.
ScriptContent Changes to this property will trigger replacement. string
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.
ScriptName Changes to this property will trigger replacement. string
The name of the Kusto database script.
ScriptUrl string
The url to the KQL script blob file. Must not be used together with scriptContent property
ScriptUrlSasToken Changes to this property will trigger replacement. string
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
clusterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Kusto cluster.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database in the Kusto cluster.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group containing the Kusto cluster.
continueOnErrors Boolean
Flag that indicates whether to continue if one of the command fails.
forceUpdateTag String
A unique string. If changed the script will be applied again.
scriptContent Changes to this property will trigger replacement. String
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.
scriptName Changes to this property will trigger replacement. String
The name of the Kusto database script.
scriptUrl String
The url to the KQL script blob file. Must not be used together with scriptContent property
scriptUrlSasToken Changes to this property will trigger replacement. String
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
clusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto cluster.
databaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto cluster.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group containing the Kusto cluster.
continueOnErrors boolean
Flag that indicates whether to continue if one of the command fails.
forceUpdateTag string
A unique string. If changed the script will be applied again.
scriptContent Changes to this property will trigger replacement. string
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.
scriptName Changes to this property will trigger replacement. string
The name of the Kusto database script.
scriptUrl string
The url to the KQL script blob file. Must not be used together with scriptContent property
scriptUrlSasToken Changes to this property will trigger replacement. string
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
cluster_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Kusto cluster.
database_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the database in the Kusto cluster.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group containing the Kusto cluster.
continue_on_errors bool
Flag that indicates whether to continue if one of the command fails.
force_update_tag str
A unique string. If changed the script will be applied again.
script_content Changes to this property will trigger replacement. str
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.
script_name Changes to this property will trigger replacement. str
The name of the Kusto database script.
script_url str
The url to the KQL script blob file. Must not be used together with scriptContent property
script_url_sas_token Changes to this property will trigger replacement. str
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
clusterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Kusto cluster.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database in the Kusto cluster.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group containing the Kusto cluster.
continueOnErrors Boolean
Flag that indicates whether to continue if one of the command fails.
forceUpdateTag String
A unique string. If changed the script will be applied again.
scriptContent Changes to this property will trigger replacement. String
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.
scriptName Changes to this property will trigger replacement. String
The name of the Kusto database script.
scriptUrl String
The url to the KQL script blob file. Must not be used together with scriptContent property
scriptUrlSasToken Changes to this property will trigger replacement. String
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.

Outputs

All input properties are implicitly available as output properties. Additionally, the Script resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioned state of the resource.
SystemData Pulumi.AzureNative.Kusto.Outputs.SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioned state of the resource.
SystemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioned state of the resource.
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
provisioningState string
The provisioned state of the resource.
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
provisioning_state str
The provisioned state of the resource.
system_data SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioned state of the resource.
systemData Property Map
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

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} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi