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.devtestlab.kotlin.UserArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devtestlab.kotlin
import com.pulumi.azurenative.devtestlab.UserArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.UserIdentityArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.UserIdentityArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.UserSecretStoreArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.UserSecretStoreArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Profile of a lab user.
* Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
* Other available API versions: 2016-05-15.
* ## Example Usage
* ### Users_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var user = new AzureNative.DevTestLab.User("user", new()
* {
* Identity = new AzureNative.DevTestLab.Inputs.UserIdentityArgs
* {
* AppId = "{appId}",
* ObjectId = "{objectId}",
* PrincipalId = "{principalId}",
* PrincipalName = "{principalName}",
* TenantId = "{tenantId}",
* },
* LabName = "{devtestlabName}",
* Location = "{location}",
* Name = "{userName}",
* ResourceGroupName = "resourceGroupName",
* SecretStore = new AzureNative.DevTestLab.Inputs.UserSecretStoreArgs
* {
* KeyVaultId = "{keyVaultId}",
* KeyVaultUri = "{keyVaultUri}",
* },
* Tags =
* {
* { "tagName1", "tagValue1" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := devtestlab.NewUser(ctx, "user", &devtestlab.UserArgs{
* Identity: &devtestlab.UserIdentityArgs{
* AppId: pulumi.String("{appId}"),
* ObjectId: pulumi.String("{objectId}"),
* PrincipalId: pulumi.String("{principalId}"),
* PrincipalName: pulumi.String("{principalName}"),
* TenantId: pulumi.String("{tenantId}"),
* },
* LabName: pulumi.String("{devtestlabName}"),
* Location: pulumi.String("{location}"),
* Name: pulumi.String("{userName}"),
* ResourceGroupName: pulumi.String("resourceGroupName"),
* SecretStore: &devtestlab.UserSecretStoreArgs{
* KeyVaultId: pulumi.String("{keyVaultId}"),
* KeyVaultUri: pulumi.String("{keyVaultUri}"),
* },
* Tags: pulumi.StringMap{
* "tagName1": pulumi.String("tagValue1"),
* },
* })
* 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.devtestlab.User;
* import com.pulumi.azurenative.devtestlab.UserArgs;
* import com.pulumi.azurenative.devtestlab.inputs.UserIdentityArgs;
* import com.pulumi.azurenative.devtestlab.inputs.UserSecretStoreArgs;
* 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 user = new User("user", UserArgs.builder()
* .identity(UserIdentityArgs.builder()
* .appId("{appId}")
* .objectId("{objectId}")
* .principalId("{principalId}")
* .principalName("{principalName}")
* .tenantId("{tenantId}")
* .build())
* .labName("{devtestlabName}")
* .location("{location}")
* .name("{userName}")
* .resourceGroupName("resourceGroupName")
* .secretStore(UserSecretStoreArgs.builder()
* .keyVaultId("{keyVaultId}")
* .keyVaultUri("{keyVaultUri}")
* .build())
* .tags(Map.of("tagName1", "tagValue1"))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:devtestlab:User {userName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{name}
* ```
* @property identity The identity of the user.
* @property labName The name of the lab.
* @property location The location of the resource.
* @property name The name of the user profile.
* @property resourceGroupName The name of the resource group.
* @property secretStore The secret store of the user.
* @property tags The tags of the resource.
*/
public data class UserArgs(
public val identity: Output? = null,
public val labName: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val secretStore: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.devtestlab.UserArgs =
com.pulumi.azurenative.devtestlab.UserArgs.builder()
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.labName(labName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.secretStore(secretStore?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [UserArgs].
*/
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
private var identity: Output? = null
private var labName: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var secretStore: Output? = null
private var tags: Output>? = null
/**
* @param value The identity of the user.
*/
@JvmName("fcjpfrdkchhiystp")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The name of the lab.
*/
@JvmName("nhwtegagqrykwcui")
public suspend fun labName(`value`: Output) {
this.labName = value
}
/**
* @param value The location of the resource.
*/
@JvmName("fmlbkqddoebnecvi")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the user profile.
*/
@JvmName("ywptnbgxwnqkqrhh")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("iqurjwlkprspyugp")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The secret store of the user.
*/
@JvmName("qfnxdvxbkflvrofa")
public suspend fun secretStore(`value`: Output) {
this.secretStore = value
}
/**
* @param value The tags of the resource.
*/
@JvmName("uthfbsccpyvlcgbj")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The identity of the user.
*/
@JvmName("isuualvvhjvdkhgg")
public suspend fun identity(`value`: UserIdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument The identity of the user.
*/
@JvmName("gyqlnhuwvtayvwjl")
public suspend fun identity(argument: suspend UserIdentityArgsBuilder.() -> Unit) {
val toBeMapped = UserIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The name of the lab.
*/
@JvmName("vrswqjpkcilxikft")
public suspend fun labName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labName = mapped
}
/**
* @param value The location of the resource.
*/
@JvmName("asmbjtbbwfiyeeis")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the user profile.
*/
@JvmName("iqeppwbujncfltfn")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("xxayurivuixvkrwu")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The secret store of the user.
*/
@JvmName("jlirmamntdsnurfc")
public suspend fun secretStore(`value`: UserSecretStoreArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.secretStore = mapped
}
/**
* @param argument The secret store of the user.
*/
@JvmName("uwjefggexvybkpvi")
public suspend fun secretStore(argument: suspend UserSecretStoreArgsBuilder.() -> Unit) {
val toBeMapped = UserSecretStoreArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.secretStore = mapped
}
/**
* @param value The tags of the resource.
*/
@JvmName("vrsrfsnkllbbkjhm")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The tags of the resource.
*/
@JvmName("ggdqvivcuoreanqw")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): UserArgs = UserArgs(
identity = identity,
labName = labName,
location = location,
name = name,
resourceGroupName = resourceGroupName,
secretStore = secretStore,
tags = tags,
)
}