Skip to main content

queue

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

Overview

Namequeue
TypeResource
Idazure.storage.queue

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
approximateMessageCountintegerInteger indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
metadataobjectA name-value pair that represents queue metadata.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, queue_name, subscription_idGets the queue with the specified queue name, under the specified account if it exists.
listselectresource_group_name, account_name, subscription_id$maxpagesize, $filterGets a list of all the queues under the specified storage account.
createinsertresource_group_name, account_name, queue_name, subscription_idCreates a new queue with the specified queue name, under the specified account.
updateupdateresource_group_name, account_name, queue_name, subscription_idCreates a new queue with the specified queue name, under the specified account.
deletedeleteresource_group_name, account_name, queue_name, subscription_idDeletes the queue with the specified queue name, under the specified account if it exists.

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.

NameDatatypeDescription
account_namestringThe name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required.
queue_namestringA queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringOptional, When specified, only the queues with a name starting with the given filter will be listed. Default value is None.
$maxpagesizestring

SELECT examples

Gets the queue with the specified queue name, under the specified account if it exists.

SELECT
id,
name,
approximateMessageCount,
metadata,
systemData,
type
FROM azure.storage.queue
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND queue_name = '{{ queue_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new queue with the specified queue name, under the specified account.

INSERT INTO azure.storage.queue (
properties,
resource_group_name,
account_name,
queue_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ queue_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Creates a new queue with the specified queue name, under the specified account.

UPDATE azure.storage.queue
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND queue_name = '{{ queue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes the queue with the specified queue name, under the specified account if it exists.

DELETE FROM azure.storage.queue
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND queue_name = '{{ queue_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;