Freigeben über


CosmosContainer.ReplaceThroughputAsync Methode

Definition

Legt den Durchsatz fest, der für einen Container bei der Messung der Anforderungseinheiten pro Sekunde im Azure Cosmos-Dienst bereitgestellt wird.

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)

Parameter

throughput
Int32

Der Cosmos-Containerdurchsatz, ausgedrückt in Anforderungseinheiten pro Sekunde.

requestOptions
RequestOptions

(Optional) Die Optionen für die Durchsatzanforderung.RequestOptions

cancellationToken
CancellationToken

(Optional) CancellationToken stellt den Anforderungsabbruch dar.

Gibt zurück

Die Durchsatzantwort.

Beispiele

Das folgende Beispiel zeigt, wie Sie den Durchsatz abrufen.

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

Hinweise

https://docs.microsoft.com/azure/cosmos-db/request-units weitere Informationen zum Bereitstellungsdurchsatz.

Gilt für: