Class EventHub
Manages a Event Hubs as a nested resource within a Event Hubs namespace.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("exampleEventHubNamespace", new Azure.EventHub.EventHubNamespaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "Standard",
Capacity = 1,
Tags =
{
{ "environment", "Production" },
},
});
var exampleEventHub = new Azure.EventHub.EventHub("exampleEventHub", new Azure.EventHub.EventHubArgs
{
NamespaceName = exampleEventHubNamespace.Name,
ResourceGroupName = exampleResourceGroup.Name,
PartitionCount = 2,
MessageRetention = 1,
});
}
}
Inherited Members
Namespace: Pulumi.Azure.EventHub
Assembly: Pulumi.Azure.dll
Syntax
public class EventHub : CustomResource
Constructors
View SourceEventHub(String, EventHubArgs, CustomResourceOptions)
Create a EventHub resource with the given unique name, arguments, and options.
Declaration
public EventHub(string name, EventHubArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| EventHubArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCaptureDescription
A capture_description block as defined below.
Declaration
public Output<EventHubCaptureDescription> CaptureDescription { get; }
Property Value
| Type | Description |
|---|---|
| Output<EventHubCaptureDescription> |
MessageRetention
Specifies the number of days to retain the events for this Event Hub. Needs to be between 1 and 7 days; or 1 day when using a Basic SKU for the parent EventHub Namespace.
Declaration
public Output<int> MessageRetention { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceName
Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
Declaration
public Output<string> NamespaceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PartitionCount
Specifies the current number of shards on the Event Hub. Changing this forces a new resource to be created.
Declaration
public Output<int> PartitionCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
PartitionIds
The identifiers for partitions created for Event Hubs.
Declaration
public Output<ImmutableArray<string>> PartitionIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ResourceGroupName
The name of the resource group in which the EventHub's parent Namespace exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, EventHubState, CustomResourceOptions)
Get an existing EventHub resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static EventHub Get(string name, Input<string> id, EventHubState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| EventHubState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| EventHub |