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

ContainerBuilder.CreateIfNotExistsAsync(Nullable<Int32>) 方法

定义

如果容器不存在于当前 fluent 定义中,则创建该容器。

public System.Threading.Tasks.Task<Azure.Cosmos.ContainerResponse> CreateIfNotExistsAsync (int? throughput = default);
member this.CreateIfNotExistsAsync : Nullable<int> -> System.Threading.Tasks.Task<Azure.Cosmos.ContainerResponse>
Public Function CreateIfNotExistsAsync (Optional throughput As Nullable(Of Integer) = Nothing) As Task(Of ContainerResponse)

参数

throughput
Nullable<Int32>

容器的所需吞吐量,以每秒请求单位数表示。

返回

一个异步任务,表示基于 Fluent 定义创建 CosmosContainer

注解

https://docs.microsoft.com/azure/cosmos-db/request-units 有关预配吞吐量的详细信息。

适用于