Class CosmosUser


  • public class CosmosUser
    extends Object
    • Method Detail

      • 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 userSettings)
        REPLACE a cosmos user
        Parameters:
        userSettings - 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 permissionSettings,
                                                               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:
        permissionSettings - 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 permissionSettings,
                                                               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:
        permissionSettings - 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 Flux<FeedResponse<CosmosPermissionProperties>> readAllPermissions​(FeedOptions options)
        Reads all permissions.

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

        Parameters:
        options - the feed options.
        Returns:
        an Flux containing one or several feed response pages of the read permissions or an error.
      • queryPermissions

        public Flux<FeedResponse<CosmosPermissionProperties>> queryPermissions​(String query)
        Query for permissions.

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

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

        public Flux<FeedResponse<CosmosPermissionProperties>> queryPermissions​(String query,
                                                                               FeedOptions options)
        Query for permissions.

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

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

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

        public CosmosDatabase getDatabase()
        Gets the parent Database
        Returns:
        the (@link CosmosDatabase)