CommonSasQueryParameters Class

  • java.lang.Object
    • com.azure.storage.common.sas.CommonSasQueryParameters

public class 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

Constructor Description
CommonSasQueryParameters(Map<String,String[]> queryParamsMap, boolean removeSasParametersFromMap)

Creates a new CommonSasQueryParameters object.

Method Summary

Modifier and Type Method and Description
String encode()

Encodes all SAS query parameters into a string that can be appended to a URL.

String getAgentObjectId()
String getCacheControl()
String getContentDisposition()
String getContentEncoding()
String getContentLanguage()
String getContentType()
String getCorrelationId()
Integer getDirectoryDepth()
String getEncryptionScope()
OffsetDateTime getExpiryTime()
String getIdentifier()
OffsetDateTime getKeyExpiry()
String getKeyObjectId()
String getKeyService()
OffsetDateTime getKeyStart()
String getKeyTenantId()
String getKeyVersion()
String getPermissions()
String getPreauthorizedAgentObjectId()
SasProtocol getProtocol()
String getResource()
String getResourceTypes()
SasIpRange getSasIpRange()
String getServices()
String getSignature()
OffsetDateTime getStartTime()
String getVersion()

Methods inherited from java.lang.Object

Constructor Details

CommonSasQueryParameters

public CommonSasQueryParameters(Map queryParamsMap, boolean removeSasParametersFromMap)

Creates a new CommonSasQueryParameters object.

Parameters:

queryParamsMap - All query parameters for the request as key-value pairs
removeSasParametersFromMap - When true, the SAS query parameters will be removed from queryParamsMap

Method Details

encode

public String encode()

Encodes all SAS query parameters into a string that can be appended to a URL.

Returns:

A String representing the SAS query parameters.

getAgentObjectId

public String getAgentObjectId()

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.

getCacheControl

public String getCacheControl()

Returns:

The Cache-Control header value when a client accesses the resource with this sas token.

getContentDisposition

public String getContentDisposition()

Returns:

The Content-Disposition header value when a client accesses the resource with this sas token.

getContentEncoding

public String getContentEncoding()

Returns:

The Content-Encoding header value when a client accesses the resource with this sas token.

getContentLanguage

public String getContentLanguage()

Returns:

The Content-Language header value when a client accesses the resource with this sas token.

getContentType

public String getContentType()

Returns:

The Content-Type header value when a client accesses the resource with this sas token.

getCorrelationId

public String getCorrelationId()

Returns:

The correlation id to correlate the storage audit logs with the audit logs used by the principal generating and distributing the SAS.

getDirectoryDepth

public Integer getDirectoryDepth()

Returns:

The directory depth of the resource this SAS token authorizes.

getEncryptionScope

public String getEncryptionScope()

Returns:

An encryption scope that will be applied to any write operations performed with the sas.

getExpiryTime

public OffsetDateTime getExpiryTime()

Returns:

The expiry time for this SAS token.

getIdentifier

public String getIdentifier()

Returns:

The signed identifier. Please see here for more information.

getKeyExpiry

public OffsetDateTime getKeyExpiry()

Returns:

the datetime when the key expires.

getKeyObjectId

public String getKeyObjectId()

Returns:

the object ID of the key.

getKeyService

public String getKeyService()

Returns:

the services that are permitted by the key.

getKeyStart

public OffsetDateTime getKeyStart()

Returns:

the datetime when the key becomes active.

getKeyTenantId

public String getKeyTenantId()

Returns:

the tenant ID of the key.

getKeyVersion

public String getKeyVersion()

Returns:

the service version that created the key.

getPermissions

public String getPermissions()

Returns:

Please refer to *SASPermission classes for more details.

getPreauthorizedAgentObjectId

public String getPreauthorizedAgentObjectId()

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.

getProtocol

public SasProtocol getProtocol()

Returns:

The allowed HTTP protocol(s) or null. Please refer to SasProtocol for more details.

getResource

public String getResource()

Returns:

The storage resource.

getResourceTypes

public String getResourceTypes()

Returns:

The storage resource types being accessed (only for Account SAS). Please refer to AccountSasResourceType for more details.

getSasIpRange

public SasIpRange getSasIpRange()

Returns:

getServices

public String getServices()

Returns:

The storage services being accessed (only for Account SAS). Please refer to AccountSasService for more details.

getSignature

public String getSignature()

Returns:

The signature for the SAS token.

getStartTime

public OffsetDateTime getStartTime()

Returns:

The start time for this SAS token or null.

getVersion

public String getVersion()

Returns:

The storage version

Applies to