database_principal_assignments
Creates, updates, deletes, gets or lists a database_principal_assignments
resource.
Overview
Name | database_principal_assignments |
Type | Resource |
Id | azure.data_explorer.database_principal_assignments |
Fields
- vw_database_principal_assignments
- database_principal_assignments
Name | Datatype | Description |
---|---|---|
aad_object_id | text | field from the properties object |
clusterName | text | field from the properties object |
databaseName | text | field from the properties object |
principalAssignmentName | text | field from the properties object |
principal_id | text | field from the properties object |
principal_name | text | field from the properties object |
principal_type | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
role | text | field from the properties object |
subscriptionId | text | field from the properties object |
tenant_id | text | field from the properties object |
tenant_name | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | A class representing database principal property. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clusterName, databaseName, principalAssignmentName, resourceGroupName, subscriptionId | Gets a Kusto cluster database principalAssignment. |
list | SELECT | clusterName, databaseName, resourceGroupName, subscriptionId | Lists all Kusto cluster database principalAssignments. |
create_or_update | INSERT | clusterName, databaseName, principalAssignmentName, resourceGroupName, subscriptionId | Creates a Kusto cluster database principalAssignment. |
delete | DELETE | clusterName, databaseName, principalAssignmentName, resourceGroupName, subscriptionId | Deletes a Kusto principalAssignment. |
check_name_availability | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__name, data__type | Checks that the database principal assignment is valid and is not already in use. |
SELECT
examples
Lists all Kusto cluster database principalAssignments.
- vw_database_principal_assignments
- database_principal_assignments
SELECT
aad_object_id,
clusterName,
databaseName,
principalAssignmentName,
principal_id,
principal_name,
principal_type,
provisioning_state,
resourceGroupName,
role,
subscriptionId,
tenant_id,
tenant_name
FROM azure.data_explorer.vw_database_principal_assignments
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.data_explorer.database_principal_assignments
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new database_principal_assignments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_explorer.database_principal_assignments (
clusterName,
databaseName,
principalAssignmentName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ clusterName }}',
'{{ databaseName }}',
'{{ principalAssignmentName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: principalId
value: string
- name: role
value: string
- name: tenantId
value: string
- name: principalType
value: string
- name: tenantName
value: string
- name: principalName
value: string
- name: provisioningState
value: []
- name: aadObjectId
value: string
DELETE
example
Deletes the specified database_principal_assignments
resource.
/*+ delete */
DELETE FROM azure.data_explorer.database_principal_assignments
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND principalAssignmentName = '{{ principalAssignmentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';