Class DatabasePrincipal
Manages a Kusto (also known as Azure Data Explorer) Database Principal
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
{
Location = "East US",
});
var cluster = new Azure.Kusto.Cluster("cluster", new Azure.Kusto.ClusterArgs
{
Location = rg.Location,
ResourceGroupName = rg.Name,
Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
{
Name = "Standard_D13_v2",
Capacity = 2,
},
});
var database = new Azure.Kusto.Database("database", new Azure.Kusto.DatabaseArgs
{
ResourceGroupName = rg.Name,
Location = rg.Location,
ClusterName = cluster.Name,
HotCachePeriod = "P7D",
SoftDeletePeriod = "P31D",
});
var principal = new Azure.Kusto.DatabasePrincipal("principal", new Azure.Kusto.DatabasePrincipalArgs
{
ResourceGroupName = rg.Name,
ClusterName = cluster.Name,
DatabaseName = azurerm_kusto_database.Test.Name,
Role = "Viewer",
Type = "User",
ClientId = current.Apply(current => current.TenantId),
ObjectId = current.Apply(current => current.ClientId),
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Kusto
Assembly: Pulumi.Azure.dll
Syntax
public class DatabasePrincipal : CustomResource
Constructors
View SourceDatabasePrincipal(String, DatabasePrincipalArgs, CustomResourceOptions)
Create a DatabasePrincipal resource with the given unique name, arguments, and options.
Declaration
public DatabasePrincipal(string name, DatabasePrincipalArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DatabasePrincipalArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAppId
The app id, if not empty, of the principal.
Declaration
public Output<string> AppId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClientId
The Client ID that owns the specified object_id. Changing this forces a new resource to be created.
Declaration
public Output<string> ClientId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClusterName
Specifies the name of the Kusto Cluster this database principal will be added to. Changing this forces a new resource to be created.
Declaration
public Output<string> ClusterName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DatabaseName
Specified the name of the Kusto Database this principal will be added to. Changing this forces a new resource to be created.
Declaration
public Output<string> DatabaseName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
The email, if not empty, of the principal.
Declaration
public Output<string> Email { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
FullyQualifiedName
The fully qualified name of the principal.
Declaration
public Output<string> FullyQualifiedName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the Kusto Database Principal.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ObjectId
An Object ID of a User, Group, or App. Changing this forces a new resource to be created.
Declaration
public Output<string> ObjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
Specifies the Resource Group where the Kusto Database Principal should exist. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Role
Specifies the permissions the Principal will have. Valid values include Admin, Ingestor, Monitor, UnrestrictedViewers, User, Viewer. Changing this forces a new resource to be created.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Type
Specifies the type of object the principal is. Valid values include App, Group, User. Changing this forces a new resource to be created.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DatabasePrincipalState, CustomResourceOptions)
Get an existing DatabasePrincipal resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DatabasePrincipal Get(string name, Input<string> id, DatabasePrincipalState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DatabasePrincipalState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DatabasePrincipal |