@azure/storage-queue package

Classes

AccountSASPermissions

ONLY AVAILABLE IN NODE.JS RUNTIME.

This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on an AccountSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

AccountSASResourceTypes

ONLY AVAILABLE IN NODE.JS RUNTIME.

This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that resource type. Once all the values are set, this should be serialized with toString and set as the resources field on an AccountSASSignatureValues object. It is possible to construct the resources string without this class, but the order of the resources is particular and this class guarantees correctness.

AccountSASServices

ONLY AVAILABLE IN NODE.JS RUNTIME.

This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that service. Once all the values are set, this should be serialized with toString and set as the services field on an AccountSASSignatureValues object. It is possible to construct the services string without this class, but the order of the services is particular and this class guarantees correctness.

AnonymousCredential

AnonymousCredential provides a credentialPolicyCreator member used to create AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources or for use with Shared Access Signatures (SAS).

AnonymousCredentialPolicy

AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources or for use with Shared Access Signatures (SAS).

BaseRequestPolicy

The base class from which all request policies derive.

Credential

Credential is an abstract class for Azure Storage HTTP requests signing. This class will host an credentialPolicyCreator factory which generates CredentialPolicy.

CredentialPolicy

Credential policy used to sign HTTP(S) requests before sending. This is an abstract class.

Pipeline

A Pipeline class containing HTTP request policies. You can create a default Pipeline by calling newPipeline. Or you can create a Pipeline with your own policies by the constructor of Pipeline.

Refer to newPipeline and provided policies before implementing your customized Pipeline.

QueueClient

A QueueClient represents a URL to an Azure Storage Queue's messages allowing you to manipulate its messages.

QueueSASPermissions

ONLY AVAILABLE IN NODE.JS RUNTIME.

This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a Queue. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a QueueSASSignatureValues object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

QueueServiceClient

A QueueServiceClient represents a URL to the Azure Storage Queue service allowing you to manipulate queues.

RestError

A custom error type for failed pipeline requests.

SASQueryParameters

Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly by the user; it is only generated by the AccountSASSignatureValues and QueueSASSignatureValues types. Once generated, it can be encoded into a toString() and appended to a URL directly (though caution should be taken here in case there are existing query parameters, which might affect the appropriate means of appending these query parameters).

NOTE: Instances of this class are immutable.

StorageBrowserPolicy

StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:

  1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL thus avoid the browser cache.

  2. Remove cookie header for security

  3. Remove content-length header to avoid browsers warning

StorageBrowserPolicyFactory

StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.

StorageRetryPolicy

Retry policy with exponential retry and linear retry implemented.

StorageRetryPolicyFactory

StorageRetryPolicyFactory is a factory class helping generating StorageRetryPolicy objects.

StorageSharedKeyCredential

ONLY AVAILABLE IN NODE.JS RUNTIME.

StorageSharedKeyCredential for account key authorization of Azure Storage service.

StorageSharedKeyCredentialPolicy

StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.

Interfaces

AccessPolicy

An Access policy

AccountSASSignatureValues

ONLY AVAILABLE IN NODE.JS RUNTIME.

AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS which can actually be applied to queue urls. Note: that both this class and SASQueryParameters exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

See https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1 for more conceptual information on SAS See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas for descriptions of the parameters, including which are required

CommonOptions

An interface for options common to every remote operation.

CorsRule

CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain

DequeuedMessageItem

The object returned in the QueueMessageList array when calling Get Messages on a Queue.

EnqueuedMessage

The object returned in the QueueMessageList array when calling Put Message on a Queue

GeoReplication

Geo-Replication information for the Secondary Storage Service

HttpHeaders

A collection of HTTP header key/value pairs.

HttpOperationResponse

Http Response that is compatible with the core-v1(core-http).

HttpResponse

A representation of an HTTP response that includes a reference to the request that originated it.

IHttpClient

A compatible interface for core-http request policies

ListQueuesSegmentResponse

The object returned when calling List Queues on a Queue Service.

Logging

Azure Analytics Logging settings.

MessageIdDeleteHeaders

Defines headers for MessageId_delete operation.

MessageIdUpdateHeaders

Defines headers for MessageId_update operation.

MessagesClearHeaders

Defines headers for Messages_clear operation.

MessagesDequeueHeaders

Defines headers for Messages_dequeue operation.

MessagesDequeueOptionalParams

Optional parameters.

MessagesEnqueueHeaders

Defines headers for Messages_enqueue operation.

MessagesEnqueueOptionalParams

Optional parameters.

MessagesPeekHeaders

Defines headers for Messages_peek operation.

MessagesPeekOptionalParams

Optional parameters.

Metadata

A collection of key-value string pairs.

Metrics

An interface representing Metrics.

PeekedMessageItem

The object returned in the QueueMessageList array when calling Peek Messages on a Queue

PipelineLike

An interface for the Pipeline class containing HTTP request policies. You can create a default Pipeline by calling newPipeline. Or you can create a Pipeline with your own policies by the constructor of Pipeline.

Refer to newPipeline and provided policies before implementing your customized Pipeline.

PipelineOptions

Option interface for Pipeline constructor.

QueueClearMessagesOptions

Options to configure clearMessages operation

QueueCreateHeaders

Defines headers for Queue_create operation.

QueueCreateIfNotExistsResponse

Contains response data for the createIfNotExists operation.

QueueCreateOptions

Options to configure create operation

QueueDeleteHeaders

Defines headers for Queue_delete operation.

QueueDeleteIfExistsResponse

Contains response data for the deleteIfExists operation.

QueueDeleteMessageOptions

Options to configure the deleteMessage operation

QueueDeleteOptions

Options to configure delete operation

QueueExistsOptions

Options to configure exists operation

QueueGenerateSasUrlOptions

Options to configure generateSasUrl operation.

QueueGetAccessPolicyHeaders

Defines headers for Queue_getAccessPolicy operation.

QueueGetAccessPolicyOptions

Options to configure getAccessPolicy operation

QueueGetPropertiesHeaders

Defines headers for Queue_getProperties operation.

QueueGetPropertiesOptions

Options to configure getProperties operation

QueueItem

An Azure Storage Queue.

QueuePeekMessagesOptions

Options to configure peekMessages operation

QueueReceiveMessageOptions

Options to configure receiveMessages operation

QueueSASSignatureValues

ONLY AVAILABLE IN NODE.JS RUNTIME.

QueueSASSignatureValues is used to help generating Queue service SAS tokens for queues.

QueueSendMessageOptions

Options to configure sendMessage operation

QueueServiceProperties

Storage Service Properties.

QueueServiceStatistics

Stats for the storage service.

QueueSetAccessPolicyHeaders

Defines headers for Queue_setAccessPolicy operation.

QueueSetAccessPolicyOptions

Options to configure setAccessPolicy operation

QueueSetMetadataHeaders

Defines headers for Queue_setMetadata operation.

QueueSetMetadataOptions

Options to configure setMetadata operation

QueueUpdateMessageOptions

Options to configure updateMessage operation

RequestPolicyFactory

An interface for compatibility with core-http's RequestPolicyFactory

RequestPolicyOptions

An interface for compatibility with RequestPolicy

ResponseLike

An object with a simple _response property.

ResponseWithBody

An object with a _response property that has body and headers already parsed into known types.

ResponseWithHeaders

An object with a _response property that has headers already parsed into a typed object.

RetentionPolicy

the retention policy

SasIPRange

Allowed IP range for a SAS.

ServiceClientOptions

A subset of @azure/core-http ServiceClientOptions

ServiceGenerateAccountSasUrlOptions

Options to configure generateAccountSasUrl operation.

ServiceGetPropertiesHeaders

Defines headers for Service_getProperties operation.

ServiceGetPropertiesOptions

Options to configure getProperties operation

ServiceGetStatisticsHeaders

Defines headers for Service_getStatistics operation.

ServiceGetStatisticsOptions

Options to configure getStatistics operation

ServiceListQueuesOptions

Options to configure listQueues operation

ServiceListQueuesSegmentHeaders

Defines headers for Service_listQueuesSegment operation.

ServiceSetPropertiesHeaders

Defines headers for Service_setProperties operation.

ServiceSetPropertiesOptions

Options to configure setProperties operation

SignedIdentifier

Signed identifier.

SignedIdentifierModel

signed identifier

StoragePipelineOptions

Options interface for the newPipeline function.

StorageRetryOptions

Storage Blob retry options interface.

WebResource

A description of a HTTP request to be made to a remote server.

Type Aliases

CredentialPolicyCreator

A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.

GeoReplicationStatusType

Defines values for GeoReplicationStatusType.

HttpRequestBody

Types of bodies supported on the request. NodeJS.ReadableStream and () => NodeJS.ReadableStream is Node only. Blob, ReadableStream, and () => ReadableStream are browser only.

ListQueuesIncludeType

Defines values for ListQueuesIncludeType. Possible values include: 'metadata'

MessageIdDeleteResponse

Contains response data for the delete operation.

MessageIdUpdateResponse

Contains response data for the update operation.

MessagesClearResponse

Contains response data for the clear operation.

QueueClearMessagesResponse

Contains response data for the clearMessages operation.

QueueCreateResponse

Contains response data for the create operation.

QueueDeleteMessageResponse

Contains response data for the deleteMessage operation.

QueueDeleteResponse

Contains response data for the delete operation.

QueueGetAccessPolicyResponse

Contains response data for the getAccessPolicy operation.

QueueGetPropertiesResponse

Contains response data for the getProperties operation.

QueuePeekMessagesResponse

Contains the response data for the peekMessages operation.

QueueReceiveMessageResponse

Contains the response data for the receiveMessages operation.

QueueSendMessageResponse

Contains the response data for the sendMessage operation.

QueueSetAccessPolicyResponse

Contains response data for the setAccessPolicy operation.

QueueSetMetadataResponse

Contains response data for the setMetadata operation.

QueueUpdateMessageResponse

Contains response data for the updateMessage operation.

ReceivedMessageItem

The object returned in the receivedMessageItems array when calling receiveMessages.

See: QueueReceiveMessageResponse

ServiceGetPropertiesResponse

Contains response data for the getProperties operation.

ServiceGetStatisticsResponse

Contains response data for the getStatistics operation.

ServiceListQueuesSegmentResponse

Contains response data for the listQueuesSegment operation.

ServiceSetPropertiesResponse

Contains response data for the setProperties operation.

WithResponse

A type that represents an operation result with a known _response property.

Enums

SASProtocol

Protocols for generated SAS.

StorageQueueAudience

Defines the known cloud audiences for Storage.

StorageRetryPolicyType

RetryPolicy types.

Functions

generateAccountSASQueryParameters(AccountSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME.

Generates a SASQueryParameters object which contains all SAS query parameters needed to make an actual REST request.

See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas

generateQueueSASQueryParameters(QueueSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME.

Creates an instance of SASQueryParameters.

Only accepts required settings needed to create a SAS. For optional settings please set corresponding properties directly, such as permissions, startsOn and identifier.

WARNING: When identifier is not provided, permissions and expiresOn are required. You MUST assign value to identifier or expiresOn & permissions manually if you initial with this constructor.

getQueueServiceAccountAudience(string)

To get OAuth audience for a storage account for queue service.

isPipelineLike(unknown)

A helper to decide if a given argument satisfies the Pipeline contract

newPipeline(StorageSharedKeyCredential | AnonymousCredential | TokenCredential, StoragePipelineOptions)

Creates a new Pipeline object with Credential provided.

Function Details

generateAccountSASQueryParameters(AccountSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME.

Generates a SASQueryParameters object which contains all SAS query parameters needed to make an actual REST request.

See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas

function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters

Parameters

accountSASSignatureValues
AccountSASSignatureValues

SAS Signature values of the account

sharedKeyCredential
StorageSharedKeyCredential

Shared key credential.

Returns

generateQueueSASQueryParameters(QueueSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME.

Creates an instance of SASQueryParameters.

Only accepts required settings needed to create a SAS. For optional settings please set corresponding properties directly, such as permissions, startsOn and identifier.

WARNING: When identifier is not provided, permissions and expiresOn are required. You MUST assign value to identifier or expiresOn & permissions manually if you initial with this constructor.

function generateQueueSASQueryParameters(queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters

Parameters

queueSASSignatureValues
QueueSASSignatureValues
sharedKeyCredential
StorageSharedKeyCredential

Returns

getQueueServiceAccountAudience(string)

To get OAuth audience for a storage account for queue service.

function getQueueServiceAccountAudience(storageAccountName: string): string

Parameters

storageAccountName

string

Returns

string

isPipelineLike(unknown)

A helper to decide if a given argument satisfies the Pipeline contract

function isPipelineLike(pipeline: unknown): pipeline

Parameters

pipeline

unknown

An argument that may be a Pipeline

Returns

pipeline

true when the argument satisfies the Pipeline contract

newPipeline(StorageSharedKeyCredential | AnonymousCredential | TokenCredential, StoragePipelineOptions)

Creates a new Pipeline object with Credential provided.

function newPipeline(credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline

Parameters

credential

StorageSharedKeyCredential | AnonymousCredential | TokenCredential

Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.

pipelineOptions
StoragePipelineOptions

Optional. Options.

Returns

A new Pipeline object.