IDocumentClient.CreatePermissionAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreatePermissionAsync(String, Permission, RequestOptions) |
Creates a permission on a user object as an asychronous operation in the Azure Cosmos DB service. |
CreatePermissionAsync(Uri, Permission, RequestOptions) |
Creates a permission as an asychronous operation in the Azure Cosmos DB service. |
CreatePermissionAsync(String, Permission, RequestOptions)
Creates a permission on a user object as an asychronous operation in the Azure Cosmos DB service.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Permission>> CreatePermissionAsync (string userLink, Microsoft.Azure.Documents.Permission permission, Microsoft.Azure.Documents.Client.RequestOptions options = null);
abstract member CreatePermissionAsync : string * Microsoft.Azure.Documents.Permission * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Permission>>
Parameters
- userLink
- System.String
The link of the user to create the permission for. E.g. dbs/db_rid/users/user_rid/
- permission
- Permission
The Permission object.
- options
- RequestOptions
(Optional) The RequestOptionsfor this request.
Returns
- System.Threading.Tasks.Task<ResourceResponse<Permission>>
A task object representing the service response for the asynchronous operation which contains the created Permission object.
Applies to
CreatePermissionAsync(Uri, Permission, RequestOptions)
Creates a permission as an asychronous operation in the Azure Cosmos DB service.
public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Permission>> CreatePermissionAsync (Uri userUri, Microsoft.Azure.Documents.Permission permission, Microsoft.Azure.Documents.Client.RequestOptions options = null);
abstract member CreatePermissionAsync : Uri * Microsoft.Azure.Documents.Permission * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Permission>>
Parameters
- userUri
- System.Uri
The URI of the user to create the permission for.
- permission
- Permission
The Permission object.
- options
- RequestOptions
(Optional) The RequestOptions for the request.
Returns
- System.Threading.Tasks.Task<ResourceResponse<Permission>>
The task object representing the service response for the asynchronous operation.