EventHub

class EventHub : KotlinCustomResource

Manages a Event Hubs as a nested resource within a Event Hubs namespace.

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.eventhub.EventHubNamespace;
import com.pulumi.azure.eventhub.EventHubNamespaceArgs;
import com.pulumi.azure.eventhub.EventHub;
import com.pulumi.azure.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.capacity(1)
.tags(Map.of("environment", "Production"))
.build());
var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
.namespaceName(exampleEventHubNamespace.name())
.resourceGroupName(exampleResourceGroup.name())
.partitionCount(2)
.messageRetention(1)
.build());
}
}

Import

EventHubs can be imported using the resource id, e.g.

$ pulumi import azure:eventhub/eventHub:EventHub eventhub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1

Properties

Link copied to clipboard

A capture_description block as defined below.

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

Specifies the number of days to retain the events for this Event Hub.

Link copied to clipboard
val name: Output<String>

Specifies the name of the EventHub resource. Changing this forces a new resource to be created.

Link copied to clipboard
val namespaceName: Output<String>

Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.

Link copied to clipboard
val partitionCount: Output<Int>

Specifies the current number of shards on the Event Hub.

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

The identifiers for partitions created for Event Hubs.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created.

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

Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.

Link copied to clipboard
val urn: Output<String>