Skip to main content

authorization_rules

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

Overview

Nameauthorization_rules
TypeResource
Idazure.event_hubs.authorization_rules

Fields

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
locationstringThe geo-location where the resource lives
properties``Properties supplied to create or update AuthorizationRule
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Methods

NameAccessible byRequired ParamsDescription
getSELECTauthorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionIdGets an AuthorizationRule for an Event Hub by rule name.
listSELECTeventHubName, namespaceName, resourceGroupName, subscriptionIdGets the authorization rules for an Event Hub.
create_or_updateINSERTauthorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionIdCreates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.
deleteDELETEauthorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionIdDeletes an Event Hub AuthorizationRule.

SELECT examples

Gets the authorization rules for an Event Hub.

SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.event_hubs.authorization_rules
WHERE eventHubName = '{{ eventHubName }}'
AND namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new authorization_rules resource.

/*+ create */
INSERT INTO azure.event_hubs.authorization_rules (
authorizationRuleName,
eventHubName,
namespaceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ authorizationRuleName }}',
'{{ eventHubName }}',
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified authorization_rules resource.

/*+ delete */
DELETE FROM azure.event_hubs.authorization_rules
WHERE authorizationRuleName = '{{ authorizationRuleName }}'
AND eventHubName = '{{ eventHubName }}'
AND namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';