Namespaces - List Keys
Gets the primary and secondary connection strings for the Namespace.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys?api-version=2015-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
authorization
|
path | True |
string minLength: 1maxLength: 50 |
The authorization rule name. |
|
namespace
|
path | True |
string minLength: 6maxLength: 50 |
The Namespace name |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
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. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Connection strings returned successfully. |
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
NameSpaceAuthorizationRuleListKey
Sample request
POST https://management.azure.com/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.EventHub/namespaces/sdk-namespace743/AuthorizationRules/sdk-Authrules4867/listKeys?api-version=2015-08-01
Sample response
{
"primaryConnectionString": "Endpoint=sb://sdk-namespace743.servicebus.windows.net/;SharedAccessKeyName=sdk-Authrules4867;SharedAccessKey=############################",
"secondaryConnectionString": "Endpoint=sb://sdk-namespace743.servicebus.windows.net/;SharedAccessKeyName=sdk-Authrules4867;SharedAccessKey=############################",
"primaryKey": "############################",
"secondaryKey": "############################",
"keyName": "sdk-Authrules4867"
}
Definitions
ResourceListKeys
Namespace/EventHub Connection String
| Name | Type | Description |
|---|---|---|
| keyName |
string |
A string that describes the AuthorizationRule. |
| primaryConnectionString |
string |
Primary connection string of the created Namespace AuthorizationRule. |
| primaryKey |
string |
A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| secondaryConnectionString |
string |
Secondary connection string of the created Namespace AuthorizationRule. |
| secondaryKey |
string |
A base64-encoded 256-bit primary key for signing and validating the SAS token. |