user246392
user246392

Reputation: 3019

Create a CosmosDB collection with shared throughput instead of using the deprecated SharedOfferThroughput

Previously, I used to create collections by calling CreateDocumentCollectionAsync() and passing a RequestOptions parameter in which I set SharedOfferThroughput. It looks like this property is deprecated now, but I cannot find a good example to replace it with. I have a single Cosmos database and I want every collection to share the RU pool of the database.

Upvotes: 1

Views: 594

Answers (1)

AlexDrenea
AlexDrenea

Reputation: 8039

Take a look a the new SDK: Blog post or GitHub.

From the blog post:

We’ve created a new top level CosmosClient class to replace DocumentClient, and split up its methods into modular CosmosDatabase, CosmosContainer, and CosmosItems classes. The new programming model removes the need for UriFactory and other “noise” from the application code.

Within those docs, you can find references to how to manipulate the throughput at a Database or Container level.

Upvotes: 1

Related Questions