-
Notifications
You must be signed in to change notification settings - Fork 46
Description
CosmosDB PowerShell Module Version
No response
Feature Description
Enable support for Transactional Batch operations in the Azure Cosmos DB PowerShell module, allowing users to execute multiple operations (e.g., create, update, delete) atomically within the same partition key. This would mirror functionality currently available in Cosmos DB SDKs (e.g., .NET, Java, Python, Node.js) via the TransactionalBatch API.
https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/transactional-batch?tabs=dotnet
Motivation and Use Case
PowerShell is widely used for infrastructure automation, provisioning, and DevOps workflows. In scenarios where multiple Cosmos DB operations must be performed together, all-or-nothing atomicity is critical to avoid partial state and ensure consistency.
Without transactional batch support, I must either:
- Fall back to stored procedures (which are harder to version and deploy), or
- Wrap SDK logic in external services and invoke them from PowerShell—adding complexity and reducing portability.
Adding native support for transactional batch would:
- Improve consistency and reliability in infra-as-code workflows
- Reduce operational overhead and error handling complexity
- Align PowerShell capabilities with SDK parity for Cosmos DB
Alternatives Considered
No response
Additional Context
No response