Package com.azure.data.tables.sas
Class TableSasSignatureValues
- java.lang.Object
-
- com.azure.data.tables.sas.TableSasSignatureValues
-
public final class TableSasSignatureValues extends Object
Used to initialize parameters for a Shared Access Signature (SAS) for the Azure Table Storage service. Once all the values here are set, use thegenerateSas()method on the desired Table client to obtain a representation of the SAS which can then be applied to a new client using thesasToken(String)method on the desired client builder.- See Also:
- Storage SAS overview, Constructing a Service SAS
-
-
Constructor Summary
Constructors Constructor Description TableSasSignatureValues(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEndPartitionKey()Get the maximum partition key accessible with this shared access signature.StringgetEndRowKey()Get the maximum row key accessible with this shared access signature.OffsetDateTimegetExpiryTime()StringgetIdentifier()StringgetPermissions()TableSasProtocolgetProtocol()TableSasIpRangegetSasIpRange()StringgetStartPartitionKey()Get the minimum partition key accessible with this shared access signature.StringgetStartRowKey()Get the minimum row key accessible with this shared access signature.OffsetDateTimegetStartTime()StringgetVersion()TableSasSignatureValuessetEndPartitionKey(String endPartitionKey)Set the maximum partition key accessible with this shared access signature.TableSasSignatureValuessetEndRowKey(String endRowKey)Set the maximum row key accessible with this shared access signature.TableSasSignatureValuessetExpiryTime(OffsetDateTime expiryTime)Sets the time after which the SAS will no longer work.TableSasSignatureValuessetIdentifier(String identifier)Sets the name of the access policy on the table this SAS references if any.TableSasSignatureValuessetPermissions(TableSasPermission permissions)Sets the permissions string allowed by the SAS.TableSasSignatureValuessetProtocol(TableSasProtocol protocol)Sets theTableSasProtocolwhich determines the protocols allowed by the SAS.TableSasSignatureValuessetSasIpRange(TableSasIpRange sasIpRange)Sets theTableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.TableSasSignatureValuessetStartPartitionKey(String startPartitionKey)Set the minimum partition key accessible with this shared access signature.TableSasSignatureValuessetStartRowKey(String startRowKey)Set the minimum row key accessible with this shared access signature.TableSasSignatureValuessetStartTime(OffsetDateTime startTime)Sets when the SAS will take effect.TableSasSignatureValuessetVersion(String version)Sets the version of the service this SAS will target.
-
-
-
Constructor Detail
-
TableSasSignatureValues
public TableSasSignatureValues(OffsetDateTime expiryTime, TableSasPermission permissions)
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
public TableSasSignatureValues(String identifier)
Creates an object with the specified identifier.- Parameters:
identifier- Name of the access policy.
-
-
Method Detail
-
getVersion
public String 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
public TableSasSignatureValues setVersion(String version)
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
public TableSasProtocol getProtocol()
- Returns:
- The
TableSasProtocolwhich determines the protocols allowed by the SAS.
-
setProtocol
public TableSasSignatureValues setProtocol(TableSasProtocol protocol)
Sets theTableSasProtocolwhich determines the protocols allowed by the SAS.- Parameters:
protocol- Protocol for the SAS- Returns:
- The updated
TableSasSignatureValuesobject.
-
getStartTime
public OffsetDateTime getStartTime()
- Returns:
- When the SAS will take effect.
-
setStartTime
public TableSasSignatureValues setStartTime(OffsetDateTime startTime)
Sets when the SAS will take effect.- Parameters:
startTime- When the SAS takes effect- Returns:
- The updated
TableSasSignatureValuesobject.
-
getExpiryTime
public OffsetDateTime getExpiryTime()
- Returns:
- The time after which the SAS will no longer work.
-
setExpiryTime
public TableSasSignatureValues 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
TableSasSignatureValuesobject.
-
getPermissions
public String getPermissions()
- Returns:
- The permissions string allowed by the SAS. Please refer to
TableSasPermissionfor help determining the permissions allowed.
-
setPermissions
public TableSasSignatureValues setPermissions(TableSasPermission permissions)
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
public TableSasIpRange getSasIpRange()
- Returns:
- The
TableSasIpRangewhich determines the IP ranges that are allowed to use the SAS.
-
setSasIpRange
public TableSasSignatureValues setSasIpRange(TableSasIpRange sasIpRange)
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:
- Specifying IP Address or IP range
-
getIdentifier
public String getIdentifier()
- Returns:
- The name of the access policy on the table this SAS references if any. Please see here for more information.
-
setIdentifier
public TableSasSignatureValues setIdentifier(String identifier)
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
public String 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
public TableSasSignatureValues setStartPartitionKey(String startPartitionKey)
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
public String 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
public TableSasSignatureValues setStartRowKey(String startRowKey)
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
public String 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
public TableSasSignatureValues setEndPartitionKey(String endPartitionKey)
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
public String 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
public TableSasSignatureValues setEndRowKey(String endRowKey)
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.
-
-