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.
Manage script with kusto.
Commands
| az kusto script create |
Creates a Kusto database script. |
| az kusto script delete |
Deletes a Kusto principalAssignment. |
| az kusto script list |
Returns the list of database scripts for given database. |
| az kusto script show |
Gets a Kusto cluster database script. |
| az kusto script update |
Updates a database script. |
| az kusto script wait |
Place the CLI in a waiting state until a condition of the kusto script is met. |
az kusto script create
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
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
The name of the Kusto database script.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Flag that indicates whether to continue if one of the command fails.
A unique string. If changed the script will be applied again.
Do not wait for the long-running operation to finish.
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.
The url to the KQL script blob file. Must not be used together with scriptContent property.
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az kusto script delete
Deletes a Kusto principalAssignment.
az kusto script delete --cluster-name
--database-name
--name
--resource-group
[--no-wait]
[--yes]
Examples
KustoScriptsDelete
az kusto script delete --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --resource-group "kustorptest" --name "kustoScript1"
Required Parameters
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
The name of the Kusto database script.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az kusto script list
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
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az kusto script show
Gets a Kusto cluster database script.
az kusto script show --cluster-name
--database-name
--name
--resource-group
Examples
KustoScriptsGet
az kusto script show --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1"
Required Parameters
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
The name of the Kusto database script.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az kusto script update
Updates a database script.
az kusto script update --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
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"
Required Parameters
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
The name of the Kusto database script.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Flag that indicates whether to continue if one of the command fails.
A unique string. If changed the script will be applied again.
Do not wait for the long-running operation to finish.
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.
The url to the KQL script blob file. Must not be used together with scriptContent property.
The SaS token that provide read access to the file which contain the script. Must be provided when using scriptUrl property.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az kusto script wait
Place the CLI in a waiting state until a condition of the kusto script is met.
az kusto script wait --cluster-name
--database-name
--name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--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
Required Parameters
The name of the Kusto cluster.
The name of the database in the Kusto cluster.
The name of the Kusto database script.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
Polling interval in seconds.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for