Table of Contents

Interface IWithShardKey<ParentT>

Namespace
Microsoft.Azure.Management.CosmosDB.Fluent.MongoCollection.Definition
Assembly
Microsoft.Azure.Management.CosmosDB.Fluent.dll

The stage of the mongo collection definition allowing to set shard keys.

public interface IWithShardKey<ParentT>

Type Parameters

ParentT

The stage of the parent definition to return to after attaching this definition.

Methods

WithShardKey(string)

Specifies a shard key with default partition kind "Hash".

IWithAttach<ParentT> WithShardKey(string shardKey)

Parameters

shardKey string

The shard key.

Returns

IWithAttach<ParentT>

The next stage of the definition.

WithShardKey(string, string)

Specifies a shard key.

IWithAttach<ParentT> WithShardKey(string shardKey, string partitionKind)

Parameters

shardKey string

The shard key.

partitionKind string

The partition kind, only support "Hash" partition kind in api-version 2019-08-01.

Returns

IWithAttach<ParentT>

The next stage of the definition.

WithShardKeys(IDictionary<string, string>)

Appends all shard keys to current shard keys.

IWithAttach<ParentT> WithShardKeys(IDictionary<string, string> shardKeys)

Parameters

shardKeys IDictionary<string, string>

The shard keys needs appending.

Returns

IWithAttach<ParentT>

The next stage of the definition.