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.databoxedge.kotlin.UserArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.databoxedge.kotlin
import com.pulumi.azurenative.databoxedge.UserArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.enums.UserType
import com.pulumi.azurenative.databoxedge.kotlin.inputs.AsymmetricEncryptedSecretArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.AsymmetricEncryptedSecretArgsBuilder
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Represents a user who has access to one or more shares on the Data Box Edge/Gateway device.
* Azure REST API version: 2022-03-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2019-07-01, 2019-08-01, 2021-02-01-preview, 2023-01-01-preview, 2023-07-01, 2023-12-01.
* ## Example Usage
* ### UserPut
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var user = new AzureNative.DataBoxEdge.User("user", new()
* {
* DeviceName = "testedgedevice",
* EncryptedPassword = new AzureNative.DataBoxEdge.Inputs.AsymmetricEncryptedSecretArgs
* {
* EncryptionAlgorithm = AzureNative.DataBoxEdge.EncryptionAlgorithm.None,
* EncryptionCertThumbprint = "blah",
* Value = "",
* },
* Name = "user1",
* ResourceGroupName = "GroupForEdgeAutomation",
* UserType = AzureNative.DataBoxEdge.UserType.Share,
* });
* });
* ```
* ```go
* package main
* import (
* databoxedge "github.com/pulumi/pulumi-azure-native-sdk/databoxedge/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := databoxedge.NewUser(ctx, "user", &databoxedge.UserArgs{
* DeviceName: pulumi.String("testedgedevice"),
* EncryptedPassword: &databoxedge.AsymmetricEncryptedSecretArgs{
* EncryptionAlgorithm: pulumi.String(databoxedge.EncryptionAlgorithmNone),
* EncryptionCertThumbprint: pulumi.String("blah"),
* Value: pulumi.String(""),
* },
* Name: pulumi.String("user1"),
* ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
* UserType: pulumi.String(databoxedge.UserTypeShare),
* })
* 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.databoxedge.User;
* import com.pulumi.azurenative.databoxedge.UserArgs;
* import com.pulumi.azurenative.databoxedge.inputs.AsymmetricEncryptedSecretArgs;
* 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()
* .deviceName("testedgedevice")
* .encryptedPassword(AsymmetricEncryptedSecretArgs.builder()
* .encryptionAlgorithm("None")
* .encryptionCertThumbprint("blah")
* .value("")
* .build())
* .name("user1")
* .resourceGroupName("GroupForEdgeAutomation")
* .userType("Share")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:databoxedge:User user1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}
* ```
* @property deviceName The device name.
* @property encryptedPassword The password details.
* @property name The user name.
* @property resourceGroupName The resource group name.
* @property userType Type of the user.
*/
public data class UserArgs(
public val deviceName: Output? = null,
public val encryptedPassword: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val userType: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.databoxedge.UserArgs =
com.pulumi.azurenative.databoxedge.UserArgs.builder()
.deviceName(deviceName?.applyValue({ args0 -> args0 }))
.encryptedPassword(encryptedPassword?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.userType(
userType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [UserArgs].
*/
@PulumiTagMarker
public class UserArgsBuilder internal constructor() {
private var deviceName: Output? = null
private var encryptedPassword: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var userType: Output>? = null
/**
* @param value The device name.
*/
@JvmName("cgxkafvkordgvmtb")
public suspend fun deviceName(`value`: Output) {
this.deviceName = value
}
/**
* @param value The password details.
*/
@JvmName("alripshvehaequpa")
public suspend fun encryptedPassword(`value`: Output) {
this.encryptedPassword = value
}
/**
* @param value The user name.
*/
@JvmName("fddolajgerjykqiq")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The resource group name.
*/
@JvmName("evcbvdtkarrlkjgl")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Type of the user.
*/
@JvmName("kxslbafjapjvitnf")
public suspend fun userType(`value`: Output>) {
this.userType = value
}
/**
* @param value The device name.
*/
@JvmName("gdxaghdayechykmq")
public suspend fun deviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deviceName = mapped
}
/**
* @param value The password details.
*/
@JvmName("fdujmrakuqrhafyy")
public suspend fun encryptedPassword(`value`: AsymmetricEncryptedSecretArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryptedPassword = mapped
}
/**
* @param argument The password details.
*/
@JvmName("igdihqngdkxomljj")
public suspend fun encryptedPassword(argument: suspend AsymmetricEncryptedSecretArgsBuilder.() -> Unit) {
val toBeMapped = AsymmetricEncryptedSecretArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.encryptedPassword = mapped
}
/**
* @param value The user name.
*/
@JvmName("tocfsypebavyyhgl")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The resource group name.
*/
@JvmName("mhmncefbegtypwsu")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Type of the user.
*/
@JvmName("gjylamaabkbmwnmj")
public suspend fun userType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.userType = mapped
}
/**
* @param value Type of the user.
*/
@JvmName("xkfdyhgnjlvixhww")
public fun userType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.userType = mapped
}
/**
* @param value Type of the user.
*/
@JvmName("gcycsbtrnicxydoj")
public fun userType(`value`: UserType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.userType = mapped
}
internal fun build(): UserArgs = UserArgs(
deviceName = deviceName,
encryptedPassword = encryptedPassword,
name = name,
resourceGroupName = resourceGroupName,
userType = userType,
)
}