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.IoTRoleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.databoxedge.kotlin
import com.pulumi.azurenative.databoxedge.IoTRoleArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.enums.PlatformType
import com.pulumi.azurenative.databoxedge.kotlin.enums.RoleStatus
import com.pulumi.azurenative.databoxedge.kotlin.inputs.ComputeResourceArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.ComputeResourceArgsBuilder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.IoTDeviceInfoArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.IoTDeviceInfoArgsBuilder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.IoTEdgeAgentInfoArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.IoTEdgeAgentInfoArgsBuilder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.MountPointMapArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.MountPointMapArgsBuilder
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.collections.List
import kotlin.jvm.JvmName
/**
* Compute role.
* Azure REST API version: 2022-03-01. Prior API version in Azure Native 1.x: 2020-12-01.
* ## Example Usage
* ### RolePut
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var ioTRole = new AzureNative.DataBoxEdge.IoTRole("ioTRole", new()
* {
* DeviceName = "testedgedevice",
* HostPlatform = AzureNative.DataBoxEdge.PlatformType.Linux,
* IoTDeviceDetails = new AzureNative.DataBoxEdge.Inputs.IoTDeviceInfoArgs
* {
* Authentication = new AzureNative.DataBoxEdge.Inputs.AuthenticationArgs
* {
* SymmetricKey = new AzureNative.DataBoxEdge.Inputs.SymmetricKeyArgs
* {
* ConnectionString = new AzureNative.DataBoxEdge.Inputs.AsymmetricEncryptedSecretArgs
* {
* EncryptionAlgorithm = AzureNative.DataBoxEdge.EncryptionAlgorithm.AES256,
* EncryptionCertThumbprint = "348586569999244",
* Value = "Encrypted<>",
* },
* },
* },
* DeviceId = "iotdevice",
* IoTHostHub = "iothub.azure-devices.net",
* },
* IoTEdgeDeviceDetails = new AzureNative.DataBoxEdge.Inputs.IoTDeviceInfoArgs
* {
* Authentication = new AzureNative.DataBoxEdge.Inputs.AuthenticationArgs
* {
* SymmetricKey = new AzureNative.DataBoxEdge.Inputs.SymmetricKeyArgs
* {
* ConnectionString = new AzureNative.DataBoxEdge.Inputs.AsymmetricEncryptedSecretArgs
* {
* EncryptionAlgorithm = AzureNative.DataBoxEdge.EncryptionAlgorithm.AES256,
* EncryptionCertThumbprint = "1245475856069999244",
* Value = "Encrypted<>",
* },
* },
* },
* DeviceId = "iotEdge",
* IoTHostHub = "iothub.azure-devices.net",
* },
* Kind = "IOT",
* Name = "IoTRole1",
* ResourceGroupName = "GroupForEdgeAutomation",
* RoleStatus = AzureNative.DataBoxEdge.RoleStatus.Enabled,
* ShareMappings = new[] {},
* });
* });
* ```
* ```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.NewIoTRole(ctx, "ioTRole", &databoxedge.IoTRoleArgs{
* DeviceName: pulumi.String("testedgedevice"),
* HostPlatform: pulumi.String(databoxedge.PlatformTypeLinux),
* IoTDeviceDetails: &databoxedge.IoTDeviceInfoArgs{
* Authentication: &databoxedge.AuthenticationArgs{
* SymmetricKey: &databoxedge.SymmetricKeyArgs{
* ConnectionString: &databoxedge.AsymmetricEncryptedSecretArgs{
* EncryptionAlgorithm: pulumi.String(databoxedge.EncryptionAlgorithmAES256),
* EncryptionCertThumbprint: pulumi.String("348586569999244"),
* Value: pulumi.String("Encrypted<>"),
* },
* },
* },
* DeviceId: pulumi.String("iotdevice"),
* IoTHostHub: pulumi.String("iothub.azure-devices.net"),
* },
* IoTEdgeDeviceDetails: &databoxedge.IoTDeviceInfoArgs{
* Authentication: &databoxedge.AuthenticationArgs{
* SymmetricKey: &databoxedge.SymmetricKeyArgs{
* ConnectionString: &databoxedge.AsymmetricEncryptedSecretArgs{
* EncryptionAlgorithm: pulumi.String(databoxedge.EncryptionAlgorithmAES256),
* EncryptionCertThumbprint: pulumi.String("1245475856069999244"),
* Value: pulumi.String("Encrypted<>"),
* },
* },
* },
* DeviceId: pulumi.String("iotEdge"),
* IoTHostHub: pulumi.String("iothub.azure-devices.net"),
* },
* Kind: pulumi.String("IOT"),
* Name: pulumi.String("IoTRole1"),
* ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
* RoleStatus: pulumi.String(databoxedge.RoleStatusEnabled),
* ShareMappings: databoxedge.MountPointMapArray{},
* })
* 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.IoTRole;
* import com.pulumi.azurenative.databoxedge.IoTRoleArgs;
* import com.pulumi.azurenative.databoxedge.inputs.IoTDeviceInfoArgs;
* import com.pulumi.azurenative.databoxedge.inputs.AuthenticationArgs;
* import com.pulumi.azurenative.databoxedge.inputs.SymmetricKeyArgs;
* 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 ioTRole = new IoTRole("ioTRole", IoTRoleArgs.builder()
* .deviceName("testedgedevice")
* .hostPlatform("Linux")
* .ioTDeviceDetails(IoTDeviceInfoArgs.builder()
* .authentication(AuthenticationArgs.builder()
* .symmetricKey(SymmetricKeyArgs.builder()
* .connectionString(AsymmetricEncryptedSecretArgs.builder()
* .encryptionAlgorithm("AES256")
* .encryptionCertThumbprint("348586569999244")
* .value("Encrypted<>")
* .build())
* .build())
* .build())
* .deviceId("iotdevice")
* .ioTHostHub("iothub.azure-devices.net")
* .build())
* .ioTEdgeDeviceDetails(IoTDeviceInfoArgs.builder()
* .authentication(AuthenticationArgs.builder()
* .symmetricKey(SymmetricKeyArgs.builder()
* .connectionString(AsymmetricEncryptedSecretArgs.builder()
* .encryptionAlgorithm("AES256")
* .encryptionCertThumbprint("1245475856069999244")
* .value("Encrypted<>")
* .build())
* .build())
* .build())
* .deviceId("iotEdge")
* .ioTHostHub("iothub.azure-devices.net")
* .build())
* .kind("IOT")
* .name("IoTRole1")
* .resourceGroupName("GroupForEdgeAutomation")
* .roleStatus("Enabled")
* .shareMappings()
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:databoxedge:IoTRole IoTRole1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}
* ```
* @property computeResource Resource allocation
* @property deviceName The device name.
* @property hostPlatform Host OS supported by the IoT role.
* @property ioTDeviceDetails IoT device metadata to which data box edge device needs to be connected.
* @property ioTEdgeAgentInfo Iot edge agent details to download the agent and bootstrap iot runtime.
* @property ioTEdgeDeviceDetails IoT edge device to which the IoT role needs to be configured.
* @property kind Role type.
* Expected value is 'IOT'.
* @property name The role name.
* @property resourceGroupName The resource group name.
* @property roleStatus Role status.
* @property shareMappings Mount points of shares in role(s).
*/
public data class IoTRoleArgs(
public val computeResource: Output? = null,
public val deviceName: Output? = null,
public val hostPlatform: Output>? = null,
public val ioTDeviceDetails: Output? = null,
public val ioTEdgeAgentInfo: Output? = null,
public val ioTEdgeDeviceDetails: Output? = null,
public val kind: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val roleStatus: Output>? = null,
public val shareMappings: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.databoxedge.IoTRoleArgs =
com.pulumi.azurenative.databoxedge.IoTRoleArgs.builder()
.computeResource(computeResource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deviceName(deviceName?.applyValue({ args0 -> args0 }))
.hostPlatform(
hostPlatform?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.ioTDeviceDetails(ioTDeviceDetails?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.ioTEdgeAgentInfo(ioTEdgeAgentInfo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.ioTEdgeDeviceDetails(
ioTEdgeDeviceDetails?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.kind(kind?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.roleStatus(
roleStatus?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.shareMappings(
shareMappings?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [IoTRoleArgs].
*/
@PulumiTagMarker
public class IoTRoleArgsBuilder internal constructor() {
private var computeResource: Output? = null
private var deviceName: Output? = null
private var hostPlatform: Output>? = null
private var ioTDeviceDetails: Output? = null
private var ioTEdgeAgentInfo: Output? = null
private var ioTEdgeDeviceDetails: Output? = null
private var kind: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var roleStatus: Output>? = null
private var shareMappings: Output>? = null
/**
* @param value Resource allocation
*/
@JvmName("dgbvdrvdfdxincuw")
public suspend fun computeResource(`value`: Output) {
this.computeResource = value
}
/**
* @param value The device name.
*/
@JvmName("bldfukeaqfskhhus")
public suspend fun deviceName(`value`: Output) {
this.deviceName = value
}
/**
* @param value Host OS supported by the IoT role.
*/
@JvmName("pecbyevvdfnrwlhs")
public suspend fun hostPlatform(`value`: Output>) {
this.hostPlatform = value
}
/**
* @param value IoT device metadata to which data box edge device needs to be connected.
*/
@JvmName("yrmdsrsvdibttdlg")
public suspend fun ioTDeviceDetails(`value`: Output) {
this.ioTDeviceDetails = value
}
/**
* @param value Iot edge agent details to download the agent and bootstrap iot runtime.
*/
@JvmName("krvgrmubxnpdunnj")
public suspend fun ioTEdgeAgentInfo(`value`: Output) {
this.ioTEdgeAgentInfo = value
}
/**
* @param value IoT edge device to which the IoT role needs to be configured.
*/
@JvmName("gvcjpnwxofigjugg")
public suspend fun ioTEdgeDeviceDetails(`value`: Output) {
this.ioTEdgeDeviceDetails = value
}
/**
* @param value Role type.
* Expected value is 'IOT'.
*/
@JvmName("dqunpqsfddtnvfjm")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value The role name.
*/
@JvmName("cluvtdtrasqofiio")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The resource group name.
*/
@JvmName("aikkispsyvdwykwx")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Role status.
*/
@JvmName("vtwdxaeremxkknfd")
public suspend fun roleStatus(`value`: Output>) {
this.roleStatus = value
}
/**
* @param value Mount points of shares in role(s).
*/
@JvmName("hidvuwqdtlilauky")
public suspend fun shareMappings(`value`: Output>) {
this.shareMappings = value
}
@JvmName("wsyiewflhjmxbyvt")
public suspend fun shareMappings(vararg values: Output) {
this.shareMappings = Output.all(values.asList())
}
/**
* @param values Mount points of shares in role(s).
*/
@JvmName("wtywekxlhawmcllf")
public suspend fun shareMappings(values: List>) {
this.shareMappings = Output.all(values)
}
/**
* @param value Resource allocation
*/
@JvmName("yjwvcbcijeheguqi")
public suspend fun computeResource(`value`: ComputeResourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.computeResource = mapped
}
/**
* @param argument Resource allocation
*/
@JvmName("xvkwrkcdtybdvjul")
public suspend fun computeResource(argument: suspend ComputeResourceArgsBuilder.() -> Unit) {
val toBeMapped = ComputeResourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.computeResource = mapped
}
/**
* @param value The device name.
*/
@JvmName("cyjrfjmdqrxannbd")
public suspend fun deviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deviceName = mapped
}
/**
* @param value Host OS supported by the IoT role.
*/
@JvmName("lffjjmypqoarhnmf")
public suspend fun hostPlatform(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostPlatform = mapped
}
/**
* @param value Host OS supported by the IoT role.
*/
@JvmName("lmqmxelmqknbswgc")
public fun hostPlatform(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hostPlatform = mapped
}
/**
* @param value Host OS supported by the IoT role.
*/
@JvmName("egtrayoedrlhdtvc")
public fun hostPlatform(`value`: PlatformType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hostPlatform = mapped
}
/**
* @param value IoT device metadata to which data box edge device needs to be connected.
*/
@JvmName("ntvpcygemgksyhji")
public suspend fun ioTDeviceDetails(`value`: IoTDeviceInfoArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ioTDeviceDetails = mapped
}
/**
* @param argument IoT device metadata to which data box edge device needs to be connected.
*/
@JvmName("ewxwfeilrvrpywvb")
public suspend fun ioTDeviceDetails(argument: suspend IoTDeviceInfoArgsBuilder.() -> Unit) {
val toBeMapped = IoTDeviceInfoArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.ioTDeviceDetails = mapped
}
/**
* @param value Iot edge agent details to download the agent and bootstrap iot runtime.
*/
@JvmName("jmligmhrvtqusqhh")
public suspend fun ioTEdgeAgentInfo(`value`: IoTEdgeAgentInfoArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ioTEdgeAgentInfo = mapped
}
/**
* @param argument Iot edge agent details to download the agent and bootstrap iot runtime.
*/
@JvmName("gaennwkqardjpokf")
public suspend fun ioTEdgeAgentInfo(argument: suspend IoTEdgeAgentInfoArgsBuilder.() -> Unit) {
val toBeMapped = IoTEdgeAgentInfoArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.ioTEdgeAgentInfo = mapped
}
/**
* @param value IoT edge device to which the IoT role needs to be configured.
*/
@JvmName("uysibgacnarsjwja")
public suspend fun ioTEdgeDeviceDetails(`value`: IoTDeviceInfoArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ioTEdgeDeviceDetails = mapped
}
/**
* @param argument IoT edge device to which the IoT role needs to be configured.
*/
@JvmName("rdeljrjlgjcycjjl")
public suspend fun ioTEdgeDeviceDetails(argument: suspend IoTDeviceInfoArgsBuilder.() -> Unit) {
val toBeMapped = IoTDeviceInfoArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.ioTEdgeDeviceDetails = mapped
}
/**
* @param value Role type.
* Expected value is 'IOT'.
*/
@JvmName("thfyekrhxksrumcn")
public suspend fun kind(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value The role name.
*/
@JvmName("amuayvrncowihspb")
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("gxkidjfakvsgtjet")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Role status.
*/
@JvmName("kgxefblpsyrnqryq")
public suspend fun roleStatus(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.roleStatus = mapped
}
/**
* @param value Role status.
*/
@JvmName("exkcrixbyykboeko")
public fun roleStatus(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.roleStatus = mapped
}
/**
* @param value Role status.
*/
@JvmName("efeynuqguwpsqlac")
public fun roleStatus(`value`: RoleStatus) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.roleStatus = mapped
}
/**
* @param value Mount points of shares in role(s).
*/
@JvmName("lpdtmqgxxcsvxyul")
public suspend fun shareMappings(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.shareMappings = mapped
}
/**
* @param argument Mount points of shares in role(s).
*/
@JvmName("jiekjqwbkcetehuo")
public suspend fun shareMappings(argument: List Unit>) {
val toBeMapped = argument.toList().map {
MountPointMapArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.shareMappings = mapped
}
/**
* @param argument Mount points of shares in role(s).
*/
@JvmName("tvtccwkmtrafhiiq")
public suspend fun shareMappings(vararg argument: suspend MountPointMapArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
MountPointMapArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.shareMappings = mapped
}
/**
* @param argument Mount points of shares in role(s).
*/
@JvmName("bygcbrcllhepmwrn")
public suspend fun shareMappings(argument: suspend MountPointMapArgsBuilder.() -> Unit) {
val toBeMapped = listOf(MountPointMapArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.shareMappings = mapped
}
/**
* @param values Mount points of shares in role(s).
*/
@JvmName("qdqhfoeabjodrcog")
public suspend fun shareMappings(vararg values: MountPointMapArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.shareMappings = mapped
}
internal fun build(): IoTRoleArgs = IoTRoleArgs(
computeResource = computeResource,
deviceName = deviceName,
hostPlatform = hostPlatform,
ioTDeviceDetails = ioTDeviceDetails,
ioTEdgeAgentInfo = ioTEdgeAgentInfo,
ioTEdgeDeviceDetails = ioTEdgeDeviceDetails,
kind = kind,
name = name,
resourceGroupName = resourceGroupName,
roleStatus = roleStatus,
shareMappings = shareMappings,
)
}