Skip to main content

subscriptions

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

Overview

Namesubscriptions
TypeResource
Idazure.service_bus.subscriptions

Fields

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
accessed_attextfield from the properties object
auto_delete_on_idletextfield from the properties object
client_affine_propertiestextfield from the properties object
count_detailstextfield from the properties object
created_attextfield from the properties object
dead_lettering_on_filter_evaluation_exceptionstextfield from the properties object
dead_lettering_on_message_expirationtextfield from the properties object
default_message_time_to_livetextfield from the properties object
duplicate_detection_history_time_windowtextfield from the properties object
enable_batched_operationstextfield from the properties object
forward_dead_lettered_messages_totextfield from the properties object
forward_totextfield from the properties object
is_client_affinetextfield from the properties object
locationtextThe geo-location where the resource lives
lock_durationtextfield from the properties object
max_delivery_counttextfield from the properties object
message_counttextfield from the properties object
namespaceNametextfield from the properties object
requires_sessiontextfield from the properties object
resourceGroupNametextfield from the properties object
statustextfield 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"
updated_attextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTnamespaceName, resourceGroupName, subscriptionId, subscriptionName, topicNameReturns a subscription description for the specified topic.
list_by_topicSELECTnamespaceName, resourceGroupName, subscriptionId, topicNameList all the subscriptions under a specified topic.
create_or_updateINSERTnamespaceName, resourceGroupName, subscriptionId, subscriptionName, topicNameCreates a topic subscription.
deleteDELETEnamespaceName, resourceGroupName, subscriptionId, subscriptionName, topicNameDeletes a subscription from the specified topic.

SELECT examples

List all the subscriptions under a specified topic.

SELECT
id,
name,
accessed_at,
auto_delete_on_idle,
client_affine_properties,
count_details,
created_at,
dead_lettering_on_filter_evaluation_exceptions,
dead_lettering_on_message_expiration,
default_message_time_to_live,
duplicate_detection_history_time_window,
enable_batched_operations,
forward_dead_lettered_messages_to,
forward_to,
is_client_affine,
location,
lock_duration,
max_delivery_count,
message_count,
namespaceName,
requires_session,
resourceGroupName,
status,
subscriptionId,
subscriptionName,
system_data,
topicName,
type,
updated_at
FROM azure.service_bus.vw_subscriptions
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND topicName = '{{ topicName }}';

INSERT example

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

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

DELETE example

Deletes the specified subscriptions resource.

/*+ delete */
DELETE FROM azure.service_bus.subscriptions
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND subscriptionName = '{{ subscriptionName }}'
AND topicName = '{{ topicName }}';