Package com.azure.storage.file.share.sas
Class ShareServiceSasSignatureValues
java.lang.Object
com.azure.storage.file.share.sas.ShareServiceSasSignatureValues
Used to initialize parameters for a Shared Access Signature (SAS) for an Azure File Storage service. Once all the
values here are set, use the appropriate SAS generation method on the desired share/file/directory client to obtain a
representation of the SAS which can then be applied to a new client using the .sasToken(String) method on the
desired client builder.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.ShareServiceSasSignatureValues
(String identifier) Creates an object with the specified identifier.ShareServiceSasSignatureValues
(OffsetDateTime expiryTime, ShareFileSasPermission permissions) Creates an object with the specified expiry time and permissionsShareServiceSasSignatureValues
(OffsetDateTime expiryTime, ShareSasPermission permissions) Creates an object with the specified expiry time and permissions -
Method Summary
Modifier and TypeMethodDescriptiongenerateSasQueryParameters
(StorageSharedKeyCredential storageSharedKeyCredentials) Deprecated.Please use the generateSas(ShareServiceSasSignatureValues) method on the desired share/file/directory client after initializingShareServiceSasSignatureValues
.Gets the cache-control header for the SAS.Gets the content-disposition header for the SAS.Gets the content-encoding header for the SAS.Gets the content-language header for the SAS.Gets the content-type header for the SAS.Gets the time after which the SAS will no longer work.Deprecated.File path is now auto-populated by the SAS generation methods provided on the desired file/directory client.Gets the name of the access policy on the share this SAS references if any.Gets the permissions string allowed by the SAS.Gets theSasProtocol
which determines the protocols allowed by the SAS.Gets theSasIpRange
which determines the IP ranges that are allowed to use the SAS.Deprecated.Share name is now auto-populated by the SAS generation methods provided on the desired share/file/directory client.Gets when the SAS will take effect.Gets the version of the service this SAS will target.setCacheControl
(String cacheControl) Sets the cache-control header for the SAS.setContentDisposition
(String contentDisposition) Sets the content-disposition header for the SAS.setContentEncoding
(String contentEncoding) Sets the content-encoding header for the SAS.setContentLanguage
(String contentLanguage) Sets the content-language header for the SAS.setContentType
(String contentType) Sets the content-type header for the SAS.setExpiryTime
(OffsetDateTime expiryTime) Sets the time after which the SAS will no longer work.setFilePath
(String filePath) Deprecated.Please use the generateSas methods provided on the desired file/directory client that will auto-populate the file path.setIdentifier
(String identifier) Sets the name of the access policy on the share this SAS references if any.setPermissions
(ShareFileSasPermission permissions) Sets the permissions allowed by the SAS.setPermissions
(ShareSasPermission permissions) Sets the permissions allowed by the SAS.setProtocol
(SasProtocol protocol) Sets theSasProtocol
which determines the protocols allowed by the SAS.setSasIpRange
(SasIpRange sasIpRange) Sets theSasIpRange
which determines the IP ranges that are allowed to use the SAS.setShareName
(String shareName) Deprecated.Please use the generateSas methods provided on the desired share/file/directory client that will auto-populate the share name.setStartTime
(OffsetDateTime startTime) Sets when the SAS will take effect.setVersion
(String version) Deprecated.The version is set to the latest version of sas.
-
Constructor Details
-
ShareServiceSasSignatureValues
Deprecated.Creates an object with empty values for all fields. -
ShareServiceSasSignatureValues
Creates an object with the specified identifier.- Parameters:
identifier
- Name of the access policy.
-
-
Method Details
-
getVersion
Gets the version of the service this SAS will target. If not specified, it will default to the version targeted by the library.- Returns:
- the version of the service this SAS will target. If not specified, it will default to the version targeted by the library.
-
setVersion
Deprecated.The version is set to the latest version of sas. Users should stop calling this API as it is now treated as a no-op.Sets the version of the service this SAS will target. If not specified, it will default to the version targeted by the library.- Parameters:
version
- Version to target- Returns:
- the updated FileServiceSasSignatureValues object
-
getProtocol
Gets theSasProtocol
which determines the protocols allowed by the SAS.- Returns:
- the
SasProtocol
which determines the protocols allowed by the SAS.
-
setProtocol
Sets theSasProtocol
which determines the protocols allowed by the SAS.- Parameters:
protocol
- Protocol for the SAS- Returns:
- the updated FileServiceSasSignatureValues object
-
getStartTime
Gets when the SAS will take effect.- Returns:
- when the SAS will take effect.
-
setStartTime
Sets when the SAS will take effect.- Parameters:
startTime
- When the SAS takes effect- Returns:
- the updated FileServiceSasSignatureValues object
-
getExpiryTime
Gets the time after which the SAS will no longer work.- Returns:
- the time after which the SAS will no longer work.
-
setExpiryTime
Sets the time after which the SAS will no longer work.- Parameters:
expiryTime
- When the SAS will no longer work- Returns:
- the updated FileServiceSasSignatureValues object
-
getPermissions
Gets the permissions string allowed by the SAS. Please refer to eitherShareSasPermission
orShareFileSasPermission
depending on the resource being accessed for help determining the permissions allowed.- Returns:
- the permissions string allowed by the SAS. Please refer to either
ShareSasPermission
orShareFileSasPermission
depending on the resource being accessed for help determining the permissions allowed.
-
getSasIpRange
Gets theSasIpRange
which determines the IP ranges that are allowed to use the SAS.- Returns:
- the
SasIpRange
which determines the IP ranges that are allowed to use the SAS.
-
setSasIpRange
Sets theSasIpRange
which determines the IP ranges that are allowed to use the SAS.- Parameters:
sasIpRange
- Allowed IP range to set- Returns:
- the updated FileServiceSasSignatureValues object
- See Also:
-
getFilePath
Deprecated.File path is now auto-populated by the SAS generation methods provided on the desired file/directory client.Gets the path of the file or directory being made accessible.null
or an empty string for a share SAS.- Returns:
- The path of the file or directory being made accessible.
null
or an empty string for a share SAS.
-
setFilePath
Deprecated.Please use the generateSas methods provided on the desired file/directory client that will auto-populate the file path.Sets the path of the file or directory being made accessible. Pass innull
or an empty string for a share SAS.- Parameters:
filePath
- The name of the share being made accessible.- Returns:
- the updated FileServiceSasSignatureValues object
-
getIdentifier
Gets the name of the access policy on the share this SAS references if any. Please see Establishing a stored access policy for more information.- Returns:
- the name of the access policy on the share this SAS references if any. Please see Establishing a stored access policy for more information.
-
setIdentifier
Sets the name of the access policy on the share this SAS references if any. Please see Establishing a stored access policy for more information.- Parameters:
identifier
- Name of the stored access policy- Returns:
- the updated FileServiceSasSignatureValues object
-
getCacheControl
Gets the cache-control header for the SAS.- Returns:
- the cache-control header for the SAS.
-
setCacheControl
Sets the cache-control header for the SAS.- Parameters:
cacheControl
- Cache-Control header value- Returns:
- the updated FileServiceSasSignatureValues object
-
getContentDisposition
Gets the content-disposition header for the SAS.- Returns:
- the content-disposition header for the SAS.
-
setContentDisposition
Sets the content-disposition header for the SAS.- Parameters:
contentDisposition
- Content-Disposition header value- Returns:
- the updated FileServiceSasSignatureValues object
-
getContentEncoding
Gets the content-encoding header for the SAS.- Returns:
- the content-encoding header for the SAS.
-
setContentEncoding
Sets the content-encoding header for the SAS.- Parameters:
contentEncoding
- Content-Encoding header value- Returns:
- the updated FileServiceSasSignatureValues object
-
getContentLanguage
Gets the content-language header for the SAS.- Returns:
- the content-language header for the SAS.
-
setContentLanguage
Sets the content-language header for the SAS.- Parameters:
contentLanguage
- Content-Language header value- Returns:
- the updated FileServiceSasSignatureValues object
-
getContentType
Gets the content-type header for the SAS.- Returns:
- the content-type header for the SAS.
-
setContentType
Sets the content-type header for the SAS.- Parameters:
contentType
- Content-Type header value- Returns:
- the updated FileServiceSasSignatureValues object
-
ShareServiceSasSignatureValues(String)
,ShareServiceSasSignatureValues(OffsetDateTime, ShareSasPermission)
, orShareServiceSasSignatureValues(OffsetDateTime, ShareFileSasPermission)