แชร์ผ่าน


az kusto script

Note

This reference is part of the kusto extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az kusto script command. Learn more about extensions.

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage script with kusto.

Commands

Name Description Type Status
az kusto script create

Creates a Kusto database script.

Extension Experimental
az kusto script delete

Deletes a Kusto principalAssignment.

Extension Experimental
az kusto script list

Returns the list of database scripts for given database.

Extension Experimental
az kusto script show

Gets a Kusto cluster database script.

Extension Experimental
az kusto script update

Updates a database script.

Extension Experimental
az kusto script wait

Place the CLI in a waiting state until a condition of the kusto script is met.

Extension Experimental

az kusto script create

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates a Kusto database script.

az kusto script create --cluster-name
                       --database-name
                       --name
                       --resource-group
                       [--continue-on-errors {false, true}]
                       [--force-update-tag]
                       [--no-wait]
                       [--script-content]
                       [--script-url]
                       [--script-url-sas-token]

Examples

KustoScriptsCreateOrUpdate

az kusto script create --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --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=********************************" --resource-group "kustorptest" --name "kustoScript1"

Required Parameters

--cluster-name

The name of the Kusto cluster.

--database-name

The name of the database in the Kusto cluster.

--name --script-name -n

The name of the Kusto database script.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--continue-on-errors

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

Accepted values: false, true
--force-update-tag

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

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--script-content

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-url

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

--script-url-sas-token

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az kusto script delete

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Deletes a Kusto principalAssignment.

az kusto script delete [--cluster-name]
                       [--database-name]
                       [--ids]
                       [--name]
                       [--no-wait]
                       [--resource-group]
                       [--subscription]
                       [--yes]

Examples

KustoScriptsDelete

az kusto script delete --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --resource-group "kustorptest" --name "kustoScript1"

Optional Parameters

--cluster-name

The name of the Kusto cluster.

--database-name

The name of the database in the Kusto cluster.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --script-name -n

The name of the Kusto database script.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az kusto script list

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Returns the list of database scripts for given database.

az kusto script list --cluster-name
                     --database-name
                     --resource-group

Examples

KustoScriptsList

az kusto script list --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest"

Required Parameters

--cluster-name

The name of the Kusto cluster.

--database-name

The name of the database in the Kusto cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az kusto script show

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Gets a Kusto cluster database script.

az kusto script show [--cluster-name]
                     [--database-name]
                     [--ids]
                     [--name]
                     [--resource-group]
                     [--subscription]

Examples

KustoScriptsGet

az kusto script show --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1"

Optional Parameters

--cluster-name

The name of the Kusto cluster.

--database-name

The name of the database in the Kusto cluster.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --script-name -n

The name of the Kusto database script.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az kusto script update

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Updates a database script.

az kusto script update [--cluster-name]
                       [--continue-on-errors {false, true}]
                       [--database-name]
                       [--force-update-tag]
                       [--ids]
                       [--name]
                       [--no-wait]
                       [--resource-group]
                       [--script-content]
                       [--script-url]
                       [--script-url-sas-token]
                       [--subscription]

Examples

KustoScriptsUpdate

az kusto script update --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --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=********************************" --resource-group "kustorptest" --name "kustoScript1"

Optional Parameters

--cluster-name

The name of the Kusto cluster.

--continue-on-errors

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

Accepted values: false, true
--database-name

The name of the database in the Kusto cluster.

--force-update-tag

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

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --script-name -n

The name of the Kusto database script.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--script-content

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-url

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

--script-url-sas-token

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az kusto script wait

Experimental

Command group 'kusto' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition of the kusto script is met.

az kusto script wait [--cluster-name]
                     [--created]
                     [--custom]
                     [--database-name]
                     [--deleted]
                     [--exists]
                     [--ids]
                     [--interval]
                     [--name]
                     [--resource-group]
                     [--subscription]
                     [--timeout]
                     [--updated]

Examples

Pause executing next line of CLI script until the kusto script is successfully created.

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --created

Pause executing next line of CLI script until the kusto script is successfully updated.

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --updated

Pause executing next line of CLI script until the kusto script is successfully deleted.

az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --deleted

Optional Parameters

--cluster-name

The name of the Kusto cluster.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--database-name

The name of the database in the Kusto cluster.

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--name --script-name -n

The name of the Kusto database script.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.