Event Hubs - Regenerate Keys
Regenerates the ACS and SAS connection strings for the Event Hub.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys?api-version={api-version}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
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 |
|
authorizationRuleName
|
path | True |
|
The authorization rule name. |
|
api-version
|
query | True |
|
Client API Version. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| policykey |
|
Key that needs to be regenerated. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Connection strings successfully regenerated. |
Examples
EventHubAuthorizationRuleRegenrateKey
Sample Request
POST https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.EventHub/namespaces/sdk-namespace2290./eventhubs/sdk-EventHub8887/authorizationRules/sdk-Authrules9261/regenerateKeys?api-version=2015-08-01
{
"policykey": "PrimaryKey"
}
Sample Response
{
"primaryConnectionString": "Endpoint=sb://sdk-namespace2290.servicebus.windows.net/;SharedAccessKeyName=sdk-Authrules9261;SharedAccessKey=############################;EntityPath=sdk-EventHub8887",
"secondaryConnectionString": "Endpoint=sb://sdk-namespace2290.servicebus.windows.net/;SharedAccessKeyName=sdk-Authrules9261;SharedAccessKey=############################;EntityPath=sdk-EventHub8887",
"primaryKey": "############################",
"secondaryKey": "############################",
"keyName": "sdk-Authrules9261"
}
Definitions
| Name | Type | Description |
|---|---|---|
| keyName |
|
A string that describes the AuthorizationRule. |
| primaryConnectionString |
|
Primary connection string of the created Namespace AuthorizationRule. |
| primaryKey |
|
A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| secondaryConnectionString |
|
Secondary connection string of the created Namespace AuthorizationRule. |
| secondaryKey |
|
A base64-encoded 256-bit primary key for signing and validating the SAS token. |