QueueServiceSasSignatureValues Class
- java.
lang. Object - com.
azure. storage. queue. sas. QueueServiceSasSignatureValues
- com.
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
Please use QueueServiceSasSignatureValues(String identifier), or QueueServiceSasSignatureValues(OffsetDateTime expiryTime, QueueSasPermission permissions)
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 |
---|---|
Queue |
generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)
Deprecated
Please use the generate
Uses an account's shared key credential to sign these signature values to produce the proper SAS query parameters. |
Offset |
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. |
Sas |
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. |
Sas |
getSasIpRange()
Gets the SasIpRange which determines the IP ranges that are allowed to use the SAS. |
Offset |
getStartTime()
Gets when the SAS will take effect. |
String |
getVersion()
Gets the version of the service this SAS will target. |
Queue |
setExpiryTime(OffsetDateTime expiryTime)
Sets the time after which the SAS will no longer work. |
Queue |
setIdentifier(String identifier)
Sets the name of the access policy on the queue this SAS references if any. |
Queue |
setPermissions(QueueSasPermission permissions)
Sets the permissions string allowed by the SAS. |
Queue |
setProtocol(SasProtocol protocol)
Sets the SasProtocol which determines the protocols allowed by the SAS. |
Queue |
setQueueName(String queueName)
Deprecated
Please use the generate
Sets the name of the queue this SAS may access. |
Queue |
setSasIpRange(SasIpRange sasIpRange)
Sets the SasIpRange which determines the IP ranges that are allowed to use the SAS. |
Queue |
setStartTime(OffsetDateTime startTime)
Sets when the SAS will take effect. |
Queue |
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:
QueueServiceSasSignatureValues
public QueueServiceSasSignatureValues(OffsetDateTime expiryTime, QueueSasPermission permissions)
Creates an object with the specified expiry time and permissions
Parameters:
Method Details
generateSasQueryParameters
@Deprecated
public QueueServiceSasQueryParameters generateSasQueryParameters(StorageSharedKeyCredential storageSharedKeyCredentials)
Deprecated
Uses an account's shared key credential to sign these signature values to produce the proper SAS query parameters.
Notes on SAS generation
- If setIdentifier(String identifier) is set, setExpiryTime(OffsetDateTime expiryTime) and permissions should not be set. These values are inherited from the stored access policy.
- Otherwise, setExpiryTime(OffsetDateTime expiryTime) and getPermissions() must be set.
For samples, see class level JavaDocs.
Parameters:
Returns:
getExpiryTime
public OffsetDateTime getExpiryTime()
Gets the time after which the SAS will no longer work.
Returns:
getId
@Deprecated
public String getId()
Deprecated
Gets the name of the access policy on the queue this SAS references if any.
Returns:
getIdentifier
public String getIdentifier()
Sets the name of the access policy on the queue this SAS references if any.
Returns:
getPermissions
public String getPermissions()
Gets the permissions string allowed by the SAS. Please refer to QueueSasPermission for help determining the permissions allowed.
Returns:
getProtocol
public SasProtocol getProtocol()
Gets the SasProtocol which determines the protocols allowed by the SAS.
Returns:
getQueueName
@Deprecated
public String getQueueName()
Deprecated
Gets the name of the queue this SAS may access.
Returns:
getSasIpRange
public SasIpRange getSasIpRange()
Gets the SasIpRange which determines the IP ranges that are allowed to use the SAS.
Returns:
getStartTime
public OffsetDateTime getStartTime()
Gets when the SAS will take effect.
Returns:
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:
setExpiryTime
public QueueServiceSasSignatureValues setExpiryTime(OffsetDateTime expiryTime)
Sets the time after which the SAS will no longer work.
Parameters:
Returns:
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:
Returns:
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:
Returns:
setProtocol
public QueueServiceSasSignatureValues setProtocol(SasProtocol protocol)
Sets the SasProtocol which determines the protocols allowed by the SAS.
Parameters:
Returns:
setQueueName
@Deprecated
public QueueServiceSasSignatureValues setQueueName(String queueName)
Deprecated
Sets the name of the queue this SAS may access.
Parameters:
Returns:
setSasIpRange
public QueueServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange)
Sets the SasIpRange which determines the IP ranges that are allowed to use the SAS.
Parameters:
Returns:
setStartTime
public QueueServiceSasSignatureValues setStartTime(OffsetDateTime startTime)
Sets when the SAS will take effect.
Parameters:
Returns:
setVersion
@Deprecated
public QueueServiceSasSignatureValues setVersion(String version)
Deprecated
Sets the version of the service this SAS will target. If not specified, it will default to the version targeted by the library.
Parameters:
Returns:
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour