Share via


@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 <xref: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 <xref: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 <xref: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 <xref:CredentialPolicyCreator> member used to create <xref:AnonymousCredentialPolicy> objects. <xref: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).

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 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 <xref: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.

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 <xref:AccountSASSignatureValues> and <xref:QueueSASSignatureValues> types. Once generated, it can be encoded into a <xref:String> 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 <xref:StorageBrowserPolicy> objects.

StorageClient

A StorageClient represents a based client class for <xref:QueueServiceClient>, <xref:QueueClient> and etc.

StorageClientContext
StorageRetryPolicy

Retry policy with exponential retry and linear retry implemented.

StorageRetryPolicyFactory

StorageRetryPolicyFactory is a factory class helping generating <xref: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 <xref:SASQueryParameters> exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

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

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 <xref:QueueClient.clearMessages> operation

QueueCreateHeaders

Defines headers for Queue_create operation.

QueueCreateIfNotExistsResponse

Contains response data for the <xref:QueueClient.createIfNotExists> operation.

QueueCreateOptions

Options to configure <xref:QueueClient.create> operation

QueueDeleteHeaders

Defines headers for Queue_delete operation.

QueueDeleteIfExistsResponse

Contains response data for the <xref:QueueClient.deleteIfExists> operation.

QueueDeleteMessageOptions

Options to configure the <xref:QueueClient.deleteMessage> operation

QueueDeleteOptions

Options to configure <xref:QueueClient.delete> operation

QueueExistsOptions

Options to configure <xref:QueueClient.exists> operation

QueueGenerateSasUrlOptions

Options to configure <xref:QueueClient.generateSasUrl> operation.

QueueGetAccessPolicyHeaders

Defines headers for Queue_getAccessPolicy operation.

QueueGetAccessPolicyOptions

Options to configure <xref:QueueClient.getAccessPolicy> operation

QueueGetPropertiesHeaders

Defines headers for Queue_getProperties operation.

QueueGetPropertiesOptions

Options to configure <xref:QueueClient.getProperties> operation

QueueItem

An Azure Storage Queue.

QueuePeekMessagesOptions

Options to configure <xref:QueueClient.peekMessages> operation

QueueReceiveMessageOptions

Options to configure <xref:QueueClient.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 <xref:QueueClient.sendMessage> operation

QueueServiceProperties

Storage Service Properties.

QueueServiceStatistics

Stats for the storage service.

QueueSetAccessPolicyHeaders

Defines headers for Queue_setAccessPolicy operation.

QueueSetAccessPolicyOptions

Options to configure <xref:QueueClient.setAccessPolicy> operation

QueueSetMetadataHeaders

Defines headers for Queue_setMetadata operation.

QueueSetMetadataOptions

Options to configure <xref:QueueClient.setMetadata> operation

QueueUpdateMessageOptions

Options to configure <xref:QueueClient.updateMessage> operation

RetentionPolicy

the retention policy

SasIPRange

Allowed IP range for a SAS.

ServiceGenerateAccountSasUrlOptions

Options to configure <xref:QueueServiceClient.generateAccountSasUrl> operation.

ServiceGetPropertiesHeaders

Defines headers for Service_getProperties operation.

ServiceGetPropertiesOptions

Options to configure <xref:QueueServiceClient.getProperties> operation

ServiceGetStatisticsHeaders

Defines headers for Service_getStatistics operation.

ServiceGetStatisticsOptions

Options to configure <xref:QueueServiceClient.getStatistics> operation

ServiceListQueuesOptions

Options to configure <xref:QueueServiceClient.listQueues> operation

ServiceListQueuesSegmentHeaders

Defines headers for Service_listQueuesSegment operation.

ServiceSetPropertiesHeaders

Defines headers for Service_setProperties operation.

ServiceSetPropertiesOptions

Options to configure <xref:QueueServiceClient.setProperties> operation

SignedIdentifier

Signed identifier.

SignedIdentifierModel

signed identifier

StorageClientOptionalParams

Optional parameters.

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.

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 <xref:QueueClient.clearMessages> operation.

QueueCreateResponse

Contains response data for the create operation.

QueueDeleteMessageResponse

Contains response data for the <xref:QueueClient.deleteMessage> operation.

QueueDeleteResponse

Contains response data for the delete operation.

QueueGetAccessPolicyResponse

Contains response data for the <xref:QueueClient.getAccessPolicy> operation.

QueueGetPropertiesResponse

Contains response data for the getProperties operation.

QueuePeekMessagesResponse

Contains the response data for the <xref:QueueClient.peekMessages> operation.

QueueReceiveMessageResponse

Contains the response data for the <xref:QueueClient.receiveMessages> operation.

QueueSendMessageResponse

Contains the response data for the <xref:QueueClient.sendMessage> operation.

QueueSetAccessPolicyResponse

Contains response data for the setAccessPolicy operation.

QueueSetMetadataResponse

Contains response data for the setMetadata operation.

QueueUpdateMessageResponse

Contains response data for the <xref:QueueClient.updateMessage> operation.

ReceivedMessageItem

The object returned in the receivedMessageItems array when calling <xref:QueueClient.receiveMessages>. See: <xref: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.

Enums

SASProtocol

Protocols for generated SAS.

StorageRetryPolicyType

RetryPolicy types.

Functions

generateAccountSASQueryParameters(AccountSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME. Generates a <xref:SASQueryParameters> object which contains all SAS query parameters needed to make an actual REST request.

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.

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 <xref:SASQueryParameters> object which contains all SAS query parameters needed to make an actual REST request.

function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential)

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)

Parameters

queueSASSignatureValues
QueueSASSignatureValues
sharedKeyCredential
StorageSharedKeyCredential

Returns

newPipeline(StorageSharedKeyCredential | AnonymousCredential | TokenCredential, StoragePipelineOptions)

Creates a new Pipeline object with Credential provided.

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

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.