UriFactory Class

 

Updated: June 30, 2017

Helper class to assist in creating the various Uris needed for use with the DocumentClient instance in the Azure DocumentDB database service.

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

SystemObject
  Microsoft.Azure.Documents.ClientUriFactory

No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCreateAttachmentUri

Given a database, collection, document, and attachment id, this creates an attachment link.

System_CAPS_pubmethodSystem_CAPS_staticCreateCollectionUri

Obsolete. Given a database and collection id, this creates a collection link.

System_CAPS_pubmethodSystem_CAPS_staticCreateConflictUri

Given a database, collection and conflict id, this creates a conflict link.

System_CAPS_pubmethodSystem_CAPS_staticCreateDatabaseUri

Given a database id, this creates a database link.

System_CAPS_pubmethodSystem_CAPS_staticCreateDocumentCollectionUri

Given a database and collection id, this creates a collection link.

System_CAPS_pubmethodSystem_CAPS_staticCreateDocumentUri

Given a database, collection and document id, this creates a document link.

System_CAPS_pubmethodSystem_CAPS_staticCreatePartitionKeyRangesUri

Given a database and collection, this creates a partition key ranges link in the Azure DocumentDB database service.

System_CAPS_pubmethodSystem_CAPS_staticCreatePermissionUri

Given a database and user id, this creates a permission link.

System_CAPS_pubmethodSystem_CAPS_staticCreateStoredProcedureUri

Given a database, collection and stored proc id, this creates a stored proc link.

System_CAPS_pubmethodSystem_CAPS_staticCreateTriggerUri

Given a database, collection and trigger id, this creates a trigger link.

System_CAPS_pubmethodSystem_CAPS_staticCreateUserDefinedFunctionUri

Given a database, collection and udf id, this creates a udf link.

System_CAPS_pubmethodSystem_CAPS_staticCreateUserUri

Given a database and user id, this creates a user link.

The example below uses UriFactory to create a DocumentCollectionLink and then uses that to create a Document.


Uri collUri = UriFactory.CreateDocumentCollectionUri("MyDb", "MyCollection");
var doc = await client.CreateDocumentAsync(collUri, new {id = "MyDoc"});

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: