com.pulumi.azure.kusto.kotlin.ClusterPrincipalAssignmentArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.kusto.kotlin
import com.pulumi.azure.kusto.ClusterPrincipalAssignmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Kusto Cluster 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 exampleClusterPrincipalAssignment = new azure.kusto.ClusterPrincipalAssignment("example", {
* name: "KustoPrincipalAssignment",
* resourceGroupName: example.name,
* clusterName: exampleCluster.name,
* tenantId: current.then(current => current.tenantId),
* principalId: current.then(current => current.clientId),
* principalType: "App",
* role: "AllDatabasesAdmin",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* current = azure.core.get_client_config()
* example = azure.core.ResourceGroup("example",
* name="KustoRG",
* location="West Europe")
* example_cluster = azure.kusto.Cluster("example",
* name="kustocluster",
* location=example.location,
* resource_group_name=example.name,
* sku=azure.kusto.ClusterSkuArgs(
* name="Standard_D13_v2",
* capacity=2,
* ))
* example_cluster_principal_assignment = azure.kusto.ClusterPrincipalAssignment("example",
* name="KustoPrincipalAssignment",
* resource_group_name=example.name,
* cluster_name=example_cluster.name,
* tenant_id=current.tenant_id,
* principal_id=current.client_id,
* principal_type="App",
* role="AllDatabasesAdmin")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var current = Azure.Core.GetClientConfig.Invoke();
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "KustoRG",
* Location = "West Europe",
* });
* var exampleCluster = new Azure.Kusto.Cluster("example", new()
* {
* Name = "kustocluster",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
* {
* Name = "Standard_D13_v2",
* Capacity = 2,
* },
* });
* var exampleClusterPrincipalAssignment = new Azure.Kusto.ClusterPrincipalAssignment("example", new()
* {
* Name = "KustoPrincipalAssignment",
* ResourceGroupName = example.Name,
* ClusterName = exampleCluster.Name,
* TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
* PrincipalId = current.Apply(getClientConfigResult => getClientConfigResult.ClientId),
* PrincipalType = "App",
* Role = "AllDatabasesAdmin",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/kusto"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* current, err := core.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("KustoRG"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
* Name: pulumi.String("kustocluster"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: &kusto.ClusterSkuArgs{
* Name: pulumi.String("Standard_D13_v2"),
* Capacity: pulumi.Int(2),
* },
* })
* if err != nil {
* return err
* }
* _, err = kusto.NewClusterPrincipalAssignment(ctx, "example", &kusto.ClusterPrincipalAssignmentArgs{
* Name: pulumi.String("KustoPrincipalAssignment"),
* ResourceGroupName: example.Name,
* ClusterName: exampleCluster.Name,
* TenantId: pulumi.String(current.TenantId),
* PrincipalId: pulumi.String(current.ClientId),
* PrincipalType: pulumi.String("App"),
* Role: pulumi.String("AllDatabasesAdmin"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.ClusterPrincipalAssignment;
* import com.pulumi.azure.kusto.ClusterPrincipalAssignmentArgs;
* 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 exampleClusterPrincipalAssignment = new ClusterPrincipalAssignment("exampleClusterPrincipalAssignment", ClusterPrincipalAssignmentArgs.builder()
* .name("KustoPrincipalAssignment")
* .resourceGroupName(example.name())
* .clusterName(exampleCluster.name())
* .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
* .principalId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
* .principalType("App")
* .role("AllDatabasesAdmin")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: KustoRG
* location: West Europe
* exampleCluster:
* type: azure:kusto:Cluster
* name: example
* properties:
* name: kustocluster
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku:
* name: Standard_D13_v2
* capacity: 2
* exampleClusterPrincipalAssignment:
* type: azure:kusto:ClusterPrincipalAssignment
* name: example
* properties:
* name: KustoPrincipalAssignment
* resourceGroupName: ${example.name}
* clusterName: ${exampleCluster.name}
* tenantId: ${current.tenantId}
* principalId: ${current.clientId}
* principalType: App
* role: AllDatabasesAdmin
* variables:
* current:
* fn::invoke:
* Function: azure:core:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* Data Explorer Cluster Principal Assignments can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/principalAssignments/assignment1
* ```
* @property clusterName The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
* @property name The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
* @property principalId The object id of the principal. Changing this forces a new resource to be created.
* @property principalType The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
* @property role The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin` and `AllDatabasesViewer`. Changing this forces a new resource to be created.
* @property tenantId The tenant id in which the principal resides. Changing this forces a new resource to be created.
*/
public data class ClusterPrincipalAssignmentArgs(
public val clusterName: Output? = null,
public val name: Output? = null,
public val principalId: Output? = null,
public val principalType: Output? = null,
public val resourceGroupName: Output? = null,
public val role: Output? = null,
public val tenantId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.kusto.ClusterPrincipalAssignmentArgs =
com.pulumi.azure.kusto.ClusterPrincipalAssignmentArgs.builder()
.clusterName(clusterName?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.principalId(principalId?.applyValue({ args0 -> args0 }))
.principalType(principalType?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.role(role?.applyValue({ args0 -> args0 }))
.tenantId(tenantId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ClusterPrincipalAssignmentArgs].
*/
@PulumiTagMarker
public class ClusterPrincipalAssignmentArgsBuilder internal constructor() {
private var clusterName: Output? = null
private var name: Output? = null
private var principalId: Output? = null
private var principalType: Output? = null
private var resourceGroupName: Output? = null
private var role: Output? = null
private var tenantId: Output? = null
/**
* @param value The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("ismhfkosxoftfnge")
public suspend fun clusterName(`value`: Output) {
this.clusterName = value
}
/**
* @param value The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
*/
@JvmName("nnfrpgcbotdrfhis")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The object id of the principal. Changing this forces a new resource to be created.
*/
@JvmName("awcifclaakppwxcd")
public suspend fun principalId(`value`: Output) {
this.principalId = value
}
/**
* @param value The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
*/
@JvmName("nmhcuohmbeeetkvv")
public suspend fun principalType(`value`: Output) {
this.principalType = value
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("ephpppjchgirippq")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin` and `AllDatabasesViewer`. Changing this forces a new resource to be created.
*/
@JvmName("cufgxobmnekcibpm")
public suspend fun role(`value`: Output) {
this.role = value
}
/**
* @param value The tenant id in which the principal resides. Changing this forces a new resource to be created.
*/
@JvmName("jkemhrkawilydyyb")
public suspend fun tenantId(`value`: Output) {
this.tenantId = value
}
/**
* @param value The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("ucxoybsfwhdjowmm")
public suspend fun clusterName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clusterName = mapped
}
/**
* @param value The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
*/
@JvmName("urtcrgompbaomeaw")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The object id of the principal. Changing this forces a new resource to be created.
*/
@JvmName("vtpmhwfcwurtgyee")
public suspend fun principalId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.principalId = mapped
}
/**
* @param value The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
*/
@JvmName("aqdqpskbgfsesthw")
public suspend fun principalType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.principalType = mapped
}
/**
* @param value The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
*/
@JvmName("keasaavrcwqqorre")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin` and `AllDatabasesViewer`. Changing this forces a new resource to be created.
*/
@JvmName("hbpjawfndnfydeuo")
public suspend fun role(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.role = mapped
}
/**
* @param value The tenant id in which the principal resides. Changing this forces a new resource to be created.
*/
@JvmName("xfbaixfrpwmdryds")
public suspend fun tenantId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tenantId = mapped
}
internal fun build(): ClusterPrincipalAssignmentArgs = ClusterPrincipalAssignmentArgs(
clusterName = clusterName,
name = name,
principalId = principalId,
principalType = principalType,
resourceGroupName = resourceGroupName,
role = role,
tenantId = tenantId,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy