Show / Hide Table of Contents

Class MongoDatabase

Manages a Mongo Database within a Cosmos DB Account.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var exampleAccount = Output.Create(Azure.CosmosDB.GetAccount.InvokeAsync(new Azure.CosmosDB.GetAccountArgs
    {
        Name = "tfex-cosmosdb-account",
        ResourceGroupName = "tfex-cosmosdb-account-rg",
    }));
    var exampleMongoDatabase = new Azure.CosmosDB.MongoDatabase("exampleMongoDatabase", new Azure.CosmosDB.MongoDatabaseArgs
    {
        ResourceGroupName = exampleAccount.Apply(exampleAccount => exampleAccount.ResourceGroupName),
        AccountName = exampleAccount.Apply(exampleAccount => exampleAccount.Name),
        Throughput = 400,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
MongoDatabase
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.CosmosDB
Assembly: Pulumi.Azure.dll
Syntax
public class MongoDatabase : CustomResource

Constructors

View Source

MongoDatabase(String, MongoDatabaseArgs, CustomResourceOptions)

Create a MongoDatabase resource with the given unique name, arguments, and options.

Declaration
public MongoDatabase(string name, MongoDatabaseArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MongoDatabaseArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AccountName

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

Declaration
public Output<string> AccountName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

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

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceGroupName

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

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

Throughput

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.

Declaration
public Output<int> Throughput { get; }
Property Value
Type Description
Output<System.Int32>

Methods

View Source

Get(String, Input<String>, MongoDatabaseState, CustomResourceOptions)

Get an existing MongoDatabase resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static MongoDatabase Get(string name, Input<string> id, MongoDatabaseState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

MongoDatabaseState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
MongoDatabase
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.