Package com.azure.data.tables.sas
Class TableSasSignatureValues
java.lang.Object
com.azure.data.tables.sas.TableSasSignatureValues
Used to initialize parameters for a Shared Access Signature (SAS) for the Azure Table Storage service. Once all the
values here are set, use the
generateSas()
method on the desired Table 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
ConstructorDescriptionTableSasSignatureValues
(String identifier) Creates an object with the specified identifier.TableSasSignatureValues
(OffsetDateTime expiryTime, TableSasPermission permissions) Creates an object with the specified expiry time and permissions. -
Method Summary
Modifier and TypeMethodDescriptionGet the maximum partition key accessible with this shared access signature.Get the maximum row key accessible with this shared access signature.Get the minimum partition key accessible with this shared access signature.Get the minimum row key accessible with this shared access signature.setEndPartitionKey
(String endPartitionKey) Set the maximum partition key accessible with this shared access signature.setEndRowKey
(String endRowKey) Set the maximum row key accessible with this shared access signature.setExpiryTime
(OffsetDateTime expiryTime) Sets the time after which the SAS will no longer work.setIdentifier
(String identifier) Sets the name of the access policy on the table this SAS references if any.setPermissions
(TableSasPermission permissions) Sets the permissions string allowed by the SAS.setProtocol
(TableSasProtocol protocol) Sets theTableSasProtocol
which determines the protocols allowed by the SAS.setSasIpRange
(TableSasIpRange sasIpRange) Sets theTableSasIpRange
which determines the IP ranges that are allowed to use the SAS.setStartPartitionKey
(String startPartitionKey) Set the minimum partition key accessible with this shared access signature.setStartRowKey
(String startRowKey) Set the minimum row key accessible with this shared access signature.setStartTime
(OffsetDateTime startTime) Sets when the SAS will take effect.setVersion
(String version) Sets the version of the service this SAS will target.
-
Constructor Details
-
TableSasSignatureValues
Creates an object with the specified expiry time and permissions.- Parameters:
expiryTime
- The time after which the SAS will no longer work.permissions
-table permissions
allowed by the SAS.
-
TableSasSignatureValues
Creates an object with the specified identifier.- Parameters:
identifier
- Name of the access policy.
-
-
Method Details
-
getVersion
- Returns:
- The version of the service this SAS will target. If not specified, it will default to the version targeted by the library.
-
setVersion
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
TableSasSignatureValues
object.
-
getProtocol
- Returns:
- The
TableSasProtocol
which determines the protocols allowed by the SAS.
-
setProtocol
Sets theTableSasProtocol
which determines the protocols allowed by the SAS.- Parameters:
protocol
- Protocol for the SAS- Returns:
- The updated
TableSasSignatureValues
object.
-
getStartTime
- Returns:
- When the SAS will take effect.
-
setStartTime
Sets when the SAS will take effect.- Parameters:
startTime
- When the SAS takes effect- Returns:
- The updated
TableSasSignatureValues
object.
-
getExpiryTime
- Returns:
- The time after which the SAS will no longer work.
-
setExpiryTime
Sets the time after which the SAS will no longer work.- Parameters:
expiryTime
- When the SAS will no longer work- Returns:
- The updated
TableSasSignatureValues
object.
-
getPermissions
- Returns:
- The permissions string allowed by the SAS. Please refer to
TableSasPermission
for help determining the permissions allowed.
-
setPermissions
Sets the permissions string allowed by the SAS. Please refer toTableSasPermission
for help constructing the permissions string.- Parameters:
permissions
- Permissions for the SAS- Returns:
- The updated
TableSasSignatureValues
object. - Throws:
NullPointerException
- ifpermissions
is null.
-
getSasIpRange
- Returns:
- The
TableSasIpRange
which determines the IP ranges that are allowed to use the SAS.
-
setSasIpRange
Sets theTableSasIpRange
which determines the IP ranges that are allowed to use the SAS.- Parameters:
sasIpRange
- Allowed IP range to set- Returns:
- The updated
TableSasSignatureValues
object. - See Also:
-
getIdentifier
- Returns:
- The name of the access policy on the table this SAS references if any. Please see here for more information.
-
setIdentifier
Sets the name of the access policy on the table this SAS references if any. Please see here for more information.- Parameters:
identifier
- Name of the access policy- Returns:
- The updated
TableSasSignatureValues
object.
-
getStartPartitionKey
Get the minimum partition key accessible with this shared access signature. Key values are inclusive. If omitted, there is no lower bound on the table entities that can be accessed. If provided, it must accompany a start row key that can be set viasetStartRowKey()
.- Returns:
- The start partition key.
-
setStartPartitionKey
Set the minimum partition key accessible with this shared access signature. Key values are inclusive. If omitted, there is no lower bound on the table entities that can be accessed. If provided, it must accompany a start row key that can be set viasetStartRowKey()
.- Parameters:
startPartitionKey
- The start partition key to set.- Returns:
- The updated
TableSasSignatureValues
object.
-
getStartRowKey
Get the minimum row key accessible with this shared access signature. Key values are inclusive. If omitted, there is no lower bound on the table entities that can be accessed. If provided, it must accompany a start row key that can be set viasetStartPartitionKey()
.- Returns:
- The start row key.
-
setStartRowKey
Set the minimum row key accessible with this shared access signature. Key values are inclusive. If omitted, there is no lower bound on the table entities that can be accessed. If provided, it must accompany a start row key that can be set viasetStartPartitionKey()
.- Parameters:
startRowKey
- The start row key to set.- Returns:
- The updated
TableSasSignatureValues
object.
-
getEndPartitionKey
Get the maximum partition key accessible with this shared access signature. Key values are inclusive. If omitted, there is no upper bound on the table entities that can be accessed. If provided, it must accompany an ending row key that can be set viasetEndRowKey()
.- Returns:
- The end partition key.
-
setEndPartitionKey
Set the maximum partition key accessible with this shared access signature. Key values are inclusive. If omitted, there is no upper bound on the table entities that can be accessed. If provided, it must accompany an ending row key that can be set viasetEndRowKey()
.- Parameters:
endPartitionKey
- The end partition key to set.- Returns:
- The updated
TableSasSignatureValues
object.
-
getEndRowKey
Get the maximum row key accessible with this shared access signature. Key values are inclusive. If omitted, there is no upper bound on the table entities that can be accessed. If provided, it must accompany an ending row key that can be set viasetEndPartitionKey()
.- Returns:
- The end row key.
-
setEndRowKey
Set the maximum row key accessible with this shared access signature. Key values are inclusive. If omitted, there is no upper bound on the table entities that can be accessed. If provided, it must accompany an ending row key that can be set viasetEndPartitionKey()
.- Parameters:
endRowKey
- The end row key to set.- Returns:
- The updated
TableSasSignatureValues
object.
-