Share via


RequestOptions.ResourceTokenExpirySeconds Property

Definition

Gets or sets the expiry time for resource token. Used when creating/updating/reading permissions in the Azure Cosmos DB service.

public int? ResourceTokenExpirySeconds { get; set; }
member this.ResourceTokenExpirySeconds : Nullable<int> with get, set
Public Property ResourceTokenExpirySeconds As Nullable(Of Integer)

Property Value

The expiry time in seconds for the resource token.

Remarks

When working with Azure Cosmos DB Users and Permissions, the way to instantiate an instance of DocumentClient is to get the Token for the resource the User wants to access and pass this to the authKeyOrResourceToken parameter of DocumentClient constructor

When requesting this Token, a RequestOption for ResourceTokenExpirySeconds can be used to set the length of time to elapse before the token expires. This value can range from 10 seconds, to 5 hours (or 18,000 seconds) The default value for this, should none be supplied is 1 hour (or 3,600 seconds).

Applies to

See also