Skip to main content

rules

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

Overview

Namerules
TypeResource
Idazure.service_bus.rules

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
actiontextfield from the properties object
correlation_filtertextfield from the properties object
filter_typetextfield from the properties object
locationtextThe geo-location where the resource lives
namespaceNametextfield from the properties object
resourceGroupNametextfield from the properties object
ruleNametextfield from the properties object
sql_filtertextfield from the properties object
subscriptionIdtextfield from the properties object
subscriptionNametextfield from the properties object
system_datatextfield from the properties object
topicNametextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Methods

NameAccessible byRequired ParamsDescription
getSELECTnamespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicNameRetrieves the description for the specified rule.
list_by_subscriptionsSELECTnamespaceName, resourceGroupName, subscriptionId, subscriptionName, topicNameList all the rules within given topic-subscription
create_or_updateINSERTnamespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicNameCreates a new rule and updates an existing rule
deleteDELETEnamespaceName, resourceGroupName, ruleName, subscriptionId, subscriptionName, topicNameDeletes an existing rule.

SELECT examples

List all the rules within given topic-subscription

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 }}';

INSERT example

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

/*+ create */
INSERT INTO azure.service_bus.rules (
namespaceName,
resourceGroupName,
ruleName,
subscriptionId,
subscriptionName,
topicName,
properties
)
SELECT
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ ruleName }}',
'{{ subscriptionId }}',
'{{ subscriptionName }}',
'{{ topicName }}',
'{{ properties }}'
;

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 }}';