subscriptions
Creates, updates, deletes, gets or lists a subscriptions resource.
Overview
| Name | subscriptions |
| Type | Resource |
| Id | azure.service_bus.subscriptions |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_topic
| 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. |
accessedAt | string (date-time) | Last time there was a receive request to this subscription. |
autoDeleteOnIdle | string | ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. |
clientAffineProperties | object | Properties specific to client affine subscriptions. |
countDetails | object | Message count details. |
createdAt | string (date-time) | Exact time the message was created. |
deadLetteringOnFilterEvaluationExceptions | boolean | Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. |
deadLetteringOnMessageExpiration | boolean | Value that indicates whether a subscription has dead letter support when a message expires. |
defaultMessageTimeToLive | string | ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. |
duplicateDetectionHistoryTimeWindow | string | ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. |
enableBatchedOperations | boolean | Value that indicates whether server-side batched operations are enabled. |
forwardDeadLetteredMessagesTo | string | Queue/Topic name to forward the Dead Letter message. |
forwardTo | string | Queue/Topic name to forward the messages. |
isClientAffine | boolean | Value that indicates whether the subscription has an affinity to the client id. |
location | string | The geo-location where the resource lives. |
lockDuration | string | ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. |
maxDeliveryCount | integer | Number of maximum deliveries. |
messageCount | integer | Number of messages. |
requiresSession | boolean | Value indicating if a subscription supports the concept of sessions. |
status | string | Enumerates the possible values for the status of a messaging entity. Known values are: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", and "Unknown". |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
| 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. |
accessedAt | string (date-time) | Last time there was a receive request to this subscription. |
autoDeleteOnIdle | string | ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes. |
clientAffineProperties | object | Properties specific to client affine subscriptions. |
countDetails | object | Message count details. |
createdAt | string (date-time) | Exact time the message was created. |
deadLetteringOnFilterEvaluationExceptions | boolean | Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. |
deadLetteringOnMessageExpiration | boolean | Value that indicates whether a subscription has dead letter support when a message expires. |
defaultMessageTimeToLive | string | ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself. |
duplicateDetectionHistoryTimeWindow | string | ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes. |
enableBatchedOperations | boolean | Value that indicates whether server-side batched operations are enabled. |
forwardDeadLetteredMessagesTo | string | Queue/Topic name to forward the Dead Letter message. |
forwardTo | string | Queue/Topic name to forward the messages. |
isClientAffine | boolean | Value that indicates whether the subscription has an affinity to the client id. |
location | string | The geo-location where the resource lives. |
lockDuration | string | ISO 8061 lock duration timespan for the subscription. The default value is 1 minute. |
maxDeliveryCount | integer | Number of maximum deliveries. |
messageCount | integer | Number of messages. |
requiresSession | boolean | Value indicating if a subscription supports the concept of sessions. |
status | string | Enumerates the possible values for the status of a messaging entity. Known values are: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", "Deleting", "Renaming", and "Unknown". |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
namespace_name | string | The namespace name. Required. |
resource_group_name | string | Name of the Resource group within the Azure subscription. Required. |
subscription_id | string | |
subscription_name | string | The subscription name. Required. |
topic_name | string | The topic name. Required. |
$skip | integer | Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. Default value is None. |
$top | integer | May be used to limit the number of results to the most recent N usageDetails. Default value is None. |
SELECT examples
- get
- list_by_topic
Returns a subscription description for the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639402.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
clientAffineProperties,
countDetails,
createdAt,
deadLetteringOnFilterEvaluationExceptions,
deadLetteringOnMessageExpiration,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
forwardDeadLetteredMessagesTo,
forwardTo,
isClientAffine,
location,
lockDuration,
maxDeliveryCount,
messageCount,
requiresSession,
status,
systemData,
type,
updatedAt
FROM azure.service_bus.subscriptions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND subscription_name = '{{ subscription_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the subscriptions under a specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
clientAffineProperties,
countDetails,
createdAt,
deadLetteringOnFilterEvaluationExceptions,
deadLetteringOnMessageExpiration,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
forwardDeadLetteredMessagesTo,
forwardTo,
isClientAffine,
location,
lockDuration,
maxDeliveryCount,
messageCount,
requiresSession,
status,
systemData,
type,
updatedAt
FROM azure.service_bus.subscriptions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND topic_name = '{{ topic_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $skip = '{{ $skip }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Creates a topic subscription. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx
INSERT INTO azure.service_bus.subscriptions (
properties,
resource_group_name,
namespace_name,
topic_name,
subscription_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ topic_name }}',
'{{ subscription_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: subscriptions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the subscriptions resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the subscriptions resource.
- name: topic_name
value: "{{ topic_name }}"
description: Required parameter for the subscriptions resource.
- name: subscription_name
value: "{{ subscription_name }}"
description: Required parameter for the subscriptions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the subscriptions resource.
- name: properties
value:
lockDuration: "{{ lockDuration }}"
requiresSession: {{ requiresSession }}
defaultMessageTimeToLive: "{{ defaultMessageTimeToLive }}"
deadLetteringOnFilterEvaluationExceptions: {{ deadLetteringOnFilterEvaluationExceptions }}
deadLetteringOnMessageExpiration: {{ deadLetteringOnMessageExpiration }}
duplicateDetectionHistoryTimeWindow: "{{ duplicateDetectionHistoryTimeWindow }}"
maxDeliveryCount: {{ maxDeliveryCount }}
status: "{{ status }}"
enableBatchedOperations: {{ enableBatchedOperations }}
autoDeleteOnIdle: "{{ autoDeleteOnIdle }}"
forwardTo: "{{ forwardTo }}"
forwardDeadLetteredMessagesTo: "{{ forwardDeadLetteredMessagesTo }}"
isClientAffine: {{ isClientAffine }}
clientAffineProperties:
clientId: "{{ clientId }}"
isDurable: {{ isDurable }}
isShared: {{ isShared }}
REPLACE examples
- create_or_update
Creates a topic subscription. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx
REPLACE azure.service_bus.subscriptions
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_name = '{{ subscription_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a subscription from the specified topic. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx
DELETE FROM azure.service_bus.subscriptions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND topic_name = '{{ topic_name }}' --required
AND subscription_name = '{{ subscription_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;