ServiceSASSignatureValues Class

Definition

ServiceSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage service. Once all the values here are set appropriately, call generateSASQueryParameters to obtain a representation of the SAS which can actually be applied to blob urls. Note: that both this class and SASQueryParameters exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

Please see here for more conceptual information on SAS.

Please see here for more details on each value, including which are required.

public class ServiceSASSignatureValues
Inheritance
java.lang.Object
ServiceSASSignatureValues

Remarks

Sample Code

Warning

It looks like the sample you are looking for has moved! Rest assured we are working on resolving this.

For more samples, please see the Samples file

Constructors

ServiceSASSignatureValues()

Creates an object with empty values for all fields.

Methods

blobName()

The name of the blob the SAS user may access.

cacheControl()

The cache-control header for the SAS.

containerName()

The name of the container the SAS user may access.

contentDisposition()

The content-disposition header for the SAS.

contentEncoding()

The content-encoding header for the SAS.

contentLanguage()

The content-language header for the SAS.

contentType()

The content-type header for the SAS.

expiryTime()

The time after which the SAS will no longer work.

generateSASQueryParameters(SharedKeyCredentials sharedKeyCredentials)

Uses an account's shared key credential to sign these signature values to produce the proper SAS query parameters.

generateSASQueryParameters(UserDelegationKey delegationKey, String accountName)

Uses a user delegation key to sign these signature values to produce the proper SAS query parameters.

identifier()

The name of the access policy on the container this SAS references if any. Please see here for more information.

ipRange()

IPRange

permissions()

Please refer to either ContainerSASPermission or BlobSASPermission depending on the resource being accessed for help constructing the permissions string.

protocol()

SASProtocol

snapshotId()

The specific snapshot the SAS user may access.

startTime()

When the SAS will take effect.

version()

The version of the service this SAS will target. If not specified, it will default to the version targeted by the library.

withBlobName(String blobName)

The name of the blob the SAS user may access.

withCacheControl(String cacheControl)

The cache-control header for the SAS.

withContainerName(String containerName)

The name of the container the SAS user may access.

withContentDisposition(String contentDisposition)

The content-disposition header for the SAS.

withContentEncoding(String contentEncoding)

The content-encoding header for the SAS.

withContentLanguage(String contentLanguage)

The content-language header for the SAS.

withContentType(String contentType)

The content-type header for the SAS.

withExpiryTime(OffsetDateTime expiryTime)

The time after which the SAS will no longer work.

withIdentifier(String identifier)

The name of the access policy on the container this SAS references if any. Please see here for more information.

withIpRange(IPRange ipRange)

IPRange

withPermissions(String permissions)

Please refer to either ContainerSASPermission or BlobSASPermission depending on the resource being accessed for help constructing the permissions string.

withProtocol(SASProtocol protocol)

SASProtocol

withSnapshotId(String snapshotId)

The specific snapshot the SAS user may access.

withStartTime(OffsetDateTime startTime)

When the SAS will take effect.

withVersion(String version)

The version of the service this SAS will target. If not specified, it will default to the version targeted by the library.

Applies to