Release 3.0.0
This release contains a minor but breaking change to setting and reading back throughput, fixed in #49, as well as an update to latest Microsoft.Azure.Cosmos
package (3.26.1
).
Throughput management in v3
// Create database with a specified throughput
await database.Operations.CreateIfNotExistsAsync(new CreateDbOptions(400, ThroughputType.Database));
// Create database with autoscale throughput
await database.Operations.CreateIfNotExistsAsync(new CreateDbOptions(ThroughputProperties.CreateAutoscaleThroughput(1000), ThroughputType.Database));
// Read and write database throughput
ThroughputProperties throughputProperties = await database.Operations.GetThroughputAsync();
database.Operations.SetThroughputAsync(ThroughputProperties.CreateManualThroughput(1000));
// Read and write collection throughput
ThroughputProperties throughput = await database.MyCollection.GetThroughputAsync();
await database.MyCollection.SetThroughputAsync(ThroughputProperties.CreateManualThroughput(400));
Throughput management in v2
// Create database with a specified throughput
await database.Operations.CreateIfNotExistsAsync(new CreateDbOptions(400, ThroughputType.Database));
// Read and write database throughput
int? throughput = await database.Operations.GetThroughputAsync();
await database.Operations.SetThroughputAsync(1000);
// Read and write collection throughput
int? throughput = await database.MyCollection.GetThroughputAsync();
await database.MyCollection.SetThroughputAsync(400);