Package version:

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 BlobSASSignatureValues types. Once generated, it can be encoded into a 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.

Constructors

  • Creates an instance of SASQueryParameters.

    Parameters

    • version: string

      Representing the storage version

    • signature: string

      Representing the signature for the SAS token

    • Optionalpermissions: string

      Representing the storage permissions

    • Optionalservices: string

      Representing the storage services being accessed (only for Account SAS)

    • OptionalresourceTypes: string

      Representing the storage resource types being accessed (only for Account SAS)

    • Optionalprotocol: SASProtocol

      Representing the allowed HTTP protocol(s)

    • OptionalstartsOn: any

      Representing the start time for this SAS token

    • OptionalexpiresOn: any

      Representing the expiry time for this SAS token

    • OptionalipRange: SasIPRange

      Representing the range of valid IP addresses for this SAS token

    • Optionalidentifier: string

      Representing the signed identifier (only for Service SAS)

    • Optionalresource: string

      Representing the storage container or blob (only for Service SAS)

    • OptionalcacheControl: string

      Representing the cache-control header (only for Blob/File Service SAS)

    • OptionalcontentDisposition: string

      Representing the content-disposition header (only for Blob/File Service SAS)

    • OptionalcontentEncoding: string

      Representing the content-encoding header (only for Blob/File Service SAS)

    • OptionalcontentLanguage: string

      Representing the content-language header (only for Blob/File Service SAS)

    • OptionalcontentType: string

      Representing the content-type header (only for Blob/File Service SAS)

    • OptionaluserDelegationKey: any

      Representing the user delegation key properties

    • OptionalpreauthorizedAgentObjectId: string

      Representing the authorized AAD Object ID (only for User Delegation SAS)

    • OptionalcorrelationId: string

      Representing the correlation ID (only for User Delegation SAS)

    • OptionalencryptionScope: string
    • OptionaldelegatedUserObjectId: string

    Returns SASQueryParameters

  • Creates an instance of SASQueryParameters.

    Parameters

    • version: string

      Representing the storage version

    • signature: string

      Representing the signature for the SAS token

    • Optionaloptions: SASQueryParametersOptions

      Optional. Options to construct the SASQueryParameters.

    Returns SASQueryParameters

Properties

cacheControl?: string

Value for cache-control header in Blob/File Service SAS.

contentDisposition?: string

Value for content-disposition header in Blob/File Service SAS.

contentEncoding?: string

Value for content-encoding header in Blob/File Service SAS.

contentLanguage?: string

Value for content-length header in Blob/File Service SAS.

contentType?: string

Value for content-type header in Blob/File Service SAS.

correlationId?: string

A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. This is only used for User Delegation SAS.

delegatedUserObjectId?: string

Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user would is authorized to use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been issued to the user specified in this value.

encryptionScope?: string

Optional. Encryption scope to use when sending requests authorized with this SAS URI.

expiresOn?: any

Optional only when identifier is provided. The expiry time for this SAS token.

identifier?: string

Optional. The signed identifier (only for BlobSASSignatureValues).

permissions?: string

Optional only when identifier is provided. Please refer to AccountSASPermissions, BlobSASPermissions, or ContainerSASPermissions for more details.

preauthorizedAgentObjectId?: string

Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission check for the user specified in this value will be performed. This is only used for User Delegation SAS.

protocol?: SASProtocol

Optional. The allowed HTTP protocol(s).

resource?: string

Optional. Specifies which resources are accessible via the SAS (only for BlobSASSignatureValues).

resourceTypes?: string

Optional. The storage resource types being accessed (only for Account SAS). Please refer to AccountSASResourceTypes for more details.

services?: string

Optional. The storage services being accessed (only for Account SAS). Please refer to AccountSASServices for more details.

signature: string

The signature for the SAS token.

startsOn?: any

Optional. The start time for this SAS token.

version: string

The storage API version.

Accessors

Methods

  • Encodes all SAS query parameters into a string that can be appended to a URL.

    Returns string