import * as pulumi from "@pulumi/pulumi"; /** * Manages a Kusto (also known as Azure Data Explorer) Database Principal Assignment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const current = azure.core.getClientConfig({}); * const example = new azure.core.ResourceGroup("example", { * name: "KustoRG", * location: "West Europe", * }); * const exampleCluster = new azure.kusto.Cluster("example", { * name: "kustocluster", * location: example.location, * resourceGroupName: example.name, * sku: { * name: "Standard_D13_v2", * capacity: 2, * }, * }); * const exampleDatabase = new azure.kusto.Database("example", { * name: "KustoDatabase", * resourceGroupName: example.name, * location: example.location, * clusterName: exampleCluster.name, * hotCachePeriod: "P7D", * softDeletePeriod: "P31D", * }); * const exampleDatabasePrincipalAssignment = new azure.kusto.DatabasePrincipalAssignment("example", { * name: "KustoPrincipalAssignment", * resourceGroupName: example.name, * clusterName: exampleCluster.name, * databaseName: exampleDatabase.name, * tenantId: current.then(current => current.tenantId), * principalId: current.then(current => current.clientId), * principalType: "App", * role: "Viewer", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Kusto` - 2024-04-13 * * ## Import * * Kusto Database Principal Assignment can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/principalAssignments/assignment1 * ``` */ export declare class DatabasePrincipalAssignment extends pulumi.CustomResource { /** * Get an existing DatabasePrincipalAssignment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: DatabasePrincipalAssignmentState, opts?: pulumi.CustomResourceOptions): DatabasePrincipalAssignment; /** * Returns true if the given object is an instance of DatabasePrincipalAssignment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DatabasePrincipalAssignment; /** * The name of the cluster in which to create the resource. Changing this forces a new resource to be created. */ readonly clusterName: pulumi.Output; /** * The name of the database in which to create the resource. Changing this forces a new resource to be created. */ readonly databaseName: pulumi.Output; /** * The name of the kusto principal assignment. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The object id of the principal. Changing this forces a new resource to be created. */ readonly principalId: pulumi.Output; /** * The name of the principal. */ readonly principalName: pulumi.Output; /** * The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. */ readonly principalType: pulumi.Output; /** * The name of the resource group in which to create the resource. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * 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. */ readonly role: pulumi.Output; /** * The tenant id in which the principal resides. Changing this forces a new resource to be created. */ readonly tenantId: pulumi.Output; /** * The name of the tenant. */ readonly tenantName: pulumi.Output; /** * Create a DatabasePrincipalAssignment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DatabasePrincipalAssignmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DatabasePrincipalAssignment resources. */ export interface DatabasePrincipalAssignmentState { /** * The name of the cluster in which to create the resource. Changing this forces a new resource to be created. */ clusterName?: pulumi.Input; /** * The name of the database in which to create the resource. Changing this forces a new resource to be created. */ databaseName?: pulumi.Input; /** * The name of the kusto principal assignment. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The object id of the principal. Changing this forces a new resource to be created. */ principalId?: pulumi.Input; /** * The name of the principal. */ principalName?: pulumi.Input; /** * The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. */ principalType?: pulumi.Input; /** * The name of the resource group in which to create the resource. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * 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. */ role?: pulumi.Input; /** * The tenant id in which the principal resides. Changing this forces a new resource to be created. */ tenantId?: pulumi.Input; /** * The name of the tenant. */ tenantName?: pulumi.Input; } /** * The set of arguments for constructing a DatabasePrincipalAssignment resource. */ export interface DatabasePrincipalAssignmentArgs { /** * The name of the cluster in which to create the resource. Changing this forces a new resource to be created. */ clusterName: pulumi.Input; /** * The name of the database in which to create the resource. Changing this forces a new resource to be created. */ databaseName: pulumi.Input; /** * The name of the kusto principal assignment. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The object id of the principal. Changing this forces a new resource to be created. */ principalId: pulumi.Input; /** * The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. */ principalType: pulumi.Input; /** * The name of the resource group in which to create the resource. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * 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. */ role: pulumi.Input; /** * The tenant id in which the principal resides. Changing this forces a new resource to be created. */ tenantId: pulumi.Input; }