1. Packages
  2. Azure Native
  3. API Docs
  4. synapse
  5. DatabasePrincipalAssignment
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.synapse.DatabasePrincipalAssignment

Explore with Pulumi AI

Class representing a database principal assignment.

Uses Azure REST API version 2021-04-01-preview. In version 2.x of the Azure Native provider, it used API version 2021-04-01-preview.

Example Usage

KustoPoolDatabasePrincipalAssignmentsCreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var databasePrincipalAssignment = new AzureNative.Synapse.DatabasePrincipalAssignment("databasePrincipalAssignment", new()
    {
        DatabaseName = "Kustodatabase8",
        KustoPoolName = "kustoclusterrptest4",
        PrincipalAssignmentName = "kustoprincipal1",
        PrincipalId = "87654321-1234-1234-1234-123456789123",
        PrincipalType = AzureNative.Synapse.PrincipalType.App,
        ResourceGroupName = "kustorptest",
        Role = AzureNative.Synapse.DatabasePrincipalRole.Admin,
        TenantId = "12345678-1234-1234-1234-123456789123",
        WorkspaceName = "synapseWorkspaceName",
    });

});
Copy
package main

import (
	synapse "github.com/pulumi/pulumi-azure-native-sdk/synapse/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := synapse.NewDatabasePrincipalAssignment(ctx, "databasePrincipalAssignment", &synapse.DatabasePrincipalAssignmentArgs{
			DatabaseName:            pulumi.String("Kustodatabase8"),
			KustoPoolName:           pulumi.String("kustoclusterrptest4"),
			PrincipalAssignmentName: pulumi.String("kustoprincipal1"),
			PrincipalId:             pulumi.String("87654321-1234-1234-1234-123456789123"),
			PrincipalType:           pulumi.String(synapse.PrincipalTypeApp),
			ResourceGroupName:       pulumi.String("kustorptest"),
			Role:                    pulumi.String(synapse.DatabasePrincipalRoleAdmin),
			TenantId:                pulumi.String("12345678-1234-1234-1234-123456789123"),
			WorkspaceName:           pulumi.String("synapseWorkspaceName"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.synapse.DatabasePrincipalAssignment;
import com.pulumi.azurenative.synapse.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()
            .databaseName("Kustodatabase8")
            .kustoPoolName("kustoclusterrptest4")
            .principalAssignmentName("kustoprincipal1")
            .principalId("87654321-1234-1234-1234-123456789123")
            .principalType("App")
            .resourceGroupName("kustorptest")
            .role("Admin")
            .tenantId("12345678-1234-1234-1234-123456789123")
            .workspaceName("synapseWorkspaceName")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const databasePrincipalAssignment = new azure_native.synapse.DatabasePrincipalAssignment("databasePrincipalAssignment", {
    databaseName: "Kustodatabase8",
    kustoPoolName: "kustoclusterrptest4",
    principalAssignmentName: "kustoprincipal1",
    principalId: "87654321-1234-1234-1234-123456789123",
    principalType: azure_native.synapse.PrincipalType.App,
    resourceGroupName: "kustorptest",
    role: azure_native.synapse.DatabasePrincipalRole.Admin,
    tenantId: "12345678-1234-1234-1234-123456789123",
    workspaceName: "synapseWorkspaceName",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

database_principal_assignment = azure_native.synapse.DatabasePrincipalAssignment("databasePrincipalAssignment",
    database_name="Kustodatabase8",
    kusto_pool_name="kustoclusterrptest4",
    principal_assignment_name="kustoprincipal1",
    principal_id="87654321-1234-1234-1234-123456789123",
    principal_type=azure_native.synapse.PrincipalType.APP,
    resource_group_name="kustorptest",
    role=azure_native.synapse.DatabasePrincipalRole.ADMIN,
    tenant_id="12345678-1234-1234-1234-123456789123",
    workspace_name="synapseWorkspaceName")
Copy
resources:
  databasePrincipalAssignment:
    type: azure-native:synapse:DatabasePrincipalAssignment
    properties:
      databaseName: Kustodatabase8
      kustoPoolName: kustoclusterrptest4
      principalAssignmentName: kustoprincipal1
      principalId: 87654321-1234-1234-1234-123456789123
      principalType: App
      resourceGroupName: kustorptest
      role: Admin
      tenantId: 12345678-1234-1234-1234-123456789123
      workspaceName: synapseWorkspaceName
Copy

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,
                                database_name: Optional[str] = None,
                                kusto_pool_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,
                                workspace_name: Optional[str] = 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:synapse:DatabasePrincipalAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DatabasePrincipalAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. DatabasePrincipalAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DatabasePrincipalAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 azure_nativeDatabasePrincipalAssignmentResource = new AzureNative.Synapse.DatabasePrincipalAssignment("azure-nativeDatabasePrincipalAssignmentResource", new()
{
    DatabaseName = "string",
    KustoPoolName = "string",
    PrincipalId = "string",
    PrincipalType = "string",
    ResourceGroupName = "string",
    Role = "string",
    WorkspaceName = "string",
    PrincipalAssignmentName = "string",
    TenantId = "string",
});
Copy
example, err := synapse.NewDatabasePrincipalAssignment(ctx, "azure-nativeDatabasePrincipalAssignmentResource", &synapse.DatabasePrincipalAssignmentArgs{
	DatabaseName:            pulumi.String("string"),
	KustoPoolName:           pulumi.String("string"),
	PrincipalId:             pulumi.String("string"),
	PrincipalType:           pulumi.String("string"),
	ResourceGroupName:       pulumi.String("string"),
	Role:                    pulumi.String("string"),
	WorkspaceName:           pulumi.String("string"),
	PrincipalAssignmentName: pulumi.String("string"),
	TenantId:                pulumi.String("string"),
})
Copy
var azure_nativeDatabasePrincipalAssignmentResource = new com.pulumi.azurenative.synapse.DatabasePrincipalAssignment("azure-nativeDatabasePrincipalAssignmentResource", com.pulumi.azurenative.synapse.DatabasePrincipalAssignmentArgs.builder()
    .databaseName("string")
    .kustoPoolName("string")
    .principalId("string")
    .principalType("string")
    .resourceGroupName("string")
    .role("string")
    .workspaceName("string")
    .principalAssignmentName("string")
    .tenantId("string")
    .build());
Copy
azure_native_database_principal_assignment_resource = azure_native.synapse.DatabasePrincipalAssignment("azure-nativeDatabasePrincipalAssignmentResource",
    database_name="string",
    kusto_pool_name="string",
    principal_id="string",
    principal_type="string",
    resource_group_name="string",
    role="string",
    workspace_name="string",
    principal_assignment_name="string",
    tenant_id="string")
Copy
const azure_nativeDatabasePrincipalAssignmentResource = new azure_native.synapse.DatabasePrincipalAssignment("azure-nativeDatabasePrincipalAssignmentResource", {
    databaseName: "string",
    kustoPoolName: "string",
    principalId: "string",
    principalType: "string",
    resourceGroupName: "string",
    role: "string",
    workspaceName: "string",
    principalAssignmentName: "string",
    tenantId: "string",
});
Copy
type: azure-native:synapse:DatabasePrincipalAssignment
properties:
    databaseName: string
    kustoPoolName: string
    principalAssignmentName: string
    principalId: string
    principalType: string
    resourceGroupName: string
    role: string
    tenantId: string
    workspaceName: string
Copy

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:

DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto pool.
KustoPoolName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto pool.
PrincipalId This property is required. string
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
PrincipalType This property is required. string | Pulumi.AzureNative.Synapse.PrincipalType
Principal type.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Role This property is required. string | Pulumi.AzureNative.Synapse.DatabasePrincipalRole
Database principal role.
WorkspaceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the workspace
PrincipalAssignmentName Changes to this property will trigger replacement. string
The name of the Kusto principalAssignment.
TenantId string
The tenant id of the principal
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto pool.
KustoPoolName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto pool.
PrincipalId This property is required. string
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
PrincipalType This property is required. string | PrincipalType
Principal type.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
Role This property is required. string | DatabasePrincipalRole
Database principal role.
WorkspaceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the workspace
PrincipalAssignmentName Changes to this property will trigger replacement. string
The name of the Kusto principalAssignment.
TenantId string
The tenant id of the principal
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database in the Kusto pool.
kustoPoolName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Kusto pool.
principalId This property is required. String
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
principalType This property is required. String | PrincipalType
Principal type.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
role This property is required. String | DatabasePrincipalRole
Database principal role.
workspaceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the workspace
principalAssignmentName Changes to this property will trigger replacement. String
The name of the Kusto principalAssignment.
tenantId String
The tenant id of the principal
databaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database in the Kusto pool.
kustoPoolName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Kusto pool.
principalId This property is required. string
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
principalType This property is required. string | PrincipalType
Principal type.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
role This property is required. string | DatabasePrincipalRole
Database principal role.
workspaceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the workspace
principalAssignmentName Changes to this property will trigger replacement. string
The name of the Kusto principalAssignment.
tenantId string
The tenant id of the principal
database_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the database in the Kusto pool.
kusto_pool_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Kusto pool.
principal_id This property is required. str
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
principal_type This property is required. str | PrincipalType
Principal type.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
role This property is required. str | DatabasePrincipalRole
Database principal role.
workspace_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the workspace
principal_assignment_name Changes to this property will trigger replacement. str
The name of the Kusto principalAssignment.
tenant_id str
The tenant id of the principal
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database in the Kusto pool.
kustoPoolName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Kusto pool.
principalId This property is required. String
The principal ID assigned to the database principal. It can be a user email, application ID, or security group name.
principalType This property is required. String | "App" | "Group" | "User"
Principal type.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
role This property is required. String | "Admin" | "Ingestor" | "Monitor" | "User" | "UnrestrictedViewer" | "Viewer"
Database principal role.
workspaceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the workspace
principalAssignmentName Changes to this property will trigger replacement. String
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:

AzureApiVersion string
The Azure API version of the resource.
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.
SystemData Pulumi.AzureNative.Synapse.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
TenantName string
The tenant name of the principal
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
AzureApiVersion string
The Azure API version of the resource.
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.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
TenantName string
The tenant name of the principal
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion String
The Azure API version of the resource.
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.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
tenantName String
The tenant name of the principal
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion string
The Azure API version of the resource.
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.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
tenantName string
The tenant name of the principal
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azure_api_version str
The Azure API version of the resource.
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.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
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"
azureApiVersion String
The Azure API version of the resource.
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.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
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
DatabasePrincipalRoleAdmin
Admin
DatabasePrincipalRoleIngestor
Ingestor
DatabasePrincipalRoleMonitor
Monitor
DatabasePrincipalRoleUser
User
DatabasePrincipalRoleUnrestrictedViewer
UnrestrictedViewer
DatabasePrincipalRoleViewer
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
PrincipalTypeApp
App
PrincipalTypeGroup
Group
PrincipalTypeUser
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

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:synapse:DatabasePrincipalAssignment synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0