authorization_rules
Creates, updates, deletes, gets or lists a authorization_rules
resource.
Overview
Name | authorization_rules |
Type | Resource |
Id | azure.event_hubs.authorization_rules |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
location | string | The geo-location where the resource lives |
properties | `` | Properties supplied to create or update AuthorizationRule |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | authorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionId | Gets an AuthorizationRule for an Event Hub by rule name. |
list | SELECT | eventHubName, namespaceName, resourceGroupName, subscriptionId | Gets the authorization rules for an Event Hub. |
create_or_update | INSERT | authorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionId | Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect. |
delete | DELETE | authorizationRuleName, eventHubName, namespaceName, resourceGroupName, subscriptionId | Deletes 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.event_hubs.authorization_rules (
authorizationRuleName,
eventHubName,
namespaceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ authorizationRuleName }}',
'{{ eventHubName }}',
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
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 }}';