Skip to content

Conversation

andrewmathew1
Copy link
Contributor

@andrewmathew1 andrewmathew1 commented Oct 3, 2025

Description

Added response hook parameter back to replace_throughput for sync and async containers

Addressing this API follow up review item:

  • replace_throughput method had the response_hook taken away - which is a breaking change. need to add this back:

@andrewmathew1 andrewmathew1 requested a review from a team as a code owner October 3, 2025 22:40
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 22:40
Copy link
Contributor

@Copilot Copilot AI left a 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 back the response_hook parameter to the replace_throughput methods in both synchronous and asynchronous Cosmos DB container classes, allowing users to access response metadata when replacing container throughput.

  • Adds response_hook parameter to sync and async replace_throughput methods
  • Includes proper documentation for the new parameter
  • Implements the hook invocation after the throughput replacement operation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sdk/cosmos/azure-cosmos/azure/cosmos/container.py Adds response_hook parameter and implementation to sync replace_throughput method
sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py Adds response_hook parameter and implementation to async replace_throughput method, fixes paramtype documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant