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

com.pulumi.azure.kusto.kotlin.IotHubDataConnection.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.kusto.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [IotHubDataConnection].
 */
@PulumiTagMarker
public class IotHubDataConnectionResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: IotHubDataConnectionArgs = IotHubDataConnectionArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend IotHubDataConnectionArgsBuilder.() -> Unit) {
        val builder = IotHubDataConnectionArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): IotHubDataConnection {
        val builtJavaResource = com.pulumi.azure.kusto.IotHubDataConnection(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return IotHubDataConnection(builtJavaResource)
    }
}

/**
 * Manages a Kusto (also known as Azure Data Explorer) IotHub Data Connection
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleCluster = new azure.kusto.Cluster("example", {
 *     name: "examplekustocluster",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: {
 *         name: "Standard_D13_v2",
 *         capacity: 2,
 *     },
 * });
 * const exampleDatabase = new azure.kusto.Database("example", {
 *     name: "example-kusto-database",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     clusterName: exampleCluster.name,
 *     hotCachePeriod: "P7D",
 *     softDeletePeriod: "P31D",
 * });
 * const exampleIoTHub = new azure.iot.IoTHub("example", {
 *     name: "exampleIoTHub",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     sku: {
 *         name: "B1",
 *         capacity: 1,
 *     },
 * });
 * const exampleSharedAccessPolicy = new azure.iot.SharedAccessPolicy("example", {
 *     name: "example-shared-access-policy",
 *     resourceGroupName: example.name,
 *     iothubName: exampleIoTHub.name,
 *     registryRead: true,
 * });
 * const exampleConsumerGroup = new azure.iot.ConsumerGroup("example", {
 *     name: "example-consumer-group",
 *     resourceGroupName: example.name,
 *     iothubName: exampleIoTHub.name,
 *     eventhubEndpointName: "events",
 * });
 * const exampleIotHubDataConnection = new azure.kusto.IotHubDataConnection("example", {
 *     name: "my-kusto-iothub-data-connection",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     clusterName: exampleCluster.name,
 *     databaseName: exampleDatabase.name,
 *     iothubId: exampleIoTHub.id,
 *     consumerGroup: exampleConsumerGroup.name,
 *     sharedAccessPolicyName: exampleSharedAccessPolicy.name,
 *     eventSystemProperties: [
 *         "message-id",
 *         "sequence-number",
 *         "to",
 *     ],
 *     tableName: "my-table",
 *     mappingRuleName: "my-table-mapping",
 *     dataFormat: "JSON",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_cluster = azure.kusto.Cluster("example",
 *     name="examplekustocluster",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku=azure.kusto.ClusterSkuArgs(
 *         name="Standard_D13_v2",
 *         capacity=2,
 *     ))
 * example_database = azure.kusto.Database("example",
 *     name="example-kusto-database",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     cluster_name=example_cluster.name,
 *     hot_cache_period="P7D",
 *     soft_delete_period="P31D")
 * example_io_t_hub = azure.iot.IoTHub("example",
 *     name="exampleIoTHub",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     sku=azure.iot.IoTHubSkuArgs(
 *         name="B1",
 *         capacity=1,
 *     ))
 * example_shared_access_policy = azure.iot.SharedAccessPolicy("example",
 *     name="example-shared-access-policy",
 *     resource_group_name=example.name,
 *     iothub_name=example_io_t_hub.name,
 *     registry_read=True)
 * example_consumer_group = azure.iot.ConsumerGroup("example",
 *     name="example-consumer-group",
 *     resource_group_name=example.name,
 *     iothub_name=example_io_t_hub.name,
 *     eventhub_endpoint_name="events")
 * example_iot_hub_data_connection = azure.kusto.IotHubDataConnection("example",
 *     name="my-kusto-iothub-data-connection",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     cluster_name=example_cluster.name,
 *     database_name=example_database.name,
 *     iothub_id=example_io_t_hub.id,
 *     consumer_group=example_consumer_group.name,
 *     shared_access_policy_name=example_shared_access_policy.name,
 *     event_system_properties=[
 *         "message-id",
 *         "sequence-number",
 *         "to",
 *     ],
 *     table_name="my-table",
 *     mapping_rule_name="my-table-mapping",
 *     data_format="JSON")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleCluster = new Azure.Kusto.Cluster("example", new()
 *     {
 *         Name = "examplekustocluster",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
 *         {
 *             Name = "Standard_D13_v2",
 *             Capacity = 2,
 *         },
 *     });
 *     var exampleDatabase = new Azure.Kusto.Database("example", new()
 *     {
 *         Name = "example-kusto-database",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ClusterName = exampleCluster.Name,
 *         HotCachePeriod = "P7D",
 *         SoftDeletePeriod = "P31D",
 *     });
 *     var exampleIoTHub = new Azure.Iot.IoTHub("example", new()
 *     {
 *         Name = "exampleIoTHub",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         Sku = new Azure.Iot.Inputs.IoTHubSkuArgs
 *         {
 *             Name = "B1",
 *             Capacity = 1,
 *         },
 *     });
 *     var exampleSharedAccessPolicy = new Azure.Iot.SharedAccessPolicy("example", new()
 *     {
 *         Name = "example-shared-access-policy",
 *         ResourceGroupName = example.Name,
 *         IothubName = exampleIoTHub.Name,
 *         RegistryRead = true,
 *     });
 *     var exampleConsumerGroup = new Azure.Iot.ConsumerGroup("example", new()
 *     {
 *         Name = "example-consumer-group",
 *         ResourceGroupName = example.Name,
 *         IothubName = exampleIoTHub.Name,
 *         EventhubEndpointName = "events",
 *     });
 *     var exampleIotHubDataConnection = new Azure.Kusto.IotHubDataConnection("example", new()
 *     {
 *         Name = "my-kusto-iothub-data-connection",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ClusterName = exampleCluster.Name,
 *         DatabaseName = exampleDatabase.Name,
 *         IothubId = exampleIoTHub.Id,
 *         ConsumerGroup = exampleConsumerGroup.Name,
 *         SharedAccessPolicyName = exampleSharedAccessPolicy.Name,
 *         EventSystemProperties = new[]
 *         {
 *             "message-id",
 *             "sequence-number",
 *             "to",
 *         },
 *         TableName = "my-table",
 *         MappingRuleName = "my-table-mapping",
 *         DataFormat = "JSON",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/kusto"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
 * 			Name:              pulumi.String("examplekustocluster"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku: &kusto.ClusterSkuArgs{
 * 				Name:     pulumi.String("Standard_D13_v2"),
 * 				Capacity: pulumi.Int(2),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{
 * 			Name:              pulumi.String("example-kusto-database"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			ClusterName:       exampleCluster.Name,
 * 			HotCachePeriod:    pulumi.String("P7D"),
 * 			SoftDeletePeriod:  pulumi.String("P31D"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
 * 			Name:              pulumi.String("exampleIoTHub"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			Sku: &iot.IoTHubSkuArgs{
 * 				Name:     pulumi.String("B1"),
 * 				Capacity: pulumi.Int(1),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSharedAccessPolicy, err := iot.NewSharedAccessPolicy(ctx, "example", &iot.SharedAccessPolicyArgs{
 * 			Name:              pulumi.String("example-shared-access-policy"),
 * 			ResourceGroupName: example.Name,
 * 			IothubName:        exampleIoTHub.Name,
 * 			RegistryRead:      pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleConsumerGroup, err := iot.NewConsumerGroup(ctx, "example", &iot.ConsumerGroupArgs{
 * 			Name:                 pulumi.String("example-consumer-group"),
 * 			ResourceGroupName:    example.Name,
 * 			IothubName:           exampleIoTHub.Name,
 * 			EventhubEndpointName: pulumi.String("events"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = kusto.NewIotHubDataConnection(ctx, "example", &kusto.IotHubDataConnectionArgs{
 * 			Name:                   pulumi.String("my-kusto-iothub-data-connection"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			ClusterName:            exampleCluster.Name,
 * 			DatabaseName:           exampleDatabase.Name,
 * 			IothubId:               exampleIoTHub.ID(),
 * 			ConsumerGroup:          exampleConsumerGroup.Name,
 * 			SharedAccessPolicyName: exampleSharedAccessPolicy.Name,
 * 			EventSystemProperties: pulumi.StringArray{
 * 				pulumi.String("message-id"),
 * 				pulumi.String("sequence-number"),
 * 				pulumi.String("to"),
 * 			},
 * 			TableName:       pulumi.String("my-table"),
 * 			MappingRuleName: pulumi.String("my-table-mapping"),
 * 			DataFormat:      pulumi.String("JSON"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.kusto.Cluster;
 * import com.pulumi.azure.kusto.ClusterArgs;
 * import com.pulumi.azure.kusto.inputs.ClusterSkuArgs;
 * import com.pulumi.azure.kusto.Database;
 * import com.pulumi.azure.kusto.DatabaseArgs;
 * import com.pulumi.azure.iot.IoTHub;
 * import com.pulumi.azure.iot.IoTHubArgs;
 * import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
 * import com.pulumi.azure.iot.SharedAccessPolicy;
 * import com.pulumi.azure.iot.SharedAccessPolicyArgs;
 * import com.pulumi.azure.iot.ConsumerGroup;
 * import com.pulumi.azure.iot.ConsumerGroupArgs;
 * import com.pulumi.azure.kusto.IotHubDataConnection;
 * import com.pulumi.azure.kusto.IotHubDataConnectionArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
 *             .name("examplekustocluster")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku(ClusterSkuArgs.builder()
 *                 .name("Standard_D13_v2")
 *                 .capacity(2)
 *                 .build())
 *             .build());
 *         var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
 *             .name("example-kusto-database")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .clusterName(exampleCluster.name())
 *             .hotCachePeriod("P7D")
 *             .softDeletePeriod("P31D")
 *             .build());
 *         var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
 *             .name("exampleIoTHub")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .sku(IoTHubSkuArgs.builder()
 *                 .name("B1")
 *                 .capacity("1")
 *                 .build())
 *             .build());
 *         var exampleSharedAccessPolicy = new SharedAccessPolicy("exampleSharedAccessPolicy", SharedAccessPolicyArgs.builder()
 *             .name("example-shared-access-policy")
 *             .resourceGroupName(example.name())
 *             .iothubName(exampleIoTHub.name())
 *             .registryRead(true)
 *             .build());
 *         var exampleConsumerGroup = new ConsumerGroup("exampleConsumerGroup", ConsumerGroupArgs.builder()
 *             .name("example-consumer-group")
 *             .resourceGroupName(example.name())
 *             .iothubName(exampleIoTHub.name())
 *             .eventhubEndpointName("events")
 *             .build());
 *         var exampleIotHubDataConnection = new IotHubDataConnection("exampleIotHubDataConnection", IotHubDataConnectionArgs.builder()
 *             .name("my-kusto-iothub-data-connection")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .clusterName(exampleCluster.name())
 *             .databaseName(exampleDatabase.name())
 *             .iothubId(exampleIoTHub.id())
 *             .consumerGroup(exampleConsumerGroup.name())
 *             .sharedAccessPolicyName(exampleSharedAccessPolicy.name())
 *             .eventSystemProperties(
 *                 "message-id",
 *                 "sequence-number",
 *                 "to")
 *             .tableName("my-table")
 *             .mappingRuleName("my-table-mapping")
 *             .dataFormat("JSON")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleCluster:
 *     type: azure:kusto:Cluster
 *     name: example
 *     properties:
 *       name: examplekustocluster
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku:
 *         name: Standard_D13_v2
 *         capacity: 2
 *   exampleDatabase:
 *     type: azure:kusto:Database
 *     name: example
 *     properties:
 *       name: example-kusto-database
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       clusterName: ${exampleCluster.name}
 *       hotCachePeriod: P7D
 *       softDeletePeriod: P31D
 *   exampleIoTHub:
 *     type: azure:iot:IoTHub
 *     name: example
 *     properties:
 *       name: exampleIoTHub
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       sku:
 *         name: B1
 *         capacity: '1'
 *   exampleSharedAccessPolicy:
 *     type: azure:iot:SharedAccessPolicy
 *     name: example
 *     properties:
 *       name: example-shared-access-policy
 *       resourceGroupName: ${example.name}
 *       iothubName: ${exampleIoTHub.name}
 *       registryRead: true
 *   exampleConsumerGroup:
 *     type: azure:iot:ConsumerGroup
 *     name: example
 *     properties:
 *       name: example-consumer-group
 *       resourceGroupName: ${example.name}
 *       iothubName: ${exampleIoTHub.name}
 *       eventhubEndpointName: events
 *   exampleIotHubDataConnection:
 *     type: azure:kusto:IotHubDataConnection
 *     name: example
 *     properties:
 *       name: my-kusto-iothub-data-connection
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       clusterName: ${exampleCluster.name}
 *       databaseName: ${exampleDatabase.name}
 *       iothubId: ${exampleIoTHub.id}
 *       consumerGroup: ${exampleConsumerGroup.name}
 *       sharedAccessPolicyName: ${exampleSharedAccessPolicy.name}
 *       eventSystemProperties:
 *         - message-id
 *         - sequence-number
 *         - to
 *       tableName: my-table
 *       mappingRuleName: my-table-mapping
 *       dataFormat: JSON
 * ```
 * 
 * ## Import
 * Kusto IotHub Data Connections can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:kusto/iotHubDataConnection:IotHubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1
 * ```
 */
public class IotHubDataConnection internal constructor(
    override val javaResource: com.pulumi.azure.kusto.IotHubDataConnection,
) : KotlinCustomResource(javaResource, IotHubDataConnectionMapper) {
    /**
     * Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
     */
    public val clusterName: Output
        get() = javaResource.clusterName().applyValue({ args0 -> args0 })

    /**
     * Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
     */
    public val consumerGroup: Output
        get() = javaResource.consumerGroup().applyValue({ args0 -> args0 })

    /**
     * Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created.
     */
    public val dataFormat: Output?
        get() = javaResource.dataFormat().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
     */
    public val databaseName: Output
        get() = javaResource.databaseName().applyValue({ args0 -> args0 })

    /**
     * Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
     */
    public val databaseRoutingType: Output?
        get() = javaResource.databaseRoutingType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. Possible values are `message-id`, `sequence-number`, `to`, `absolute-expiry-time`, `iothub-enqueuedtime`, `correlation-id`, `user-id`, `iothub-ack`, `iothub-connection-device-id`, `iothub-connection-auth-generation-id` and `iothub-connection-auth-method`.
     */
    public val eventSystemProperties: Output>?
        get() = javaResource.eventSystemProperties().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created.
     */
    public val iothubId: Output
        get() = javaResource.iothubId().applyValue({ args0 -> args0 })

    /**
     * The location where the Kusto Database should be created. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created.
     */
    public val mappingRuleName: Output?
        get() = javaResource.mappingRuleName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created.
     */
    public val sharedAccessPolicyName: Output
        get() = javaResource.sharedAccessPolicyName().applyValue({ args0 -> args0 })

    /**
     * Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created.
     */
    public val tableName: Output?
        get() = javaResource.tableName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object IotHubDataConnectionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.kusto.IotHubDataConnection::class == javaResource::class

    override fun map(javaResource: Resource): IotHubDataConnection = IotHubDataConnection(
        javaResource
            as com.pulumi.azure.kusto.IotHubDataConnection,
    )
}

/**
 * @see [IotHubDataConnection].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [IotHubDataConnection].
 */
public suspend fun iotHubDataConnection(
    name: String,
    block: suspend IotHubDataConnectionResourceBuilder.() -> Unit,
): IotHubDataConnection {
    val builder = IotHubDataConnectionResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [IotHubDataConnection].
 * @param name The _unique_ name of the resulting resource.
 */
public fun iotHubDataConnection(name: String): IotHubDataConnection {
    val builder = IotHubDataConnectionResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy