Package com.azure.cosmos.models
Class CosmosPermissionProperties
java.lang.Object
com.azure.cosmos.models.CosmosPermissionProperties
The type Cosmos permission properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the Cosmos container as the parent resource which is associated with this permission object.getETag()
Get the entity tag associated with the resource.getId()
Gets the name of the resource.Gets the permission mode.Gets the kind of resource that has a Cosmos container as the parent resource which is associated with this permission object.Gets the name of resource that has a Cosmos container as the parent resource which is associated with this permission object.Gets the resource partition key associated with this permission object.Get the last modified timestamp associated with the resource.getToken()
Gets the access token granting the defined permission.setContainerName
(String containerName) Sets the name of the Cosmos container as the parent resource which is associated with this permission object.Sets the name of the permission resource.setPermissionMode
(PermissionMode permissionMode) Sets the permission mode.setResourcePartitionKey
(PartitionKey partitionKey) Sets the resource partition key associated with this permission object.setResourcePath
(ContainerChildResourceType resourceKind, String resourceName) Sets the resource path represented by the name and kind of a resource that has a Cosmos container as the parent resource which is associated with this permission object.
-
Constructor Details
-
CosmosPermissionProperties
public CosmosPermissionProperties()Initialize a permission object.
-
-
Method Details
-
setId
Sets the name of the permission resource.- Parameters:
id
- the name of the resource.- Returns:
- the current
CosmosPermissionProperties
object
-
setContainerName
Sets the name of the Cosmos container as the parent resource which is associated with this permission object.- Parameters:
containerName
- the name of the Cosmos container representing the parent resource.- Returns:
- the current
CosmosPermissionProperties
object.
-
getContainerName
Gets the name of the Cosmos container as the parent resource which is associated with this permission object.- Returns:
- the name of the Cosmos container representing the parent resource.
-
getResourceKind
Gets the kind of resource that has a Cosmos container as the parent resource which is associated with this permission object.- Returns:
- the kind of resource that has a Cosmos container as parent resource.
-
getResourceName
Gets the name of resource that has a Cosmos container as the parent resource which is associated with this permission object.- Returns:
- the name of resource that has a Cosmos container as the parent resource.
-
setResourcePath
public CosmosPermissionProperties setResourcePath(ContainerChildResourceType resourceKind, String resourceName) Sets the resource path represented by the name and kind of a resource that has a Cosmos container as the parent resource which is associated with this permission object.- Parameters:
resourceKind
- the kind of resource that has a Cosmos container as parent resource.resourceName
- the name of resource that has a Cosmos container as the parent resource.- Returns:
- the current
CosmosPermissionProperties
object.
-
getPermissionMode
Gets the permission mode.- Returns:
- the permission mode.
-
setPermissionMode
Sets the permission mode.- Parameters:
permissionMode
- the permission mode.- Returns:
- the current
CosmosPermissionProperties
object
-
getResourcePartitionKey
Gets the resource partition key associated with this permission object.- Returns:
- the partition key.
-
setResourcePartitionKey
Sets the resource partition key associated with this permission object.- Parameters:
partitionKey
- the partition key.- Returns:
- the current
CosmosPermissionProperties
object.
-
getId
Gets the name of the resource.- Returns:
- the name of the resource.
-
getTimestamp
Get the last modified timestamp associated with the resource. This is only relevant when getting response from the server.- Returns:
- the timestamp or null if the permission object was not yet registered with the Cosmos service (when executing a create, upsert or replace operation) or if it was changed through one of the setter methods.
-
getETag
Get the entity tag associated with the resource. This is only relevant when getting response from the server.- Returns:
- the Cosmos ETAG property or null if the permission object was not yet registered with the Cosmos service (when executing a create, upsert or replace operation) or if it was changed through one of the setter methods.
-
getToken
Gets the access token granting the defined permission.- Returns:
- the access token or null if the permission object was not yet registered with the Cosmos service (when executing a create, upsert or replace operation) or if it was changed through one of the setter methods.
-