public final class AccountSasSignatureValues extends Object
| Constructor and Description |
|---|
AccountSasSignatureValues()
|
AccountSasSignatureValues(OffsetDateTime expiryTime,
AccountSasPermission permissions,
AccountSasService services,
AccountSasResourceType resourceTypes)
Initializes a new
AccountSasSignatureValues object. |
@Deprecated public AccountSasSignatureValues()
AccountSasSignatureValues.AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService,
AccountSasResourceType)AccountSasSignatureValues object.public AccountSasSignatureValues(OffsetDateTime expiryTime, AccountSasPermission permissions, AccountSasService services, AccountSasResourceType resourceTypes)
AccountSasSignatureValues object.expiryTime - The time after which the SAS will no longer work.permissions - AccountSasPermission allowed by the SAS.services - AccountSasService targeted by the SAS.resourceTypes - AccountSasResourceType targeted by the SAS.public String getVersion()
null or empty the latest service version targeted by the
library will be used.public AccountSasSignatureValues setVersion(String version)
null or empty to target the version used by the
library.version - Target version to setpublic SasProtocol getProtocol()
SasProtocol which determines the HTTP protocol that will be used.public AccountSasSignatureValues setProtocol(SasProtocol protocol)
SasProtocol which determines the HTTP protocol that will be used.protocol - Protocol to setpublic OffsetDateTime getStartTime()
public AccountSasSignatureValues setStartTime(OffsetDateTime startTime)
startTime - Start time to setpublic OffsetDateTime getExpiryTime()
@Deprecated public AccountSasSignatureValues setExpiryTime(OffsetDateTime expiryTime)
AccountSasSignatureValues.AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService,
AccountSasResourceType) to specify the expiry time.expiryTime - Expiry time to setpublic String getPermissions()
AccountSasPermission to help determine
which permissions are allowed.@Deprecated public AccountSasSignatureValues setPermissions(AccountSasPermission permissions)
AccountSasSignatureValues.AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService,
AccountSasResourceType) to specify the allowed permissions.AccountSasPermission for help
constructing the permissions string.permissions - Permissions to set.NullPointerException - if permissions is null.public SasIpRange getSasIpRange()
SasIpRange which determines the IP ranges that are allowed to use the SAS.public AccountSasSignatureValues setSasIpRange(SasIpRange sasIpRange)
SasIpRange which determines the IP ranges that are allowed to use the SAS.sasIpRange - Allowed IP range to setpublic String getServices()
AccountSasService to help determine which
services are accessible.@Deprecated public AccountSasSignatureValues setServices(String services)
AccountSasSignatureValues.AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService,
AccountSasResourceType) to specify the services being targeted.AccountSasService to construct this value.services - Allowed services string to setpublic String getResourceTypes()
AccountSasResourceType to help
determine the resource types that are accessible.@Deprecated public AccountSasSignatureValues setResourceTypes(String resourceTypes)
AccountSasSignatureValues.AccountSasSignatureValues(OffsetDateTime, AccountSasPermission, AccountSasService,
AccountSasResourceType) to specify the resource types being targeted.AccountSasResourceType to construct
this value.resourceTypes - Allowed resource types string to set@Deprecated public AccountSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)
AccountSasSignatureValues.AccountSasQueryParameters object which contains all SAS query parameters for authenticating
requests.
Notes on SAS generation
version is not set, the latest service version is used.For samples, see class level JavaDocs.
storageSharedKeyCredentials - Credentials for the storage account.AccountSasQueryParameters used for authenticating requests.RuntimeException - If the HMAC-SHA256 signature for storageSharedKeyCredentials fails to generate.NullPointerException - If any of storageSharedKeyCredentials, services,
resourceTypes, expiryTime, or permissions is null.Copyright © 2020 Microsoft Corporation. All rights reserved.