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

ArmCosmosDBModelFactory.CosmosDBContainerPartitionKey 方法

定义

初始化 CosmosDBContainerPartitionKey 的新实例。

public static Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey CosmosDBContainerPartitionKey (System.Collections.Generic.IEnumerable<string> paths = default, Azure.ResourceManager.CosmosDB.Models.CosmosDBPartitionKind? kind = default, int? version = default, bool? isSystemKey = default);
static member CosmosDBContainerPartitionKey : seq<string> * Nullable<Azure.ResourceManager.CosmosDB.Models.CosmosDBPartitionKind> * Nullable<int> * Nullable<bool> -> Azure.ResourceManager.CosmosDB.Models.CosmosDBContainerPartitionKey
Public Shared Function CosmosDBContainerPartitionKey (Optional paths As IEnumerable(Of String) = Nothing, Optional kind As Nullable(Of CosmosDBPartitionKind) = Nothing, Optional version As Nullable(Of Integer) = Nothing, Optional isSystemKey As Nullable(Of Boolean) = Nothing) As CosmosDBContainerPartitionKey

参数

paths
IEnumerable<String>

使用可对容器内的数据进行分区的路径列表。

kind
Nullable<CosmosDBPartitionKind>

指示用于分区的算法类型。 对于 MultiHash,容器创建支持多个分区键 (最多三个) 。

version
Nullable<Int32>

指示分区键定义的版本。

isSystemKey
Nullable<Boolean>

指示容器是否正在使用系统生成的分区键。

返回

用于模拟的新 CosmosDBContainerPartitionKey 实例。

适用于