你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Database.DeleteStreamAsync(RequestOptions, CancellationToken) 方法

定义

DatabaseProperties从 Azure Cosmos DB 服务中删除 作为异步操作。

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

参数

requestOptions
RequestOptions

(可选) 请求的选项。

cancellationToken
CancellationToken

(表示请求取消的可选) CancellationToken

返回

一个 TaskResponseMessage ,它包含有关发出的请求的信息。

示例

// Delete a Database resource where database_id is the ID property of the Database resource you wish to delete.
Database database = this.cosmosClient.GetDatabase(database_id);
await database.DeleteStreamAsync();

适用于