MongoDatabaseArgs

data class MongoDatabaseArgs(val accountName: Output<String>? = null, val autoscaleSettings: Output<MongoDatabaseAutoscaleSettingsArgs>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val throughput: Output<Int>? = null) : ConvertibleToJava<MongoDatabaseArgs>

Manages a Mongo Database within a Cosmos DB Account.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.cosmosdb.CosmosdbFunctions;
import com.pulumi.azure.cosmosdb.inputs.GetAccountArgs;
import com.pulumi.azure.cosmosdb.MongoDatabase;
import com.pulumi.azure.cosmosdb.MongoDatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleAccount = CosmosdbFunctions.getAccount(GetAccountArgs.builder()
.name("tfex-cosmosdb-account")
.resourceGroupName("tfex-cosmosdb-account-rg")
.build());
var exampleMongoDatabase = new MongoDatabase("exampleMongoDatabase", MongoDatabaseArgs.builder()
.resourceGroupName(exampleAccount.applyValue(getAccountResult -> getAccountResult.resourceGroupName()))
.accountName(exampleAccount.applyValue(getAccountResult -> getAccountResult.name()))
.throughput(400)
.build());
}
}

Import

Cosmos Mongo Database can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/mongoDatabase:MongoDatabase db1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1/mongodbDatabases/db1

Constructors

Link copied to clipboard
fun MongoDatabaseArgs(accountName: Output<String>? = null, autoscaleSettings: Output<MongoDatabaseAutoscaleSettingsArgs>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, throughput: Output<Int>? = null)

Functions

Link copied to clipboard
open override fun toJava(): MongoDatabaseArgs

Properties

Link copied to clipboard
val accountName: Output<String>? = null

The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created.

Link copied to clipboard

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Cosmos DB Mongo Database. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created.

Link copied to clipboard
val throughput: Output<Int>? = null

The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.