We recommend using Azure Native.
azure.eventhub.EventHub
Explore with Pulumi AI
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:
- 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 isPremium
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 EventHub Capture Description - 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.
- Namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- Namespace
Name string - Resource
Group stringName - Status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- 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 isPremium
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 EventHub Capture Description Args - 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.
- Namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- Namespace
Name string - Resource
Group stringName - Status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- message
Retention 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.- partition
Count Integer Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 EventHub Capture Description - 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.
- namespace
Id String - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name String - resource
Group StringName - status String
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- message
Retention 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.- partition
Count number Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 EventHub Capture Description - 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.
- namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name string - resource
Group stringName - status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- 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 isPremium
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 EventHub Capture Description Args - 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 - resource_
group_ strname - status str
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- message
Retention 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.- partition
Count Number Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 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.
- namespace
Id String - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name String - resource
Group StringName - status String
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
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.
- Partition
Ids List<string> - The identifiers for partitions created for Event Hubs.
- Id string
- The provider-assigned unique ID for this managed resource.
- Partition
Ids []string - The identifiers for partitions created for Event Hubs.
- id String
- The provider-assigned unique ID for this managed resource.
- partition
Ids List<String> - The identifiers for partitions created for Event Hubs.
- id string
- The provider-assigned unique ID for this managed resource.
- partition
Ids 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.
- partition
Ids 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.
- Capture
Description EventHub Capture Description - 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 string
- Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
- Namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- Namespace
Name string - Partition
Count int Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 List<string> - The identifiers for partitions created for Event Hubs.
- Resource
Group stringName - Status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- Capture
Description EventHub Capture Description Args - 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 string
- Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
- Namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- Namespace
Name string - Partition
Count int Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 []string - The identifiers for partitions created for Event Hubs.
- Resource
Group stringName - Status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- capture
Description EventHub Capture Description - A
capture_description
block as defined below. - message
Retention 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.
- namespace
Id String - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name String - partition
Count Integer Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 List<String> - The identifiers for partitions created for Event Hubs.
- resource
Group StringName - status String
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- capture
Description EventHub Capture Description - A
capture_description
block as defined below. - message
Retention 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.
- namespace
Id string - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name string - partition
Count number Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 string[] - The identifiers for partitions created for Event Hubs.
- resource
Group stringName - status string
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- capture_
description EventHub Capture Description Args - 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 - partition_
count int Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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_ strname - status str
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
- capture
Description Property Map - A
capture_description
block as defined below. - message
Retention 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.
- namespace
Id String - Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
- namespace
Name String - partition
Count Number Specifies the current number of shards on the Event Hub.
Note:
partition_count
cannot be changed unless Eventhub Namespace SKU isPremium
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 List<String> - The identifiers for partitions created for Event Hubs.
- resource
Group StringName - status String
- Specifies the status of the Event Hub resource. Possible values are
Active
,Disabled
andSendDisabled
. Defaults toActive
.
Supporting Types
EventHubCaptureDescription, EventHubCaptureDescriptionArgs
- Destination
Event
Hub Capture Description Destination - 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
andAvroDeflate
. - Interval
In intSeconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - Size
Limit intIn Bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - Skip
Empty boolArchives - Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to
false
.
- Destination
Event
Hub Capture Description Destination - 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
andAvroDeflate
. - Interval
In intSeconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - Size
Limit intIn Bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - Skip
Empty boolArchives - Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to
false
.
- destination
Event
Hub Capture Description Destination - 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
andAvroDeflate
. - interval
In IntegerSeconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - size
Limit IntegerIn Bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - skip
Empty BooleanArchives - Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to
false
.
- destination
Event
Hub Capture Description Destination - 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
andAvroDeflate
. - interval
In numberSeconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - size
Limit numberIn Bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - skip
Empty booleanArchives - Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to
false
.
- destination
Event
Hub Capture Description Destination - 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
andAvroDeflate
. - interval_
in_ intseconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - size_
limit_ intin_ bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - skip_
empty_ boolarchives - 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
andAvroDeflate
. - interval
In NumberSeconds - Specifies the time interval in seconds at which the capture will happen. Values can be between
60
and900
seconds. Defaults to300
seconds. - size
Limit NumberIn Bytes - Specifies the amount of data built up in your EventHub before a Capture Operation occurs. Value should be between
10485760
and524288000
bytes. Defaults to314572800
bytes. - skip
Empty BooleanArchives - Specifies if empty files should not be emitted if no events occur during the Capture time window. Defaults to
false
.
EventHubCaptureDescriptionDestination, EventHubCaptureDescriptionDestinationArgs
- Archive
Name stringFormat - 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 stringName - 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.
- Storage
Account stringId - The ID of the Blob Storage Account where messages should be archived.
- Archive
Name stringFormat - 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 stringName - 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.
- Storage
Account stringId - The ID of the Blob Storage Account where messages should be archived.
- archive
Name StringFormat - 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 StringName - 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.
- storage
Account StringId - The ID of the Blob Storage Account where messages should be archived.
- archive
Name stringFormat - 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 stringName - 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.
- storage
Account stringId - The ID of the Blob Storage Account where messages should be archived.
- archive_
name_ strformat - 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_ strname - 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_ strid - The ID of the Blob Storage Account where messages should be archived.
- archive
Name StringFormat - 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 StringName - 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.
- storage
Account StringId - 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.