Table of Contents

Class Permission

Namespace
Microsoft.Azure.Documents
Assembly
Microsoft.Azure.Documents.Client.dll

Represents a per-User permission to access a specific resource in the Azure Cosmos DB service, for example Document or Collection.

public class Permission : Resource
Inheritance
Permission
Inherited Members
Extension Methods

Constructors

Permission()

public Permission()

Properties

PermissionMode

Gets or sets the permission mode in the Azure Cosmos DB service.

public PermissionMode PermissionMode { get; set; }

Property Value

PermissionMode

The PermissionMode mode: Read or All.

Gets or sets the self-link of resource to which the permission applies in the Azure Cosmos DB service.

public string ResourceLink { get; set; }

Property Value

string

The self-link of the resource to which the permission applies.

ResourcePartitionKey

Gets or sets optional partition key value for the permission in the Azure Cosmos DB service. A permission applies to resources when two conditions are met: 1. ResourceLink is prefix of resource's link. For example "/dbs/mydatabase/colls/mycollection" applies to "/dbs/mydatabase/colls/mycollection" and "/dbs/mydatabase/colls/mycollection/docs/mydocument" 2. ResourcePartitionKey is superset of resource's partition key. For example absent/empty partition key is superset of all partition keys.

public PartitionKey ResourcePartitionKey { get; set; }

Property Value

PartitionKey

Token

Gets the access token granting the defined permission from the Azure Cosmos DB service.

public string Token { get; }

Property Value

string

The access token granting the defined permission.