Event Hubs - List By Namespace
Gets all the Event Hubs in a Namespace.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs?api-version=2024-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs?api-version=2024-01-01&$skip={$skip}&$top={$top}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
namespace
|
path | True |
string |
The Namespace name Regex pattern: |
resource
|
path | True |
string |
Name of the resource group within the azure subscription. |
subscription
|
path | True |
string |
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client API Version. |
$skip
|
query |
integer |
Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. |
|
$top
|
query |
integer |
May be used to limit the number of results to the most recent N usageDetails. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved the list of Event Hubs. |
|
Other Status Codes |
Eventhub error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
EventHubsListAll
Sample request
Sample response
{
"value": [
{
"id": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-eventhub-10",
"name": "sdk-eventhub-10",
"type": "Microsoft.EventHub/Namespaces/EventHubs",
"properties": {
"messageRetentionInDays": 4,
"partitionCount": 4,
"status": "Active",
"createdAt": "2017-06-28T02:45:55.877Z",
"updatedAt": "2017-06-28T02:46:05.877Z",
"partitionIds": [
"0",
"1",
"2",
"3"
],
"captureDescription": {
"enabled": true,
"encoding": "Avro",
"destination": {
"name": "EventHubArchive.AzureBlockBlob",
"properties": {
"storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
"blobContainer": "container",
"archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
}
},
"intervalInSeconds": 120,
"sizeLimitInBytes": 10485763
},
"retentionDescription": {
"cleanupPolicy": "Delete",
"retentionTimeInHours": 96,
"tombstoneRetentionTimeInHours": 1
}
}
}
]
}
Definitions
Name | Description |
---|---|
Capture |
Properties to configure capture description for eventhub |
Capture |
A value that indicates whether capture description is enabled. |
Capture |
Type of Azure Active Directory Managed Identity. |
Cleanup |
Enumerates the possible values for cleanup policy |
created |
The type of identity that created the resource. |
Destination |
Capture storage details for capture description |
Encoding |
Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version |
Entity |
Enumerates the possible values for the status of the Event Hub. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message. |
Eventhub |
Single item in List or Get Event Hub operation |
Event |
The result of the List EventHubs operation. |
Retention |
Properties to configure retention settings for the eventhub |
system |
Metadata pertaining to creation and last modification of the resource. |
CaptureDescription
Properties to configure capture description for eventhub
Name | Type | Description |
---|---|---|
destination |
Properties of Destination where capture will be stored. (Storage Account, Blob Names) |
|
enabled |
boolean |
A value that indicates whether capture description is enabled. |
encoding |
Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version |
|
intervalInSeconds |
integer |
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 |
sizeLimitInBytes |
integer |
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 |
skipEmptyArchives |
boolean |
A value that indicates whether to Skip Empty Archives |
CaptureIdentity
A value that indicates whether capture description is enabled.
Name | Type | Description |
---|---|---|
type |
Type of Azure Active Directory Managed Identity. |
|
userAssignedIdentity |
string |
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. |
CaptureIdentityType
Type of Azure Active Directory Managed Identity.
Name | Type | Description |
---|---|---|
SystemAssigned |
string |
|
UserAssigned |
string |
CleanupPolicyRetentionDescription
Enumerates the possible values for cleanup policy
Name | Type | Description |
---|---|---|
Compact |
string |
|
Delete |
string |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
Destination
Capture storage details for capture description
Name | Type | Description |
---|---|---|
identity |
A value that indicates whether capture description is enabled. |
|
name |
string |
Name for capture destination |
properties.archiveNameFormat |
string |
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 |
properties.blobContainer |
string |
Blob container Name |
properties.dataLakeAccountName |
string |
The Azure Data Lake Store name for the captured events |
properties.dataLakeFolderPath |
string |
The destination folder path for the captured events |
properties.dataLakeSubscriptionId |
string |
Subscription Id of Azure Data Lake Store |
properties.storageAccountResourceId |
string |
Resource id of the storage account to be used to create the blobs |
EncodingCaptureDescription
Enumerates the possible values for the encoding format of capture description. Note: 'AvroDeflate' will be deprecated in New API Version
Name | Type | Description |
---|---|---|
Avro |
string |
|
AvroDeflate |
string |
EntityStatus
Enumerates the possible values for the status of the Event Hub.
Name | Type | Description |
---|---|---|
Active |
string |
|
Creating |
string |
|
Deleting |
string |
|
Disabled |
string |
|
ReceiveDisabled |
string |
|
Renaming |
string |
|
Restoring |
string |
|
SendDisabled |
string |
|
Unknown |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message.
Name | Type | Description |
---|---|---|
error |
The error object. |
Eventhub
Single item in List or Get Event Hub operation
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.captureDescription |
Properties of capture description |
|
properties.createdAt |
string |
Exact time the Event Hub was created. |
properties.messageRetentionInDays |
integer |
Number of days to retain the events for this Event Hub, value should be 1 to 7 days |
properties.partitionCount |
integer |
Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions. |
properties.partitionIds |
string[] |
Current number of shards on the Event Hub. |
properties.retentionDescription |
Event Hub retention settings |
|
properties.status |
Enumerates the possible values for the status of the Event Hub. |
|
properties.updatedAt |
string |
The exact time the message was updated. |
properties.userMetadata |
string |
Gets and Sets Metadata of User. |
systemData |
The system meta data relating to this resource. |
|
type |
string |
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" |
EventHubListResult
The result of the List EventHubs operation.
Name | Type | Description |
---|---|---|
nextLink |
string |
Link to the next set of results. Not empty if Value contains incomplete list of EventHubs. |
value |
Eventhub[] |
Result of the List EventHubs operation. |
RetentionDescription
Properties to configure retention settings for the eventhub
Name | Type | Description |
---|---|---|
cleanupPolicy |
Enumerates the possible values for cleanup policy |
|
retentionTimeInHours |
integer |
Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue |
tombstoneRetentionTimeInHours |
integer |
Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. 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 |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The type of identity that last modified the resource. |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |