RequestOptions.ResourceTokenExpirySeconds Property

 

Updated: January 27, 2017

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

Namespace:   Microsoft.Azure.Documents.Client
Assembly:  Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)

public Nullable<int> ResourceTokenExpirySeconds { get; set; }

Property Value

Type: System.Nullable<Int32>

The expiry time in seconds for the resource token.

When working with Azure DocumentDB 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).

Return to top
Show: