AccountSasBuilder Class

Definition

AccountSasBuilder is used to generate an account level Shared Access Signature (SAS) for Azure Storage services. For more information, see Create an account SAS.

public class AccountSasBuilder
type AccountSasBuilder = class
Public Class AccountSasBuilder
Inheritance
AccountSasBuilder

Constructors

AccountSasBuilder(AccountSasPermissions, DateTimeOffset, AccountSasServices, AccountSasResourceTypes)

Initializes a new instance of the AccountSasBuilder class to create a Blob Container Service Sas.

Properties

EncryptionScope

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

ExpiresOn

The time at which the shared access signature becomes invalid. This field must be omitted if it has been specified in an associated stored access policy.

IPRange

Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address or address range specified on the SAS token, the request is not authenticated. When specifying a range of IP addresses, note that the range is inclusive.

Permissions

The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. The AccountSasPermissions type can be used to create the permissions string.

Protocol

The optional signed protocol field specifies the protocol permitted for a request made with the SAS. Possible values are HttpsAndHttp, Https, and None.

ResourceTypes

The resource types associated with the shared access signature. The user is restricted to operations on the specified resources.

Services

The services associated with the shared access signature. The user is restricted to operations with the specified services.

StartsOn

Optionally specify the time at which the shared access signature becomes valid. If omitted when DateTimeOffset.MinValue is used, start time for this call is assumed to be the time when the storage service receives the request.

Methods

SetPermissions(AccountSasPermissions)

Sets the permissions for an account SAS.

SetPermissions(String)

Sets the permissions for the SAS using a raw permissions string.

ToSasQueryParameters(StorageSharedKeyCredential)

Use an account's StorageSharedKeyCredential to sign this shared access signature values to produce the proper SAS query parameters for authenticating requests.

Applies to