subscriptions
Creates, updates, deletes, gets or lists a subscriptions
resource.
Overview
Name | subscriptions |
Type | Resource |
Id | azure.service_bus.subscriptions |
Fields
- vw_subscriptions
- subscriptions
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 |
accessed_at | text | field from the properties object |
auto_delete_on_idle | text | field from the properties object |
client_affine_properties | text | field from the properties object |
count_details | text | field from the properties object |
created_at | text | field from the properties object |
dead_lettering_on_filter_evaluation_exceptions | text | field from the properties object |
dead_lettering_on_message_expiration | text | field from the properties object |
default_message_time_to_live | text | field from the properties object |
duplicate_detection_history_time_window | text | field from the properties object |
enable_batched_operations | text | field from the properties object |
forward_dead_lettered_messages_to | text | field from the properties object |
forward_to | text | field from the properties object |
is_client_affine | text | field from the properties object |
location | text | The geo-location where the resource lives |
lock_duration | text | field from the properties object |
max_delivery_count | text | field from the properties object |
message_count | text | field from the properties object |
namespaceName | text | field from the properties object |
requires_session | text | field from the properties object |
resourceGroupName | text | field from the properties object |
status | 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" |
updated_at | text | field from the properties object |
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 Subscription 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, subscriptionId, subscriptionName, topicName | Returns a subscription description for the specified topic. |
list_by_topic | SELECT | namespaceName, resourceGroupName, subscriptionId, topicName | List all the subscriptions under a specified topic. |
create_or_update | INSERT | namespaceName, resourceGroupName, subscriptionId, subscriptionName, topicName | Creates a topic subscription. |
delete | DELETE | namespaceName, resourceGroupName, subscriptionId, subscriptionName, topicName | Deletes a subscription from the specified topic. |
SELECT
examples
List all the subscriptions under a specified topic.
- vw_subscriptions
- subscriptions
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 }}';
SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.service_bus.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.service_bus.subscriptions (
namespaceName,
resourceGroupName,
subscriptionId,
subscriptionName,
topicName,
properties
)
SELECT
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ subscriptionName }}',
'{{ topicName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: messageCount
value: integer
- name: createdAt
value: string
- name: accessedAt
value: string
- name: updatedAt
value: string
- name: countDetails
value:
- name: activeMessageCount
value: integer
- name: deadLetterMessageCount
value: integer
- name: scheduledMessageCount
value: integer
- name: transferMessageCount
value: integer
- name: transferDeadLetterMessageCount
value: integer
- name: lockDuration
value: string
- name: requiresSession
value: boolean
- name: defaultMessageTimeToLive
value: string
- name: deadLetteringOnFilterEvaluationExceptions
value: boolean
- name: deadLetteringOnMessageExpiration
value: boolean
- name: duplicateDetectionHistoryTimeWindow
value: string
- name: maxDeliveryCount
value: integer
- name: status
value: []
- name: enableBatchedOperations
value: boolean
- name: autoDeleteOnIdle
value: string
- name: forwardTo
value: string
- name: forwardDeadLetteredMessagesTo
value: string
- name: isClientAffine
value: boolean
- name: clientAffineProperties
value:
- name: clientId
value: string
- name: isDurable
value: boolean
- name: isShared
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 subscriptions
resource.
/*+ delete */
DELETE FROM azure.service_bus.subscriptions
WHERE namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND subscriptionName = '{{ subscriptionName }}'
AND topicName = '{{ topicName }}';