1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. EventHub

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi

azure.eventhub.EventHub

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleEventHubNamespace = new azure.eventhub.EventHubNamespace("example", {
        name: "acceptanceTestEventHubNamespace",
        location: example.location,
        resourceGroupName: example.name,
        sku: "Standard",
        capacity: 1,
        tags: {
            environment: "Production",
        },
    });
    const exampleEventHub = new azure.eventhub.EventHub("example", {
        name: "acceptanceTestEventHub",
        namespaceId: exampleEventHubNamespace.id,
        partitionCount: 2,
        messageRetention: 1,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_event_hub_namespace = azure.eventhub.EventHubNamespace("example",
        name="acceptanceTestEventHubNamespace",
        location=example.location,
        resource_group_name=example.name,
        sku="Standard",
        capacity=1,
        tags={
            "environment": "Production",
        })
    example_event_hub = azure.eventhub.EventHub("example",
        name="acceptanceTestEventHub",
        namespace_id=example_event_hub_namespace.id,
        partition_count=2,
        message_retention=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
    	"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-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
    			Name:              pulumi.String("acceptanceTestEventHubNamespace"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Sku:               pulumi.String("Standard"),
    			Capacity:          pulumi.Int(1),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("Production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
    			Name:             pulumi.String("acceptanceTestEventHub"),
    			NamespaceId:      exampleEventHubNamespace.ID(),
    			PartitionCount:   pulumi.Int(2),
    			MessageRetention: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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-resources",
            Location = "West Europe",
        });
    
        var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("example", new()
        {
            Name = "acceptanceTestEventHubNamespace",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Sku = "Standard",
            Capacity = 1,
            Tags = 
            {
                { "environment", "Production" },
            },
        });
    
        var exampleEventHub = new Azure.EventHub.EventHub("example", new()
        {
            Name = "acceptanceTestEventHub",
            NamespaceId = exampleEventHubNamespace.Id,
            PartitionCount = 2,
            MessageRetention = 1,
        });
    
    });
    
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleEventHubNamespace = new EventHubNamespace("exampleEventHubNamespace", EventHubNamespaceArgs.builder()
                .name("acceptanceTestEventHubNamespace")
                .location(example.location())
                .resourceGroupName(example.name())
                .sku("Standard")
                .capacity(1)
                .tags(Map.of("environment", "Production"))
                .build());
    
            var exampleEventHub = new EventHub("exampleEventHub", EventHubArgs.builder()
                .name("acceptanceTestEventHub")
                .namespaceId(exampleEventHubNamespace.id())
                .partitionCount(2)
                .messageRetention(1)
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleEventHubNamespace:
        type: azure:eventhub:EventHubNamespace
        name: example
        properties:
          name: acceptanceTestEventHubNamespace
          location: ${example.location}
          resourceGroupName: ${example.name}
          sku: Standard
          capacity: 1
          tags:
            environment: Production
      exampleEventHub:
        type: azure:eventhub:EventHub
        name: example
        properties:
          name: acceptanceTestEventHub
          namespaceId: ${exampleEventHubNamespace.id}
          partitionCount: 2
          messageRetention: 1
    

    Create EventHub Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EventHub(name: string, args: EventHubArgs, opts?: CustomResourceOptions);
    @overload
    def EventHub(resource_name: str,
                 args: EventHubArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def EventHub(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 message_retention: Optional[int] = None,
                 partition_count: Optional[int] = None,
                 capture_description: Optional[EventHubCaptureDescriptionArgs] = None,
                 name: Optional[str] = None,
                 namespace_id: Optional[str] = None,
                 namespace_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 status: Optional[str] = None)
    func NewEventHub(ctx *Context, name string, args EventHubArgs, opts ...ResourceOption) (*EventHub, error)
    public EventHub(string name, EventHubArgs args, CustomResourceOptions? opts = null)
    public EventHub(String name, EventHubArgs args)
    public EventHub(String name, EventHubArgs args, CustomResourceOptions options)
    
    type: azure:eventhub:EventHub
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EventHubArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EventHubArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EventHubArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventHubArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventHubArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var eventHubResource = new Azure.EventHub.EventHub("eventHubResource", new()
    {
        MessageRetention = 0,
        PartitionCount = 0,
        CaptureDescription = new Azure.EventHub.Inputs.EventHubCaptureDescriptionArgs
        {
            Destination = new Azure.EventHub.Inputs.EventHubCaptureDescriptionDestinationArgs
            {
                ArchiveNameFormat = "string",
                BlobContainerName = "string",
                Name = "string",
                StorageAccountId = "string",
            },
            Enabled = false,
            Encoding = "string",
            IntervalInSeconds = 0,
            SizeLimitInBytes = 0,
            SkipEmptyArchives = false,
        },
        Name = "string",
        NamespaceId = "string",
        Status = "string",
    });
    
    example, err := eventhub.NewEventHub(ctx, "eventHubResource", &eventhub.EventHubArgs{
    	MessageRetention: pulumi.Int(0),
    	PartitionCount:   pulumi.Int(0),
    	CaptureDescription: &eventhub.EventHubCaptureDescriptionArgs{
    		Destination: &eventhub.EventHubCaptureDescriptionDestinationArgs{
    			ArchiveNameFormat: pulumi.String("string"),
    			BlobContainerName: pulumi.String("string"),
    			Name:              pulumi.String("string"),
    			StorageAccountId:  pulumi.String("string"),
    		},
    		Enabled:           pulumi.Bool(false),
    		Encoding:          pulumi.String("string"),
    		IntervalInSeconds: pulumi.Int(0),
    		SizeLimitInBytes:  pulumi.Int(0),
    		SkipEmptyArchives: pulumi.Bool(false),
    	},
    	Name:        pulumi.String("string"),
    	NamespaceId: pulumi.String("string"),
    	Status:      pulumi.String("string"),
    })
    
    var eventHubResource = new EventHub("eventHubResource", EventHubArgs.builder()
        .messageRetention(0)
        .partitionCount(0)
        .captureDescription(EventHubCaptureDescriptionArgs.builder()
            .destination(EventHubCaptureDescriptionDestinationArgs.builder()
                .archiveNameFormat("string")
                .blobContainerName("string")
                .name("string")
                .storageAccountId("string")
                .build())
            .enabled(false)
            .encoding("string")
            .intervalInSeconds(0)
            .sizeLimitInBytes(0)
            .skipEmptyArchives(false)
            .build())
        .name("string")
        .namespaceId("string")
        .status("string")
        .build());
    
    event_hub_resource = azure.eventhub.EventHub("eventHubResource",
        message_retention=0,
        partition_count=0,
        capture_description={
            "destination": {
                "archive_name_format": "string",
                "blob_container_name": "string",
                "name": "string",
                "storage_account_id": "string",
            },
            "enabled": False,
            "encoding": "string",
            "interval_in_seconds": 0,
            "size_limit_in_bytes": 0,
            "skip_empty_archives": False,
        },
        name="string",
        namespace_id="string",
        status="string")
    
    const eventHubResource = new azure.eventhub.EventHub("eventHubResource", {
        messageRetention: 0,
        partitionCount: 0,
        captureDescription: {
            destination: {
                archiveNameFormat: "string",
                blobContainerName: "string",
                name: "string",
                storageAccountId: "string",
            },
            enabled: false,
            encoding: "string",
            intervalInSeconds: 0,
            sizeLimitInBytes: 0,
            skipEmptyArchives: false,
        },
        name: "string",
        namespaceId: "string",
        status: "string",
    });
    
    type: azure:eventhub:EventHub
    properties:
        captureDescription:
            destination:
                archiveNameFormat: string
                blobContainerName: string
                name: string
                storageAccountId: string
            enabled: false
            encoding: string
            intervalInSeconds: 0
            sizeLimitInBytes: 0
            skipEmptyArchives: false
        messageRetention: 0
        name: string
        namespaceId: string
        partitionCount: 0
        status: string
    

    EventHub Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The EventHub resource accepts the following input properties:

    MessageRetention int

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    PartitionCount int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    CaptureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    Name string
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    NamespaceId string
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    ResourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    PartitionCount int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    CaptureDescription EventHubCaptureDescriptionArgs
    A capture_description block as defined below.
    Name string
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    NamespaceId string
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    ResourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    partitionCount Integer

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    captureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    name String
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    namespaceId String
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    resourceGroupName String

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    partitionCount number

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    captureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    name string
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    namespaceId string
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    namespaceName string

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    resourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    partition_count int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    capture_description EventHubCaptureDescriptionArgs
    A capture_description block as defined below.
    name str
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    namespace_id str
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    namespace_name str

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    resource_group_name str

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    partitionCount Number

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    captureDescription Property Map
    A capture_description block as defined below.
    name String
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    namespaceId String
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    namespaceName String

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    resourceGroupName String

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EventHub resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    PartitionIds List<string>
    The identifiers for partitions created for Event Hubs.
    Id string
    The provider-assigned unique ID for this managed resource.
    PartitionIds []string
    The identifiers for partitions created for Event Hubs.
    id String
    The provider-assigned unique ID for this managed resource.
    partitionIds List<String>
    The identifiers for partitions created for Event Hubs.
    id string
    The provider-assigned unique ID for this managed resource.
    partitionIds string[]
    The identifiers for partitions created for Event Hubs.
    id str
    The provider-assigned unique ID for this managed resource.
    partition_ids Sequence[str]
    The identifiers for partitions created for Event Hubs.
    id String
    The provider-assigned unique ID for this managed resource.
    partitionIds List<String>
    The identifiers for partitions created for Event Hubs.

    Look up Existing EventHub Resource

    Get an existing EventHub resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EventHubState, opts?: CustomResourceOptions): EventHub
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capture_description: Optional[EventHubCaptureDescriptionArgs] = None,
            message_retention: Optional[int] = None,
            name: Optional[str] = None,
            namespace_id: Optional[str] = None,
            namespace_name: Optional[str] = None,
            partition_count: Optional[int] = None,
            partition_ids: Optional[Sequence[str]] = None,
            resource_group_name: Optional[str] = None,
            status: Optional[str] = None) -> EventHub
    func GetEventHub(ctx *Context, name string, id IDInput, state *EventHubState, opts ...ResourceOption) (*EventHub, error)
    public static EventHub Get(string name, Input<string> id, EventHubState? state, CustomResourceOptions? opts = null)
    public static EventHub get(String name, Output<String> id, EventHubState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CaptureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    MessageRetention int

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    Name string
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    NamespaceId string
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    PartitionCount int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    PartitionIds List<string>
    The identifiers for partitions created for Event Hubs.
    ResourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    Status string
    Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.
    CaptureDescription EventHubCaptureDescriptionArgs
    A capture_description block as defined below.
    MessageRetention int

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

    Name string
    Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
    NamespaceId string
    Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
    NamespaceName string

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    PartitionCount int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    PartitionIds []string
    The identifiers for partitions created for Event Hubs.
    ResourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    Status string
    Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.
    captureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    messageRetention Integer

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

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

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    partitionCount Integer

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    partitionIds List<String>
    The identifiers for partitions created for Event Hubs.
    resourceGroupName String

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    status String
    Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.
    captureDescription EventHubCaptureDescription
    A capture_description block as defined below.
    messageRetention number

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

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

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    partitionCount number

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    partitionIds string[]
    The identifiers for partitions created for Event Hubs.
    resourceGroupName string

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    status string
    Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.
    capture_description EventHubCaptureDescriptionArgs
    A capture_description block as defined below.
    message_retention int

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

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

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    partition_count int

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    partition_ids Sequence[str]
    The identifiers for partitions created for Event Hubs.
    resource_group_name str

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    status str
    Specifies the status of the Event Hub resource. Possible values are Active, Disabled and SendDisabled. Defaults to Active.
    captureDescription Property Map
    A capture_description block as defined below.
    messageRetention Number

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

    Note: When using a dedicated Event Hubs cluster, maximum value of message_retention is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.

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

    Deprecated: namespace_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

    partitionCount Number

    Specifies the current number of shards on the Event Hub.

    Note: partition_count cannot be changed unless Eventhub Namespace SKU is Premium and cannot be decreased.

    Note: When using a dedicated Event Hubs cluster, maximum value of partition_count is 1024. When using a shared parent EventHub Namespace, maximum value is 32.

    partitionIds List<String>
    The identifiers for partitions created for Event Hubs.
    resourceGroupName String

    Deprecated: resource_group_name has been deprecated in favour of namespace_id and will be removed in v5.0 of the AzureRM Provider

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

    Supporting Types

    EventHubCaptureDescription, EventHubCaptureDescriptionArgs

    Destination EventHubCaptureDescriptionDestination
    A destination block as defined below.
    Enabled bool
    Specifies if the Capture Description is Enabled.
    Encoding string
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    IntervalInSeconds int
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    SizeLimitInBytes int
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    SkipEmptyArchives bool
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.
    Destination EventHubCaptureDescriptionDestination
    A destination block as defined below.
    Enabled bool
    Specifies if the Capture Description is Enabled.
    Encoding string
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    IntervalInSeconds int
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    SizeLimitInBytes int
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    SkipEmptyArchives bool
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.
    destination EventHubCaptureDescriptionDestination
    A destination block as defined below.
    enabled Boolean
    Specifies if the Capture Description is Enabled.
    encoding String
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    intervalInSeconds Integer
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    sizeLimitInBytes Integer
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    skipEmptyArchives Boolean
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.
    destination EventHubCaptureDescriptionDestination
    A destination block as defined below.
    enabled boolean
    Specifies if the Capture Description is Enabled.
    encoding string
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    intervalInSeconds number
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    sizeLimitInBytes number
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    skipEmptyArchives boolean
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.
    destination EventHubCaptureDescriptionDestination
    A destination block as defined below.
    enabled bool
    Specifies if the Capture Description is Enabled.
    encoding str
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    interval_in_seconds int
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    size_limit_in_bytes int
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    skip_empty_archives bool
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.
    destination Property Map
    A destination block as defined below.
    enabled Boolean
    Specifies if the Capture Description is Enabled.
    encoding String
    Specifies the Encoding used for the Capture Description. Possible values are Avro and AvroDeflate.
    intervalInSeconds Number
    Specifies the time interval in seconds at which the capture will happen. Values can be between 60 and 900 seconds. Defaults to 300 seconds.
    sizeLimitInBytes Number
    Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between 10485760 and 524288000 bytes. Defaults to 314572800 bytes.
    skipEmptyArchives Boolean
    Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to false.

    EventHubCaptureDescriptionDestination, EventHubCaptureDescriptionDestinationArgs

    ArchiveNameFormat string
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    BlobContainerName string
    The name of the Container within the Blob Storage Account where messages should be archived.
    Name string

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    StorageAccountId string
    The ID of the Blob Storage Account where messages should be archived.
    ArchiveNameFormat string
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    BlobContainerName string
    The name of the Container within the Blob Storage Account where messages should be archived.
    Name string

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    StorageAccountId string
    The ID of the Blob Storage Account where messages should be archived.
    archiveNameFormat String
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    blobContainerName String
    The name of the Container within the Blob Storage Account where messages should be archived.
    name String

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    storageAccountId String
    The ID of the Blob Storage Account where messages should be archived.
    archiveNameFormat string
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    blobContainerName string
    The name of the Container within the Blob Storage Account where messages should be archived.
    name string

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    storageAccountId string
    The ID of the Blob Storage Account where messages should be archived.
    archive_name_format str
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    blob_container_name str
    The name of the Container within the Blob Storage Account where messages should be archived.
    name str

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    storage_account_id str
    The ID of the Blob Storage Account where messages should be archived.
    archiveNameFormat String
    The Blob naming convention for archiving. e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order
    blobContainerName String
    The name of the Container within the Blob Storage Account where messages should be archived.
    name String

    The Name of the Destination where the capture should take place. At this time the only supported value is EventHubArchive.AzureBlockBlob.

    At this time it's only possible to Capture EventHub messages to Blob Storage. There's a Feature Request for the Azure SDK to add support for Capturing messages to Azure Data Lake here.

    storageAccountId String
    The ID of the Blob Storage Account where messages should be archived.

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.12.0 published on Monday, Dec 2, 2024 by Pulumi