az storage message

Manage queue storage messages.

Commands

az storage message clear Deletes all messages from the specified queue.
az storage message delete Deletes the specified message.
az storage message get Retrieves one or more messages from the front of the queue.
az storage message peek Retrieves one or more messages from the front of the queue, but does not alter the visibility of the message.
az storage message put Adds a new message to the back of the message queue.
az storage message update Updates the visibility timeout of a message.

az storage message clear

Deletes all messages from the specified queue.

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

Required Parameters

--queue-name -q
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 message delete

Deletes the specified message.

az storage message delete --id
--pop-receipt
--queue-name
[--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--timeout]

Required Parameters

--id
The message id identifying the message to delete.
--pop-receipt
A valid pop receipt value returned from an earlier call to the get_messages() or update_message().
--queue-name -q
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 message get

Retrieves one or more messages from the front of the queue.

az storage message get --queue-name
[--account-key]
[--account-name]
[--connection-string]
[--num-messages]
[--sas-token]
[--timeout]
[--visibility-timeout]

Required Parameters

--queue-name -q
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.
--num-messages
A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation.
--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.
--visibility-timeout
Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 1 second, and cannot be larger than 7 days. The visibility timeout of a message can be set to a value later than the expiry time.

az storage message peek

Retrieves one or more messages from the front of the queue, but does not alter the visibility of the message.

az storage message peek --queue-name
[--account-key]
[--account-name]
[--connection-string]
[--num-messages]
[--sas-token]
[--timeout]

Required Parameters

--queue-name -q
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.
--num-messages
A nonzero integer value that specifies the number of messages to peek from the queue, up to a maximum of 32. By default, a single message is peeked from the queue with this operation.
--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 message put

Adds a new message to the back of the message queue.

az storage message put --content
--queue-name
[--account-key]
[--account-name]
[--connection-string]
[--sas-token]
[--time-to-live]
[--timeout]
[--visibility-timeout]

Required Parameters

--content
Message content, up to 64KB in size.
--queue-name -q
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.
--time-to-live
Specifies the time-to-live interval for the message, in seconds. The maximum time-to-live allowed is 7 days. If this parameter is omitted, the default time-to-live is 7 days.
--timeout
Request timeout in seconds. Applies to each call to the service.
--visibility-timeout
If not specified, the default value is 0. Specifies the new visibility timeout value, in seconds, relative to server time. The value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. visibility_timeout should be set to a value smaller than the time-to-live value.

az storage message update

Updates the visibility timeout of a message.

az storage message update --id
--pop-receipt
--queue-name
--visibility-timeout
[--account-key]
[--account-name]
[--connection-string]
[--content]
[--sas-token]
[--timeout]

Required Parameters

--id
The message id identifying the message to update.
--pop-receipt
A valid pop receipt value returned from an earlier call to the get_messages() or update_message() operation.
--queue-name -q
The queue name.
--visibility-timeout
Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. A message can be updated until it has been deleted or has expired.

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.
--content
Message content, up to 64KB in size.
--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.