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

com.pulumi.azurenative.databoxedge.kotlin.MECRoleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.databoxedge.kotlin

import com.pulumi.azurenative.databoxedge.MECRoleArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.enums.RoleStatus
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

/**
 * MEC 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 mecRole = new AzureNative.DataBoxEdge.MECRole("mecRole", new()
 *     {
 *         DeviceName = "testedgedevice",
 *         Name = "IoTRole1",
 *         ResourceGroupName = "GroupForEdgeAutomation",
 *     });
 * });
 * ```
 * ```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.NewMECRole(ctx, "mecRole", &databoxedge.MECRoleArgs{
 * 			DeviceName:        pulumi.String("testedgedevice"),
 * 			Name:              pulumi.String("IoTRole1"),
 * 			ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
 * 		})
 * 		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.MECRole;
 * import com.pulumi.azurenative.databoxedge.MECRoleArgs;
 * 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 mecRole = new MECRole("mecRole", MECRoleArgs.builder()
 *             .deviceName("testedgedevice")
 *             .name("IoTRole1")
 *             .resourceGroupName("GroupForEdgeAutomation")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:databoxedge:MECRole IoTRole1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}
 * ```
 * @property connectionString Activation key of the MEC.
 * @property controllerEndpoint Controller Endpoint.
 * @property deviceName The device name.
 * @property kind Role type.
 * Expected value is 'MEC'.
 * @property name The role name.
 * @property resourceGroupName The resource group name.
 * @property resourceUniqueId Unique Id of the Resource.
 * @property roleStatus Role status.
 */
public data class MECRoleArgs(
    public val connectionString: Output? = null,
    public val controllerEndpoint: Output? = null,
    public val deviceName: Output? = null,
    public val kind: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val resourceUniqueId: Output? = null,
    public val roleStatus: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.databoxedge.MECRoleArgs =
        com.pulumi.azurenative.databoxedge.MECRoleArgs.builder()
            .connectionString(connectionString?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .controllerEndpoint(controllerEndpoint?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourceUniqueId(resourceUniqueId?.applyValue({ args0 -> args0 }))
            .roleStatus(
                roleStatus?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [MECRoleArgs].
 */
@PulumiTagMarker
public class MECRoleArgsBuilder internal constructor() {
    private var connectionString: Output? = null

    private var controllerEndpoint: Output? = null

    private var deviceName: Output? = null

    private var kind: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var resourceUniqueId: Output? = null

    private var roleStatus: Output>? = null

    /**
     * @param value Activation key of the MEC.
     */
    @JvmName("qgcmkfiiitksdwyv")
    public suspend fun connectionString(`value`: Output) {
        this.connectionString = value
    }

    /**
     * @param value Controller Endpoint.
     */
    @JvmName("jdkscbkwadetxril")
    public suspend fun controllerEndpoint(`value`: Output) {
        this.controllerEndpoint = value
    }

    /**
     * @param value The device name.
     */
    @JvmName("jcpryugunxttprsy")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value Role type.
     * Expected value is 'MEC'.
     */
    @JvmName("ijgbcxogoqfikvfv")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value The role name.
     */
    @JvmName("plcubhnvpfvpwuqh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The resource group name.
     */
    @JvmName("aixhkyciknyhmxcg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Unique Id of the Resource.
     */
    @JvmName("eldyuvrtbfmerbau")
    public suspend fun resourceUniqueId(`value`: Output) {
        this.resourceUniqueId = value
    }

    /**
     * @param value Role status.
     */
    @JvmName("cpbspilqdrvvqgqy")
    public suspend fun roleStatus(`value`: Output>) {
        this.roleStatus = value
    }

    /**
     * @param value Activation key of the MEC.
     */
    @JvmName("bqodrqucumtjciol")
    public suspend fun connectionString(`value`: AsymmetricEncryptedSecretArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionString = mapped
    }

    /**
     * @param argument Activation key of the MEC.
     */
    @JvmName("vwdmwbyofklaeetg")
    public suspend fun connectionString(argument: suspend AsymmetricEncryptedSecretArgsBuilder.() -> Unit) {
        val toBeMapped = AsymmetricEncryptedSecretArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.connectionString = mapped
    }

    /**
     * @param value Controller Endpoint.
     */
    @JvmName("hsbsvfocdlwsgdet")
    public suspend fun controllerEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.controllerEndpoint = mapped
    }

    /**
     * @param value The device name.
     */
    @JvmName("emigtiqnxpktjrnm")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value Role type.
     * Expected value is 'MEC'.
     */
    @JvmName("keadoyeoqerkutdt")
    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("fbokkowbqmonvjni")
    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("wywnlwrkuxdxnwge")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Unique Id of the Resource.
     */
    @JvmName("aqmvpfpbbklynokx")
    public suspend fun resourceUniqueId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceUniqueId = mapped
    }

    /**
     * @param value Role status.
     */
    @JvmName("ppdtlysrvfedywgi")
    public suspend fun roleStatus(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleStatus = mapped
    }

    /**
     * @param value Role status.
     */
    @JvmName("uklthdcvumwlyuhr")
    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("pjfbymtlfciwgjvt")
    public fun roleStatus(`value`: RoleStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roleStatus = mapped
    }

    internal fun build(): MECRoleArgs = MECRoleArgs(
        connectionString = connectionString,
        controllerEndpoint = controllerEndpoint,
        deviceName = deviceName,
        kind = kind,
        name = name,
        resourceGroupName = resourceGroupName,
        resourceUniqueId = resourceUniqueId,
        roleStatus = roleStatus,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy