EventHub

class EventHub : KotlinCustomResource

Single item in List or Get Event Hub operation API Version: 2017-04-01.

Example Usage

EventHubCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var eventHub = new AzureNative.EventHub.EventHub("eventHub", new()
{
CaptureDescription = new AzureNative.EventHub.Inputs.CaptureDescriptionArgs
{
Destination = new AzureNative.EventHub.Inputs.DestinationArgs
{
ArchiveNameFormat = "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}",
BlobContainer = "container",
Name = "EventHubArchive.AzureBlockBlob",
StorageAccountResourceId = "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
},
Enabled = true,
Encoding = AzureNative.EventHub.EncodingCaptureDescription.Avro,
IntervalInSeconds = 120,
SizeLimitInBytes = 10485763,
},
EventHubName = "sdk-EventHub-6547",
MessageRetentionInDays = 4,
NamespaceName = "sdk-Namespace-5357",
PartitionCount = 4,
ResourceGroupName = "Default-NotificationHubs-AustraliaEast",
Status = AzureNative.EventHub.EntityStatus.Active,
});
});
package main
import (
eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := eventhub.NewEventHub(ctx, "eventHub", &eventhub.EventHubArgs{
CaptureDescription: eventhub.CaptureDescriptionResponse{
Destination: &eventhub.DestinationArgs{
ArchiveNameFormat: pulumi.String("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
BlobContainer: pulumi.String("container"),
Name: pulumi.String("EventHubArchive.AzureBlockBlob"),
StorageAccountResourceId: pulumi.String("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage"),
},
Enabled: pulumi.Bool(true),
Encoding: eventhub.EncodingCaptureDescriptionAvro,
IntervalInSeconds: pulumi.Int(120),
SizeLimitInBytes: pulumi.Int(10485763),
},
EventHubName: pulumi.String("sdk-EventHub-6547"),
MessageRetentionInDays: pulumi.Float64(4),
NamespaceName: pulumi.String("sdk-Namespace-5357"),
PartitionCount: pulumi.Float64(4),
ResourceGroupName: pulumi.String("Default-NotificationHubs-AustraliaEast"),
Status: eventhub.EntityStatusActive,
})
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.azurenative.eventhub.EventHub;
import com.pulumi.azurenative.eventhub.EventHubArgs;
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 eventHub = new EventHub("eventHub", EventHubArgs.builder()
.captureDescription(Map.ofEntries(
Map.entry("destination", Map.ofEntries(
Map.entry("archiveNameFormat", "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
Map.entry("blobContainer", "container"),
Map.entry("name", "EventHubArchive.AzureBlockBlob"),
Map.entry("storageAccountResourceId", "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage")
)),
Map.entry("enabled", true),
Map.entry("encoding", "Avro"),
Map.entry("intervalInSeconds", 120),
Map.entry("sizeLimitInBytes", 10485763)
))
.eventHubName("sdk-EventHub-6547")
.messageRetentionInDays(4)
.namespaceName("sdk-Namespace-5357")
.partitionCount(4)
.resourceGroupName("Default-NotificationHubs-AustraliaEast")
.status("Active")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:eventhub:EventHub sdk-EventHub-10 /subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-EventHub-10

Properties

Link copied to clipboard

Properties of capture description

Link copied to clipboard
val createdAt: Output<String>

Exact time the Event Hub was created.

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

Number of days to retain the events for this Event Hub, value should be 1 to 7 days

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val partitionCount: Output<Double>?

Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions.

Link copied to clipboard
val partitionIds: Output<List<String>>

Current number of shards on the Event Hub.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>?

Enumerates the possible values for the status of the Event Hub.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val updatedAt: Output<String>

The exact time the message was updated.

Link copied to clipboard
val urn: Output<String>