Class CosmosAsyncUser

java.lang.Object
com.azure.cosmos.CosmosAsyncUser

public class CosmosAsyncUser extends Object
The type Cosmos async user.
  • Method Details

    • getId

      public String getId()
      Get the id of the CosmosAsyncUser
      Returns:
      the id of the CosmosAsyncUser
    • read

      public Mono<CosmosUserResponse> read()
      Reads a cosmos user
      Returns:
      a Mono containing the single resource response with the read user or an error.
    • replace

      public Mono<CosmosUserResponse> replace(CosmosUserProperties userProperties)
      Replace a cosmos user
      Parameters:
      userProperties - the user properties to use
      Returns:
      a Mono containing the single resource response with the replaced user or an error.
    • delete

      public Mono<CosmosUserResponse> delete()
      Delete a cosmos user
      Returns:
      a Mono containing the single resource response with the deleted user or an error.
    • createPermission

      public Mono<CosmosPermissionResponse> createPermission(CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options)
      Creates a permission.

      After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the created permission. In case of failure the Mono will error.

      Parameters:
      permissionProperties - the permission properties to create.
      options - the request options.
      Returns:
      an Mono containing the single resource response with the created permission or an error.
    • upsertPermission

      public Mono<CosmosPermissionResponse> upsertPermission(CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options)
      Upserts a permission.

      After subscription the operation will be performed. The Mono upon successful completion will contain a single resource response with the upserted permission. In case of failure the Mono will error.

      Parameters:
      permissionProperties - the permission properties to upsert.
      options - the request options.
      Returns:
      an Mono containing the single resource response with the upserted permission or an error.
    • readAllPermissions

      public CosmosPagedFlux<CosmosPermissionProperties> readAllPermissions()
      Reads all permissions.

      After subscription the operation will be performed. The CosmosPagedFlux will contain one or several feed response pages of the read permissions. In case of failure the CosmosPagedFlux will error.

      Returns:
      a CosmosPagedFlux containing one or several feed response pages of the read permissions or an error.
    • queryPermissions

      public CosmosPagedFlux<CosmosPermissionProperties> queryPermissions(String query)
      Query for permissions.

      After subscription the operation will be performed. The CosmosPagedFlux will contain one or several feed response pages of the obtained permissions. In case of failure the CosmosPagedFlux will error.

      Parameters:
      query - the query.
      Returns:
      a CosmosPagedFlux containing one or several feed response pages of the obtained permissions or an error.
    • queryPermissions

      public CosmosPagedFlux<CosmosPermissionProperties> queryPermissions(String query, CosmosQueryRequestOptions options)
      Query for permissions.

      After subscription the operation will be performed. The CosmosPagedFlux will contain one or several feed response pages of the obtained permissions. In case of failure the CosmosPagedFlux will error.

      Parameters:
      query - the query.
      options - the query request options.
      Returns:
      a CosmosPagedFlux containing one or several feed response pages of the obtained permissions or an error.
    • getPermission

      public CosmosAsyncPermission getPermission(String id)
      Get cosmos permission without making a call to backend
      Parameters:
      id - the id
      Returns:
      the cosmos permission