Class MongoDBCollectionResource

java.lang.Object
com.microsoft.azure.management.cosmosdb.MongoDBCollectionResource

public class MongoDBCollectionResource extends Object
Cosmos DB MongoDB collection resource object.
  • Constructor Details

    • MongoDBCollectionResource

      public MongoDBCollectionResource()
  • Method Details

    • id

      public String id()
      Get name of the Cosmos DB MongoDB collection.
      Returns:
      the id value
    • withId

      public MongoDBCollectionResource withId(String id)
      Set name of the Cosmos DB MongoDB collection.
      Parameters:
      id - the id value to set
      Returns:
      the MongoDBCollectionResource object itself.
    • shardKey

      public Map<String,String> shardKey()
      Get a key-value pair of shard keys to be applied for the request.
      Returns:
      the shardKey value
    • withShardKey

      public MongoDBCollectionResource withShardKey(Map<String,String> shardKey)
      Set a key-value pair of shard keys to be applied for the request.
      Parameters:
      shardKey - the shardKey value to set
      Returns:
      the MongoDBCollectionResource object itself.
    • indexes

      public List<MongoIndex> indexes()
      Get list of index keys.
      Returns:
      the indexes value
    • withIndexes

      public MongoDBCollectionResource withIndexes(List<MongoIndex> indexes)
      Set list of index keys.
      Parameters:
      indexes - the indexes value to set
      Returns:
      the MongoDBCollectionResource object itself.