azure-native.kusto.DatabasePrincipalAssignment
Explore with Pulumi AI
Class representing a database principal assignment.
Uses Azure REST API version 2022-12-29. In version 1.x of the Azure Native provider, it used API version 2021-01-01.
Other available API versions: 2023-05-02, 2023-08-15, 2024-04-13.
Example Usage
KustoDatabasePrincipalAssignmentsCreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var databasePrincipalAssignment = new AzureNative.Kusto.DatabasePrincipalAssignment("databasePrincipalAssignment", new()
    {
        ClusterName = "kustoCluster",
        DatabaseName = "Kustodatabase8",
        PrincipalAssignmentName = "kustoprincipal1",
        PrincipalId = "87654321-1234-1234-1234-123456789123",
        PrincipalType = AzureNative.Kusto.PrincipalType.App,
        ResourceGroupName = "kustorptest",
        Role = AzureNative.Kusto.DatabasePrincipalRole.Admin,
        TenantId = "12345678-1234-1234-1234-123456789123",
    });
});
package main
import (
	kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := kusto.NewDatabasePrincipalAssignment(ctx, "databasePrincipalAssignment", &kusto.DatabasePrincipalAssignmentArgs{
			ClusterName:             pulumi.String("kustoCluster"),
			DatabaseName:            pulumi.String("Kustodatabase8"),
			PrincipalAssignmentName: pulumi.String("kustoprincipal1"),
			PrincipalId:             pulumi.String("87654321-1234-1234-1234-123456789123"),
			PrincipalType:           pulumi.String(kusto.PrincipalTypeApp),
			ResourceGroupName:       pulumi.String("kustorptest"),
			Role:                    pulumi.String(kusto.DatabasePrincipalRoleAdmin),
			TenantId:                pulumi.String("12345678-1234-1234-1234-123456789123"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.kusto.DatabasePrincipalAssignment;
import com.pulumi.azurenative.kusto.DatabasePrincipalAssignmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var databasePrincipalAssignment = new DatabasePrincipalAssignment("databasePrincipalAssignment", DatabasePrincipalAssignmentArgs.builder()
            .clusterName("kustoCluster")
            .databaseName("Kustodatabase8")
            .principalAssignmentName("kustoprincipal1")
            .principalId("87654321-1234-1234-1234-123456789123")
            .principalType("App")
            .resourceGroupName("kustorptest")
            .role("Admin")
            .tenantId("12345678-1234-1234-1234-123456789123")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const databasePrincipalAssignment = new azure_native.kusto.DatabasePrincipalAssignment("databasePrincipalAssignment", {
    clusterName: "kustoCluster",
    databaseName: "Kustodatabase8",
    principalAssignmentName: "kustoprincipal1",
    principalId: "87654321-1234-1234-1234-123456789123",
    principalType: azure_native.kusto.PrincipalType.App,
    resourceGroupName: "kustorptest",
    role: azure_native.kusto.DatabasePrincipalRole.Admin,
    tenantId: "12345678-1234-1234-1234-123456789123",
});
import pulumi
import pulumi_azure_native as azure_native
database_principal_assignment = azure_native.kusto.DatabasePrincipalAssignment("databasePrincipalAssignment",
    cluster_name="kustoCluster",
    database_name="Kustodatabase8",
    principal_assignment_name="kustoprincipal1",
    principal_id="87654321-1234-1234-1234-123456789123",
    principal_type=azure_native.kusto.PrincipalType.APP,
    resource_group_name="kustorptest",
    role=azure_native.kusto.DatabasePrincipalRole.ADMIN,
    tenant_id="12345678-1234-1234-1234-123456789123")
resources:
  databasePrincipalAssignment:
    type: azure-native:kusto:DatabasePrincipalAssignment
    properties:
      clusterName: kustoCluster
      databaseName: Kustodatabase8
      principalAssignmentName: kustoprincipal1
      principalId: 87654321-1234-1234-1234-123456789123
      principalType: App
      resourceGroupName: kustorptest
      role: Admin
      tenantId: 12345678-1234-1234-1234-123456789123
Create DatabasePrincipalAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabasePrincipalAssignment(name: string, args: DatabasePrincipalAssignmentArgs, opts?: CustomResourceOptions);@overload
def DatabasePrincipalAssignment(resource_name: str,
                                args: DatabasePrincipalAssignmentArgs,
                                opts: Optional[ResourceOptions] = None)
@overload
def DatabasePrincipalAssignment(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                cluster_name: Optional[str] = None,
                                database_name: Optional[str] = None,
                                principal_id: Optional[str] = None,
                                principal_type: Optional[Union[str, PrincipalType]] = None,
                                resource_group_name: Optional[str] = None,
                                role: Optional[Union[str, DatabasePrincipalRole]] = None,
                                principal_assignment_name: Optional[str] = None,
                                tenant_id: Optional[str] = None)func NewDatabasePrincipalAssignment(ctx *Context, name string, args DatabasePrincipalAssignmentArgs, opts ...ResourceOption) (*DatabasePrincipalAssignment, error)public DatabasePrincipalAssignment(string name, DatabasePrincipalAssignmentArgs args, CustomResourceOptions? opts = null)
public DatabasePrincipalAssignment(String name, DatabasePrincipalAssignmentArgs args)
public DatabasePrincipalAssignment(String name, DatabasePrincipalAssignmentArgs args, CustomResourceOptions options)
type: azure-native:kusto:DatabasePrincipalAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabasePrincipalAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabasePrincipalAssignmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabasePrincipalAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabasePrincipalAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabasePrincipalAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databasePrincipalAssignmentResource = new AzureNative.Kusto.DatabasePrincipalAssignment("databasePrincipalAssignmentResource", new()
{
    ClusterName = "string",
    DatabaseName = "string",
    PrincipalId = "string",
    PrincipalType = "string",
    ResourceGroupName = "string",
    Role = "string",
    PrincipalAssignmentName = "string",
    TenantId = "string",
});
example, err := kusto.NewDatabasePrincipalAssignment(ctx, "databasePrincipalAssignmentResource", &kusto.DatabasePrincipalAssignmentArgs{
	ClusterName:             pulumi.String("string"),
	DatabaseName:            pulumi.String("string"),
	PrincipalId:             pulumi.String("string"),
	PrincipalType:           pulumi.String("string"),
	ResourceGroupName:       pulumi.String("string"),
	Role:                    pulumi.String("string"),
	PrincipalAssignmentName: pulumi.String("string"),
	TenantId:                pulumi.String("string"),
})
var databasePrincipalAssignmentResource = new DatabasePrincipalAssignment("databasePrincipalAssignmentResource", DatabasePrincipalAssignmentArgs.builder()
    .clusterName("string")
    .databaseName("string")
    .principalId("string")
    .principalType("string")
    .resourceGroupName("string")
    .role("string")
    .principalAssignmentName("string")
    .tenantId("string")
    .build());
database_principal_assignment_resource = azure_native.kusto.DatabasePrincipalAssignment("databasePrincipalAssignmentResource",
    cluster_name="string",
    database_name="string",
    principal_id="string",
    principal_type="string",
    resource_group_name="string",
    role="string",
    principal_assignment_name="string",
    tenant_id="string")
const databasePrincipalAssignmentResource = new azure_native.kusto.DatabasePrincipalAssignment("databasePrincipalAssignmentResource", {
    clusterName: "string",
    databaseName: "string",
    principalId: "string",
    principalType: "string",
    resourceGroupName: "string",
    role: "string",
    principalAssignmentName: "string",
    tenantId: "string",
});
type: azure-native:kusto:DatabasePrincipalAssignment
properties:
    clusterName: string
    databaseName: string
    principalAssignmentName: string
    principalId: string
    principalType: string
    resourceGroupName: string
    role: string
    tenantId: string
DatabasePrincipalAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DatabasePrincipalAssignment resource accepts the following input properties:
- ClusterName string
- The name of the Kusto cluster.
- DatabaseName string
- The name of the database in the Kusto cluster.
- PrincipalId string
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- PrincipalType string | Pulumi.Azure Native. Kusto. Principal Type 
- Principal type.
- ResourceGroup stringName 
- The name of the resource group containing the Kusto cluster.
- Role
string | Pulumi.Azure Native. Kusto. Database Principal Role 
- Database principal role.
- PrincipalAssignment stringName 
- The name of the Kusto principalAssignment.
- TenantId string
- The tenant id of the principal
- ClusterName string
- The name of the Kusto cluster.
- DatabaseName string
- The name of the database in the Kusto cluster.
- PrincipalId string
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- PrincipalType string | PrincipalType 
- Principal type.
- ResourceGroup stringName 
- The name of the resource group containing the Kusto cluster.
- Role
string | DatabasePrincipal Role 
- Database principal role.
- PrincipalAssignment stringName 
- The name of the Kusto principalAssignment.
- TenantId string
- The tenant id of the principal
- clusterName String
- The name of the Kusto cluster.
- databaseName String
- The name of the database in the Kusto cluster.
- principalId String
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- principalType String | PrincipalType 
- Principal type.
- resourceGroup StringName 
- The name of the resource group containing the Kusto cluster.
- role
String | DatabasePrincipal Role 
- Database principal role.
- principalAssignment StringName 
- The name of the Kusto principalAssignment.
- tenantId String
- The tenant id of the principal
- clusterName string
- The name of the Kusto cluster.
- databaseName string
- The name of the database in the Kusto cluster.
- principalId string
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- principalType string | PrincipalType 
- Principal type.
- resourceGroup stringName 
- The name of the resource group containing the Kusto cluster.
- role
string | DatabasePrincipal Role 
- Database principal role.
- principalAssignment stringName 
- The name of the Kusto principalAssignment.
- tenantId string
- The tenant id of the principal
- cluster_name str
- The name of the Kusto cluster.
- database_name str
- The name of the database in the Kusto cluster.
- principal_id str
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- principal_type str | PrincipalType 
- Principal type.
- resource_group_ strname 
- The name of the resource group containing the Kusto cluster.
- role
str | DatabasePrincipal Role 
- Database principal role.
- principal_assignment_ strname 
- The name of the Kusto principalAssignment.
- tenant_id str
- The tenant id of the principal
- clusterName String
- The name of the Kusto cluster.
- databaseName String
- The name of the database in the Kusto cluster.
- principalId String
- The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
- principalType String | "App" | "Group" | "User"
- Principal type.
- resourceGroup StringName 
- The name of the resource group containing the Kusto cluster.
- role
String | "Admin" | "Ingestor" | "Monitor" | "User" | "UnrestrictedViewer" | "Viewer" 
- Database principal role.
- principalAssignment StringName 
- The name of the Kusto principalAssignment.
- tenantId String
- The tenant id of the principal
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabasePrincipalAssignment resource produces the following output properties:
- AadObject stringId 
- The service principal object id in AAD (Azure active directory)
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- PrincipalName string
- The principal name
- ProvisioningState string
- The provisioned state of the resource.
- TenantName string
- The tenant name of the principal
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- AadObject stringId 
- The service principal object id in AAD (Azure active directory)
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- PrincipalName string
- The principal name
- ProvisioningState string
- The provisioned state of the resource.
- TenantName string
- The tenant name of the principal
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- aadObject StringId 
- The service principal object id in AAD (Azure active directory)
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- principalName String
- The principal name
- provisioningState String
- The provisioned state of the resource.
- tenantName String
- The tenant name of the principal
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- aadObject stringId 
- The service principal object id in AAD (Azure active directory)
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- principalName string
- The principal name
- provisioningState string
- The provisioned state of the resource.
- tenantName string
- The tenant name of the principal
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- aad_object_ strid 
- The service principal object id in AAD (Azure active directory)
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- principal_name str
- The principal name
- provisioning_state str
- The provisioned state of the resource.
- tenant_name str
- The tenant name of the principal
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- aadObject StringId 
- The service principal object id in AAD (Azure active directory)
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- principalName String
- The principal name
- provisioningState String
- The provisioned state of the resource.
- tenantName String
- The tenant name of the principal
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
DatabasePrincipalRole, DatabasePrincipalRoleArgs      
- Admin
- Admin
- Ingestor
- Ingestor
- Monitor
- Monitor
- User
- User
- UnrestrictedViewer 
- UnrestrictedViewer
- Viewer
- Viewer
- DatabasePrincipal Role Admin 
- Admin
- DatabasePrincipal Role Ingestor 
- Ingestor
- DatabasePrincipal Role Monitor 
- Monitor
- DatabasePrincipal Role User 
- User
- DatabasePrincipal Role Unrestricted Viewer 
- UnrestrictedViewer
- DatabasePrincipal Role Viewer 
- Viewer
- Admin
- Admin
- Ingestor
- Ingestor
- Monitor
- Monitor
- User
- User
- UnrestrictedViewer 
- UnrestrictedViewer
- Viewer
- Viewer
- Admin
- Admin
- Ingestor
- Ingestor
- Monitor
- Monitor
- User
- User
- UnrestrictedViewer 
- UnrestrictedViewer
- Viewer
- Viewer
- ADMIN
- Admin
- INGESTOR
- Ingestor
- MONITOR
- Monitor
- USER
- User
- UNRESTRICTED_VIEWER
- UnrestrictedViewer
- VIEWER
- Viewer
- "Admin"
- Admin
- "Ingestor"
- Ingestor
- "Monitor"
- Monitor
- "User"
- User
- "UnrestrictedViewer" 
- UnrestrictedViewer
- "Viewer"
- Viewer
PrincipalType, PrincipalTypeArgs    
- App
- App
- Group
- Group
- User
- User
- PrincipalType App 
- App
- PrincipalType Group 
- Group
- PrincipalType User 
- User
- App
- App
- Group
- Group
- User
- User
- App
- App
- Group
- Group
- User
- User
- APP
- App
- GROUP
- Group
- USER
- User
- "App"
- App
- "Group"
- Group
- "User"
- User
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:kusto:DatabasePrincipalAssignment kustoCluster/Kustodatabase8/kustoprincipal1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/principalAssignments/{principalAssignmentName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0