Container.ReplaceThroughputAsync(Int32, RequestOptions, CancellationToken) Method

Definition

Sets throughput provisioned for a container in measurement of request units per second in the Azure Cosmos service.

public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ThroughputResponse> ReplaceThroughputAsync (int throughput, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplaceThroughputAsync : int * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ThroughputResponse>
Public MustOverride Function ReplaceThroughputAsync (throughput As Integer, Optional requestOptions As RequestOptions = null, Optional cancellationToken As CancellationToken = null) As Task(Of ThroughputResponse)

Parameters

throughput
Int32

The Cosmos container throughput, expressed in Request Units per second.

requestOptions
RequestOptions

(Optional) The options for the throughput request.

cancellationToken
CancellationToken

(Optional) CancellationToken representing request cancellation.

Return Value

Task<ThroughputResponse>

The throughput response.

Examples

The following example shows how to get the throughput.


ThroughputResponse throughput = await this.cosmosContainer.ReplaceThroughputAsync(400);

Remarks

for details on provision throughput.

Applies to