TableAccountSasPermission Class
- java.
lang. Object - com.
azure. data. tables. sas. TableAccountSasPermission
- com.
public final class TableAccountSasPermission
This is a helper class to construct a string representing the permissions granted by an Account SAS. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString()
and set as the permissions field on an TableAccountSasSignatureValues object.
It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.
Constructor Summary
Constructor | Description |
---|---|
TableAccountSasPermission() |
Returns an instance of TableAccountSasPermission that has all fields set to false. |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
TableAccountSasPermission
public TableAccountSasPermission()
Returns an instance of TableAccountSasPermission that has all fields set to false.
Method Details
hasAddPermission
public boolean hasAddPermission()
Gets the add permission status. Valid for the following Object resource types only: queue messages, table entities, and append blobs.
Returns:
hasCreatePermission
public boolean hasCreatePermission()
Gets the create permission status. Valid for the following Object resource types only: blobs and files. Users can create new blobs or files, but may not overwrite existing blobs or files.
Returns:
hasDeletePermission
public boolean hasDeletePermission()
Gets the delete permission status. Valid for Container and Object resource types, except for queue messages.
Returns:
hasDeleteVersionPermission
public boolean hasDeleteVersionPermission()
Gets the delete version permission status. Used to delete a blob version
Returns:
hasFilterTagsPermission
public boolean hasFilterTagsPermission()
Returns the filter tags permission status. Used to filter blobs by their tags.
Returns:
hasListPermission
public boolean hasListPermission()
Gets the list permission status. Valid for Service and Container resource types only.
Returns:
hasProcessMessages
public boolean hasProcessMessages()
Gets the process messages permission. Valid for the following Object resource type only: queue messages.
Returns:
hasReadPermission
public boolean hasReadPermission()
Gets the read permission status. Valid for all signed resources types (Service, Container, and Object). Permits read permissions to the specified resource type.
Returns:
hasTagsPermission
public boolean hasTagsPermission()
Returns the tags permission status. Used to read or write the tags on a blob.
Returns:
hasUpdatePermission
public boolean hasUpdatePermission()
Gets the update permission status. Valid for the following Object resource types only: queue messages and table entities.
Returns:
hasWritePermission
public boolean hasWritePermission()
Gets the write permission status. Valid for all signed resources types (Service, Container, and Object). Permits write permissions to the specified resource type.
Returns:
parse
public static TableAccountSasPermission parse(String permissionsString)
Creates an TableAccountSasPermission from the specified permissions string. This method will throw an IllegalArgumentException if it encounters a character that does not correspond to a valid permission.
Parameters:
Returns:
String
.setAddPermission
public TableAccountSasPermission setAddPermission(boolean hasAddPermission)
Sets the add permission status. Valid for the following Object resource types only: queue messages, table entities, and append blobs.
Parameters:
Returns:
setCreatePermission
public TableAccountSasPermission setCreatePermission(boolean hasCreatePermission)
Sets the create permission status. Valid for the following Object resource types only: blobs and files. Users can create new blobs or files, but may not overwrite existing blobs or files.
Parameters:
Returns:
setDeletePermission
public TableAccountSasPermission setDeletePermission(boolean hasDeletePermission)
Sets the delete permission status. Valid for Container and Object resource types, except for queue messages.
Parameters:
Returns:
setDeleteVersionPermission
public TableAccountSasPermission setDeleteVersionPermission(boolean hasDeleteVersionPermission)
Sets the delete version permission status. Used to delete a blob version
Parameters:
Returns:
setFilterTagsPermission
public TableAccountSasPermission setFilterTagsPermission(boolean filterTagsPermission)
Sets the filter tags permission status. Used to filter blobs by their tags.
Parameters:
Returns:
setListPermission
public TableAccountSasPermission setListPermission(boolean hasListPermission)
Sets the list permission status. Valid for Service and Container resource types only.
Parameters:
Returns:
setProcessMessages
public TableAccountSasPermission setProcessMessages(boolean hasProcessMessagesPermission)
Sets the process messages permission. Valid for the following Object resource type only: queue messages.
Parameters:
Returns:
setReadPermission
public TableAccountSasPermission setReadPermission(boolean hasReadPermission)
Sets the read permission status. Valid for all signed resources types (Service, Container, and Object). Permits read permissions to the specified resource type.
Parameters:
Returns:
setTagsPermission
public TableAccountSasPermission setTagsPermission(boolean tagsPermission)
Sets the tags permission status.
Parameters:
Returns:
setUpdatePermission
public TableAccountSasPermission setUpdatePermission(boolean hasUpdatePermission)
Sets the update permission status. Valid for the following Object resource types only: queue messages and table entities.
Parameters:
Returns:
setWritePermission
public TableAccountSasPermission setWritePermission(boolean hasWritePermission)
Sets the write permission status. Valid for all signed resources types (Service, Container, and Object). Permits write permissions to the specified resource type.
Parameters:
Returns:
toString
public String toString()
Converts the given permissions to a String
. Using this method will guarantee the permissions are in an order accepted by the service. If all permissions are set to false, an empty string is returned from this method.
Overrides:
TableAccountSasPermission.toString()Returns:
String
which represents the TableAccountSasPermission.Applies to
Azure SDK for Java