Compartir a través de


CosmosDatabase.ReadStreamAsync(RequestOptions, CancellationToken) Método

Definición

Lee un DatabaseProperties elemento del servicio Azure Cosmos como una operación asincrónica.

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

Parámetros

requestOptions
RequestOptions

(Opcional) Opciones de la solicitud de contenedor RequestOptions

cancellationToken
CancellationToken

(Opcional) CancellationToken que representa la cancelación de la solicitud.

Devoluciones

que Task contiene un Response objeto que contiene el registro de recursos de lectura.

Ejemplos

//Reads a Database resource where
// - database_id is the ID property of the Database resource you wish to read.
Database database = this.cosmosClient.GetDatabase(database_id);
Response response = await database.ReadContainerStreamAsync();

Se aplica a