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
  • string
The authorization rule name.
consumerGroupName
path True
  • string
The consumer group name
subscriptionId
path True
  • string

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

Name of the resource group within the azure subscription.

namespaceName
path True
  • string

The Namespace name

eventHubName
path True
  • string

The Event Hub name

api-version
query True
  • string

Client API Version.

Request Body

Name Required Type Description
location True
  • string

Location of the resource.

messageRetentionInDays
  • integer
    int64

Number of days to retain the events for this Event Hub.

name
  • string

Name of the Event Hub.

partitionCount
  • integer
    int64

Number of partitions created for the Event Hub.

status
  • enum:
    • Active
    • Disabled
    • Restoring
    • SendDisabled
    • ReceiveDisabled
    • Creating
    • Deleting
    • Renaming
    • Unknown

Enumerates the possible values for the status of the Event Hub.

type
  • string

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
  • string
    date-time

Exact time the Event Hub was created.

id
  • string

Resource Id

location
  • string

Resource location

messageRetentionInDays
  • integer
    int64

Number of days to retain the events for this Event Hub.

name
  • string

Resource name

partitionCount
  • integer
    int64

Number of partitions created for the Event Hub.

partitionIds
  • string[]

Current number of shards on the Event Hub.

status
  • enum:
    • Active
    • Disabled
    • Restoring
    • SendDisabled
    • ReceiveDisabled
    • Creating
    • Deleting
    • Renaming
    • Unknown

Enumerates the possible values for the status of the Event Hub.

type
  • string

Resource type

updatedAt
  • string
    date-time

The exact time the message was updated.