Skip to main content

keys

Creates, updates, deletes, gets or lists a keys resource.

Overview

Namekeys
TypeResource
Idazure.event_hubs.keys

Fields

The following fields are returned by SELECT queries:

Connection strings successfully returned.

NameDatatypeDescription
aliasPrimaryConnectionStringstringPrimary connection string of the alias if GEO DR is enabled
aliasSecondaryConnectionStringstringSecondary connection string of the alias if GEO DR is enabled
keyNamestringA string that describes the AuthorizationRule.
primaryConnectionStringstringPrimary connection string of the created namespace AuthorizationRule.
primaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.
secondaryConnectionStringstringSecondary connection string of the created namespace AuthorizationRule.
secondaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresourceGroupName, namespaceName, eventHubName, authorizationRuleName, subscriptionIdGets the ACS and SAS connection strings for the Event Hub.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
authorizationRuleNamestringThe authorization rule name.
eventHubNamestringThe Event Hub name
namespaceNamestringThe Namespace name
resourceGroupNamestringName of the resource group within the azure subscription.
subscriptionIdstringSubscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

SELECT examples

Gets the ACS and SAS connection strings for the Event Hub.

SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.event_hubs.keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND namespaceName = '{{ namespaceName }}' -- required
AND eventHubName = '{{ eventHubName }}' -- required
AND authorizationRuleName = '{{ authorizationRuleName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;