TimeSeriesInsightsEventSourceEventhubArgs

data class TimeSeriesInsightsEventSourceEventhubArgs(val consumerGroupName: Output<String>? = null, val environmentId: Output<String>? = null, val eventSourceResourceId: Output<String>? = null, val eventhubName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val namespaceName: Output<String>? = null, val sharedAccessKey: Output<String>? = null, val sharedAccessKeyName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val timestampPropertyName: Output<String>? = null) : ConvertibleToJava<TimeSeriesInsightsEventSourceEventhubArgs>

Manages an Azure IoT Time Series Insights EventHub Event Source.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example",
location: "West Europe",
});
const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
sku: "Standard",
});
const exampleEventHub = new azure.eventhub.EventHub("example", {
name: "example",
namespaceName: exampleEventHubNamespace.name,
resourceGroupName: example.name,
partitionCount: 2,
messageRetention: 7,
});
const exampleConsumerGroup = new azure.eventhub.ConsumerGroup("example", {
name: "example",
namespaceName: exampleEventHubNamespace.name,
eventhubName: exampleEventHub.name,
resourceGroupName: example.name,
});
const exampleAuthorizationRule = new azure.eventhub.AuthorizationRule("example", {
name: "example",
namespaceName: exampleEventHubNamespace.name,
eventhubName: exampleEventHub.name,
resourceGroupName: example.name,
listen: true,
send: false,
manage: false,
});
const exampleAccount = new azure.storage.Account("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleTimeSeriesInsightsGen2Environment = new azure.iot.TimeSeriesInsightsGen2Environment("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
skuName: "L1",
idProperties: ["id"],
storage: {
name: exampleAccount.name,
key: exampleAccount.primaryAccessKey,
},
});
const exampleTimeSeriesInsightsEventSourceEventhub = new azure.iot.TimeSeriesInsightsEventSourceEventhub("example", {
name: "example",
location: example.location,
environmentId: exampleTimeSeriesInsightsGen2Environment.id,
eventhubName: exampleEventHub.name,
namespaceName: exampleEventHubNamespace.name,
sharedAccessKey: exampleAuthorizationRule.primaryKey,
sharedAccessKeyName: exampleAuthorizationRule.name,
consumerGroupName: exampleConsumerGroup.name,
eventSourceResourceId: exampleEventHub.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example",
location="West Europe")
example_event_hub_namespace = azure.eventhub.EventHubNamespace("example",
name="example",
location=example.location,
resource_group_name=example.name,
sku="Standard")
example_event_hub = azure.eventhub.EventHub("example",
name="example",
namespace_name=example_event_hub_namespace.name,
resource_group_name=example.name,
partition_count=2,
message_retention=7)
example_consumer_group = azure.eventhub.ConsumerGroup("example",
name="example",
namespace_name=example_event_hub_namespace.name,
eventhub_name=example_event_hub.name,
resource_group_name=example.name)
example_authorization_rule = azure.eventhub.AuthorizationRule("example",
name="example",
namespace_name=example_event_hub_namespace.name,
eventhub_name=example_event_hub.name,
resource_group_name=example.name,
listen=True,
send=False,
manage=False)
example_account = azure.storage.Account("example",
name="example",
location=example.location,
resource_group_name=example.name,
account_tier="Standard",
account_replication_type="LRS")
example_time_series_insights_gen2_environment = azure.iot.TimeSeriesInsightsGen2Environment("example",
name="example",
location=example.location,
resource_group_name=example.name,
sku_name="L1",
id_properties=["id"],
storage={
"name": example_account.name,
"key": example_account.primary_access_key,
})
example_time_series_insights_event_source_eventhub = azure.iot.TimeSeriesInsightsEventSourceEventhub("example",
name="example",
location=example.location,
environment_id=example_time_series_insights_gen2_environment.id,
eventhub_name=example_event_hub.name,
namespace_name=example_event_hub_namespace.name,
shared_access_key=example_authorization_rule.primary_key,
shared_access_key_name=example_authorization_rule.name,
consumer_group_name=example_consumer_group.name,
event_source_resource_id=example_event_hub.id)
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",
Location = "West Europe",
});
var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "Standard",
});
var exampleEventHub = new Azure.EventHub.EventHub("example", new()
{
Name = "example",
NamespaceName = exampleEventHubNamespace.Name,
ResourceGroupName = example.Name,
PartitionCount = 2,
MessageRetention = 7,
});
var exampleConsumerGroup = new Azure.EventHub.ConsumerGroup("example", new()
{
Name = "example",
NamespaceName = exampleEventHubNamespace.Name,
EventhubName = exampleEventHub.Name,
ResourceGroupName = example.Name,
});
var exampleAuthorizationRule = new Azure.EventHub.AuthorizationRule("example", new()
{
Name = "example",
NamespaceName = exampleEventHubNamespace.Name,
EventhubName = exampleEventHub.Name,
ResourceGroupName = example.Name,
Listen = true,
Send = false,
Manage = false,
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleTimeSeriesInsightsGen2Environment = new Azure.Iot.TimeSeriesInsightsGen2Environment("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
SkuName = "L1",
IdProperties = new[]
{
"id",
},
Storage = new Azure.Iot.Inputs.TimeSeriesInsightsGen2EnvironmentStorageArgs
{
Name = exampleAccount.Name,
Key = exampleAccount.PrimaryAccessKey,
},
});
var exampleTimeSeriesInsightsEventSourceEventhub = new Azure.Iot.TimeSeriesInsightsEventSourceEventhub("example", new()
{
Name = "example",
Location = example.Location,
EnvironmentId = exampleTimeSeriesInsightsGen2Environment.Id,
EventhubName = exampleEventHub.Name,
NamespaceName = exampleEventHubNamespace.Name,
SharedAccessKey = exampleAuthorizationRule.PrimaryKey,
SharedAccessKeyName = exampleAuthorizationRule.Name,
ConsumerGroupName = exampleConsumerGroup.Name,
EventSourceResourceId = exampleEventHub.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/eventhub"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
"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"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
Name: pulumi.String("example"),
NamespaceName: exampleEventHubNamespace.Name,
ResourceGroupName: example.Name,
PartitionCount: pulumi.Int(2),
MessageRetention: pulumi.Int(7),
})
if err != nil {
return err
}
exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{
Name: pulumi.String("example"),
NamespaceName: exampleEventHubNamespace.Name,
EventhubName: exampleEventHub.Name,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
Name: pulumi.String("example"),
NamespaceName: exampleEventHubNamespace.Name,
EventhubName: exampleEventHub.Name,
ResourceGroupName: example.Name,
Listen: pulumi.Bool(true),
Send: pulumi.Bool(false),
Manage: pulumi.Bool(false),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleTimeSeriesInsightsGen2Environment, err := iot.NewTimeSeriesInsightsGen2Environment(ctx, "example", &iot.TimeSeriesInsightsGen2EnvironmentArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
SkuName: pulumi.String("L1"),
IdProperties: pulumi.StringArray{
pulumi.String("id"),
},
Storage: &iot.TimeSeriesInsightsGen2EnvironmentStorageArgs{
Name: exampleAccount.Name,
Key: exampleAccount.PrimaryAccessKey,
},
})
if err != nil {
return err
}
_, err = iot.NewTimeSeriesInsightsEventSourceEventhub(ctx, "example", &iot.TimeSeriesInsightsEventSourceEventhubArgs{
Name: pulumi.String("example"),
Location: example.Location,
EnvironmentId: exampleTimeSeriesInsightsGen2Environment.ID(),
EventhubName: exampleEventHub.Name,
NamespaceName: exampleEventHubNamespace.Name,
SharedAccessKey: exampleAuthorizationRule.PrimaryKey,
SharedAccessKeyName: exampleAuthorizationRule.Name,
ConsumerGroupName: exampleConsumerGroup.Name,
EventSourceResourceId: exampleEventHub.ID(),
})
if err != nil {
return err
}
return nil
})
}
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.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.eventhub.AuthorizationRule;
import com.pulumi.azure.eventhub.AuthorizationRuleArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.iot.TimeSeriesInsightsGen2Environment;
import com.pulumi.azure.iot.TimeSeriesInsightsGen2EnvironmentArgs;
import com.pulumi.azure.iot.inputs.TimeSeriesInsightsGen2EnvironmentStorageArgs;
import com.pulumi.azure.iot.TimeSeriesInsightsEventSourceEventhub;
import com.pulumi.azure.iot.TimeSeriesInsightsEventSourceEventhubArgs;
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")
.location("West Europe")
.build());
var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.sku("Standard")
.build());
var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
.name("example")
.namespaceName(exampleEventHubNamespace.name())
.resourceGroupName(example.name())
.partitionCount(2)
.messageRetention(7)
.build());
var exampleConsumerGroup = new ConsumerGroup("exampleConsumerGroup", ConsumerGroupArgs.builder()
.name("example")
.namespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.resourceGroupName(example.name())
.build());
var exampleAuthorizationRule = new AuthorizationRule("exampleAuthorizationRule", AuthorizationRuleArgs.builder()
.name("example")
.namespaceName(exampleEventHubNamespace.name())
.eventhubName(exampleEventHub.name())
.resourceGroupName(example.name())
.listen(true)
.send(false)
.manage(false)
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleTimeSeriesInsightsGen2Environment = new TimeSeriesInsightsGen2Environment("exampleTimeSeriesInsightsGen2Environment", TimeSeriesInsightsGen2EnvironmentArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.skuName("L1")
.idProperties("id")
.storage(TimeSeriesInsightsGen2EnvironmentStorageArgs.builder()
.name(exampleAccount.name())
.key(exampleAccount.primaryAccessKey())
.build())
.build());
var exampleTimeSeriesInsightsEventSourceEventhub = new TimeSeriesInsightsEventSourceEventhub("exampleTimeSeriesInsightsEventSourceEventhub", TimeSeriesInsightsEventSourceEventhubArgs.builder()
.name("example")
.location(example.location())
.environmentId(exampleTimeSeriesInsightsGen2Environment.id())
.eventhubName(exampleEventHub.name())
.namespaceName(exampleEventHubNamespace.name())
.sharedAccessKey(exampleAuthorizationRule.primaryKey())
.sharedAccessKeyName(exampleAuthorizationRule.name())
.consumerGroupName(exampleConsumerGroup.name())
.eventSourceResourceId(exampleEventHub.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example
location: West Europe
exampleEventHubNamespace:
type: azure:eventhub:EventHubNamespace
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
sku: Standard
exampleEventHub:
type: azure:eventhub:EventHub
name: example
properties:
name: example
namespaceName: ${exampleEventHubNamespace.name}
resourceGroupName: ${example.name}
partitionCount: 2
messageRetention: 7
exampleConsumerGroup:
type: azure:eventhub:ConsumerGroup
name: example
properties:
name: example
namespaceName: ${exampleEventHubNamespace.name}
eventhubName: ${exampleEventHub.name}
resourceGroupName: ${example.name}
exampleAuthorizationRule:
type: azure:eventhub:AuthorizationRule
name: example
properties:
name: example
namespaceName: ${exampleEventHubNamespace.name}
eventhubName: ${exampleEventHub.name}
resourceGroupName: ${example.name}
listen: true
send: false
manage: false
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
accountTier: Standard
accountReplicationType: LRS
exampleTimeSeriesInsightsGen2Environment:
type: azure:iot:TimeSeriesInsightsGen2Environment
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
skuName: L1
idProperties:
- id
storage:
name: ${exampleAccount.name}
key: ${exampleAccount.primaryAccessKey}
exampleTimeSeriesInsightsEventSourceEventhub:
type: azure:iot:TimeSeriesInsightsEventSourceEventhub
name: example
properties:
name: example
location: ${example.location}
environmentId: ${exampleTimeSeriesInsightsGen2Environment.id}
eventhubName: ${exampleEventHub.name}
namespaceName: ${exampleEventHubNamespace.name}
sharedAccessKey: ${exampleAuthorizationRule.primaryKey}
sharedAccessKeyName: ${exampleAuthorizationRule.name}
consumerGroupName: ${exampleConsumerGroup.name}
eventSourceResourceId: ${exampleEventHub.id}

Import

Azure IoT Time Series Insights EventHub Event Source can be imported using the resource id, e.g.

$ pulumi import azure:iot/timeSeriesInsightsEventSourceEventhub:TimeSeriesInsightsEventSourceEventhub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.TimeSeriesInsights/environments/environment1/eventSources/example

Constructors

constructor(consumerGroupName: Output<String>? = null, environmentId: Output<String>? = null, eventSourceResourceId: Output<String>? = null, eventhubName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, namespaceName: Output<String>? = null, sharedAccessKey: Output<String>? = null, sharedAccessKeyName: Output<String>? = null, tags: Output<Map<String, String>>? = null, timestampPropertyName: Output<String>? = null)

Properties

Link copied to clipboard
val consumerGroupName: Output<String>? = null

Specifies the name of the EventHub Consumer Group that holds the partitions from which events will be read.

Link copied to clipboard
val environmentId: Output<String>? = null

Specifies the id of the IoT Time Series Insights Environment that the Event Source should be associated with. Changing this forces a new resource to created.

Link copied to clipboard
val eventhubName: Output<String>? = null

Specifies the name of the EventHub which will be associated with this resource.

Link copied to clipboard
val eventSourceResourceId: Output<String>? = null

Specifies the resource id where events will be coming from.

Link copied to clipboard
val location: Output<String>? = null

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Azure IoT Time Series Insights EventHub Event Source. Changing this forces a new resource to be created. Must be globally unique.

Link copied to clipboard
val namespaceName: Output<String>? = null

Specifies the EventHub Namespace name.

Link copied to clipboard
val sharedAccessKey: Output<String>? = null

Specifies the value of the Shared Access Policy key that grants the Time Series Insights service read access to the EventHub.

Link copied to clipboard
val sharedAccessKeyName: Output<String>? = null

Specifies the name of the Shared Access key that grants the Event Source access to the EventHub.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val timestampPropertyName: Output<String>? = null

Specifies the value that will be used as the event source's timestamp. This value defaults to the event creation time.

Functions

Link copied to clipboard
open override fun toJava(): TimeSeriesInsightsEventSourceEventhubArgs