xml/Microsoft.Azure.Documents/DocumentCollection.xml (468 lines of code) (raw):
<Type Name="DocumentCollection" FullName="Microsoft.Azure.Documents.DocumentCollection">
<TypeSignature Language="C#" Value="public class DocumentCollection : Microsoft.Azure.Documents.Resource" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DocumentCollection extends Microsoft.Azure.Documents.Resource" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.DocumentCollection" />
<TypeSignature Language="VB.NET" Value="Public Class DocumentCollection
Inherits Resource" />
<TypeSignature Language="F#" Value="type DocumentCollection = class
 inherit Resource" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Azure.Documents.Resource</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Represents a document collection in the Azure Cosmos DB service. A collection is a named logical container for documents.
</summary>
<remarks>
A database may contain zero or more named collections and each collection consists of zero or more JSON documents.
Being schema-free, the documents in a collection do not need to share the same structure or fields. Since collections are application resources,
they can be authorized using either the master key or resource keys.
Refer to <see>http://azure.microsoft.com/documentation/articles/documentdb-resources/#collections</see> for more details on collections.
</remarks>
<altmember cref="T:Microsoft.Azure.Documents.PartitionKeyDefinition" />
<altmember cref="T:Microsoft.Azure.Documents.Document" />
<altmember cref="T:Microsoft.Azure.Documents.Database" />
<altmember cref="T:Microsoft.Azure.Documents.Offer" />
<altmember cref="T:Microsoft.Azure.Documents.IndexingPolicy" />
<example>
The example below creates a new partitioned collection with 50000 Request-per-Unit throughput.
The partition key is the first level 'country' property in all the documents within this collection.
<code language="c#"><![CDATA[
DocumentCollection collection = await client.CreateDocumentCollectionAsync(
databaseLink,
new DocumentCollection
{
Id = "MyCollection",
PartitionKey = new PartitionKeyDefinition
{
Paths = new Collection<string> { "/country" }
}
},
new RequestOptions { OfferThroughput = 50000} ).Result;
]]></code></example>
<example>
The example below creates a new collection with OfferThroughput set to 10000.
<code language="c#"><![CDATA[
DocumentCollection collection = await client.CreateDocumentCollectionAsync(
databaseLink,
new DocumentCollection { Id = "MyCollection" },
new RequestOptions { OfferThroughput = 10000} ).Result;
]]></code></example>
<example>
The example below creates a new collection with a custom indexing policy.
<code language="c#"><![CDATA[
DocumentCollection collectionSpec = new DocumentCollection { Id ="MyCollection" };
collectionSpec.IndexingPolicy.Automatic = true;
collectionSpec.IndexingPolicy.IndexingMode = IndexingMode.Consistent;
collection = await client.CreateDocumentCollectionAsync(database.SelfLink, collectionSpec);
]]></code></example>
<example>
The example below creates a document of type Book inside this collection.
<code language="c#"><![CDATA[
Document doc = await client.CreateDocumentAsync(collection.SelfLink, new Book { Title = "War and Peace" });
]]></code></example>
<example>
The example below queries for a Database by Id to retrieve the SelfLink.
<code language="c#"><![CDATA[
using Microsoft.Azure.Documents.Linq;
DocumentCollection collection = client.CreateDocumentCollectionQuery(databaseLink).Where(c => c.Id == "myColl").AsEnumerable().FirstOrDefault();
string collectionLink = collection.SelfLink;
]]></code></example>
<example>
The example below deletes this collection.
<code language="c#"><![CDATA[
await client.DeleteDocumentCollectionAsync(collection.SelfLink);
]]></code></example>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DocumentCollection ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.DocumentCollection.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Azure.Documents.DocumentCollection" /> class for the Azure Cosmos DB service.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConflictResolutionPolicy">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.ConflictResolutionPolicy ConflictResolutionPolicy { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.ConflictResolutionPolicy ConflictResolutionPolicy" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.ConflictResolutionPolicy" />
<MemberSignature Language="VB.NET" Value="Public Property ConflictResolutionPolicy As ConflictResolutionPolicy" />
<MemberSignature Language="F#" Value="member this.ConflictResolutionPolicy : Microsoft.Azure.Documents.ConflictResolutionPolicy with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.ConflictResolutionPolicy" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="conflictResolutionPolicy")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="conflictResolutionPolicy")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.ConflictResolutionPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.ConflictResolutionPolicy" /> that is used for resolving conflicting writes on documents in different regions, in a collection in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConflictsLink">
<MemberSignature Language="C#" Value="public string ConflictsLink { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ConflictsLink" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.ConflictsLink" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ConflictsLink As String" />
<MemberSignature Language="F#" Value="member this.ConflictsLink : string" Usage="Microsoft.Azure.Documents.DocumentCollection.ConflictsLink" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the self-link for conflicts in a collection from the Azure Cosmos DB service.
</summary>
<value>
The self-link for conflicts in a collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DefaultTimeToLive">
<MemberSignature Language="C#" Value="public int? DefaultTimeToLive { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<int32> DefaultTimeToLive" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" />
<MemberSignature Language="VB.NET" Value="Public Property DefaultTimeToLive As Nullable(Of Integer)" />
<MemberSignature Language="F#" Value="member this.DefaultTimeToLive : Nullable<int> with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="defaultTtl")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="defaultTtl")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Nullable<System.Int32></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the default time to live in seconds for documents in a collection from the Azure Cosmos DB service.
</summary>
<value>
It is an optional property.
A valid value must be either a nonzero positive integer, '-1', or <c>null</c>.
By default, DefaultTimeToLive is set to null meaning the time to live is turned off for the collection.
The unit of measurement is seconds. The maximum allowed value is 2147483647.
</value>
<remarks>
<para>
The <see cref="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" /> will be applied to all the documents in the collection as the default time-to-live policy.
The individual document could override the default time-to-live policy by setting its <see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" />.
</para>
<para>
When the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" /> is <c>null</c>, the time-to-live will be turned off for the collection.
It means all the documents will never expire. The individual document's <see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" /> will be disregarded.
</para>
<para>
When the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" /> is '-1', the time-to-live will be turned on for the collection.
By default, all the documents will never expire. The individual document could be given a specific time-to-live value by setting its
<see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" />. The document's <see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" /> will be honored, and the expired documents
will be deleted in background.
</para>
<para>
When the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" /> is a nonzero positive integer, the time-to-live will be turned on for the collection.
And a default time-to-live in seconds will be applied to all the documents. A document will be expired after the
specified <see cref="P:Microsoft.Azure.Documents.DocumentCollection.DefaultTimeToLive" /> value in seconds since its last write time.
The individual document could override the default time-to-live policy by setting its <see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" />.
Please refer to the <see cref="P:Microsoft.Azure.Documents.Document.TimeToLive" /> for more details about evaluating the final time-to-live policy of a document.
</para>
</remarks>
<altmember cref="T:Microsoft.Azure.Documents.Document" />
<example>
The example below disables time-to-live on a collection.
<code language="c#"><![CDATA[
collection.DefaultTimeToLive = null;
]]></code></example>
<example>
The example below enables time-to-live on a collection. By default, all the documents never expire.
<code language="c#"><![CDATA[
collection.DefaultTimeToLive = -1;
]]></code></example>
<example>
The example below enables time-to-live on a collection. By default, the document will expire after 1000 seconds
since its last write time.
<code language="c#"><![CDATA[
collection.DefaultTimeToLive = 1000;
]]></code></example>
</Docs>
</Member>
<Member MemberName="DocumentsLink">
<MemberSignature Language="C#" Value="public string DocumentsLink { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string DocumentsLink" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.DocumentsLink" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DocumentsLink As String" />
<MemberSignature Language="F#" Value="member this.DocumentsLink : string" Usage="Microsoft.Azure.Documents.DocumentCollection.DocumentsLink" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="_docs")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="_docs")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the self-link for documents in a collection from the Azure Cosmos DB service.
</summary>
<value>
The self-link for documents in a collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GeospatialConfig">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.GeospatialConfig GeospatialConfig { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.GeospatialConfig GeospatialConfig" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.GeospatialConfig" />
<MemberSignature Language="VB.NET" Value="Public Property GeospatialConfig As GeospatialConfig" />
<MemberSignature Language="F#" Value="member this.GeospatialConfig : Microsoft.Azure.Documents.GeospatialConfig with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.GeospatialConfig" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="geospatialConfig")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="geospatialConfig")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.GeospatialConfig</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.GeospatialConfig" /> associated with the collection from the Azure Cosmos DB service.
</summary>
<value>
Geospatial type of collection i.e. geography or geometry
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IndexingPolicy">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.IndexingPolicy IndexingPolicy { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.IndexingPolicy IndexingPolicy" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.IndexingPolicy" />
<MemberSignature Language="VB.NET" Value="Public Property IndexingPolicy As IndexingPolicy" />
<MemberSignature Language="F#" Value="member this.IndexingPolicy : Microsoft.Azure.Documents.IndexingPolicy with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.IndexingPolicy" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.IndexingPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.IndexingPolicy" /> associated with the collection from the Azure Cosmos DB service.
</summary>
<value>
The indexing policy associated with the collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PartitionKey">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.PartitionKeyDefinition PartitionKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.PartitionKeyDefinition PartitionKey" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKey" />
<MemberSignature Language="VB.NET" Value="Public Property PartitionKey As PartitionKeyDefinition" />
<MemberSignature Language="F#" Value="member this.PartitionKey : Microsoft.Azure.Documents.PartitionKeyDefinition with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.PartitionKey" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="partitionKey")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="partitionKey")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.PartitionKeyDefinition</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets <see cref="T:Microsoft.Azure.Documents.PartitionKeyDefinition" /> object in the Azure Cosmos DB service.
</summary>
<value>
<see cref="T:Microsoft.Azure.Documents.PartitionKeyDefinition" /> object.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PartitionKeyDeleteThroughputFraction">
<MemberSignature Language="C#" Value="public double PartitionKeyDeleteThroughputFraction { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float64 PartitionKeyDeleteThroughputFraction" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKeyDeleteThroughputFraction" />
<MemberSignature Language="VB.NET" Value="Public Property PartitionKeyDeleteThroughputFraction As Double" />
<MemberSignature Language="F#" Value="member this.PartitionKeyDeleteThroughputFraction : double with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.PartitionKeyDeleteThroughputFraction" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="partitionKeyDeleteThroughputFraction")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="partitionKeyDeleteThroughputFraction")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Obsolete("PartitionKeyDeleteThroughputFraction is deprecated.")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("PartitionKeyDeleteThroughputFraction is deprecated.")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the PartitionKeyDeleteThroughputFraction for the collection.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PartitionKeyRangeStatistics">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IReadOnlyList<Microsoft.Azure.Documents.PartitionKeyRangeStatistics> PartitionKeyRangeStatistics { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IReadOnlyList`1<class Microsoft.Azure.Documents.PartitionKeyRangeStatistics> PartitionKeyRangeStatistics" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKeyRangeStatistics" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PartitionKeyRangeStatistics As IReadOnlyList(Of PartitionKeyRangeStatistics)" />
<MemberSignature Language="F#" Value="member this.PartitionKeyRangeStatistics : System.Collections.Generic.IReadOnlyList<Microsoft.Azure.Documents.PartitionKeyRangeStatistics>" Usage="Microsoft.Azure.Documents.DocumentCollection.PartitionKeyRangeStatistics" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonIgnore]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonIgnore>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.Generic.IReadOnlyList<Microsoft.Azure.Documents.PartitionKeyRangeStatistics></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets a collection of <see cref="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKeyRangeStatistics" /> object in the Azure Cosmos DB service.
</summary>
<value>
<see cref="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKeyRangeStatistics" /> object.
</value>
<remarks>
This is reported based on a sub-sampling of partition keys within the collection and hence these are approximate. If your partition keys are below 1GB of storage, they may not show up in the reported statistics.
</remarks>
<altmember cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulatePartitionKeyRangeStatistics" />
<altmember cref="T:Microsoft.Azure.Documents.PartitionKeyStatistics" />
<example>
The following code shows how to log statistics for all partition key ranges as a string:
<code language="c#"><![CDATA[
var collection = await client.ReadDocumentCollectionAsync(
collectionUri,
new RequestOptions { PopulatePartitionKeyRangeStatistics = true } );
Console.WriteLine(collection.PartitionKeyRangeStatistics.ToString());
]]></code>
To log individual partition key range statistics, use the following code:
<code language="c#"><![CDATA[
var collection = await client.ReadDocumentCollectionAsync(
collectionUri,
new RequestOptions { PopulatePartitionKeyRangeStatistics = true } );
foreach(var partitionKeyRangeStatistics in collection.PartitionKeyRangeStatistics)
{
Console.WriteLine(partitionKeyRangeStatistics.PartitionKeyRangeId);
Console.WriteLine(partitionKeyRangeStatistics.DocumentCount);
Console.WriteLine(partitionKeyRangeStatistics.SizeInKB);
foreach(var partitionKeyStatistics in partitionKeyRangeStatistics.PartitionKeyStatistics)
{
Console.WriteLine(partitionKeyStatistics.PartitionKey);
Console.WriteLine(partitionKeyStatistics.SizeInKB);
}
}
]]></code>
The output will look something like that:
"statistics": [
{"id":"0","sizeInKB":1410184,"documentCount":42807,"partitionKeys":[]},
{"id":"1","sizeInKB":3803113,"documentCount":150530,"partitionKeys":[{"partitionKey":["4009696"],"sizeInKB":3731654}]},
{"id":"2","sizeInKB":1447855,"documentCount":59056,"partitionKeys":[{"partitionKey":["4009633"],"sizeInKB":2861210},{"partitionKey":["4004207"],"sizeInKB":2293163}]},
{"id":"3","sizeInKB":1026254,"documentCount":44241,"partitionKeys":[]},
{"id":"4","sizeInKB":3250973,"documentCount":124959,"partitionKeys":[]}
]
</example>
</Docs>
</Member>
<Member MemberName="StoredProceduresLink">
<MemberSignature Language="C#" Value="public string StoredProceduresLink { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string StoredProceduresLink" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.StoredProceduresLink" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property StoredProceduresLink As String" />
<MemberSignature Language="F#" Value="member this.StoredProceduresLink : string" Usage="Microsoft.Azure.Documents.DocumentCollection.StoredProceduresLink" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="_sprocs")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="_sprocs")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the self-link for stored procedures in a collection from the Azure Cosmos DB service.
</summary>
<value>
The self-link for stored procedures in a collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TimeToLivePropertyPath">
<MemberSignature Language="C#" Value="public string TimeToLivePropertyPath { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TimeToLivePropertyPath" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.TimeToLivePropertyPath" />
<MemberSignature Language="VB.NET" Value="Public Property TimeToLivePropertyPath As String" />
<MemberSignature Language="F#" Value="member this.TimeToLivePropertyPath : string with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.TimeToLivePropertyPath" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="ttlPropertyPath")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="ttlPropertyPath")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the time to live base timestamp property path.
</summary>
<value>
It is an optional property.
This property should be only present when DefaultTimeToLive is set. When this property is present, time to live
for a document is decided based on the value of this property in document.
By default, TimeToLivePropertyPath is set to null meaning the time to live is based on the _ts property in document.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TriggersLink">
<MemberSignature Language="C#" Value="public string TriggersLink { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string TriggersLink" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.TriggersLink" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TriggersLink As String" />
<MemberSignature Language="F#" Value="member this.TriggersLink : string" Usage="Microsoft.Azure.Documents.DocumentCollection.TriggersLink" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the self-link for triggers in a collection from the Azure Cosmos DB service.
</summary>
<value>
The self-link for triggers in a collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UniqueKeyPolicy">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.UniqueKeyPolicy UniqueKeyPolicy { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.UniqueKeyPolicy UniqueKeyPolicy" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.UniqueKeyPolicy" />
<MemberSignature Language="VB.NET" Value="Public Property UniqueKeyPolicy As UniqueKeyPolicy" />
<MemberSignature Language="F#" Value="member this.UniqueKeyPolicy : Microsoft.Azure.Documents.UniqueKeyPolicy with get, set" Usage="Microsoft.Azure.Documents.DocumentCollection.UniqueKeyPolicy" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Newtonsoft.Json.JsonProperty(PropertyName="uniqueKeyPolicy")]</AttributeName>
<AttributeName Language="F#">[<Newtonsoft.Json.JsonProperty(PropertyName="uniqueKeyPolicy")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.UniqueKeyPolicy</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.DocumentCollection.UniqueKeyPolicy" /> that guarantees uniqueness of documents in collection in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="UserDefinedFunctionsLink">
<MemberSignature Language="C#" Value="public string UserDefinedFunctionsLink { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string UserDefinedFunctionsLink" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.DocumentCollection.UserDefinedFunctionsLink" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property UserDefinedFunctionsLink As String" />
<MemberSignature Language="F#" Value="member this.UserDefinedFunctionsLink : string" Usage="Microsoft.Azure.Documents.DocumentCollection.UserDefinedFunctionsLink" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the self-link for user defined functions in a collection from the Azure Cosmos DB service.
</summary>
<value>
The self-link for user defined functions in a collection.
</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>