DocumentClient.ReplaceUserAsync
Method
Definition
Overloads
| ReplaceUserAsync(User, RequestOptions) |
Replaces a User in the Azure DocumentDB database service as an asynchronous operation. |
| ReplaceUserAsync(Uri, User, RequestOptions) |
Replaces a user as an asynchronous operation in the Azure DocumentDB database service. |
ReplaceUserAsync(User, RequestOptions)
Replaces a User in the Azure DocumentDB database service as an asynchronous operation.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.User>> ReplaceUserAsync (Microsoft.Azure.Documents.User user, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- options
- RequestOptions
(Optional) The request options for the request.
A System.Threading.Tasks containing a ResourceResponse<TResource> which wraps a User containing the updated resource record.
If user is not set.
This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:
| StatusCode | Reason for exception |
|---|---|
| 404 | NotFound - This means the resource you tried to delete did not exist. |
ReplaceUserAsync(Uri, User, RequestOptions)
Replaces a user as an asynchronous operation in the Azure DocumentDB database service.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.User>> ReplaceUserAsync (Uri userUri, Microsoft.Azure.Documents.User user, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- userUri
- Uri
the URI for the user to be updated.
- user
- User
the updated user.
- options
- RequestOptions
The request options for the request.
The task object representing the service response for the asynchronous operation.