Database.ReplaceThroughputAsync メソッド

定義

オーバーロード

ReplaceThroughputAsync(ThroughputProperties, RequestOptions, CancellationToken)

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

ReplaceThroughputAsync(Int32, RequestOptions, CancellationToken)

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

ReplaceThroughputAsync(ThroughputProperties, RequestOptions, CancellationToken)

ソース:
Database.cs

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

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

パラメーター

throughputProperties
ThroughputProperties

1 秒あたりの要求ユニット数で表される Cosmos データベースのスループット。

requestOptions
RequestOptions

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

cancellationToken
CancellationToken

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

戻り値

スループット応答。

次の例は、手動スループットを置き換える方法を示しています。

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

次の例は、自動スケーリングによってプロビジョニングされたスループットを置き換える方法を示しています。

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

注釈

要求ユニットデータベースのスループットを設定する

適用対象

ReplaceThroughputAsync(Int32, RequestOptions, CancellationToken)

ソース:
Database.cs

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

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 = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ThroughputResponse)

パラメーター

throughput
Int32

1 秒あたりの要求ユニット数で表される Cosmos データベースのスループット。

requestOptions
RequestOptions

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

cancellationToken
CancellationToken

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

戻り値

スループット応答。

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

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

注釈

要求ユニット

適用対象