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 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 Details

    • 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 permissions allowed by the SAS.
    • TableSasSignatureValues

      public TableSasSignatureValues(String identifier)
      Creates an object with the specified identifier.
      Parameters:
      identifier - Name of the access policy.
  • Method Details

    • 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 TableSasSignatureValues object.
    • getProtocol

      public TableSasProtocol getProtocol()
      Returns:
      The TableSasProtocol which determines the protocols allowed by the SAS.
    • setProtocol

      public TableSasSignatureValues setProtocol(TableSasProtocol protocol)
      Sets the TableSasProtocol which determines the protocols allowed by the SAS.
      Parameters:
      protocol - Protocol for the SAS
      Returns:
      The updated TableSasSignatureValues object.
    • 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 TableSasSignatureValues object.
    • 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 TableSasSignatureValues object.
    • getPermissions

      public String getPermissions()
      Returns:
      The permissions string allowed by the SAS. Please refer to TableSasPermission for help determining the permissions allowed.
    • setPermissions

      public TableSasSignatureValues setPermissions(TableSasPermission permissions)
      Sets the permissions string allowed by the SAS. Please refer to TableSasPermission for help constructing the permissions string.
      Parameters:
      permissions - Permissions for the SAS
      Returns:
      The updated TableSasSignatureValues object.
      Throws:
      NullPointerException - if permissions is null.
    • getSasIpRange

      public TableSasIpRange getSasIpRange()
      Returns:
      The TableSasIpRange which determines the IP ranges that are allowed to use the SAS.
    • setSasIpRange

      public TableSasSignatureValues setSasIpRange(TableSasIpRange sasIpRange)
      Sets the TableSasIpRange 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

      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 TableSasSignatureValues object.
    • 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 via setStartRowKey().
      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 via setStartRowKey().
      Parameters:
      startPartitionKey - The start partition key to set.
      Returns:
      The updated TableSasSignatureValues object.
    • 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 via setStartPartitionKey().
      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 via setStartPartitionKey().
      Parameters:
      startRowKey - The start row key to set.
      Returns:
      The updated TableSasSignatureValues object.
    • 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 via setEndRowKey().
      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 via setEndRowKey().
      Parameters:
      endPartitionKey - The end partition key to set.
      Returns:
      The updated TableSasSignatureValues object.
    • 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 via setEndPartitionKey().
      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 via setEndPartitionKey().
      Parameters:
      endRowKey - The end row key to set.
      Returns:
      The updated TableSasSignatureValues object.