databases
Creates, updates, deletes, gets or lists a databases
resource.
Overview
Name | databases |
Type | Resource |
Id | azure.data_explorer.databases |
Fields
Name | Datatype | Description |
---|---|---|
kind | string | Kind of the database |
location | string | Resource location. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clusterName, databaseName, resourceGroupName, subscriptionId | Returns a database. |
list_by_cluster | SELECT | clusterName, resourceGroupName, subscriptionId | Returns the list of databases of the given Kusto cluster. |
create_or_update | INSERT | clusterName, databaseName, resourceGroupName, subscriptionId, data__kind | Creates or updates a database. |
delete | DELETE | clusterName, databaseName, resourceGroupName, subscriptionId | Deletes the database with the given name. |
update | UPDATE | clusterName, databaseName, resourceGroupName, subscriptionId, data__kind | Updates a database. |
add_principals | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId | Add Database principals permissions. |
check_name_availability | EXEC | clusterName, resourceGroupName, subscriptionId, data__name, data__type | Checks that the databases resource name is valid and is not already in use. |
invite_follower | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__inviteeEmail | Generates an invitation token that allows attaching a follower database to this database. |
remove_principals | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId | Remove Database principals permissions. |
SELECT
examples
Returns the list of databases of the given Kusto cluster.
SELECT
kind,
location
FROM azure.data_explorer.databases
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new databases
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_explorer.databases (
clusterName,
databaseName,
resourceGroupName,
subscriptionId,
data__kind,
location,
kind
)
SELECT
'{{ clusterName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__kind }}',
'{{ location }}',
'{{ kind }}'
;
- name: your_resource_model_name
props:
- name: location
value: string
- name: kind
value: string
UPDATE
example
Updates a databases
resource.
/*+ update */
UPDATE azure.data_explorer.databases
SET
location = '{{ location }}',
kind = '{{ kind }}'
WHERE
clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND data__kind = '{{ data__kind }}';
DELETE
example
Deletes the specified databases
resource.
/*+ delete */
DELETE FROM azure.data_explorer.databases
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';