UriFactory.CreateAttachmentUri(String, String, String, String) Method

Definition

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

public static Uri CreateAttachmentUri (string databaseId, string collectionId, string documentId, string attachmentId);
static member CreateAttachmentUri : string * string * string * string -> Uri
Public Shared Function CreateAttachmentUri (databaseId As String, collectionId As String, documentId As String, attachmentId As String) As Uri

Parameters

databaseId
String

The database id

collectionId
String

The collection id

documentId
String

The document id

attachmentId
String

The attachment id

Returns

Uri

An attachment link in the format of /dbs/{0}/colls/{1}/docs/{2}/attachments/{3} with {0} being a Uri escaped version of the databaseId, {1} being collectionId, {2} being the documentId and {3} being attachmentId

Remarks

Would be used when replacing, or deleting an Attachment in Azure Cosmos DB.

Applies to

See also