az kusto database

Manage Azure Kusto databases.

Azure CLI commands for Kusto are now an extension. Execute "az extension add -n kusto" to install the extension. The original core module for Kusto is no longer supported.

Commands

az kusto database add-principal

Add Database principals permissions.

az kusto database create

Create a Kusto database.

az kusto database delete

Delete a Kusto database.

az kusto database list

List a Kusto database.

az kusto database list-principal

Returns a list of database principals of the given Kusto cluster and database.

az kusto database remove-principal

Remove Database principals permissions.

az kusto database show

Get a Kusto database.

az kusto database update

Update a Kusto database.

az kusto database wait

Wait for a managed Kusto database to reach a desired state.

az kusto database add-principal

Add Database principals permissions.

az kusto database add-principal [--cluster-name]
                                [--database-name]
                                [--ids]
                                [--resource-group]
                                [--subscription]
                                [--value]

Examples

KustoDatabaseAddPrincipals

az kusto database add-principal --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser=some_guid" role="Admin" --value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup=some_guid" role="Viewer" --value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp=some_guid_app_id" role="Admin" --resource-group "kustorptest"

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.

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

--value

The list of Kusto database principals.

az kusto database create

Create a Kusto database.

az kusto database create --cluster-name
                         --name
                         --resource-group
                         [--hot-cache-period]
                         [--no-wait]
                         [--soft-delete-period]

Examples

create a Kusto Database.

az kusto database create --cluster-name myclustername -g myrgname -n mydbname  --soft-delete-period P365D --hot-cache-period P31D

Required Parameters

--cluster-name

The name of the cluster.

--name -n

The name of the database.

--resource-group -g

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

Optional Parameters

--hot-cache-period

Amount of time that data should be kept in cache.Duration in ISO8601 format (for example, 100 days would be P100D).

--no-wait

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

default value: False
--soft-delete-period

Amount of time that data should be kept so it is available to query. Duration in ISO8601 format (for example, 100 days would be P100D).

az kusto database delete

Delete a Kusto database.

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

Optional Parameters

--cluster-name

The name of the 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 -n

The name of the database.

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

az kusto database list

List a Kusto database.

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

Examples

List a Kusto database. (autogenerated)

az kusto database list --cluster-name MyCluster --resource-group MyResourceGroup

Required Parameters

--cluster-name

The name of the cluster.

--resource-group -g

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

az kusto database list-principal

Returns a list of database principals of the given Kusto cluster and database.

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

Examples

KustoDatabaseListPrincipals

az kusto database list-principal --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>.

az kusto database remove-principal

Remove Database principals permissions.

az kusto database remove-principal [--cluster-name]
                                   [--database-name]
                                   [--ids]
                                   [--resource-group]
                                   [--subscription]
                                   [--value]

Examples

KustoDatabaseRemovePrincipals

az kusto database remove-principal --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --value name="Some User" type="User" app-id="" email="user@microsoft.com" fqn="aaduser=some_guid" role="Admin" --value name="Kusto" type="Group" app-id="" email="kusto@microsoft.com" fqn="aadgroup=some_guid" role="Viewer" --value name="SomeApp" type="App" app-id="some_guid_app_id" email="" fqn="aadapp=some_guid_app_id" role="Admin" --resource-group "kustorptest"

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.

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

--value

The list of Kusto database principals.

az kusto database show

Get a Kusto database.

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

Examples

Get a Kusto database. (autogenerated)

az kusto database show --cluster-name MyCluster --name MyDatabase --resource-group MyResourceGroup

Optional Parameters

--cluster-name

The name of the 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 -n

The name of the database.

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

az kusto database update

Update a Kusto database.

az kusto database update --soft-delete-period
                         [--add]
                         [--cluster-name]
                         [--force-string]
                         [--hot-cache-period]
                         [--ids]
                         [--name]
                         [--no-wait]
                         [--remove]
                         [--resource-group]
                         [--set]
                         [--subscription]

Examples

create a Kusto Database.

az kusto database update --cluster-name myclustername -g myrgname -n mydbname  --soft-delete-period P365D --hot-cache-period P30D

Required Parameters

--soft-delete-period

Amount of time that data should be kept so it is available to query. Duration in ISO8601 format (for example, 100 days would be P100D).

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

default value: []
--cluster-name

The name of the cluster.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

default value: False
--hot-cache-period

Amount of time that data should be kept in cache.Duration in ISO8601 format (for example, 100 days would be P100D).

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

The name of the database.

--no-wait

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

default value: False
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

default value: []
--resource-group -g

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

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

default value: []
--subscription

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

az kusto database wait

Wait for a managed Kusto database to reach a desired state.

If an operation on a database was interrupted or was started with --no-wait, use this command to wait for it to complete.

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

Optional Parameters

--cluster-name

The name of the 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'].

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

The name of the database.

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