EventGridDataConnection

class EventGridDataConnection : KotlinCustomResource

Manages a Kusto (also known as Azure Data Explorer) Event Grid 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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.eventhub.EventHubNamespace;
import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
import com.pulumi.azure.eventhub.EventHub;
import com.pulumi.azure.eventhub.EventHubArgs;
import com.pulumi.azure.eventhub.ConsumerGroup;
import com.pulumi.azure.eventhub.ConsumerGroupArgs;
import com.pulumi.azure.eventgrid.EventSubscription;
import com.pulumi.azure.eventgrid.EventSubscriptionArgs;
import com.pulumi.azure.eventgrid.inputs.EventSubscriptionRetryPolicyArgs;
import com.pulumi.azure.kusto.EventGridDataConnection;
import com.pulumi.azure.kusto.EventGridDataConnectionArgs;
import com.pulumi.resources.CustomResourceOptions;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.build());
var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.resourceGroupName(exampleResourceGroup.name())
.partitionCount(1)
.messageRetention(1)
.build());
var exampleConsumerGroup = new ConsumerGroup("exampleConsumerGroup", ConsumerGroupArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleEventSubscription = new EventSubscription("exampleEventSubscription", EventSubscriptionArgs.builder()
.scope(exampleAccount.id())
.eventhubEndpointId(exampleEventHub.id())
.eventDeliverySchema("EventGridSchema")
.includedEventTypes(
"Microsoft.Storage.BlobCreated",
"Microsoft.Storage.BlobRenamed")
.retryPolicy(EventSubscriptionRetryPolicyArgs.builder()
.eventTimeToLive(144)
.maxDeliveryAttempts(10)
.build())
.build());
var exampleEventGridDataConnection = new EventGridDataConnection("exampleEventGridDataConnection", EventGridDataConnectionArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.clusterName(exampleCluster.name())
.databaseName(exampleDatabase.name())
.storageAccountId(exampleAccount.id())
.eventhubId(exampleEventHub.id())
.eventhubConsumerGroupName(exampleConsumerGroup.name())
.tableName("my-table")
.mappingRuleName("my-table-mapping")
.dataFormat("JSON")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleEventSubscription)
.build());
}
}

Import

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

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

Properties

Link copied to clipboard

Specifies the blob storage event type that needs to be processed. Possible Values are Microsoft.Storage.BlobCreated and Microsoft.Storage.BlobRenamed. Defaults to Microsoft.Storage.BlobCreated.

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 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 EventHub messages. Allowed values: APACHEAVRO, AVRO, CSV, JSON, MULTIJSON, ORC, PARQUET, PSV, RAW, SCSV, SINGLEJSON, SOHSV, TSV, TSVE, TXT and W3CLOGFILE.

Link copied to clipboard

The resource ID of the event grid that is subscribed to the storage account events.

Link copied to clipboard

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

Link copied to clipboard
val eventhubId: Output<String>

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

Link copied to clipboard
val id: Output<String>
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

Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.

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.

Link copied to clipboard
val name: Output<String>

The name of the Kusto Event Grid 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
val skipFirstRecord: Output<Boolean>?

is the first record of every file ignored? Defaults to false.

Link copied to clipboard

Specifies the resource id of the Storage Account this data connection will use for ingestion. 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.

Link copied to clipboard
val urn: Output<String>