Share via


CosmosContainer.ReplaceThroughputAsync メソッド

定義

Azure Cosmos サービスの 1 秒あたりの要求ユニット数を測定して、コンテナーにプロビジョニングされるスループットを設定します。

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)

パラメーター

throughput
Int32

1 秒あたりの要求ユニット数で表される Cosmos コンテナーのスループット。

requestOptions
RequestOptions

(省略可能)スループット要求のオプション。RequestOptions

cancellationToken
CancellationToken

(省略可能) CancellationToken 要求の取り消しを表します。

戻り値

スループット応答。

次の例は、スループットを取得する方法を示しています。

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

注釈

https://docs.microsoft.com/azure/cosmos-db/request-units プロビジョニングスループットの詳細については、次を参照してください。

適用対象