All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.synapse.kotlin.KustoPoolPrincipalAssignment.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.synapse.kotlin
import com.pulumi.azurenative.synapse.kotlin.outputs.SystemDataResponse
import com.pulumi.azurenative.synapse.kotlin.outputs.SystemDataResponse.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [KustoPoolPrincipalAssignment].
*/
@PulumiTagMarker
public class KustoPoolPrincipalAssignmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: KustoPoolPrincipalAssignmentArgs = KustoPoolPrincipalAssignmentArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend KustoPoolPrincipalAssignmentArgsBuilder.() -> Unit) {
val builder = KustoPoolPrincipalAssignmentArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): KustoPoolPrincipalAssignment {
val builtJavaResource =
com.pulumi.azurenative.synapse.KustoPoolPrincipalAssignment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return KustoPoolPrincipalAssignment(builtJavaResource)
}
}
/**
* Class representing a cluster principal assignment.
* Azure REST API version: 2021-06-01-preview. Prior API version in Azure Native 1.x: 2021-04-01-preview.
* ## Example Usage
* ### KustoPoolPrincipalAssignmentsCreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var kustoPoolPrincipalAssignment = new AzureNative.Synapse.KustoPoolPrincipalAssignment("kustoPoolPrincipalAssignment", new()
* {
* KustoPoolName = "kustoclusterrptest4",
* PrincipalAssignmentName = "kustoprincipal1",
* PrincipalId = "87654321-1234-1234-1234-123456789123",
* PrincipalType = AzureNative.Synapse.PrincipalType.App,
* ResourceGroupName = "kustorptest",
* Role = AzureNative.Synapse.ClusterPrincipalRole.AllDatabasesAdmin,
* TenantId = "12345678-1234-1234-1234-123456789123",
* WorkspaceName = "synapseWorkspaceName",
* });
* });
* ```
* ```go
* package main
* import (
* synapse "github.com/pulumi/pulumi-azure-native-sdk/synapse/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := synapse.NewKustoPoolPrincipalAssignment(ctx, "kustoPoolPrincipalAssignment", &synapse.KustoPoolPrincipalAssignmentArgs{
* 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.ClusterPrincipalRoleAllDatabasesAdmin),
* TenantId: pulumi.String("12345678-1234-1234-1234-123456789123"),
* WorkspaceName: pulumi.String("synapseWorkspaceName"),
* })
* 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.azurenative.synapse.KustoPoolPrincipalAssignment;
* import com.pulumi.azurenative.synapse.KustoPoolPrincipalAssignmentArgs;
* 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 kustoPoolPrincipalAssignment = new KustoPoolPrincipalAssignment("kustoPoolPrincipalAssignment", KustoPoolPrincipalAssignmentArgs.builder()
* .kustoPoolName("kustoclusterrptest4")
* .principalAssignmentName("kustoprincipal1")
* .principalId("87654321-1234-1234-1234-123456789123")
* .principalType("App")
* .resourceGroupName("kustorptest")
* .role("AllDatabasesAdmin")
* .tenantId("12345678-1234-1234-1234-123456789123")
* .workspaceName("synapseWorkspaceName")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:synapse:KustoPoolPrincipalAssignment synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}
* ```
*/
public class KustoPoolPrincipalAssignment internal constructor(
override val javaResource: com.pulumi.azurenative.synapse.KustoPoolPrincipalAssignment,
) : KotlinCustomResource(javaResource, KustoPoolPrincipalAssignmentMapper) {
/**
* The service principal object id in AAD (Azure active directory)
*/
public val aadObjectId: Output
get() = javaResource.aadObjectId().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group name.
*/
public val principalId: Output
get() = javaResource.principalId().applyValue({ args0 -> args0 })
/**
* The principal name
*/
public val principalName: Output
get() = javaResource.principalName().applyValue({ args0 -> args0 })
/**
* Principal type.
*/
public val principalType: Output
get() = javaResource.principalType().applyValue({ args0 -> args0 })
/**
* The provisioned state of the resource.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* Cluster principal role.
*/
public val role: Output
get() = javaResource.role().applyValue({ args0 -> args0 })
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The tenant id of the principal
*/
public val tenantId: Output?
get() = javaResource.tenantId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The tenant name of the principal
*/
public val tenantName: Output
get() = javaResource.tenantName().applyValue({ args0 -> args0 })
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object KustoPoolPrincipalAssignmentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.synapse.KustoPoolPrincipalAssignment::class == javaResource::class
override fun map(javaResource: Resource): KustoPoolPrincipalAssignment =
KustoPoolPrincipalAssignment(
javaResource as
com.pulumi.azurenative.synapse.KustoPoolPrincipalAssignment,
)
}
/**
* @see [KustoPoolPrincipalAssignment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [KustoPoolPrincipalAssignment].
*/
public suspend fun kustoPoolPrincipalAssignment(
name: String,
block: suspend KustoPoolPrincipalAssignmentResourceBuilder.() -> Unit,
): KustoPoolPrincipalAssignment {
val builder = KustoPoolPrincipalAssignmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [KustoPoolPrincipalAssignment].
* @param name The _unique_ name of the resulting resource.
*/
public fun kustoPoolPrincipalAssignment(name: String): KustoPoolPrincipalAssignment {
val builder = KustoPoolPrincipalAssignmentResourceBuilder()
builder.name(name)
return builder.build()
}