I am using @azure/cosmos
with version 3.9.5
for creating Container and collection in Cosmos DB
. I am trying to create collection with maxThroughput parameter so that auto scaling will be enabled.
comosRefClient.database("sample").containers.createIfNotExists({ id: "samplecoll1", 5000 });
As per documentation, this should create collection with Autoscaling with Max RU of 5000. But collection is created with Manual Mode and 5000 RUs.
I checked in the documentation as well as unit testing code from SDK and ideally things should work fine.
Appreciate your help on this question.
I use the same version with yours. I tried this code and it can work:
const { resource: containerDef } = await client.database("sample").containers.createIfNotExists({ id: "samplecoll1",maxThroughput:5000});