public final class ShareServiceSasSignatureValues extends Object
| Constructor and Description |
|---|
ShareServiceSasSignatureValues()
|
ShareServiceSasSignatureValues(OffsetDateTime expiryTime,
ShareFileSasPermission permissions)
Creates an object with the specified expiry time and permissions
|
ShareServiceSasSignatureValues(OffsetDateTime expiryTime,
ShareSasPermission permissions)
Creates an object with the specified expiry time and permissions
|
ShareServiceSasSignatureValues(String identifier)
Creates an object with the specified identifier.
|
| Modifier and Type | Method and Description |
|---|---|
ShareServiceSasQueryParameters |
generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)
Deprecated.
Please use the generateSas(ShareServiceSasSignatureValues) method on the desired share/file/directory
client after initializing
ShareServiceSasSignatureValues. |
String |
getCacheControl() |
String |
getContentDisposition() |
String |
getContentEncoding() |
String |
getContentLanguage() |
String |
getContentType() |
OffsetDateTime |
getExpiryTime() |
String |
getFilePath()
Deprecated.
File path is now auto-populated by the SAS generation methods provided on the desired file/directory
client.
|
String |
getIdentifier() |
String |
getPermissions() |
SasProtocol |
getProtocol() |
SasIpRange |
getSasIpRange() |
String |
getShareName()
Deprecated.
Share name is now auto-populated by the SAS generation methods provided on the desired
share/file/directory client.
|
OffsetDateTime |
getStartTime() |
String |
getVersion() |
ShareServiceSasSignatureValues |
setCacheControl(String cacheControl)
Sets the cache-control header for the SAS.
|
ShareServiceSasSignatureValues |
setContentDisposition(String contentDisposition)
Sets the content-disposition header for the SAS.
|
ShareServiceSasSignatureValues |
setContentEncoding(String contentEncoding)
Sets the content-encoding header for the SAS.
|
ShareServiceSasSignatureValues |
setContentLanguage(String contentLanguage)
Sets the content-language header for the SAS.
|
ShareServiceSasSignatureValues |
setContentType(String contentType)
Sets the content-type header for the SAS.
|
ShareServiceSasSignatureValues |
setExpiryTime(OffsetDateTime expiryTime)
Sets the time after which the SAS will no longer work.
|
ShareServiceSasSignatureValues |
setFilePath(String filePath)
Deprecated.
Please use the generateSas methods provided on the desired file/directory client that will
auto-populate the file path.
|
ShareServiceSasSignatureValues |
setIdentifier(String identifier)
Sets the name of the access policy on the share this SAS references if any.
|
ShareServiceSasSignatureValues |
setPermissions(ShareFileSasPermission permissions)
Sets the permissions allowed by the SAS.
|
ShareServiceSasSignatureValues |
setPermissions(ShareSasPermission permissions)
Sets the permissions allowed by the SAS.
|
ShareServiceSasSignatureValues |
setProtocol(SasProtocol protocol)
Sets the
SasProtocol which determines the protocols allowed by the SAS. |
ShareServiceSasSignatureValues |
setSasIpRange(SasIpRange sasIpRange)
Sets the
SasIpRange which determines the IP ranges that are allowed to use the SAS. |
ShareServiceSasSignatureValues |
setShareName(String shareName)
Deprecated.
Please use the generateSas methods provided on the desired share/file/directory client that will
auto-populate the share name.
|
ShareServiceSasSignatureValues |
setStartTime(OffsetDateTime startTime)
Sets when the SAS will take effect.
|
ShareServiceSasSignatureValues |
setVersion(String version)
Sets the version of the service this SAS will target.
|
@Deprecated public ShareServiceSasSignatureValues()
ShareServiceSasSignatureValues.ShareServiceSasSignatureValues(String),
ShareServiceSasSignatureValues.ShareServiceSasSignatureValues(OffsetDateTime, ShareSasPermission), or
ShareServiceSasSignatureValues.ShareServiceSasSignatureValues(OffsetDateTime, ShareFileSasPermission)public ShareServiceSasSignatureValues(OffsetDateTime expiryTime, ShareSasPermission permissions)
expiryTime - The time after which the SAS will no longer work.permissions - ShareSasPermission allowed by the SAS.public ShareServiceSasSignatureValues(OffsetDateTime expiryTime, ShareFileSasPermission permissions)
expiryTime - The time after which the SAS will no longer work.permissions - ShareFileSasPermission allowed by the SAS.public ShareServiceSasSignatureValues(String identifier)
identifier - Name of the access policy.public String getVersion()
public ShareServiceSasSignatureValues setVersion(String version)
version - Version to targetpublic SasProtocol getProtocol()
SasProtocol which determines the protocols allowed by the SAS.public ShareServiceSasSignatureValues setProtocol(SasProtocol protocol)
SasProtocol which determines the protocols allowed by the SAS.protocol - Protocol for the SASpublic OffsetDateTime getStartTime()
public ShareServiceSasSignatureValues setStartTime(OffsetDateTime startTime)
startTime - When the SAS takes effectpublic OffsetDateTime getExpiryTime()
public ShareServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime)
expiryTime - When the SAS will no longer workpublic String getPermissions()
ShareSasPermission or ShareFileSasPermission depending on the resource being accessed for help determining the permissions allowed.public ShareServiceSasSignatureValues setPermissions(ShareSasPermission permissions)
share name is set on the builder.permissions - Permissions for the share SAS.public ShareServiceSasSignatureValues setPermissions(ShareFileSasPermission permissions)
share name and file path are set on the builder.permissions - Permissions for the SAS.public SasIpRange getSasIpRange()
SasIpRange which determines the IP ranges that are allowed to use the SAS.public ShareServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange)
SasIpRange which determines the IP ranges that are allowed to use the SAS.sasIpRange - Allowed IP range to set@Deprecated public String getShareName()
@Deprecated public ShareServiceSasSignatureValues setShareName(String shareName)
shareName - The name of the share being made accessible.@Deprecated public String getFilePath()
null or an empty string for a share SAS.null or an empty string for a share SAS.@Deprecated public ShareServiceSasSignatureValues setFilePath(String filePath)
null or an empty string for a share
SAS.filePath - The name of the share being made accessible.public String getIdentifier()
public ShareServiceSasSignatureValues setIdentifier(String identifier)
identifier - Name of the stored access policypublic String getCacheControl()
public ShareServiceSasSignatureValues setCacheControl(String cacheControl)
cacheControl - Cache-Control header valuepublic String getContentDisposition()
public ShareServiceSasSignatureValues setContentDisposition(String contentDisposition)
contentDisposition - Content-Disposition header valuepublic String getContentEncoding()
public ShareServiceSasSignatureValues setContentEncoding(String contentEncoding)
contentEncoding - Content-Encoding header valuepublic String getContentLanguage()
public ShareServiceSasSignatureValues setContentLanguage(String contentLanguage)
contentLanguage - Content-Language header valuepublic String getContentType()
public ShareServiceSasSignatureValues setContentType(String contentType)
contentType - Content-Type header value@Deprecated public ShareServiceSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)
ShareServiceSasSignatureValues.Notes on SAS generation
version is not set, the latest service
version is used.identifier is set, expiryTime and
permissions should not be set. These values are inherited from the stored access policy.expiryTime and permissions must
be set.The type of SAS query parameters returned depends on the following:
ShareServiceSasSignatureValues.getFilePath() is not set, query parameters for a share SAS are returned.ShareServiceSasSignatureValues.getShareName() and ShareServiceSasSignatureValues.getFilePath() are used to create query parameters for a
file SAS.See class level JavaDocs for code snippets.
storageSharedKeyCredentials - A StorageSharedKeyCredential object used to sign the SAS values.ShareServiceSasQueryParametersIllegalStateException - If the HMAC-SHA256 algorithm isn't supported, if the key isn't a valid Base64
encoded string, or the UTF-8 charset isn't supported.IllegalArgumentException - if ShareServiceSasSignatureValues.getPermissions() contains an invalid character for the SAS resource.NullPointerException - If storageSharedKeyCredentials is null.Copyright © 2021 Microsoft Corporation. All rights reserved.