Event Hubs - Create Or Update
Creates or updates a new Event Hub as a nested resource within a Namespace.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
authorizationRuleName
|
path | True |
|
The authorization rule name. |
|
consumerGroupName
|
path | True |
|
The consumer group name |
|
subscriptionId
|
path | True |
|
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
resourceGroupName
|
path | True |
|
Name of the resource group within the azure subscription. |
|
namespaceName
|
path | True |
|
The Namespace name |
|
eventHubName
|
path | True |
|
The Event Hub name |
|
api-version
|
query | True |
|
Client API Version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| location | True |
|
Location of the resource. |
| messageRetentionInDays |
|
Number of days to retain the events for this Event Hub. |
|
| name |
|
Name of the Event Hub. |
|
| partitionCount |
|
Number of partitions created for the Event Hub. |
|
| status |
|
Enumerates the possible values for the status of the Event Hub. |
|
| type |
|
ARM type of the Namespace. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Event Hub successfully created. |
Examples
EventHubCreate
Sample Request
PUT https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.EventHub/namespaces/sdk-Namespace7834/eventhubs/sdk-EventHub6448?api-version=2015-08-01
{
"location": "West US",
"properties": {
"messageRetentionInDays": 7,
"status": "Active",
"partitionCount": 4
}
}
Sample Response
{
"id": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.EventHub/namespaces/sdk-Namespace7834/eventhubs/sdk-EventHub6448",
"name": "sdk-EventHub6448",
"type": "Microsoft.EventHub/EventHubs",
"properties": {
"messageRetentionInDays": 7,
"status": "Active",
"createdAt": "2017-03-12T20:37:09.280Z",
"updatedAt": "2017-03-12T20:37:18.640Z",
"partitionCount": 4,
"partitionIds": [
"0",
"1",
"2",
"3"
]
}
}
Definitions
| Name | Type | Description |
|---|---|---|
| createdAt |
|
Exact time the Event Hub was created. |
| id |
|
Resource Id |
| location |
|
Resource location |
| messageRetentionInDays |
|
Number of days to retain the events for this Event Hub. |
| name |
|
Resource name |
| partitionCount |
|
Number of partitions created for the Event Hub. |
| partitionIds |
|
Current number of shards on the Event Hub. |
| status |
|
Enumerates the possible values for the status of the Event Hub. |
| type |
|
Resource type |
| updatedAt |
|
The exact time the message was updated. |