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

com.pulumi.azurenative.healthcareapis.kotlin.IotConnectorArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.healthcareapis.kotlin

import com.pulumi.azurenative.healthcareapis.IotConnectorArgs.builder
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.IotEventHubIngestionEndpointConfigurationArgs
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.IotEventHubIngestionEndpointConfigurationArgsBuilder
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.IotMappingPropertiesArgs
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.IotMappingPropertiesArgsBuilder
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.ServiceManagedIdentityIdentityArgs
import com.pulumi.azurenative.healthcareapis.kotlin.inputs.ServiceManagedIdentityIdentityArgsBuilder
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

/**
 * IoT Connector definition.
 * Azure REST API version: 2023-02-28. Prior API version in Azure Native 1.x: 2022-05-15.
 * Other available API versions: 2023-09-06, 2023-11-01, 2023-12-01, 2024-03-01, 2024-03-31.
 * ## Example Usage
 * ### Create an IoT Connector
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var iotConnector = new AzureNative.HealthcareApis.IotConnector("iotConnector", new()
 *     {
 *         DeviceMapping = new AzureNative.HealthcareApis.Inputs.IotMappingPropertiesArgs
 *         {
 *             Content = new Dictionary
 *             {
 *                 ["template"] = new[]
 *                 {
 *                     new Dictionary
 *                     {
 *                         ["template"] = new Dictionary
 *                         {
 *                             ["deviceIdExpression"] = "$.deviceid",
 *                             ["timestampExpression"] = "$.measurementdatetime",
 *                             ["typeMatchExpression"] = "$..[?(@heartrate)]",
 *                             ["typeName"] = "heartrate",
 *                             ["values"] = new[]
 *                             {
 *                                 new Dictionary
 *                                 {
 *                                     ["required"] = "true",
 *                                     ["valueExpression"] = "$.heartrate",
 *                                     ["valueName"] = "hr",
 *                                 },
 *                             },
 *                         },
 *                         ["templateType"] = "JsonPathContent",
 *                     },
 *                 },
 *                 ["templateType"] = "CollectionContent",
 *             },
 *         },
 *         Identity = new AzureNative.HealthcareApis.Inputs.ServiceManagedIdentityIdentityArgs
 *         {
 *             Type = AzureNative.HealthcareApis.ServiceManagedIdentityType.SystemAssigned,
 *         },
 *         IngestionEndpointConfiguration = new AzureNative.HealthcareApis.Inputs.IotEventHubIngestionEndpointConfigurationArgs
 *         {
 *             ConsumerGroup = "ConsumerGroupA",
 *             EventHubName = "MyEventHubName",
 *             FullyQualifiedEventHubNamespace = "myeventhub.servicesbus.windows.net",
 *         },
 *         IotConnectorName = "blue",
 *         Location = "westus",
 *         ResourceGroupName = "testRG",
 *         Tags =
 *         {
 *             { "additionalProp1", "string" },
 *             { "additionalProp2", "string" },
 *             { "additionalProp3", "string" },
 *         },
 *         WorkspaceName = "workspace1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	healthcareapis "github.com/pulumi/pulumi-azure-native-sdk/healthcareapis/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := healthcareapis.NewIotConnector(ctx, "iotConnector", &healthcareapis.IotConnectorArgs{
 * 			DeviceMapping: &healthcareapis.IotMappingPropertiesArgs{
 * 				Content: pulumi.Any(map[string]interface{}{
 * 					"template": []map[string]interface{}{
 * 						map[string]interface{}{
 * 							"template": map[string]interface{}{
 * 								"deviceIdExpression":  "$.deviceid",
 * 								"timestampExpression": "$.measurementdatetime",
 * 								"typeMatchExpression": "$..[?(@heartrate)]",
 * 								"typeName":            "heartrate",
 * 								"values": []map[string]interface{}{
 * 									map[string]interface{}{
 * 										"required":        "true",
 * 										"valueExpression": "$.heartrate",
 * 										"valueName":       "hr",
 * 									},
 * 								},
 * 							},
 * 							"templateType": "JsonPathContent",
 * 						},
 * 					},
 * 					"templateType": "CollectionContent",
 * 				}),
 * 			},
 * 			Identity: &healthcareapis.ServiceManagedIdentityIdentityArgs{
 * 				Type: pulumi.String(healthcareapis.ServiceManagedIdentityTypeSystemAssigned),
 * 			},
 * 			IngestionEndpointConfiguration: &healthcareapis.IotEventHubIngestionEndpointConfigurationArgs{
 * 				ConsumerGroup:                   pulumi.String("ConsumerGroupA"),
 * 				EventHubName:                    pulumi.String("MyEventHubName"),
 * 				FullyQualifiedEventHubNamespace: pulumi.String("myeventhub.servicesbus.windows.net"),
 * 			},
 * 			IotConnectorName:  pulumi.String("blue"),
 * 			Location:          pulumi.String("westus"),
 * 			ResourceGroupName: pulumi.String("testRG"),
 * 			Tags: pulumi.StringMap{
 * 				"additionalProp1": pulumi.String("string"),
 * 				"additionalProp2": pulumi.String("string"),
 * 				"additionalProp3": pulumi.String("string"),
 * 			},
 * 			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.healthcareapis.IotConnector;
 * import com.pulumi.azurenative.healthcareapis.IotConnectorArgs;
 * import com.pulumi.azurenative.healthcareapis.inputs.IotMappingPropertiesArgs;
 * import com.pulumi.azurenative.healthcareapis.inputs.ServiceManagedIdentityIdentityArgs;
 * import com.pulumi.azurenative.healthcareapis.inputs.IotEventHubIngestionEndpointConfigurationArgs;
 * 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 iotConnector = new IotConnector("iotConnector", IotConnectorArgs.builder()
 *             .deviceMapping(IotMappingPropertiesArgs.builder()
 *                 .content(Map.ofEntries(
 *                     Map.entry("template", Map.ofEntries(
 *                         Map.entry("template", Map.ofEntries(
 *                             Map.entry("deviceIdExpression", "$.deviceid"),
 *                             Map.entry("timestampExpression", "$.measurementdatetime"),
 *                             Map.entry("typeMatchExpression", "$..[?(@heartrate)]"),
 *                             Map.entry("typeName", "heartrate"),
 *                             Map.entry("values", Map.ofEntries(
 *                                 Map.entry("required", "true"),
 *                                 Map.entry("valueExpression", "$.heartrate"),
 *                                 Map.entry("valueName", "hr")
 *                             ))
 *                         )),
 *                         Map.entry("templateType", "JsonPathContent")
 *                     )),
 *                     Map.entry("templateType", "CollectionContent")
 *                 ))
 *                 .build())
 *             .identity(ServiceManagedIdentityIdentityArgs.builder()
 *                 .type("SystemAssigned")
 *                 .build())
 *             .ingestionEndpointConfiguration(IotEventHubIngestionEndpointConfigurationArgs.builder()
 *                 .consumerGroup("ConsumerGroupA")
 *                 .eventHubName("MyEventHubName")
 *                 .fullyQualifiedEventHubNamespace("myeventhub.servicesbus.windows.net")
 *                 .build())
 *             .iotConnectorName("blue")
 *             .location("westus")
 *             .resourceGroupName("testRG")
 *             .tags(Map.ofEntries(
 *                 Map.entry("additionalProp1", "string"),
 *                 Map.entry("additionalProp2", "string"),
 *                 Map.entry("additionalProp3", "string")
 *             ))
 *             .workspaceName("workspace1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:healthcareapis:IotConnector blue /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}
 * ```
 * @property deviceMapping Device Mappings.
 * @property identity Setting indicating whether the service has a managed identity associated with it.
 * @property ingestionEndpointConfiguration Source configuration.
 * @property iotConnectorName The name of IoT Connector resource.
 * @property location The resource location.
 * @property resourceGroupName The name of the resource group that contains the service instance.
 * @property tags Resource tags.
 * @property workspaceName The name of workspace resource.
 */
public data class IotConnectorArgs(
    public val deviceMapping: Output? = null,
    public val identity: Output? = null,
    public val ingestionEndpointConfiguration: Output? =
        null,
    public val iotConnectorName: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val workspaceName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.healthcareapis.IotConnectorArgs =
        com.pulumi.azurenative.healthcareapis.IotConnectorArgs.builder()
            .deviceMapping(deviceMapping?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingestionEndpointConfiguration(
                ingestionEndpointConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .iotConnectorName(iotConnectorName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IotConnectorArgs].
 */
@PulumiTagMarker
public class IotConnectorArgsBuilder internal constructor() {
    private var deviceMapping: Output? = null

    private var identity: Output? = null

    private var ingestionEndpointConfiguration: Output? =
        null

    private var iotConnectorName: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var workspaceName: Output? = null

    /**
     * @param value Device Mappings.
     */
    @JvmName("eqbpsqmpukbgbfop")
    public suspend fun deviceMapping(`value`: Output) {
        this.deviceMapping = value
    }

    /**
     * @param value Setting indicating whether the service has a managed identity associated with it.
     */
    @JvmName("htwciusvubmmqjny")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Source configuration.
     */
    @JvmName("clsbwpafqxgeknhc")
    public suspend fun ingestionEndpointConfiguration(`value`: Output) {
        this.ingestionEndpointConfiguration = value
    }

    /**
     * @param value The name of IoT Connector resource.
     */
    @JvmName("rgrmhgmqwkcfqnsr")
    public suspend fun iotConnectorName(`value`: Output) {
        this.iotConnectorName = value
    }

    /**
     * @param value The resource location.
     */
    @JvmName("qolwwbfngdcudqkq")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the resource group that contains the service instance.
     */
    @JvmName("atyyithnykarweoh")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("qdqqwpysaqnhnvwi")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The name of workspace resource.
     */
    @JvmName("gkrmgqbhuwhkiubi")
    public suspend fun workspaceName(`value`: Output) {
        this.workspaceName = value
    }

    /**
     * @param value Device Mappings.
     */
    @JvmName("fnxcixgtxwyldirv")
    public suspend fun deviceMapping(`value`: IotMappingPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceMapping = mapped
    }

    /**
     * @param argument Device Mappings.
     */
    @JvmName("rwecydrpmriywins")
    public suspend fun deviceMapping(argument: suspend IotMappingPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = IotMappingPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deviceMapping = mapped
    }

    /**
     * @param value Setting indicating whether the service has a managed identity associated with it.
     */
    @JvmName("fypklywftkxkkerl")
    public suspend fun identity(`value`: ServiceManagedIdentityIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument Setting indicating whether the service has a managed identity associated with it.
     */
    @JvmName("vslcjarlfpachnie")
    public suspend fun identity(argument: suspend ServiceManagedIdentityIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceManagedIdentityIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Source configuration.
     */
    @JvmName("ausdulcuaptxtjbl")
    public suspend fun ingestionEndpointConfiguration(`value`: IotEventHubIngestionEndpointConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingestionEndpointConfiguration = mapped
    }

    /**
     * @param argument Source configuration.
     */
    @JvmName("denyptvkgmubwotf")
    public suspend fun ingestionEndpointConfiguration(argument: suspend IotEventHubIngestionEndpointConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = IotEventHubIngestionEndpointConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.ingestionEndpointConfiguration = mapped
    }

    /**
     * @param value The name of IoT Connector resource.
     */
    @JvmName("lxocqejhlyjobsjt")
    public suspend fun iotConnectorName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iotConnectorName = mapped
    }

    /**
     * @param value The resource location.
     */
    @JvmName("eymidxccmeihnfvi")
    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 resource group that contains the service instance.
     */
    @JvmName("bvwaivlmhijwbnsv")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("vqgjhqormulxhtvd")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("bitefygqejgxjrue")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

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

    internal fun build(): IotConnectorArgs = IotConnectorArgs(
        deviceMapping = deviceMapping,
        identity = identity,
        ingestionEndpointConfiguration = ingestionEndpointConfiguration,
        iotConnectorName = iotConnectorName,
        location = location,
        resourceGroupName = resourceGroupName,
        tags = tags,
        workspaceName = workspaceName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy