I created a document db database with RU shared at DB level rather than at container level. Is it possible to create a collection without partition under the same DB? When I try to do the same with the code below I get an error
Provisioned throughput collection should have a partition key
private async Task CreatePartitionLessCollection()
{
try
{
DocumentClient documentClient = new DocumentClient(new Uri(EndpointUrl), PrimaryKey);
DocumentCollection myCollection = new DocumentCollection();
myCollection.Id = "MyCollection";
await documentClient.CreateDocumentCollectionAsync(
UriFactory.CreateDatabaseUri("MyDB"), myCollection, new RequestOptions { OfferThroughput = 400 });
}
catch (Exception ex)
{
Console.WriteLine(ex.GetBaseException().Message);
}
}