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

BlobSasQueryParameters

A BlobSasQueryParameters object represents the components that make up an Azure Storage Shared Access Signature's query parameters. You can construct a new instance using BlobSasBuilder. For more information, Create a service SAS.
using System; using System.Collections.Generic; using System.Text; namespace Azure.Storage.Sas { public sealed class BlobSasQueryParameters { internal UserDelegationKeyProperties KeyProperties { get; set; } public string KeyObjectId => KeyProperties?.ObjectId; public string KeyTenantId => KeyProperties?.TenantId; public DateTimeOffset KeyStartsOn { get { if (KeyProperties != null) return KeyProperties.StartsOn; return default(DateTimeOffset); } } public DateTimeOffset KeyExpiresOn { get { if (KeyProperties != null) return KeyProperties.ExpiresOn; return default(DateTimeOffset); } } public string KeyService => KeyProperties?.Service; public string KeyVersion => KeyProperties?.Version; public static BlobSasQueryParameters Empty => new BlobSasQueryParameters(); internal BlobSasQueryParameters() : this() { } internal BlobSasQueryParameters(string version, AccountSasServices? services, AccountSasResourceTypes? resourceTypes, SasProtocol protocol, DateTimeOffset startsOn, DateTimeOffset expiresOn, SasIPRange ipRange, string identifier, string resource, string permissions, string signature, string keyOid = null, string keyTid = null, DateTimeOffset keyStart = default(DateTimeOffset), DateTimeOffset keyExpiry = default(DateTimeOffset), string keyService = null, string keyVersion = null, string cacheControl = null, string contentDisposition = null, string contentEncoding = null, string contentLanguage = null, string contentType = null, string authorizedAadObjectId = null, string unauthorizedAadObjectId = null, string correlationId = null, string encryptionScope = null) : this(version, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, permissions, signature, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, authorizedAadObjectId, unauthorizedAadObjectId, correlationId, (int?)null, encryptionScope) { KeyProperties = new UserDelegationKeyProperties { ObjectId = keyOid, TenantId = keyTid, StartsOn = keyStart, ExpiresOn = keyExpiry, Service = keyService, Version = keyVersion }; } internal BlobSasQueryParameters(IDictionary<string, string> values) : this(values) { this.ParseKeyProperties(values); } public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); KeyProperties.AppendProperties(stringBuilder); this.AppendProperties(stringBuilder); return stringBuilder.ToString(); } } }