Microsoft.EventHub namespaces/eventhubs 2024-05-01-preview
Bicep resource definition
The namespaces/eventhubs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.EventHub/namespaces/eventhubs resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.EventHub/namespaces/eventhubs@2024-05-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
captureDescription: {
destination: {
identity: {
type: 'string'
userAssignedIdentity: 'string'
}
name: 'string'
properties: {
archiveNameFormat: 'string'
blobContainer: 'string'
dataLakeAccountName: 'string'
dataLakeFolderPath: 'string'
dataLakeSubscriptionId: 'string'
storageAccountResourceId: 'string'
}
}
enabled: bool
encoding: 'string'
intervalInSeconds: int
sizeLimitInBytes: int
skipEmptyArchives: bool
}
messageRetentionInDays: int
messageTimestampDescription: {
timestampType: 'string'
}
partitionCount: int
retentionDescription: {
cleanupPolicy: 'string'
minCompactionLagInMins: int
retentionTimeInHours: int
tombstoneRetentionTimeInHours: int
}
status: 'string'
userMetadata: 'string'
}
}
Property values
CaptureDescription
Name | Description | Value |
---|---|---|
destination | Properties of Destination where capture will be stored. (Storage Account, Blob Names) | Destination |
enabled | A value that indicates whether capture description is enabled. | bool |
encoding | Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version | 'Avro' 'AvroDeflate' |
intervalInSeconds | The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds | int |
sizeLimitInBytes | The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes | int |
skipEmptyArchives | A value that indicates whether to Skip Empty Archives | bool |
CaptureIdentity
Name | Description | Value |
---|---|---|
type | Type of Azure Active Directory Managed Identity. | 'SystemAssigned' 'UserAssigned' |
userAssignedIdentity | ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. | string |
Destination
Name | Description | Value |
---|---|---|
identity | A value that indicates whether capture description is enabled. | CaptureIdentity |
name | Name for capture destination | string |
properties | Properties describing the storage account, blob container and archive name format for capture destination | DestinationProperties |
DestinationProperties
Name | Description | Value |
---|---|---|
archiveNameFormat | Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order | string |
blobContainer | Blob container Name | string |
dataLakeAccountName | The Azure Data Lake Store name for the captured events | string |
dataLakeFolderPath | The destination folder path for the captured events | string |
dataLakeSubscriptionId | Subscription Id of Azure Data Lake Store | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
storageAccountResourceId | Resource id of the storage account to be used to create the blobs | string |
EventhubProperties
Name | Description | Value |
---|---|---|
captureDescription | Properties of capture description | CaptureDescription |
messageRetentionInDays | Number of days to retain the events for this Event Hub, value should be 1 to 7 days | int Constraints: Min value = 1 |
messageTimestampDescription | Properties of MessageTimestamp Description | MessageTimestampDescription |
partitionCount | Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. | int Constraints: Min value = 1 |
retentionDescription | Event Hub retention settings | RetentionDescription |
status | Enumerates the possible values for the status of the Event Hub. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
userMetadata | Gets and Sets Metadata of User. | string |
MessageTimestampDescription
Name | Description | Value |
---|---|---|
timestampType | Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same. | 'Create' 'LogAppend' |
Microsoft.EventHub/namespaces/eventhubs
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: namespaces |
properties | Properties supplied to the Create Or Update Event Hub operation. | EventhubProperties |
RetentionDescription
Name | Description | Value |
---|---|---|
cleanupPolicy | Enumerates the possible values for cleanup policy | 'Compact' 'Delete' 'DeleteOrCompact' |
minCompactionLagInMins | The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact. | int |
retentionTimeInHours | Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type. | int |
tombstoneRetentionTimeInHours | Number of hours to retain the tombstone markers of a compacted Event Hub. This value is used when cleanupPolicy is Compact or DeleteOrCompact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub | int |
Quickstart samples
The following quickstart samples deploy this resource type.
Bicep File | Description |
---|---|
Azure Digital Twins with Time Data History Connection | This template creates an Azure Digital Twins instance configured with a time series data history connection. In order to create a connection, other resources must be created such as an Event Hubs namespace, an event hub, Azure Data Explorer cluster, and a database. Data is sent to an event hub which eventually forwards the data to the Azure Data Explorer cluster. Data is stored in a database table in the cluster |
Azure Function App with Event Hub and Managed Identity | his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account |
Create an event hub | This template enables you to deploy a EventHubs namespace with an event hub. |
Create an EventHubs namespace, Event Hub, & consumer group | This template enables you to deploy an Event Hubs Standard namespace, an Event Hub, and a consumer group. |
Creates Eventhub cluster, namesapce & eventhub | This template enables you to create EventHubs Cluster, namespace and eventhub in cluster |
Deploy Azure Data Explorer db with Event Grid connection | Deploy Azure Data Explorer db with Event Grid connection. |
Deploy Azure Data Explorer db with Event Hub connection | Deploy Azure Data Explorer db with Event Hub connection. |
Deploy the MedTech service | The MedTech service is one of the Azure Health Data Services designed to ingest device data from multiple devices, transform the device data into FHIR Observations, which are then persisted in the Azure Health Data Services FHIR service. |
Deploy the MedTech service including an Azure IoT Hub | The MedTech service is one of the Azure Health Data Services designed to ingest device data from multiple devices, transform the device data into FHIR Observations, which are then persisted in the Azure Health Data Services FHIR service. |
Deploy the Sports Analytics on Azure Architecture | Creates an Azure storage account with ADLS Gen 2 enabled, an Azure Data Factory instance with linked services for the storage account (an the Azure SQL Database if deployed), and an Azure Databricks instance. The AAD identity for the user deploying the template and the managed identity for the ADF instance will be granted the Storage Blob Data Contributor role on the storage account. There are also options to deploy an Azure Key Vault instance, an Azure SQL Database, and an Azure Event Hub (for streaming use cases). When an Azure Key Vault is deployed, the data factory managed identity and the AAD identity for the user deploying the template will be granted the Key Vault Secrets User role. |
FrontDoor CDN with WAF, Domains and Logs to EventHub | This template creates a new Azure FrontDoor cdn profile. Create WAF with custom and managed rules, cdn routes, origin and groups with their association with WAF and routes, configures custom domains, create event hub and diagnostic settings for sending CDN access logs using event hub. |
Moesif API Analytics and Monetization | The template will log API calls from Azure API Management to Moesif API analytics and monetization platform |
ARM template resource definition
The namespaces/eventhubs resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.EventHub/namespaces/eventhubs resource, add the following JSON to your template.
{
"type": "Microsoft.EventHub/namespaces/eventhubs",
"apiVersion": "2024-05-01-preview",
"name": "string",
"properties": {
"captureDescription": {
"destination": {
"identity": {
"type": "string",
"userAssignedIdentity": "string"
},
"name": "string",
"properties": {
"archiveNameFormat": "string",
"blobContainer": "string",
"dataLakeAccountName": "string",
"dataLakeFolderPath": "string",
"dataLakeSubscriptionId": "string",
"storageAccountResourceId": "string"
}
},
"enabled": "bool",
"encoding": "string",
"intervalInSeconds": "int",
"sizeLimitInBytes": "int",
"skipEmptyArchives": "bool"
},
"messageRetentionInDays": "int",
"messageTimestampDescription": {
"timestampType": "string"
},
"partitionCount": "int",
"retentionDescription": {
"cleanupPolicy": "string",
"minCompactionLagInMins": "int",
"retentionTimeInHours": "int",
"tombstoneRetentionTimeInHours": "int"
},
"status": "string",
"userMetadata": "string"
}
}
Property values
CaptureDescription
Name | Description | Value |
---|---|---|
destination | Properties of Destination where capture will be stored. (Storage Account, Blob Names) | Destination |
enabled | A value that indicates whether capture description is enabled. | bool |
encoding | Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version | 'Avro' 'AvroDeflate' |
intervalInSeconds | The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds | int |
sizeLimitInBytes | The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes | int |
skipEmptyArchives | A value that indicates whether to Skip Empty Archives | bool |
CaptureIdentity
Name | Description | Value |
---|---|---|
type | Type of Azure Active Directory Managed Identity. | 'SystemAssigned' 'UserAssigned' |
userAssignedIdentity | ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. | string |
Destination
Name | Description | Value |
---|---|---|
identity | A value that indicates whether capture description is enabled. | CaptureIdentity |
name | Name for capture destination | string |
properties | Properties describing the storage account, blob container and archive name format for capture destination | DestinationProperties |
DestinationProperties
Name | Description | Value |
---|---|---|
archiveNameFormat | Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order | string |
blobContainer | Blob container Name | string |
dataLakeAccountName | The Azure Data Lake Store name for the captured events | string |
dataLakeFolderPath | The destination folder path for the captured events | string |
dataLakeSubscriptionId | Subscription Id of Azure Data Lake Store | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
storageAccountResourceId | Resource id of the storage account to be used to create the blobs | string |
EventhubProperties
Name | Description | Value |
---|---|---|
captureDescription | Properties of capture description | CaptureDescription |
messageRetentionInDays | Number of days to retain the events for this Event Hub, value should be 1 to 7 days | int Constraints: Min value = 1 |
messageTimestampDescription | Properties of MessageTimestamp Description | MessageTimestampDescription |
partitionCount | Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. | int Constraints: Min value = 1 |
retentionDescription | Event Hub retention settings | RetentionDescription |
status | Enumerates the possible values for the status of the Event Hub. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
userMetadata | Gets and Sets Metadata of User. | string |
MessageTimestampDescription
Name | Description | Value |
---|---|---|
timestampType | Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same. | 'Create' 'LogAppend' |
Microsoft.EventHub/namespaces/eventhubs
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2024-05-01-preview' |
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
properties | Properties supplied to the Create Or Update Event Hub operation. | EventhubProperties |
type | The resource type | 'Microsoft.EventHub/namespaces/eventhubs' |
RetentionDescription
Name | Description | Value |
---|---|---|
cleanupPolicy | Enumerates the possible values for cleanup policy | 'Compact' 'Delete' 'DeleteOrCompact' |
minCompactionLagInMins | The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact. | int |
retentionTimeInHours | Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type. | int |
tombstoneRetentionTimeInHours | Number of hours to retain the tombstone markers of a compacted Event Hub. This value is used when cleanupPolicy is Compact or DeleteOrCompact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub | int |
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Azure Digital Twins with Time Data History Connection |
This template creates an Azure Digital Twins instance configured with a time series data history connection. In order to create a connection, other resources must be created such as an Event Hubs namespace, an event hub, Azure Data Explorer cluster, and a database. Data is sent to an event hub which eventually forwards the data to the Azure Data Explorer cluster. Data is stored in a database table in the cluster |
Azure Function App with Event Hub and Managed Identity |
his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account |
Create an event hub |
This template enables you to deploy a EventHubs namespace with an event hub. |
Create an EventHubs namespace, Event Hub, & consumer group |
This template enables you to deploy an Event Hubs Standard namespace, an Event Hub, and a consumer group. |
Creates Eventhub cluster, namesapce & eventhub |
This template enables you to create EventHubs Cluster, namespace and eventhub in cluster |
Deploy Azure Data Explorer db with Event Grid connection |
Deploy Azure Data Explorer db with Event Grid connection. |
Deploy Azure Data Explorer db with Event Hub connection |
Deploy Azure Data Explorer db with Event Hub connection. |
Deploy the MedTech service |
The MedTech service is one of the Azure Health Data Services designed to ingest device data from multiple devices, transform the device data into FHIR Observations, which are then persisted in the Azure Health Data Services FHIR service. |
Deploy the MedTech service including an Azure IoT Hub |
The MedTech service is one of the Azure Health Data Services designed to ingest device data from multiple devices, transform the device data into FHIR Observations, which are then persisted in the Azure Health Data Services FHIR service. |
Deploy the Sports Analytics on Azure Architecture |
Creates an Azure storage account with ADLS Gen 2 enabled, an Azure Data Factory instance with linked services for the storage account (an the Azure SQL Database if deployed), and an Azure Databricks instance. The AAD identity for the user deploying the template and the managed identity for the ADF instance will be granted the Storage Blob Data Contributor role on the storage account. There are also options to deploy an Azure Key Vault instance, an Azure SQL Database, and an Azure Event Hub (for streaming use cases). When an Azure Key Vault is deployed, the data factory managed identity and the AAD identity for the user deploying the template will be granted the Key Vault Secrets User role. |
FrontDoor CDN with WAF, Domains and Logs to EventHub |
This template creates a new Azure FrontDoor cdn profile. Create WAF with custom and managed rules, cdn routes, origin and groups with their association with WAF and routes, configures custom domains, create event hub and diagnostic settings for sending CDN access logs using event hub. |
Moesif API Analytics and Monetization |
The template will log API calls from Azure API Management to Moesif API analytics and monetization platform |
Terraform (AzAPI provider) resource definition
The namespaces/eventhubs resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.EventHub/namespaces/eventhubs resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.EventHub/namespaces/eventhubs@2024-05-01-preview"
name = "string"
body = jsonencode({
properties = {
captureDescription = {
destination = {
identity = {
type = "string"
userAssignedIdentity = "string"
}
name = "string"
properties = {
archiveNameFormat = "string"
blobContainer = "string"
dataLakeAccountName = "string"
dataLakeFolderPath = "string"
dataLakeSubscriptionId = "string"
storageAccountResourceId = "string"
}
}
enabled = bool
encoding = "string"
intervalInSeconds = int
sizeLimitInBytes = int
skipEmptyArchives = bool
}
messageRetentionInDays = int
messageTimestampDescription = {
timestampType = "string"
}
partitionCount = int
retentionDescription = {
cleanupPolicy = "string"
minCompactionLagInMins = int
retentionTimeInHours = int
tombstoneRetentionTimeInHours = int
}
status = "string"
userMetadata = "string"
}
})
}
Property values
CaptureDescription
Name | Description | Value |
---|---|---|
destination | Properties of Destination where capture will be stored. (Storage Account, Blob Names) | Destination |
enabled | A value that indicates whether capture description is enabled. | bool |
encoding | Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version | 'Avro' 'AvroDeflate' |
intervalInSeconds | The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds | int |
sizeLimitInBytes | The size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 to 524288000 bytes | int |
skipEmptyArchives | A value that indicates whether to Skip Empty Archives | bool |
CaptureIdentity
Name | Description | Value |
---|---|---|
type | Type of Azure Active Directory Managed Identity. | 'SystemAssigned' 'UserAssigned' |
userAssignedIdentity | ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. | string |
Destination
Name | Description | Value |
---|---|---|
identity | A value that indicates whether capture description is enabled. | CaptureIdentity |
name | Name for capture destination | string |
properties | Properties describing the storage account, blob container and archive name format for capture destination | DestinationProperties |
DestinationProperties
Name | Description | Value |
---|---|---|
archiveNameFormat | Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order | string |
blobContainer | Blob container Name | string |
dataLakeAccountName | The Azure Data Lake Store name for the captured events | string |
dataLakeFolderPath | The destination folder path for the captured events | string |
dataLakeSubscriptionId | Subscription Id of Azure Data Lake Store | string Constraints: Min length = 36 Max length = 36 Pattern = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ |
storageAccountResourceId | Resource id of the storage account to be used to create the blobs | string |
EventhubProperties
Name | Description | Value |
---|---|---|
captureDescription | Properties of capture description | CaptureDescription |
messageRetentionInDays | Number of days to retain the events for this Event Hub, value should be 1 to 7 days | int Constraints: Min value = 1 |
messageTimestampDescription | Properties of MessageTimestamp Description | MessageTimestampDescription |
partitionCount | Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. | int Constraints: Min value = 1 |
retentionDescription | Event Hub retention settings | RetentionDescription |
status | Enumerates the possible values for the status of the Event Hub. | 'Active' 'Creating' 'Deleting' 'Disabled' 'ReceiveDisabled' 'Renaming' 'Restoring' 'SendDisabled' 'Unknown' |
userMetadata | Gets and Sets Metadata of User. | string |
MessageTimestampDescription
Name | Description | Value |
---|---|---|
timestampType | Denotes the type of timestamp the message will hold.Two types of timestamp types - "AppendTime" and "CreateTime". AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same. | 'Create' 'LogAppend' |
Microsoft.EventHub/namespaces/eventhubs
Name | Description | Value |
---|---|---|
name | The resource name | string Constraints: Min length = 1 Max length = 1 (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: namespaces |
properties | Properties supplied to the Create Or Update Event Hub operation. | EventhubProperties |
type | The resource type | "Microsoft.EventHub/namespaces/eventhubs@2024-05-01-preview" |
RetentionDescription
Name | Description | Value |
---|---|---|
cleanupPolicy | Enumerates the possible values for cleanup policy | 'Compact' 'Delete' 'DeleteOrCompact' |
minCompactionLagInMins | The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact. | int |
retentionTimeInHours | Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type. | int |
tombstoneRetentionTimeInHours | Number of hours to retain the tombstone markers of a compacted Event Hub. This value is used when cleanupPolicy is Compact or DeleteOrCompact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub | int |