EventhubDataConnection

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
        {
            Location = "East US",
        });
        var cluster = new Azure.Kusto.Cluster("cluster", new Azure.Kusto.ClusterArgs
        {
            Location = rg.Location,
            ResourceGroupName = rg.Name,
            Sku = new Azure.Kusto.Inputs.ClusterSkuArgs
            {
                Name = "Standard_D13_v2",
                Capacity = 2,
            },
        });
        var database = new Azure.Kusto.Database("database", new Azure.Kusto.DatabaseArgs
        {
            ResourceGroupName = rg.Name,
            Location = rg.Location,
            ClusterName = cluster.Name,
            HotCachePeriod = "P7D",
            SoftDeletePeriod = "P31D",
        });
        var eventhubNs = new Azure.EventHub.EventHubNamespace("eventhubNs", new Azure.EventHub.EventHubNamespaceArgs
        {
            Location = rg.Location,
            ResourceGroupName = rg.Name,
            Sku = "Standard",
        });
        var eventhub = new Azure.EventHub.EventHub("eventhub", new Azure.EventHub.EventHubArgs
        {
            NamespaceName = eventhubNs.Name,
            ResourceGroupName = rg.Name,
            PartitionCount = 1,
            MessageRetention = 1,
        });
        var consumerGroup = new Azure.EventHub.ConsumerGroup("consumerGroup", new Azure.EventHub.ConsumerGroupArgs
        {
            NamespaceName = eventhubNs.Name,
            EventhubName = eventhub.Name,
            ResourceGroupName = rg.Name,
        });
        var eventhubConnection = new Azure.Kusto.EventhubDataConnection("eventhubConnection", new Azure.Kusto.EventhubDataConnectionArgs
        {
            ResourceGroupName = rg.Name,
            Location = rg.Location,
            ClusterName = cluster.Name,
            DatabaseName = database.Name,
            EventhubId = azurerm_eventhub.Evenhub.Id,
            ConsumerGroup = consumerGroup.Name,
            TableName = "my-table",
            MappingRuleName = "my-table-mapping",
            DataFormat = "JSON",
        });
        //(Optional)
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/eventhub"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/kusto"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
            Location: pulumi.String("East US"),
        })
        if err != nil {
            return err
        }
        cluster, err := kusto.NewCluster(ctx, "cluster", &kusto.ClusterArgs{
            Location:          rg.Location,
            ResourceGroupName: rg.Name,
            Sku: &kusto.ClusterSkuArgs{
                Name:     pulumi.String("Standard_D13_v2"),
                Capacity: pulumi.Int(2),
            },
        })
        if err != nil {
            return err
        }
        database, err := kusto.NewDatabase(ctx, "database", &kusto.DatabaseArgs{
            ResourceGroupName: rg.Name,
            Location:          rg.Location,
            ClusterName:       cluster.Name,
            HotCachePeriod:    pulumi.String("P7D"),
            SoftDeletePeriod:  pulumi.String("P31D"),
        })
        if err != nil {
            return err
        }
        eventhubNs, err := eventhub.NewEventHubNamespace(ctx, "eventhubNs", &eventhub.EventHubNamespaceArgs{
            Location:          rg.Location,
            ResourceGroupName: rg.Name,
            Sku:               pulumi.String("Standard"),
        })
        if err != nil {
            return err
        }
        eventhub, err := eventhub.NewEventHub(ctx, "eventhub", &eventhub.EventHubArgs{
            NamespaceName:     eventhubNs.Name,
            ResourceGroupName: rg.Name,
            PartitionCount:    pulumi.Int(1),
            MessageRetention:  pulumi.Int(1),
        })
        if err != nil {
            return err
        }
        consumerGroup, err := eventhub.NewConsumerGroup(ctx, "consumerGroup", &eventhub.ConsumerGroupArgs{
            NamespaceName:     eventhubNs.Name,
            EventhubName:      eventhub.Name,
            ResourceGroupName: rg.Name,
        })
        if err != nil {
            return err
        }
        _, err = kusto.NewEventhubDataConnection(ctx, "eventhubConnection", &kusto.EventhubDataConnectionArgs{
            ResourceGroupName: rg.Name,
            Location:          rg.Location,
            ClusterName:       cluster.Name,
            DatabaseName:      database.Name,
            EventhubId:        pulumi.String(azurerm_eventhub.Evenhub.Id),
            ConsumerGroup:     consumerGroup.Name,
            TableName:         pulumi.String("my-table"),
            MappingRuleName:   pulumi.String("my-table-mapping"),
            DataFormat:        pulumi.String("JSON"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

rg = azure.core.ResourceGroup("rg", location="East US")
cluster = azure.kusto.Cluster("cluster",
    location=rg.location,
    resource_group_name=rg.name,
    sku={
        "name": "Standard_D13_v2",
        "capacity": 2,
    })
database = azure.kusto.Database("database",
    resource_group_name=rg.name,
    location=rg.location,
    cluster_name=cluster.name,
    hot_cache_period="P7D",
    soft_delete_period="P31D")
eventhub_ns = azure.eventhub.EventHubNamespace("eventhubNs",
    location=rg.location,
    resource_group_name=rg.name,
    sku="Standard")
eventhub = azure.eventhub.EventHub("eventhub",
    namespace_name=eventhub_ns.name,
    resource_group_name=rg.name,
    partition_count=1,
    message_retention=1)
consumer_group = azure.eventhub.ConsumerGroup("consumerGroup",
    namespace_name=eventhub_ns.name,
    eventhub_name=eventhub.name,
    resource_group_name=rg.name)
eventhub_connection = azure.kusto.EventhubDataConnection("eventhubConnection",
    resource_group_name=rg.name,
    location=rg.location,
    cluster_name=cluster.name,
    database_name=database.name,
    eventhub_id=azurerm_eventhub["evenhub"]["id"],
    consumer_group=consumer_group.name,
    table_name="my-table",
    mapping_rule_name="my-table-mapping",
    data_format="JSON")
#(Optional)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const rg = new azure.core.ResourceGroup("rg", {location: "East US"});
const cluster = new azure.kusto.Cluster("cluster", {
    location: rg.location,
    resourceGroupName: rg.name,
    sku: {
        name: "Standard_D13_v2",
        capacity: 2,
    },
});
const database = new azure.kusto.Database("database", {
    resourceGroupName: rg.name,
    location: rg.location,
    clusterName: cluster.name,
    hotCachePeriod: "P7D",
    softDeletePeriod: "P31D",
});
const eventhubNs = new azure.eventhub.EventHubNamespace("eventhubNs", {
    location: rg.location,
    resourceGroupName: rg.name,
    sku: "Standard",
});
const eventhub = new azure.eventhub.EventHub("eventhub", {
    namespaceName: eventhubNs.name,
    resourceGroupName: rg.name,
    partitionCount: 1,
    messageRetention: 1,
});
const consumerGroup = new azure.eventhub.ConsumerGroup("consumerGroup", {
    namespaceName: eventhubNs.name,
    eventhubName: eventhub.name,
    resourceGroupName: rg.name,
});
const eventhubConnection = new azure.kusto.EventhubDataConnection("eventhubConnection", {
    resourceGroupName: rg.name,
    location: rg.location,
    clusterName: cluster.name,
    databaseName: database.name,
    eventhubId: azurerm_eventhub.evenhub.id,
    consumerGroup: consumerGroup.name,
    tableName: "my-table",
    mappingRuleName: "my-table-mapping",
    dataFormat: "JSON",
});
//(Optional)

Create a EventhubDataConnection Resource

def EventhubDataConnection(resource_name, opts=None, cluster_name=None, consumer_group=None, data_format=None, database_name=None, eventhub_id=None, location=None, mapping_rule_name=None, name=None, resource_group_name=None, table_name=None, __props__=None);
name string
The unique name of the resource.
args EventhubDataConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EventhubDataConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventhubDataConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

EventhubDataConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The EventhubDataConnection resource accepts the following input properties:

ClusterName string

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

ConsumerGroup string

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

DatabaseName string

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

EventhubId string

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

ResourceGroupName string

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

DataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

Location string

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

MappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

Name string

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

TableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

ClusterName string

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

ConsumerGroup string

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

DatabaseName string

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

EventhubId string

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

ResourceGroupName string

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

DataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

Location string

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

MappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

Name string

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

TableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

clusterName string

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

consumerGroup string

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

databaseName string

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

eventhubId string

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

resourceGroupName string

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

dataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

location string

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

mappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

name string

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

tableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

cluster_name str

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

consumer_group str

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

database_name str

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

eventhub_id str

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

resource_group_name str

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

data_format str

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

location str

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

mapping_rule_name str

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

name str

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

table_name str

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventhubDataConnection resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing EventhubDataConnection Resource

Get an existing EventhubDataConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, cluster_name=None, consumer_group=None, data_format=None, database_name=None, eventhub_id=None, location=None, mapping_rule_name=None, name=None, resource_group_name=None, table_name=None, __props__=None);
func GetEventhubDataConnection(ctx *Context, name string, id IDInput, state *EventhubDataConnectionState, opts ...ResourceOption) (*EventhubDataConnection, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterName string

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

ConsumerGroup string

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

DataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

DatabaseName string

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

EventhubId string

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

Location string

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

MappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

Name string

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

ResourceGroupName string

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

TableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

ClusterName string

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

ConsumerGroup string

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

DataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

DatabaseName string

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

EventhubId string

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

Location string

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

MappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

Name string

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

ResourceGroupName string

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

TableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

clusterName string

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

consumerGroup string

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

dataFormat string

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

databaseName string

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

eventhubId string

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

location string

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

mappingRuleName string

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

name string

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

resourceGroupName string

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

tableName string

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

cluster_name str

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

consumer_group str

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

data_format str

Specifies the data format of the EventHub messages. Allowed values: AVRO, CSV, JSON, MULTIJSON, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV and TXT

database_name str

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

eventhub_id str

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

location str

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

mapping_rule_name str

Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.

name str

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

resource_group_name str

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

table_name str

Specifies the target table name used for the message ingestion. Table must exist before resource is created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.