Container Interface

Implements

public interface Container
implements Annotation

Annotation for Cosmos Container

Method Summary

Modifier and Type Method and Description
abstract boolean autoCreateContainer()

To set if create container automatically

abstract boolean autoScale()

To enable auto scale for container RU limit

abstract String containerName()

To set container name

abstract String[] hierarchicalPartitionKeyPaths()

To set the partition key definition for container Should only be used for hierarchical partition key scenario.

abstract String partitionKeyPath()

To set the partition key definition for container Should only be used for nested partition key scenario.

abstract String ru()

To set request unit

abstract int timeToLive()

To set the ttl of container level

Method Details

autoCreateContainer

public abstract boolean autoCreateContainer()

To set if create container automatically

Returns:

default as true

autoScale

public abstract boolean autoScale()

To enable auto scale for container RU limit

Returns:

default as false

containerName

public abstract String containerName()

To set container name

Returns:

String

hierarchicalPartitionKeyPaths

public abstract String[] hierarchicalPartitionKeyPaths()

To set the partition key definition for container Should only be used for hierarchical partition key scenario. For general partition key support, use the PartitionKey annotation By default PartitionKey annotation will take precedence, unless not specified.

Returns:

list of partition key paths

partitionKeyPath

public abstract String partitionKeyPath()

To set the partition key definition for container Should only be used for nested partition key scenario. For general partition key support, use the PartitionKey annotation By default PartitionKey annotation will take precedence, unless not specified.

Returns:

partition key path

ru

public abstract String ru()

To set request unit

Returns:

default as ""

timeToLive

public abstract int timeToLive()

To set the ttl of container level

Returns:

default as no ttl

Applies to