queues
Creates, updates, deletes, gets or lists a queues resource.
Overview
| Name | queues |
| Type | Resource |
| Id | azure.service_bus.queues |
Fields
The following fields are returned by SELECT queries:
- list_keys
- get
- list_by_namespace
| Name | Datatype | Description |
|---|---|---|
aliasPrimaryConnectionString | string | Primary connection string of the alias if GEO DR is enabled. |
aliasSecondaryConnectionString | string | Secondary connection string of the alias if GEO DR is enabled. |
keyName | string | A string that describes the authorization rule. |
primaryConnectionString | string | Primary connection string of the created namespace authorization rule. |
primaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
secondaryConnectionString | string | Secondary connection string of the created namespace authorization rule. |
secondaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| 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 a message was sent, or the last time there was a receive request to this queue. |
autoDeleteOnIdle | string | ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. |
countDetails | object | Message Count Details. |
createdAt | string (date-time) | The exact time the message was created. |
deadLetteringOnMessageExpiration | boolean | A value that indicates whether this queue has dead letter support when a message expires. |
defaultMessageTimeToLive | string | ISO 8601 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. |
enableExpress | boolean | A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. |
enablePartitioning | boolean | A value that indicates whether the queue is to be partitioned across multiple message brokers. |
forwardDeadLetteredMessagesTo | string | Queue/Topic name to forward the Dead Letter message. |
forwardTo | string | Queue/Topic name to forward the messages. |
location | string | The geo-location where the resource lives. |
lockDuration | string | ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. |
maxDeliveryCount | integer | The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10. |
maxMessageSizeInKilobytes | integer | Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. |
maxSizeInMegabytes | integer | The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. |
messageCount | integer | The number of messages in the queue. |
requiresDuplicateDetection | boolean | A value indicating if this queue requires duplicate detection. |
requiresSession | boolean | A value that indicates whether the queue supports the concept of sessions. |
sizeInBytes | integer | The size of the queue, in bytes. |
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 a message was sent, or the last time there was a receive request to this queue. |
autoDeleteOnIdle | string | ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes. |
countDetails | object | Message Count Details. |
createdAt | string (date-time) | The exact time the message was created. |
deadLetteringOnMessageExpiration | boolean | A value that indicates whether this queue has dead letter support when a message expires. |
defaultMessageTimeToLive | string | ISO 8601 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. |
enableExpress | boolean | A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. |
enablePartitioning | boolean | A value that indicates whether the queue is to be partitioned across multiple message brokers. |
forwardDeadLetteredMessagesTo | string | Queue/Topic name to forward the Dead Letter message. |
forwardTo | string | Queue/Topic name to forward the messages. |
location | string | The geo-location where the resource lives. |
lockDuration | string | ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute. |
maxDeliveryCount | integer | The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10. |
maxMessageSizeInKilobytes | integer | Maximum size (in KB) of the message payload that can be accepted by the queue. This property is only used in Premium today and default is 1024. |
maxSizeInMegabytes | integer | The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024. |
messageCount | integer | The number of messages in the queue. |
requiresDuplicateDetection | boolean | A value indicating if this queue requires duplicate detection. |
requiresSession | boolean | A value that indicates whether the queue supports the concept of sessions. |
sizeInBytes | integer | The size of the queue, in bytes. |
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 |
|---|---|---|
authorization_rule_name | string | The authorization rule name. Required. |
namespace_name | string | The namespace name. Required. |
queue_name | string | The queue name. Required. |
resource_group_name | string | Name of the Resource group within the Azure subscription. Required. |
subscription_id | string | |
$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
- list_keys
- get
- list_by_namespace
Primary and secondary connection strings to the queue. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt705608.aspx
SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.service_bus.queues
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND queue_name = '{{ queue_name }}' -- required
AND authorization_rule_name = '{{ authorization_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns a description for the specified queue. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639380.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
countDetails,
createdAt,
deadLetteringOnMessageExpiration,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
enableExpress,
enablePartitioning,
forwardDeadLetteredMessagesTo,
forwardTo,
location,
lockDuration,
maxDeliveryCount,
maxMessageSizeInKilobytes,
maxSizeInMegabytes,
messageCount,
requiresDuplicateDetection,
requiresSession,
sizeInBytes,
status,
systemData,
type,
updatedAt
FROM azure.service_bus.queues
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND queue_name = '{{ queue_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets the queues within a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639415.aspx
SELECT
id,
name,
accessedAt,
autoDeleteOnIdle,
countDetails,
createdAt,
deadLetteringOnMessageExpiration,
defaultMessageTimeToLive,
duplicateDetectionHistoryTimeWindow,
enableBatchedOperations,
enableExpress,
enablePartitioning,
forwardDeadLetteredMessagesTo,
forwardTo,
location,
lockDuration,
maxDeliveryCount,
maxMessageSizeInKilobytes,
maxSizeInMegabytes,
messageCount,
requiresDuplicateDetection,
requiresSession,
sizeInBytes,
status,
systemData,
type,
updatedAt
FROM azure.service_bus.queues
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $skip = '{{ $skip }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a Service Bus queue. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx
INSERT INTO azure.service_bus.queues (
properties,
resource_group_name,
namespace_name,
queue_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ queue_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: queues
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the queues resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the queues resource.
- name: queue_name
value: "{{ queue_name }}"
description: Required parameter for the queues resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the queues resource.
- name: properties
value:
lockDuration: "{{ lockDuration }}"
maxSizeInMegabytes: {{ maxSizeInMegabytes }}
maxMessageSizeInKilobytes: {{ maxMessageSizeInKilobytes }}
requiresDuplicateDetection: {{ requiresDuplicateDetection }}
requiresSession: {{ requiresSession }}
defaultMessageTimeToLive: "{{ defaultMessageTimeToLive }}"
deadLetteringOnMessageExpiration: {{ deadLetteringOnMessageExpiration }}
duplicateDetectionHistoryTimeWindow: "{{ duplicateDetectionHistoryTimeWindow }}"
maxDeliveryCount: {{ maxDeliveryCount }}
status: "{{ status }}"
enableBatchedOperations: {{ enableBatchedOperations }}
autoDeleteOnIdle: "{{ autoDeleteOnIdle }}"
enablePartitioning: {{ enablePartitioning }}
enableExpress: {{ enableExpress }}
forwardTo: "{{ forwardTo }}"
forwardDeadLetteredMessagesTo: "{{ forwardDeadLetteredMessagesTo }}"
REPLACE examples
- create_or_update
Creates or updates a Service Bus queue. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639395.aspx
REPLACE azure.service_bus.queues
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND queue_name = '{{ queue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a queue from the specified namespace in a resource group. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639411.aspx
DELETE FROM azure.service_bus.queues
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND queue_name = '{{ queue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_authorization_rules
- get_authorization_rule
- create_or_update_authorization_rule
- delete_authorization_rule
- regenerate_keys
Gets all authorization rules for a queue. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt705607.aspx
EXEC azure.service_bus.queues.list_authorization_rules
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@queue_name='{{ queue_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets an authorization rule for a queue by rule name. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt705611.aspx
EXEC azure.service_bus.queues.get_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@queue_name='{{ queue_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Creates an authorization rule for a queue.
EXEC azure.service_bus.queues.create_or_update_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@queue_name='{{ queue_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Deletes a queue authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt705609.aspx
EXEC azure.service_bus.queues.delete_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@queue_name='{{ queue_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerates the primary or secondary connection strings to the queue. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt705606.aspx
EXEC azure.service_bus.queues.regenerate_keys
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@queue_name='{{ queue_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keyType": "{{ keyType }}",
"key": "{{ key }}"
}'
;