Class CosmosPermissionProperties

java.lang.Object
com.azure.cosmos.models.CosmosPermissionProperties

public final class CosmosPermissionProperties extends Object
The type Cosmos permission properties.
  • 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

      public CosmosPermissionProperties setContainerName(String containerName)
      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

      public String 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

      public ContainerChildResourceType 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

      public String 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

      public PermissionMode getPermissionMode()
      Gets the permission mode.
      Returns:
      the permission mode.
    • setPermissionMode

      public CosmosPermissionProperties setPermissionMode(PermissionMode permissionMode)
      Sets the permission mode.
      Parameters:
      permissionMode - the permission mode.
      Returns:
      the current CosmosPermissionProperties object
    • getResourcePartitionKey

      public PartitionKey getResourcePartitionKey()
      Gets the resource partition key associated with this permission object.
      Returns:
      the partition key.
    • setResourcePartitionKey

      public CosmosPermissionProperties setResourcePartitionKey(PartitionKey partitionKey)
      Sets the resource partition key associated with this permission object.
      Parameters:
      partitionKey - the partition key.
      Returns:
      the current CosmosPermissionProperties object.
    • getId

      public String getId()
      Gets the name of the resource.
      Returns:
      the name of the resource.
    • getTimestamp

      public Instant 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

      public String 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

      public String 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.