I have an Azure CosmosDb database with database-level throughput provisioned. We're using the MongoDB API against this Cosmos instance. The shared throughput model requires all collections to have a partition key specified, which seems to prevent pretty much any tools from being able to create a collection, other than the Azure Portal or the official Azure Cosmos SDKs. For example, in Robo 3T, attempting to create a collection results in the following error:
Failed to create collection 'mycollection'.
Error: Shared throughput collection should have a partition key
The same error occurs when attempting to create a collection via mongoose (similar to this question) or other tooling.
So I guess the operative question boils down to this: Is there any way through the MongoDb API to pass the desired partitionKey to CosmosDb, so that collection creation will succeed?