QueueServiceSasSignatureValues Class

  • java.lang.Object
    • com.azure.storage.queue.sas.QueueServiceSasSignatureValues

public final class QueueServiceSasSignatureValues

Used to initialize parameters for a Shared Access Signature (SAS) for an Azure Queue Storage service. Once all the values here are set, use the appropriate SAS generation method on the desired queue 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.

Constructor Summary

Constructor Description
QueueServiceSasSignatureValues()

Deprecated

Creates an object with empty values for all fields.

QueueServiceSasSignatureValues(String identifier)

Creates an object with the specified identifier.

QueueServiceSasSignatureValues(OffsetDateTime expiryTime, QueueSasPermission permissions)

Creates an object with the specified expiry time and permissions

Method Summary

Modifier and Type Method and Description
QueueServiceSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)

Deprecated

Please use the generateSas(QueueServiceSasSignatureValues) method on the desired queue client after initializing QueueServiceSasSignatureValues.

Uses an account's shared key credential to sign these signature values to produce the proper SAS query parameters.

OffsetDateTime getExpiryTime()

Gets the time after which the SAS will no longer work.

String getId()

Deprecated

Please use getIdentifier()

Gets the name of the access policy on the queue this SAS references if any.

String getIdentifier()

Sets the name of the access policy on the queue this SAS references if any.

String getPermissions()

Gets the permissions string allowed by the SAS.

SasProtocol getProtocol()

Gets the SasProtocol which determines the protocols allowed by the SAS.

String getQueueName()

Deprecated

Queue name is now auto-populated by the SAS generation methods provided on the desired queue client.

Gets the name of the queue this SAS may access.

SasIpRange getSasIpRange()

Gets the SasIpRange which determines the IP ranges that are allowed to use the SAS.

OffsetDateTime getStartTime()

Gets when the SAS will take effect.

String getVersion()

Gets the version of the service this SAS will target.

QueueServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime)

Sets the time after which the SAS will no longer work.

QueueServiceSasSignatureValues setIdentifier(String identifier)

Sets the name of the access policy on the queue this SAS references if any.

QueueServiceSasSignatureValues setPermissions(QueueSasPermission permissions)

Sets the permissions string allowed by the SAS.

QueueServiceSasSignatureValues setProtocol(SasProtocol protocol)

Sets the SasProtocol which determines the protocols allowed by the SAS.

QueueServiceSasSignatureValues setQueueName(String queueName)

Deprecated

Please use the generateSas methods provided on the desired queue client that will auto-populate the queue name.

Sets the name of the queue this SAS may access.

QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange)

Sets the SasIpRange which determines the IP ranges that are allowed to use the SAS.

QueueServiceSasSignatureValues setStartTime(OffsetDateTime startTime)

Sets when the SAS will take effect.

QueueServiceSasSignatureValues setVersion(String version)

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.

Methods inherited from java.lang.Object

Constructor Details

QueueServiceSasSignatureValues

@Deprecated
public QueueServiceSasSignatureValues()

Deprecated

Creates an object with empty values for all fields.

QueueServiceSasSignatureValues

public QueueServiceSasSignatureValues(String identifier)

Creates an object with the specified identifier.

Parameters:

identifier - Name of the access policy.

QueueServiceSasSignatureValues

public QueueServiceSasSignatureValues(OffsetDateTime expiryTime, QueueSasPermission permissions)

Creates an object with the specified expiry time and permissions

Parameters:

expiryTime - The time after which the SAS will no longer work.
permissions - QueueSasPermission allowed by the SAS.

Method Details

generateSasQueryParameters

@Deprecated
public QueueServiceSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)

Deprecated

Please use the generateSas(QueueServiceSasSignatureValues) method on the desired queue client after initializing QueueServiceSasSignatureValues.

Uses an account's shared key credential to sign these signature values to produce the proper SAS query parameters.

Notes on SAS generation

For samples, see class level JavaDocs.

Parameters:

storageSharedKeyCredentials - A StorageSharedKeyCredential object used to sign the SAS values.

Returns:

A new QueueServiceSasQueryParameters represented by the current builder.

getExpiryTime

public OffsetDateTime getExpiryTime()

Gets the time after which the SAS will no longer work.

Returns:

the time after which the SAS will no longer work.

getId

@Deprecated
public String getId()

Deprecated

Please use getIdentifier()

Gets the name of the access policy on the queue this SAS references if any.

Returns:

the name of the access policy on the queue this SAS references if any. Please see here for more information.

getIdentifier

public String getIdentifier()

Sets the name of the access policy on the queue this SAS references if any.

Returns:

the name of the access policy on the queue this SAS references if any. Please see here for more information.

getPermissions

public String getPermissions()

Gets the permissions string allowed by the SAS. Please refer to QueueSasPermission for help determining the permissions allowed.

Returns:

the permissions string allowed by the SAS. Please refer to QueueSasPermission for help determining the permissions allowed.

getProtocol

public SasProtocol getProtocol()

Gets the SasProtocol which determines the protocols allowed by the SAS.

Returns:

the SasProtocol which determines the protocols allowed by the SAS.

getQueueName

@Deprecated
public String getQueueName()

Deprecated

Queue name is now auto-populated by the SAS generation methods provided on the desired queue client.

Gets the name of the queue this SAS may access.

Returns:

The name of the queue the SAS user may access.

getSasIpRange

public SasIpRange getSasIpRange()

Gets the SasIpRange 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.

getStartTime

public OffsetDateTime getStartTime()

Gets when the SAS will take effect.

Returns:

when the SAS will take effect.

getVersion

public String 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.

setExpiryTime

public QueueServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime)

Sets the time after which the SAS will no longer work.

Parameters:

expiryTime - When the SAS will no longer work

Returns:

the updated QueueServiceSasSignatureValues object

setIdentifier

public QueueServiceSasSignatureValues setIdentifier(String identifier)

Sets the name of the access policy on the queue this SAS references if any. Please see here for more information.

Parameters:

identifier - Name of the access policy

Returns:

the updated QueueServiceSasSignatureValues object

setPermissions

public QueueServiceSasSignatureValues setPermissions(QueueSasPermission permissions)

Sets the permissions string allowed by the SAS. Please refer to QueueSasPermission for help constructing the permissions string.

Parameters:

permissions - Permissions for the SAS

Returns:

the updated QueueServiceSasSignatureValues object

setProtocol

public QueueServiceSasSignatureValues setProtocol(SasProtocol protocol)

Sets the SasProtocol which determines the protocols allowed by the SAS.

Parameters:

protocol - Protocol for the SAS

Returns:

the updated QueueServiceSasSignatureValues object

setQueueName

@Deprecated
public QueueServiceSasSignatureValues setQueueName(String queueName)

Deprecated

Please use the generateSas methods provided on the desired queue client that will auto-populate the queue name.

Sets the name of the queue this SAS may access.

Parameters:

queueName - Canonical name of the object the SAS grants access

Returns:

the updated QueueServiceSasSignatureValues object

setSasIpRange

public QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange)

Sets the SasIpRange which determines the IP ranges that are allowed to use the SAS.

Parameters:

sasIpRange - Allowed IP range to set

Returns:

the updated QueueServiceSasSignatureValues object

setStartTime

public QueueServiceSasSignatureValues setStartTime(OffsetDateTime startTime)

Sets when the SAS will take effect.

Parameters:

startTime - When the SAS takes effect

Returns:

the updated QueueServiceSasSignatureValues object

setVersion

@Deprecated
public QueueServiceSasSignatureValues setVersion(String version)

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 QueueServiceSasSignatureValues object

Applies to