Condividi tramite


SasQueryParameters Class

Definition

A SasQueryParameters object represents the components that make up an Azure Storage Shared Access Signature's query parameters. It includes components used by all Azure Storage resources (Blob Containers, Blobs, Files, and Queues). You can construct a new instance using the service specific SAS builder types. For more information, Create a service SAS.

public class SasQueryParameters
type SasQueryParameters = class
Public Class SasQueryParameters
Inheritance
SasQueryParameters
Derived

Constructors

SasQueryParameters()

Initializes a new instance of the SasQueryParameters class.

SasQueryParameters(IDictionary<String,String>)

Creates a new instance of the SasQueryParameters type based on the supplied query parameters values. All SAS-related query parameters will be removed from values.

SasQueryParameters(String, Nullable<AccountSasServices>, Nullable<AccountSasResourceTypes>, SasProtocol, DateTimeOffset, DateTimeOffset, SasIPRange, String, String, String, String, String, String, String, String, String, String, String, String, Nullable<Int32>, String)

Creates a new SasQueryParameters instance.

Fields

DefaultSasVersion

The default service version to use for Shared Access Signatures.

Properties

AgentObjectId

Gets the Unauthorized AAD Object Id associated with the shared access signature. The AAD Object Id of a user that is assumed to be unauthorized by the owner of the User Delegation Key. The Azure Storage Service will perform an additional POSIX ACL check to determine if the user is authorized to perform the requested operation. This cannot be used in conjuction with PreauthorizedAgentObjectId. Only valid in an HNS enabled account. If this value is set in an non-HNS enabled account, an authorization failure will be thrown.

CacheControl

Gets the Cache-Control response header, which allows for specifying the client-side caching to be used for blob and file downloads.

ContentDisposition

Gets the Content-Disposition response header, which allows for specifying the way that the blob or file content can be displayed in the browser.

ContentEncoding

Gets the Content-Encoding response header, which allows for specifying the type of encoding used for blob and file downloads.

ContentLanguage

Gets the Content-Language response header, which allows for specifying the language of the downloaded blob or file content.

ContentType

Gets the Content-Type response header, which allows for specifying the type of the downloaded blob or file content.

CorrelationId

Gets the Correlation Id associated with the shared access signature. This is used to correlate the storage audit logs with the audit logs used by the principal generating and distributing SAS.

DirectoryDepth

Gets the Directory Depth specificed in the canonicalizedresource field of the string-to-sign. The depth of the directory is the number of directories beneath the root folder. Required when resource (sr) = d to indicate the depth of the directory. The value must be a non-negative integer.

Empty

Gets empty shared access signature query parameters.

EncryptionScope

Gets the Encryption Scope associated with the shared access signature.

ExpiresOn

Gets the time at which the shared access signature becomes invalid. MinValue means not set.

Identifier

Gets the optional unique value up to 64 characters in length that correlates to an access policy specified for the blob container, queue, or share.

IPRange

Gets the optional IP address or a range of IP addresses from which to accept requests. When specifying a range, note that the range is inclusive.

Permissions

Gets the permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. This field must be omitted if it has been specified in an associated stored access policy.

PreauthorizedAgentObjectId

Gets the Authorized AAD Object Id associated with the shared access signature. 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 cannot be used in conjuction with AgentObjectId. Only valid in an HNS enabled account. If this value is set in an non-HNS enabled account, an authorization failure will be thrown.

Protocol

Optional. Specifies the protocol permitted for a request made with the shared access signature.

Resource

Gets the resources are accessible via the shared access signature.

ResourceTypes

Gets which resources are accessible via the shared access signature.

Services

Gets the signed services accessible with an account level shared access signature.

Signature

Gets the string-to-sign, a unique string constructed from the fields that must be verified in order to authenticate the request. The signature is an HMAC computed over the string-to-sign and key using the SHA256 algorithm, and then encoded using Base64 encoding.

StartsOn

Gets the optional time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. MinValue means not set.

Version

Gets the storage service version to use to authenticate requests made with this shared access signature, and the service version to use when handling requests made with this shared access signature.

Methods

AppendProperties(StringBuilder)

Builds the query parameter string for the SasQueryParameters instance.

Create(IDictionary<String,String>)

Creates a new instance of the SasQueryParameters type based on the supplied query parameters values. All SAS-related query parameters will be removed from values.

Create(String, Nullable<AccountSasServices>, Nullable<AccountSasResourceTypes>, SasProtocol, DateTimeOffset, DateTimeOffset, SasIPRange, String, String, String, String, String, String, String, String, String, String, String, String, Nullable<Int32>, String)

Creates a new SasQueryParameters instance.

ToString()

Convert the SAS query parameters into a URL encoded query string.

Applies to