EventHubArgs

data class EventHubArgs(val captureDescription: Output<CaptureDescriptionArgs>? = null, val eventHubName: Output<String>? = null, val messageRetentionInDays: Output<Double>? = null, val namespaceName: Output<String>? = null, val partitionCount: Output<Double>? = null, val resourceGroupName: Output<String>? = null, val retentionDescription: Output<RetentionDescriptionArgs>? = null, val status: Output<EntityStatus>? = null, val userMetadata: Output<String>? = null) : ConvertibleToJava<EventHubArgs>

Single item in List or Get Event Hub operation Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-10-01-preview. Other available API versions: 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview, 2022-10-01-preview, 2023-01-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventhub [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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",
Identity = new AzureNative.EventHub.Inputs.CaptureIdentityArgs
{
Type = AzureNative.EventHub.CaptureIdentityType.UserAssigned,
UserAssignedIdentity = "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2",
},
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",
RetentionDescription = new AzureNative.EventHub.Inputs.RetentionDescriptionArgs
{
CleanupPolicy = AzureNative.EventHub.CleanupPolicyRetentionDescription.Compact,
RetentionTimeInHours = 96,
TombstoneRetentionTimeInHours = 1,
},
Status = AzureNative.EventHub.EntityStatus.Active,
UserMetadata = "key",
});
});
package main
import (
eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub/v3"
"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.CaptureDescriptionArgs{
Destination: &eventhub.DestinationArgs{
ArchiveNameFormat: pulumi.String("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"),
BlobContainer: pulumi.String("container"),
Identity: &eventhub.CaptureIdentityArgs{
Type: eventhub.CaptureIdentityTypeUserAssigned,
UserAssignedIdentity: pulumi.String("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2"),
},
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"),
RetentionDescription: &eventhub.RetentionDescriptionArgs{
CleanupPolicy: pulumi.String(eventhub.CleanupPolicyRetentionDescriptionCompact),
RetentionTimeInHours: pulumi.Float64(96),
TombstoneRetentionTimeInHours: pulumi.Int(1),
},
Status: eventhub.EntityStatusActive,
UserMetadata: pulumi.String("key"),
})
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 com.pulumi.azurenative.eventhub.inputs.CaptureDescriptionArgs;
import com.pulumi.azurenative.eventhub.inputs.DestinationArgs;
import com.pulumi.azurenative.eventhub.inputs.CaptureIdentityArgs;
import com.pulumi.azurenative.eventhub.inputs.RetentionDescriptionArgs;
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(CaptureDescriptionArgs.builder()
.destination(DestinationArgs.builder()
.archiveNameFormat("{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}")
.blobContainer("container")
.identity(CaptureIdentityArgs.builder()
.type("UserAssigned")
.userAssignedIdentity("/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2")
.build())
.name("EventHubArchive.AzureBlockBlob")
.storageAccountResourceId("/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage")
.build())
.enabled(true)
.encoding("Avro")
.intervalInSeconds(120)
.sizeLimitInBytes(10485763)
.build())
.eventHubName("sdk-EventHub-6547")
.messageRetentionInDays(4.0)
.namespaceName("sdk-Namespace-5357")
.partitionCount(4.0)
.resourceGroupName("Default-NotificationHubs-AustraliaEast")
.retentionDescription(RetentionDescriptionArgs.builder()
.cleanupPolicy("Compact")
.retentionTimeInHours(96.0)
.tombstoneRetentionTimeInHours(1)
.build())
.status("Active")
.userMetadata("key")
.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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}

Constructors

Link copied to clipboard
constructor(captureDescription: Output<CaptureDescriptionArgs>? = null, eventHubName: Output<String>? = null, messageRetentionInDays: Output<Double>? = null, namespaceName: Output<String>? = null, partitionCount: Output<Double>? = null, resourceGroupName: Output<String>? = null, retentionDescription: Output<RetentionDescriptionArgs>? = null, status: Output<EntityStatus>? = null, userMetadata: Output<String>? = null)

Properties

Link copied to clipboard

Properties of capture description

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

The Event Hub name

Link copied to clipboard
val messageRetentionInDays: Output<Double>? = null

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

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

The Namespace name

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

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

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

Name of the resource group within the azure subscription.

Link copied to clipboard

Event Hub retention settings

Link copied to clipboard
val status: Output<EntityStatus>? = null

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

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

Gets and Sets Metadata of User.

Functions

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