rules
Creates, updates, deletes, gets or lists a rules
resource.
Overview
Name | rules |
Type | Resource |
Id | azure.service_bus.rules |
Fields
- vw_rules
- rules
Name | Datatype | Description |
---|---|---|
id | text | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | text | The name of the resource |
action | text | field from the properties object |
correlation_filter | text | field from the properties object |
filter_type | text | field from the properties object |
location | text | The geo-location where the resource lives |
namespaceName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
ruleName | text | field from the properties object |
sql_filter | text | field from the properties object |
subscriptionId | text | field from the properties object |
subscriptionName | text | field from the properties object |
system_data | text | field from the properties object |
topicName | text | field from the properties object |
type | text | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs" |
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 | object | Description of Rule Resource. |
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 | namespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicName | Retrieves the description for the specified rule. |
list_by_subscriptions | SELECT | namespaceName, resourceGroupName, subscriptionId, subscriptionName, topicName | List all the rules within given topic-subscription |
create_or_update | INSERT | namespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicName | Creates a new rule and updates an existing rule |
delete | DELETE | namespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicName | Deletes an existing rule. |
SELECT
examples
List all the rules within given topic-subscription
- vw_rules
- rules
SELECT
id,
name,
action,
correlation_filter,
filter_type,
location,
namespaceName,
resourceGroupName,
ruleName,
sql_filter,
subscriptionId,
subscriptionName,
system_data,
topicName,
type
FROM azure.service_bus.vw_rules
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND subscriptionName = '{{ subscriptionName }}'
AND topicName = '{{ topicName }}';
SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.service_bus.rules
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND subscriptionName = '{{ subscriptionName }}'
AND topicName = '{{ topicName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new rules
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.service_bus.rules (
namespaceName,
resourceGroupName,
ruleName,
subscriptionId,
subscriptionName,
topicName,
properties
)
SELECT
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ ruleName }}',
'{{ subscriptionId }}',
'{{ subscriptionName }}',
'{{ topicName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: action
value:
- name: sqlExpression
value: string
- name: compatibilityLevel
value: integer
- name: requiresPreprocessing
value: boolean
- name: filterType
value: []
- name: sqlFilter
value:
- name: sqlExpression
value: string
- name: compatibilityLevel
value: integer
- name: requiresPreprocessing
value: boolean
- name: correlationFilter
value:
- name: properties
value: object
- name: correlationId
value: string
- name: messageId
value: string
- name: to
value: string
- name: replyTo
value: string
- name: label
value: string
- name: sessionId
value: string
- name: replyToSessionId
value: string
- name: contentType
value: string
- name: requiresPreprocessing
value: boolean
- 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 rules
resource.
/*+ delete */
DELETE FROM azure.service_bus.rules
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND ruleName = '{{ ruleName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND subscriptionName = '{{ subscriptionName }}'
AND topicName = '{{ topicName }}';