SASQueryParameters class
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.
Constructors
| SASQuery |
Creates an instance of SASQueryParameters. |
Properties
| delegated |
Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user who 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. |
| expires |
Optional only when identifier is provided. The expiry time for this SAS token. |
| identifier | Optional. The signed identifier (only for QueueSASSignatureValues). See https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy |
| ip |
Optional. IP range allowed for this SAS. |
| permissions | Optional only when identifier is provided. Please refer to AccountSASPermissions, QueueSASPermissions for more details. |
| protocol | Optional. The allowed HTTP protocol(s). |
| resource | Optional. The storage queue (only for QueueSASSignatureValues). |
| resource |
Optional. The storage resource types being accessed (only for Account SAS). Please refer to AccountSASResourceTypes for more details. |
| services | Optional. The storage services being accessed (only for Account SAS). Please refer to AccountSASServices for more details. |
| signature | The signature for the SAS token. |
| starts |
Optional. The start time for this SAS token. |
| version | The storage API version. |
Methods
| to |
Encodes all SAS query parameters into a string that can be appended to a URL. |
Constructor Details
SASQueryParameters(string, string, string, string, string, SASProtocol, Date, Date, SasIPRange, string, string, UserDelegationKey, string)
Creates an instance of SASQueryParameters.
new SASQueryParameters(version: string, signature: string, permissions?: string, services?: string, resourceTypes?: string, protocol?: SASProtocol, startsOn?: Date, expiresOn?: Date, ipRange?: SasIPRange, identifier?: string, resource?: string, userDelegationKey?: UserDelegationKey, delegatedUserObjectId?: string)
Parameters
- version
-
string
Representing the storage version
- signature
-
string
Representing the signature for the SAS token
- permissions
-
string
Representing the storage permissions
- services
-
string
Representing the storage services being accessed (only for Account SAS)
- resourceTypes
-
string
Representing the storage resource types being accessed (only for Account SAS)
- protocol
- SASProtocol
Representing the allowed HTTP protocol(s)
- startsOn
-
Date
Representing the start time for this SAS token
- expiresOn
-
Date
Representing the expiry time for this SAS token
- ipRange
- SasIPRange
Representing the range of valid IP addresses for this SAS token
- identifier
-
string
Representing the signed identifier (only for Service SAS)
- resource
-
string
Representing the storage queue (only for Service SAS)
- userDelegationKey
- UserDelegationKey
- delegatedUserObjectId
-
string
Property Details
delegatedUserObjectId
Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user who 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.
delegatedUserObjectId?: string
Property Value
string
expiresOn
Optional only when identifier is provided. The expiry time for this SAS token.
expiresOn?: Date
Property Value
Date
identifier
Optional. The signed identifier (only for QueueSASSignatureValues).
See https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
identifier?: string
Property Value
string
ipRange
Optional. IP range allowed for this SAS.
undefined | SasIPRange ipRange
Property Value
undefined | SasIPRange
permissions
Optional only when identifier is provided. Please refer to AccountSASPermissions, QueueSASPermissions for more details.
permissions?: string
Property Value
string
protocol
resource
Optional. The storage queue (only for QueueSASSignatureValues).
resource?: string
Property Value
string
resourceTypes
Optional. The storage resource types being accessed (only for Account SAS). Please refer to AccountSASResourceTypes for more details.
resourceTypes?: string
Property Value
string
services
Optional. The storage services being accessed (only for Account SAS). Please refer to AccountSASServices for more details.
services?: string
Property Value
string
signature
The signature for the SAS token.
signature: string
Property Value
string
startsOn
Optional. The start time for this SAS token.
startsOn?: Date
Property Value
Date
version
The storage API version.
version: string
Property Value
string
Method Details
toString()
Encodes all SAS query parameters into a string that can be appended to a URL.
function toString(): string
Returns
string