Storage queues - az storage queue

Use queues to effectively scale applications according to traffic.

Commands

az storage queue create Creates a queue under the given account.
az storage queue delete Deletes the specified queue and any messages it contains.
az storage queue exists Returns a boolean indicating whether the queue exists.
az storage queue generate-sas Generates a shared access signature for the queue.
az storage queue list List queues in a storage account.
az storage queue metadata Manage the metadata for a storage queue.
az storage queue metadata show Retrieves user-defined metadata and queue properties on the specified queue.
az storage queue metadata update Sets user-defined metadata on the specified queue.
az storage queue policy Manage shared access policies for a storage queue.
az storage queue policy create Create a stored access policy on the containing object.
az storage queue policy delete Delete a stored access policy on a containing object.
az storage queue policy list List stored access policies on a containing object.
az storage queue policy show Show a stored access policy on a containing object.
az storage queue policy update Set a stored access policy on a containing object.
az storage queue stats Retrieves statistics related to replication for the Queue service.

az storage queue create

Creates a queue under the given account.

az storage queue create --name
[--account-key]
[--account-name]
[--connection-string]
[--fail-on-exist]
[--metadata]
[--sas-token]
[--timeout]

Required Parameters

--name -n

The queue name.

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--fail-on-exist

Specifies whether to throw an exception if the queue already exists.

--metadata

Metadata in space-separated key=value pairs. This overwrites any existing metadata.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.

az storage queue delete

When a queue is successfully deleted, it is immediately marked for deletion and is no longer accessible to clients. The queue is later removed from the Queue service during garbage collection. Note that deleting a queue is likely to take at least 40 seconds to complete. If an operation is attempted against the queue while it was being deleted, an AzureConflictHttpError will be thrown.

az storage queue delete --name
[--account-key]
[--account-name]
[--connection-string]
[--fail-not-exist]
[--sas-token]
[--timeout]

Required Parameters

--name -n

The queue name.

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--fail-not-exist

Specifies whether to throw an exception if the queue doesn't exist.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.

az storage queue exists

Returns a boolean indicating whether the queue exists.

az storage queue exists --name
[--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--timeout]

Required Parameters

--name -n

The queue name.

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.

az storage queue generate-sas

Use the returned signature with the sas_token parameter of QueueService.

az storage queue generate-sas --name
[--account-key]
[--account-name]
[--connection-string]
[--expiry]
[--https-only]
[--ip]
[--permissions]
[--policy-name]
[--sas-token]
[--start]

Required Parameters

--name -n

The queue name.

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--expiry

Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes invalid. Do not use if a stored access policy is referenced with --id that specifies this value.

--https-only

Only permit requests made with the HTTPS protocol. If omitted, requests from both the HTTP and HTTPS protocol are permitted.

--ip

Specifies the IP address or range of IP addresses from which to accept requests. Supports only IPv4 style addresses.

--permissions

The permissions the SAS grants. Allowed values: (a)dd (p)rocess (r)ead (u)pdate. Do not use if a stored access policy is referenced with --id that specifies this value. Can be combined.

--policy-name

The name of a stored access policy within the queue's ACL.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--start

Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes valid. Do not use if a stored access policy is referenced with --id that specifies this value. Defaults to the time of the request.

az storage queue list

List queues in a storage account.

az storage queue list [--account-key]
[--account-name]
[--connection-string]
[--include-metadata]
[--marker]
[--num-results]
[--prefix]
[--sas-token]
[--timeout]

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--include-metadata

Specifies that container metadata be returned in the response.

--marker

An opaque continuation token. This value can be retrieved from the next_marker field of a previous generator object if num_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped.

--num-results

The maximum number of queues to return.

--prefix

Filters the results to return only queues with names that begin with the specified prefix.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.

az storage queue stats

It is only available when read-access geo-redundant replication is enabled for the storage account. With geo-redundant replication, Azure Storage maintains your data durable in two locations. In both locations, Azure Storage constantly maintains multiple healthy replicas of your data. The location where you read, create, update, or delete data is the primary storage account location. The primary location exists in the region you choose at the time you create an account via the Azure Management Azure classic portal, for example, North Central US. The location to which your data is replicated is the secondary location. The secondary location is automatically determined based on the location of the primary; it is in a second data center that resides in the same region as the primary location. Read-only access is available from the secondary location, if read-access geo-redundant replication is enabled for your storage account.

az storage queue stats [--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--timeout]

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment variable: AZURE_STORAGE_ACCOUNT.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.