All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.synapse.kotlin.WorkspaceAadAdmin.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.synapse.kotlin

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 [WorkspaceAadAdmin].
 */
@PulumiTagMarker
public class WorkspaceAadAdminResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: WorkspaceAadAdminArgs = WorkspaceAadAdminArgs()

    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 WorkspaceAadAdminArgsBuilder.() -> Unit) {
        val builder = WorkspaceAadAdminArgsBuilder()
        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(): WorkspaceAadAdmin {
        val builtJavaResource =
            com.pulumi.azurenative.synapse.WorkspaceAadAdmin(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return WorkspaceAadAdmin(builtJavaResource)
    }
}

/**
 * Workspace active directory administrator
 * Azure REST API version: 2021-06-01. Prior API version in Azure Native 1.x: 2021-03-01.
 * Other available API versions: 2021-06-01-preview.
 * ## Example Usage
 * ### Create or update workspace active directory admin
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var workspaceAadAdmin = new AzureNative.Synapse.WorkspaceAadAdmin("workspaceAadAdmin", new()
 *     {
 *         AdministratorType = "ActiveDirectory",
 *         Login = "[email protected]",
 *         ResourceGroupName = "resourceGroup1",
 *         Sid = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
 *         TenantId = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
 *         WorkspaceName = "workspace1",
 *     });
 * });
 * ```
 * ```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.NewWorkspaceAadAdmin(ctx, "workspaceAadAdmin", &synapse.WorkspaceAadAdminArgs{
 * 			AdministratorType: pulumi.String("ActiveDirectory"),
 * 			Login:             pulumi.String("[email protected]"),
 * 			ResourceGroupName: pulumi.String("resourceGroup1"),
 * 			Sid:               pulumi.String("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
 * 			TenantId:          pulumi.String("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
 * 			WorkspaceName:     pulumi.String("workspace1"),
 * 		})
 * 		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.WorkspaceAadAdmin;
 * import com.pulumi.azurenative.synapse.WorkspaceAadAdminArgs;
 * 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 workspaceAadAdmin = new WorkspaceAadAdmin("workspaceAadAdmin", WorkspaceAadAdminArgs.builder()
 *             .administratorType("ActiveDirectory")
 *             .login("[email protected]")
 *             .resourceGroupName("resourceGroup1")
 *             .sid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
 *             .tenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
 *             .workspaceName("workspace1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:synapse:WorkspaceAadAdmin activeDirectory /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/administrators/activeDirectory
 * ```
 */
public class WorkspaceAadAdmin internal constructor(
    override val javaResource: com.pulumi.azurenative.synapse.WorkspaceAadAdmin,
) : KotlinCustomResource(javaResource, WorkspaceAadAdminMapper) {
    /**
     * Workspace active directory administrator type
     */
    public val administratorType: Output?
        get() = javaResource.administratorType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Login of the workspace active directory administrator
     */
    public val login: Output?
        get() = javaResource.login().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the resource
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Object ID of the workspace active directory administrator
     */
    public val sid: Output?
        get() = javaResource.sid().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Tenant ID of the workspace active directory administrator
     */
    public val tenantId: Output?
        get() = javaResource.tenantId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * 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 WorkspaceAadAdminMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azurenative.synapse.WorkspaceAadAdmin::class == javaResource::class

    override fun map(javaResource: Resource): WorkspaceAadAdmin = WorkspaceAadAdmin(
        javaResource as
            com.pulumi.azurenative.synapse.WorkspaceAadAdmin,
    )
}

/**
 * @see [WorkspaceAadAdmin].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [WorkspaceAadAdmin].
 */
public suspend fun workspaceAadAdmin(
    name: String,
    block: suspend WorkspaceAadAdminResourceBuilder.() -> Unit,
): WorkspaceAadAdmin {
    val builder = WorkspaceAadAdminResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [WorkspaceAadAdmin].
 * @param name The _unique_ name of the resulting resource.
 */
public fun workspaceAadAdmin(name: String): WorkspaceAadAdmin {
    val builder = WorkspaceAadAdminResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy