次の方法で共有


CosmosDatabase.CreateContainerStreamAsync メソッド

定義

Azure Cosmos サービスで非同期操作としてコンテナーを作成します。

public abstract System.Threading.Tasks.Task<Azure.Response> CreateContainerStreamAsync (Azure.Cosmos.ContainerProperties containerProperties, int? throughput = default, Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateContainerStreamAsync : Azure.Cosmos.ContainerProperties * Nullable<int> * Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response>
Public MustOverride Function CreateContainerStreamAsync (containerProperties As ContainerProperties, Optional throughput As Nullable(Of Integer) = Nothing, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

パラメーター

containerProperties
ContainerProperties

ContainerProperties オブジェクト。

throughput
Nullable<Int32>

(省略可能)Azure Cosmos DB サービスの 1 秒あたりの要求ユニット数の測定でコンテナーにプロビジョニングされるスループット。

requestOptions
RequestOptions

(省略可能)コンテナー要求のオプション RequestOptions

cancellationToken
CancellationToken

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

戻り値

Task作成されたリソース レコードをResponse含む を含む 。

Azure Cosmos サービスで非同期操作としてコンテナーを作成し、ストリーム応答を返します。

ContainerProperties containerProperties = new ContainerProperties()
{
    Id = Guid.NewGuid().ToString(),
    PartitionKeyPath = "/pk",
};

using(Response response = await this.cosmosDatabase.CreateContainerStreamAsync(containerProperties))
{
}

注釈

https://docs.microsoft.com/azure/cosmos-db/request-units プロビジョニングスループットの詳細については、

適用対象