Permission Class
- java.
lang. Object - JsonSerializable
- Resource
- com.
microsoft. azure. cosmosdb. Permission
- com.
public class Permission extends Resource
Represents a per-User Permission to access a specific resource e.g. Document or Collection in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
Permission() |
Initialize a permission object. |
Permission(String jsonString) |
Initialize a permission object from json string. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Permission |
getPermissionMode()
Gets the permission mode. |
String |
getResourceLink()
Gets the self-link of resource to which the permission applies. |
Partition |
getResourcePartitionKey()
Gets the resource partition key associated with this permission object. |
String |
getToken()
Gets the access token granting the defined permission. |
void |
setPermissionMode(PermissionMode permissionMode)
Sets the permission mode. |
void |
setResourceLink(String resourceLink)
Sets the self-link of resource to which the permission applies. |
void |
setResourcePartitionKey(PartitionKey partitionkey)
Sets the resource partition key associated with this permission object. |
Inherited Members
Constructor Details
Permission
public Permission()
Initialize a permission object.
Permission
public Permission(String jsonString)
Initialize a permission object from json string.
Parameters:
Method Details
getPermissionMode
public PermissionMode getPermissionMode()
Gets the permission mode.
Returns:
getResourceLink
public String getResourceLink()
Gets the self-link of resource to which the permission applies.
Returns:
getResourcePartitionKey
public PartitionKey getResourcePartitionKey()
Gets the resource partition key associated with this permission object.
Returns:
getToken
public String getToken()
Gets the access token granting the defined permission.
Returns:
setPermissionMode
public void setPermissionMode(PermissionMode permissionMode)
Sets the permission mode.
Parameters:
setResourceLink
public void setResourceLink(String resourceLink)
Sets the self-link of resource to which the permission applies.
Parameters:
setResourcePartitionKey
public void setResourcePartitionKey(PartitionKey partitionkey)
Sets the resource partition key associated with this permission object.
Parameters:
Applies to
Azure SDK for Java