database_principal_assignments
Creates, updates, deletes, gets or lists a database_principal_assignments resource.
Overview
| Name | database_principal_assignments |
| Type | Resource |
| Id | azure.kusto.database_principal_assignments |
Fields
The following fields are returned by SELECT queries:
- check_name_availability
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | The name that was checked. |
message | string | Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated. |
nameAvailable | boolean | Specifies a Boolean value that indicates if the name is available. |
reason | string | Message providing the reason why the given name is invalid. Known values are: "Invalid" and "AlreadyExists". (Invalid, AlreadyExists) |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aadObjectId | string | The service principal object id in AAD (Azure active directory). |
principalId | string | The principal ID assigned to the database principal. It can be a user email, application ID, or security group name. Required. |
principalName | string | The principal name. |
principalType | string | Principal type. Required. Known values are: "App", "Group", and "User". (App, Group, User) |
provisioningState | string | The provisioned state of the resource. Known values are: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". (Running, Creating, Deleting, Succeeded, Failed, Moving, Canceled) |
role | string | Database principal role. Required. Known values are: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", and "Viewer". (Admin, Ingestor, Monitor, User, UnrestrictedViewer, Viewer) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tenantId | string | The tenant id of the principal. |
tenantName | string | The tenant name of the principal. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aadObjectId | string | The service principal object id in AAD (Azure active directory). |
principalId | string | The principal ID assigned to the database principal. It can be a user email, application ID, or security group name. Required. |
principalName | string | The principal name. |
principalType | string | Principal type. Required. Known values are: "App", "Group", and "User". (App, Group, User) |
provisioningState | string | The provisioned state of the resource. Known values are: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", and "Canceled". (Running, Creating, Deleting, Succeeded, Failed, Moving, Canceled) |
role | string | Database principal role. Required. Known values are: "Admin", "Ingestor", "Monitor", "User", "UnrestrictedViewer", and "Viewer". (Admin, Ingestor, Monitor, User, UnrestrictedViewer, Viewer) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tenantId | string | The tenant id of the principal. |
tenantName | string | The tenant name of the principal. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
check_name_availability | select | resource_group_name, cluster_name, database_name, subscription_id | Checks that the database principal assignment is valid and is not already in use. | |
get | select | resource_group_name, cluster_name, database_name, principal_assignment_name, subscription_id | Gets a Kusto cluster database principalAssignment. | |
list | select | resource_group_name, cluster_name, database_name, subscription_id | Lists all Kusto cluster database principalAssignments. | |
create_or_update | insert | resource_group_name, cluster_name, database_name, principal_assignment_name, subscription_id | Creates a Kusto cluster database principalAssignment. | |
create_or_update | replace | resource_group_name, cluster_name, database_name, principal_assignment_name, subscription_id | Creates a Kusto cluster database principalAssignment. | |
delete | delete | resource_group_name, cluster_name, database_name, principal_assignment_name, subscription_id | Deletes a Kusto principalAssignment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
cluster_name | string | The name of the Kusto cluster. Required. |
database_name | string | The name of the database in the Kusto cluster. Required. |
principal_assignment_name | string | The name of the Kusto principalAssignment. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- check_name_availability
- get
- list
Checks that the database principal assignment is valid and is not already in use.
SELECT
name,
message,
nameAvailable,
reason
FROM azure.kusto.database_principal_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a Kusto cluster database principalAssignment.
SELECT
id,
name,
aadObjectId,
principalId,
principalName,
principalType,
provisioningState,
role,
systemData,
tenantId,
tenantName,
type
FROM azure.kusto.database_principal_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND principal_assignment_name = '{{ principal_assignment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all Kusto cluster database principalAssignments.
SELECT
id,
name,
aadObjectId,
principalId,
principalName,
principalType,
provisioningState,
role,
systemData,
tenantId,
tenantName,
type
FROM azure.kusto.database_principal_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND database_name = '{{ database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates a Kusto cluster database principalAssignment.
INSERT INTO azure.kusto.database_principal_assignments (
properties,
resource_group_name,
cluster_name,
database_name,
principal_assignment_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cluster_name }}',
'{{ database_name }}',
'{{ principal_assignment_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: database_principal_assignments
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the database_principal_assignments resource.
- name: cluster_name
value: "{{ cluster_name }}"
description: Required parameter for the database_principal_assignments resource.
- name: database_name
value: "{{ database_name }}"
description: Required parameter for the database_principal_assignments resource.
- name: principal_assignment_name
value: "{{ principal_assignment_name }}"
description: Required parameter for the database_principal_assignments resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the database_principal_assignments resource.
- name: properties
description: |
The database principal.
value:
principalId: "{{ principalId }}"
role: "{{ role }}"
tenantId: "{{ tenantId }}"
principalType: "{{ principalType }}"
tenantName: "{{ tenantName }}"
principalName: "{{ principalName }}"
provisioningState: "{{ provisioningState }}"
aadObjectId: "{{ aadObjectId }}"
REPLACE examples
- create_or_update
Creates a Kusto cluster database principalAssignment.
REPLACE azure.kusto.database_principal_assignments
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND database_name = '{{ database_name }}' --required
AND principal_assignment_name = '{{ principal_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a Kusto principalAssignment.
DELETE FROM azure.kusto.database_principal_assignments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND database_name = '{{ database_name }}' --required
AND principal_assignment_name = '{{ principal_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;