Skip to content

Commit 93ffad9

Browse files
author
Ryan CrawCour
committed
Merge pull request Azure#103 from ryancrawcour/master
Added sample of create collection with OfferType
2 parents 0e15a8d + 7cf0887 commit 93ffad9

File tree

1 file changed

+14
-0
lines changed
  • samples/code-samples/CollectionManagement

1 file changed

+14
-0
lines changed

samples/code-samples/CollectionManagement/Program.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ private static async Task RunCollectionDemo()
118118

119119
Console.WriteLine("1.2. Created Collection {0}, with custom index policy \n{1}", c2.Id, c2.IndexingPolicy);
120120

121+
//***********************************************************************************************
122+
// 1.3 - Create collection with OfferType set
123+
//***********************************************************************************************
124+
// By default a collection is created with the lowest performance tier, S1
125+
// You can set this when creating a collection by supplying a value for RequestOptions.OfferType
126+
collectionSpec = new DocumentCollection
127+
{
128+
Id = "SampleCollectionWithS2OfferType"
129+
};
130+
131+
c2 = await client.CreateDocumentCollectionAsync(database.SelfLink, collectionSpec, new RequestOptions { OfferType="S2" });
132+
133+
Console.WriteLine("1.3. Created Collection {0}, with OfferType of S2\n", c2.Id);
134+
121135
//*********************************************************************************************
122136
// 2. Get performance tier of a DocumentCollection
123137
//

0 commit comments

Comments
 (0)