<PackageReference Include="Azure.Storage.Common" Version="12.24.0" />

AccountSasBuilder

public class AccountSasBuilder
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 string EncryptionScope { get; set; }

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

public DateTimeOffset ExpiresOn { get; set; }

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.

public SasIPRange IPRange { get; set; }

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.

public string Permissions { get; }

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.

public SasProtocol Protocol { get; set; }

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

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

public AccountSasServices Services { get; set; }

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

public DateTimeOffset StartsOn { get; set; }

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.

public string Version { get; set; }

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.

Initializes a new instance of the AccountSasBuilder class.

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

public void SetPermissions(AccountSasPermissions permissions)

Sets the permissions for an account SAS.

public void SetPermissions(string rawPermissions)

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

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

public SasQueryParameters ToSasQueryParameters(StorageSharedKeyCredential sharedKeyCredential, out string stringToSign)

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