Megosztás a következőn keresztül:


CosmosDatabase.ReplaceThroughputAsync Method

Definition

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

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

Parameters

throughput
Int32

The cosmos database throughput expressed in Request Units per second.

requestOptions
RequestOptions

(Optional) The options for the throughput request.RequestOptions

cancellationToken
CancellationToken

(Optional) CancellationToken representing request cancellation.

Returns

The throughput response.

Examples

The following example shows how to get the throughput.

ThroughputResponse throughput = await this.cosmosDatabase.ReplaceThroughputAsync(10000);

Remarks

https://docs.microsoft.com/azure/cosmos-db/request-units for details on provision throughput.

Applies to