你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
IWithShardKey<ParentT>.WithShardKey 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
WithShardKey(String) |
指定默认分区类型为“Hash”的分片键。 |
WithShardKey(String, String) |
指定分片键。 |
WithShardKey(String)
指定默认分区类型为“Hash”的分片键。
public Microsoft.Azure.Management.CosmosDB.Fluent.MongoCollection.Definition.IWithAttach<ParentT> WithShardKey (string shardKey);
abstract member WithShardKey : string -> Microsoft.Azure.Management.CosmosDB.Fluent.MongoCollection.Definition.IWithAttach<'ParentT>
Public Function WithShardKey (shardKey As String) As IWithAttach(Of ParentT)
参数
- shardKey
- String
分片键。
返回
定义的下一阶段。
适用于
WithShardKey(String, String)
指定分片键。
public Microsoft.Azure.Management.CosmosDB.Fluent.MongoCollection.Definition.IWithAttach<ParentT> WithShardKey (string shardKey, string partitionKind);
abstract member WithShardKey : string * string -> Microsoft.Azure.Management.CosmosDB.Fluent.MongoCollection.Definition.IWithAttach<'ParentT>
Public Function WithShardKey (shardKey As String, partitionKind As String) As IWithAttach(Of ParentT)
参数
- shardKey
- String
分片键。
- partitionKind
- String
分区类型仅支持 api-版本 2019-08-01 中的“哈希”分区类型。
返回
定义的下一阶段。