DatabasePrincipalAssignment

class DatabasePrincipalAssignment : KotlinCustomResource

Manages a Kusto (also known as Azure Data Explorer) Database Principal Assignment.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.kusto.Cluster;
import com.pulumi.azure.kusto.ClusterArgs;
import com.pulumi.azure.kusto.inputs.ClusterSkuArgs;
import com.pulumi.azure.kusto.Database;
import com.pulumi.azure.kusto.DatabaseArgs;
import com.pulumi.azure.kusto.DatabasePrincipalAssignment;
import com.pulumi.azure.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) {
final var current = CoreFunctions.getClientConfig();
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("KustoRG")
.location("West Europe")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.name("kustocluster")
.location(example.location())
.resourceGroupName(example.name())
.sku(ClusterSkuArgs.builder()
.name("Standard_D13_v2")
.capacity(2)
.build())
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.name("KustoDatabase")
.resourceGroupName(example.name())
.location(example.location())
.clusterName(exampleCluster.name())
.hotCachePeriod("P7D")
.softDeletePeriod("P31D")
.build());
var exampleDatabasePrincipalAssignment = new DatabasePrincipalAssignment("exampleDatabasePrincipalAssignment", DatabasePrincipalAssignmentArgs.builder()
.name("KustoPrincipalAssignment")
.resourceGroupName(example.name())
.clusterName(exampleCluster.name())
.databaseName(exampleDatabase.name())
.tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
.principalId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
.principalType("App")
.role("Viewer")
.build());
}
}

Import

Kusto Database Principal Assignment can be imported using the resource id, e.g.

$ pulumi import azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/principalAssignments/assignment1

Properties

Link copied to clipboard
val clusterName: Output<String>

The name of the cluster in which to create the resource. Changing this forces a new resource to be created.

Link copied to clipboard
val databaseName: Output<String>

The name of the database in which to create the resource. Changing this forces a new resource to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the kusto principal assignment. Changing this forces a new resource to be created.

Link copied to clipboard
val principalId: Output<String>

The object id of the principal. Changing this forces a new resource to be created.

Link copied to clipboard
val principalName: Output<String>

The name of the principal.

Link copied to clipboard
val principalType: Output<String>

The type of the principal. Valid values include App, Group, User. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which to create the resource. Changing this forces a new resource to be created.

Link copied to clipboard
val role: Output<String>

The database role assigned to the principal. Valid values include Admin, Ingestor, Monitor, UnrestrictedViewer, User and Viewer. Changing this forces a new resource to be created.

Link copied to clipboard
val tenantId: Output<String>

The tenant id in which the principal resides. Changing this forces a new resource to be created.

Link copied to clipboard
val tenantName: Output<String>

The name of the tenant.

Link copied to clipboard
val urn: Output<String>