-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Added Autoscale Throughput Samples #43619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added Autoscale Throughput Samples #43619
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive sample code demonstrating autoscale throughput management for Azure Cosmos DB. The samples show users how to create databases and containers with autoscale settings, read current throughput configurations, and update maximum throughput values.
Key Changes:
- Added synchronous client sample (
autoscale_throughput_management.py) demonstrating core autoscale operations - Added asynchronous client sample (
autoscale_throughput_management_async.py) with additional concurrent operations demonstration - Both samples include create, read, and update operations for autoscale throughput settings
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py |
New synchronous sample demonstrating autoscale throughput operations including database/container creation, reading settings, and updating maximum throughput |
sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py |
New asynchronous sample with similar operations plus concurrent throughput management demonstration |
sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/samples/autoscale_throughput_management_async.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concurrency sample is probably not anything that we need to have, but won't block on that. Thanks Andrew!
Description
Added samples for both the sync and async client showing users how to create a database and container without autoscale throughput settings. Also demonstrated how to read the current autoscale throughput settings for a database and container. Lastly, these samples show a user how to update their max_throughput autoscale settings for a container.