IotHubDataConnection

class IotHubDataConnection : KotlinCustomResource

Manages a Kusto (also known as Azure Data Explorer) IotHub Data Connection

Example Usage

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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(ClusterSkuArgs.builder()
.name("Standard_D13_v2")
.capacity(2)
.build())
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.clusterName(exampleCluster.name())
.hotCachePeriod("P7D")
.softDeletePeriod("P31D")
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IoTHubSkuArgs.builder()
.name("B1")
.capacity("1")
.build())
.build());
var exampleSharedAccessPolicy = new SharedAccessPolicy("exampleSharedAccessPolicy", SharedAccessPolicyArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubName(exampleIoTHub.name())
.registryRead(true)
.build());
var exampleConsumerGroup = new ConsumerGroup("exampleConsumerGroup", ConsumerGroupArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubName(exampleIoTHub.name())
.eventhubEndpointName("events")
.build());
var exampleIotHubDataConnection = new IotHubDataConnection("exampleIotHubDataConnection", IotHubDataConnectionArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.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());
}
}

Import

Kusto IotHub Data Connections can be imported using the resource id, e.g.

$ pulumi import azure:kusto/iotHubDataConnection:IotHubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1

Properties

Link copied to clipboard
val clusterName: Output<String>

Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.

Link copied to clipboard
val consumerGroup: Output<String>

Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.

Link copied to clipboard
val databaseName: Output<String>

Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.

Link copied to clipboard

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.

Link copied to clipboard
val dataFormat: Output<String>?

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.

Link copied to clipboard

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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val iothubId: Output<String>

Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created.

Link copied to clipboard
val location: Output<String>

The location where the Kusto Database should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val mappingRuleName: Output<String>?

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.

Link copied to clipboard
val name: Output<String>

The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.

Link copied to clipboard

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.

Link copied to clipboard
val tableName: Output<String>?

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.

Link copied to clipboard
val urn: Output<String>