Container.ReplaceThroughputAsync(Int32, RequestOptions, CancellationToken) 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 = null, System.Threading.CancellationToken cancellationToken = null);
abstract member ReplaceThroughputAsync : int * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ThroughputResponse>

Parameters

throughput
Int32 Int32

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

requestOptions
RequestOptions RequestOptions

(Optional) The options for the throughput request.RequestOptions

cancellationToken
CancellationToken CancellationToken

(Optional) CancellationToken representing request cancellation.

Returns

The provisioned throughput for this container.

Examples

The following example shows how to get the throughput.


ThroughputResponse throughput = await this.cosmosContainer.ReplaceThroughputAsync(400, requestOptions : new RequestOptions());

The following example shows how to get the throughput.


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

Remarks

for details on provision throughput.

Applies to