Package com.azure.storage.common.sas
Class CommonSasQueryParameters
java.lang.Object
com.azure.storage.common.sas.CommonSasQueryParameters
Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
by the user; it is only generated by the URLParts type. NOTE: Instances of this class are immutable to ensure thread
safety.
-
Constructor Summary
ConstructorsConstructorDescriptionCommonSasQueryParameters(Map<String, String[]> queryParamsMap, boolean removeSasParametersFromMap) Creates a newCommonSasQueryParametersobject. -
Method Summary
Modifier and TypeMethodDescriptionencode()Encodes all SAS query parameters into a string that can be appended to a URL.Gets the AAD object ID of a user assumed to be unauthorized by the owner of the user delegation key to perform the action granted by the SAS token.Gets the Cache-Control header value when a client accesses the resource with this sas token.Gets the Content-Disposition header value when a client accesses the resource with this sas token.Gets the Content-Encoding header value when a client accesses the resource with this sas token.Gets the Content-Language header value when a client accesses the resource with this sas token.Gets the Content-Type header value when a client accesses the resource with this sas token.Gets the correlation id to correlate the storage audit logs with the audit logs used by the principal generating and distributing the SAS.Gets the directory depth of the resource this SAS token authorizes.Gets the encryption scope that will be applied to any write operations performed with the sas.Gets the expiry time for this SAS token.Gets the signed identifier.Gets the datetime when the key expires.Gets the object ID of the key.Gets the services that are permitted by the key.Gets the datetime when the key becomes active.Gets the tenant ID of the key.Gets the service version that created the key.Gets the SAS permissions in a raw format.Gets the AAD object ID of a user assumed to be authorized by the owner of the user delegation key to perform the action granted by the SAS token.Gets the allowed HTTP protocol(s).Gets the storage resource.Gets the storage resource types being accessed (only for Account SAS).Gets theSasIpRange.Gets the storage services being accessed (only for Account SAS).Gets the signature for the SAS token.Gets the start time for this SAS token.Gets the storage version.
-
Constructor Details
-
CommonSasQueryParameters
public CommonSasQueryParameters(Map<String, String[]> queryParamsMap, boolean removeSasParametersFromMap) Creates a newCommonSasQueryParametersobject.- Parameters:
queryParamsMap- All query parameters for the request as key-value pairsremoveSasParametersFromMap- Whentrue, the SAS query parameters will be removed from queryParamsMap
-
-
Method Details
-
encode
Encodes all SAS query parameters into a string that can be appended to a URL.- Returns:
- A
Stringrepresenting the SAS query parameters.
-
getIdentifier
Gets the signed identifier.Please see here for more information.
- Returns:
- The signed identifier.
-
getResource
Gets the storage resource.- Returns:
- The storage resource.
-
getCacheControl
Gets the Cache-Control header value when a client accesses the resource with this sas token.- Returns:
- The Cache-Control header value when a client accesses the resource with this sas token.
-
getContentDisposition
Gets the Content-Disposition header value when a client accesses the resource with this sas token.- Returns:
- The Content-Disposition header value when a client accesses the resource with this sas token.
-
getContentEncoding
Gets the Content-Encoding header value when a client accesses the resource with this sas token.- Returns:
- The Content-Encoding header value when a client accesses the resource with this sas token.
-
getContentLanguage
Gets the Content-Language header value when a client accesses the resource with this sas token.- Returns:
- The Content-Language header value when a client accesses the resource with this sas token.
-
getContentType
Gets the Content-Type header value when a client accesses the resource with this sas token.- Returns:
- The Content-Type header value when a client accesses the resource with this sas token.
-
getKeyObjectId
Gets the object ID of the key.- Returns:
- the object ID of the key.
-
getKeyTenantId
Gets the tenant ID of the key.- Returns:
- the tenant ID of the key.
-
getKeyStart
Gets the datetime when the key becomes active.- Returns:
- the datetime when the key becomes active.
-
getKeyExpiry
Gets the datetime when the key expires.- Returns:
- the datetime when the key expires.
-
getKeyService
Gets the services that are permitted by the key.- Returns:
- the services that are permitted by the key.
-
getKeyVersion
Gets the service version that created the key.- Returns:
- the service version that created the key.
-
getServices
Gets the storage services being accessed (only for Account SAS).Please refer to
AccountSasServicefor more details.- Returns:
- The storage services being accessed (only for Account SAS).
-
getResourceTypes
Gets the storage resource types being accessed (only for Account SAS).Please refer to
AccountSasResourceTypefor more details.- Returns:
- The storage resource types being accessed (only for Account SAS).
-
getVersion
Gets the storage version.- Returns:
- The storage version
-
getProtocol
Gets the allowed HTTP protocol(s).Please refer to
SasProtocolfor more details.- Returns:
- The allowed HTTP protocol(s) or
null.
-
getStartTime
Gets the start time for this SAS token.- Returns:
- The start time for this SAS token or
null.
-
getExpiryTime
Gets the expiry time for this SAS token.- Returns:
- The expiry time for this SAS token.
-
getSasIpRange
Gets theSasIpRange.- Returns:
SasIpRange
-
getPermissions
Gets the SAS permissions in a raw format.Please refer to *SASPermission classes for more details.
- Returns:
- The SAS permissions in a raw format.
-
getSignature
Gets the signature for the SAS token.- Returns:
- The signature for the SAS token.
-
getDirectoryDepth
Gets the directory depth of the resource this SAS token authorizes.- Returns:
- The directory depth of the resource this SAS token authorizes.
-
getPreauthorizedAgentObjectId
Gets the AAD object ID of a user assumed to be authorized by the owner of the user delegation key to perform the action granted by the SAS token. The service will validate the SAS token and ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission check for the agent object id will be performed.- Returns:
- The AAD object ID of a user assumed to be authorized by the owner of the user delegation key to perform the action granted by the SAS token. The service will validate the SAS token and ensure that the owner of the user delegation key has the required permissions before granting access but no additional permission check for the agent object id will be performed.
-
getAgentObjectId
Gets the AAD object ID of a user assumed to be unauthorized by the owner of the user delegation key to perform the action granted by the SAS token. The service will validate the SAS token and ensure that the owner of the user delegation key has the required permissions before granting access and the service will perform an additional POSIX ACL check to determine if this user is authorized to perform the requested operation.- Returns:
- The AAD object ID of a user assumed to be unauthorized by the owner of the user delegation key to perform the action granted by the SAS token. The service will validate the SAS token and ensure that the owner of the user delegation key has the required permissions before granting access and the service will perform an additional POSIX ACL check to determine if this user is authorized to perform the requested operation.
-
getCorrelationId
Gets the correlation id to correlate the storage audit logs with the audit logs used by the principal generating and distributing the SAS.- Returns:
- The correlation id to correlate the storage audit logs with the audit logs used by the principal generating and distributing the SAS.
-
getEncryptionScope
Gets the encryption scope that will be applied to any write operations performed with the sas.- Returns:
- An encryption scope that will be applied to any write operations performed with the sas.
-