@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.

HttpHeaders

A collection of HTTP header key/value pairs.

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 as reference 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.

RequestPolicyOptions

Optional properties that can be used when creating a RequestPolicy.

RestError

An error resulting from an HTTP request to a service endpoint.

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.

WebResource

Creates a new WebResource object.

This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary properties to initiate a request.

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

HttpOperationResponse

Wrapper object for http request and response. Deserialized object is stored in the parsedBody property when the response body is received in JSON or XML.

IHttpClient

An interface that can send HttpRequests and receive promised HttpResponses.

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

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

RequestPolicy

The underlying structure of a request policy.

RetentionPolicy

the retention policy

SasIPRange

Allowed IP range for a SAS.

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

Option interface for newPipeline() method.

StorageRetryOptions

Storage Queue retry options interface.

Type Aliases

CredentialPolicyCreator

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

GeoReplicationStatusType

Defines values for GeoReplicationStatusType.

HttpRequestBody

Possible HTTP request body types

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

RequestPolicyFactory

Creates a new RequestPolicy per-request that uses the provided nextPolicy.

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.

Enums

SASProtocol

Protocols for generated SAS.

StorageQueueAudience

Defines the known cloud audiences for Storage.

StorageRetryPolicyType

RetryPolicy types.

Functions

deserializationPolicy(DeserializationContentTypes, SerializerOptions)

Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they pass through the HTTP pipeline.

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)
newPipeline(StorageSharedKeyCredential | AnonymousCredential | TokenCredential, StoragePipelineOptions)

Creates a new Pipeline object with Credential provided.

Function Details

deserializationPolicy(DeserializationContentTypes, SerializerOptions)

Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they pass through the HTTP pipeline.

function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes, parsingOptions?: SerializerOptions): RequestPolicyFactory

Parameters

deserializationContentTypes
DeserializationContentTypes
parsingOptions
SerializerOptions

Returns

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)

function getQueueServiceAccountAudience(storageAccountName: string): string

Parameters

storageAccountName

string

Returns

string

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

Options.

Returns

A new Pipeline object.