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.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTableSasSignatureValues(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.Returns the time after which the SAS will no longer work.Returns the name of the access policy on the table this SAS references if any.Returns the permissions string allowed by the SAS.Returns theTableSasProtocolwhich determines the protocols allowed by the SAS.Returns theTableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.Get the minimum partition key accessible with this shared access signature.Get the minimum row key accessible with this shared access signature.Returns when the SAS will take effect.Returns the version of the service this SAS will target.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 theTableSasProtocolwhich determines the protocols allowed by the SAS.setSasIpRange(TableSasIpRange sasIpRange) Sets theTableSasIpRangewhich 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 permissionsallowed 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.- 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
TableSasSignatureValuesobject.
-
getProtocol
Returns theTableSasProtocolwhich determines the protocols allowed by the SAS.- Returns:
- The
TableSasProtocolwhich determines the protocols allowed by the SAS.
-
setProtocol
Sets theTableSasProtocolwhich determines the protocols allowed by the SAS.- Parameters:
protocol- Protocol for the SAS- Returns:
- The updated
TableSasSignatureValuesobject.
-
getStartTime
Returns when the SAS will take effect.- 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
TableSasSignatureValuesobject.
-
getExpiryTime
Returns the time after which the SAS will no longer work.- 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
TableSasSignatureValuesobject.
-
getPermissions
Returns the permissions string allowed by the SAS. Please refer toTableSasPermissionfor help determining the permissions allowed.- Returns:
- The permissions string allowed by the SAS. Please refer to
TableSasPermissionfor help determining the permissions allowed.
-
setPermissions
Sets the permissions string allowed by the SAS. Please refer toTableSasPermissionfor help constructing the permissions string.- Parameters:
permissions- Permissions for the SAS- Returns:
- The updated
TableSasSignatureValuesobject. - Throws:
NullPointerException- ifpermissionsis null.
-
getSasIpRange
Returns theTableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.- Returns:
- The
TableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.
-
setSasIpRange
Sets theTableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.- Parameters:
sasIpRange- Allowed IP range to set- Returns:
- The updated
TableSasSignatureValuesobject. - See Also:
-
getIdentifier
Returns the name of the access policy on the table this SAS references if any. Please see here for more information.- Returns:
- The name of the access policy on the table this SAS references if any.
-
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
TableSasSignatureValuesobject.
-
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
TableSasSignatureValuesobject.
-
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
TableSasSignatureValuesobject.
-
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
TableSasSignatureValuesobject.
-
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
TableSasSignatureValuesobject.
-