Class CosmosAsyncUser
-
Method Summary
Modifier and TypeMethodDescriptioncreatePermission
(CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options) Creates a permission.delete()
Delete a cosmos usergetId()
Get the id of theCosmosAsyncUser
getPermission
(String id) Get cosmos permission without making a call to backendqueryPermissions
(String query) Query for permissions.queryPermissions
(String query, CosmosQueryRequestOptions options) Query for permissions.read()
Reads a cosmos userReads all permissions.replace
(CosmosUserProperties userProperties) Replace a cosmos userupsertPermission
(CosmosPermissionProperties permissionProperties, CosmosPermissionRequestOptions options) Upserts a permission.
-
Method Details
-
getId
Get the id of theCosmosAsyncUser
- Returns:
- the id of the
CosmosAsyncUser
-
read
Reads a cosmos user- Returns:
- a
Mono
containing the single resource response with the read user or an error.
-
replace
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
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 theMono
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 theMono
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
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 theCosmosPagedFlux
will error.- Returns:
- a
CosmosPagedFlux
containing one or several feed response pages of the read permissions or an error.
-
queryPermissions
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 theCosmosPagedFlux
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 theCosmosPagedFlux
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
Get cosmos permission without making a call to backend- Parameters:
id
- the id- Returns:
- the cosmos permission
-