1. Packages
  2. Azure Native
  3. API Docs
  4. documentdb
  5. MongoDBResourceMongoDBDatabase
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.documentdb.MongoDBResourceMongoDBDatabase

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    An Azure Cosmos DB MongoDB database. Azure REST API version: 2023-04-15. Prior API version in Azure Native 1.x: 2021-03-15.

    Other available API versions: 2019-08-01, 2023-03-15-preview, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview.

    Example Usage

    CosmosDBMongoDBDatabaseCreateUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var mongoDBResourceMongoDBDatabase = new AzureNative.DocumentDB.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabase", new()
        {
            AccountName = "ddb1",
            DatabaseName = "databaseName",
            Location = "West US",
            Options = null,
            Resource = new AzureNative.DocumentDB.Inputs.MongoDBDatabaseResourceArgs
            {
                Id = "databaseName",
            },
            ResourceGroupName = "rg1",
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	documentdb "github.com/pulumi/pulumi-azure-native-sdk/documentdb/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := documentdb.NewMongoDBResourceMongoDBDatabase(ctx, "mongoDBResourceMongoDBDatabase", &documentdb.MongoDBResourceMongoDBDatabaseArgs{
    			AccountName:  pulumi.String("ddb1"),
    			DatabaseName: pulumi.String("databaseName"),
    			Location:     pulumi.String("West US"),
    			Options:      nil,
    			Resource: &documentdb.MongoDBDatabaseResourceArgs{
    				Id: pulumi.String("databaseName"),
    			},
    			ResourceGroupName: pulumi.String("rg1"),
    			Tags:              nil,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.documentdb.MongoDBResourceMongoDBDatabase;
    import com.pulumi.azurenative.documentdb.MongoDBResourceMongoDBDatabaseArgs;
    import com.pulumi.azurenative.documentdb.inputs.CreateUpdateOptionsArgs;
    import com.pulumi.azurenative.documentdb.inputs.MongoDBDatabaseResourceArgs;
    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) {
            var mongoDBResourceMongoDBDatabase = new MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabase", MongoDBResourceMongoDBDatabaseArgs.builder()
                .accountName("ddb1")
                .databaseName("databaseName")
                .location("West US")
                .options()
                .resource(MongoDBDatabaseResourceArgs.builder()
                    .id("databaseName")
                    .build())
                .resourceGroupName("rg1")
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    mongo_db_resource_mongo_db_database = azure_native.documentdb.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabase",
        account_name="ddb1",
        database_name="databaseName",
        location="West US",
        options=azure_native.documentdb.CreateUpdateOptionsArgs(),
        resource=azure_native.documentdb.MongoDBDatabaseResourceArgs(
            id="databaseName",
        ),
        resource_group_name="rg1",
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const mongoDBResourceMongoDBDatabase = new azure_native.documentdb.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabase", {
        accountName: "ddb1",
        databaseName: "databaseName",
        location: "West US",
        options: {},
        resource: {
            id: "databaseName",
        },
        resourceGroupName: "rg1",
        tags: {},
    });
    
    resources:
      mongoDBResourceMongoDBDatabase:
        type: azure-native:documentdb:MongoDBResourceMongoDBDatabase
        properties:
          accountName: ddb1
          databaseName: databaseName
          location: West US
          options: {}
          resource:
            id: databaseName
          resourceGroupName: rg1
          tags: {}
    

    Create MongoDBResourceMongoDBDatabase Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MongoDBResourceMongoDBDatabase(name: string, args: MongoDBResourceMongoDBDatabaseArgs, opts?: CustomResourceOptions);
    @overload
    def MongoDBResourceMongoDBDatabase(resource_name: str,
                                       args: MongoDBResourceMongoDBDatabaseArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongoDBResourceMongoDBDatabase(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       account_name: Optional[str] = None,
                                       resource: Optional[MongoDBDatabaseResourceArgs] = None,
                                       resource_group_name: Optional[str] = None,
                                       database_name: Optional[str] = None,
                                       location: Optional[str] = None,
                                       options: Optional[CreateUpdateOptionsArgs] = None,
                                       tags: Optional[Mapping[str, str]] = None)
    func NewMongoDBResourceMongoDBDatabase(ctx *Context, name string, args MongoDBResourceMongoDBDatabaseArgs, opts ...ResourceOption) (*MongoDBResourceMongoDBDatabase, error)
    public MongoDBResourceMongoDBDatabase(string name, MongoDBResourceMongoDBDatabaseArgs args, CustomResourceOptions? opts = null)
    public MongoDBResourceMongoDBDatabase(String name, MongoDBResourceMongoDBDatabaseArgs args)
    public MongoDBResourceMongoDBDatabase(String name, MongoDBResourceMongoDBDatabaseArgs args, CustomResourceOptions options)
    
    type: azure-native:documentdb:MongoDBResourceMongoDBDatabase
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MongoDBResourceMongoDBDatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MongoDBResourceMongoDBDatabaseArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MongoDBResourceMongoDBDatabaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongoDBResourceMongoDBDatabaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongoDBResourceMongoDBDatabaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var mongoDBResourceMongoDBDatabaseResource = new AzureNative.DocumentDB.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabaseResource", new()
    {
        AccountName = "string",
        Resource = new AzureNative.DocumentDB.Inputs.MongoDBDatabaseResourceArgs
        {
            Id = "string",
        },
        ResourceGroupName = "string",
        DatabaseName = "string",
        Location = "string",
        Options = new AzureNative.DocumentDB.Inputs.CreateUpdateOptionsArgs
        {
            AutoscaleSettings = new AzureNative.DocumentDB.Inputs.AutoscaleSettingsArgs
            {
                MaxThroughput = 0,
            },
            Throughput = 0,
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := documentdb.NewMongoDBResourceMongoDBDatabase(ctx, "mongoDBResourceMongoDBDatabaseResource", &documentdb.MongoDBResourceMongoDBDatabaseArgs{
    AccountName: pulumi.String("string"),
    Resource: &documentdb.MongoDBDatabaseResourceArgs{
    Id: pulumi.String("string"),
    },
    ResourceGroupName: pulumi.String("string"),
    DatabaseName: pulumi.String("string"),
    Location: pulumi.String("string"),
    Options: &documentdb.CreateUpdateOptionsArgs{
    AutoscaleSettings: &documentdb.AutoscaleSettingsArgs{
    MaxThroughput: pulumi.Int(0),
    },
    Throughput: pulumi.Int(0),
    },
    Tags: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    })
    
    var mongoDBResourceMongoDBDatabaseResource = new MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabaseResource", MongoDBResourceMongoDBDatabaseArgs.builder()
        .accountName("string")
        .resource(MongoDBDatabaseResourceArgs.builder()
            .id("string")
            .build())
        .resourceGroupName("string")
        .databaseName("string")
        .location("string")
        .options(CreateUpdateOptionsArgs.builder()
            .autoscaleSettings(AutoscaleSettingsArgs.builder()
                .maxThroughput(0)
                .build())
            .throughput(0)
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    mongo_db_resource_mongo_db_database_resource = azure_native.documentdb.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabaseResource",
        account_name="string",
        resource=azure_native.documentdb.MongoDBDatabaseResourceArgs(
            id="string",
        ),
        resource_group_name="string",
        database_name="string",
        location="string",
        options=azure_native.documentdb.CreateUpdateOptionsArgs(
            autoscale_settings=azure_native.documentdb.AutoscaleSettingsArgs(
                max_throughput=0,
            ),
            throughput=0,
        ),
        tags={
            "string": "string",
        })
    
    const mongoDBResourceMongoDBDatabaseResource = new azure_native.documentdb.MongoDBResourceMongoDBDatabase("mongoDBResourceMongoDBDatabaseResource", {
        accountName: "string",
        resource: {
            id: "string",
        },
        resourceGroupName: "string",
        databaseName: "string",
        location: "string",
        options: {
            autoscaleSettings: {
                maxThroughput: 0,
            },
            throughput: 0,
        },
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:documentdb:MongoDBResourceMongoDBDatabase
    properties:
        accountName: string
        databaseName: string
        location: string
        options:
            autoscaleSettings:
                maxThroughput: 0
            throughput: 0
        resource:
            id: string
        resourceGroupName: string
        tags:
            string: string
    

    MongoDBResourceMongoDBDatabase Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The MongoDBResourceMongoDBDatabase resource accepts the following input properties:

    AccountName string
    Cosmos DB database account name.
    Resource Pulumi.AzureNative.DocumentDB.Inputs.MongoDBDatabaseResource
    The standard JSON format of a MongoDB database
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    DatabaseName string
    Cosmos DB database name.
    Location string
    The location of the resource group to which the resource belongs.
    Options Pulumi.AzureNative.DocumentDB.Inputs.CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    Tags Dictionary<string, string>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    AccountName string
    Cosmos DB database account name.
    Resource MongoDBDatabaseResourceArgs
    The standard JSON format of a MongoDB database
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    DatabaseName string
    Cosmos DB database name.
    Location string
    The location of the resource group to which the resource belongs.
    Options CreateUpdateOptionsArgs
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    Tags map[string]string
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    accountName String
    Cosmos DB database account name.
    resource MongoDBDatabaseResource
    The standard JSON format of a MongoDB database
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    databaseName String
    Cosmos DB database name.
    location String
    The location of the resource group to which the resource belongs.
    options CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    tags Map<String,String>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    accountName string
    Cosmos DB database account name.
    resource MongoDBDatabaseResource
    The standard JSON format of a MongoDB database
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    databaseName string
    Cosmos DB database name.
    location string
    The location of the resource group to which the resource belongs.
    options CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    tags {[key: string]: string}
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    account_name str
    Cosmos DB database account name.
    resource MongoDBDatabaseResourceArgs
    The standard JSON format of a MongoDB database
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    database_name str
    Cosmos DB database name.
    location str
    The location of the resource group to which the resource belongs.
    options CreateUpdateOptionsArgs
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    tags Mapping[str, str]
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
    accountName String
    Cosmos DB database account name.
    resource Property Map
    The standard JSON format of a MongoDB database
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    databaseName String
    Cosmos DB database name.
    location String
    The location of the resource group to which the resource belongs.
    options Property Map
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    tags Map<String>
    Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MongoDBResourceMongoDBDatabase resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the ARM resource.
    Type string
    The type of Azure resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the ARM resource.
    Type string
    The type of Azure resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the ARM resource.
    type String
    The type of Azure resource.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the ARM resource.
    type string
    The type of Azure resource.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the ARM resource.
    type str
    The type of Azure resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the ARM resource.
    type String
    The type of Azure resource.

    Supporting Types

    AutoscaleSettings, AutoscaleSettingsArgs

    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Integer
    Represents maximum throughput, the resource can scale up to.
    maxThroughput number
    Represents maximum throughput, the resource can scale up to.
    max_throughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Number
    Represents maximum throughput, the resource can scale up to.

    AutoscaleSettingsResponse, AutoscaleSettingsResponseArgs

    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    MaxThroughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Integer
    Represents maximum throughput, the resource can scale up to.
    maxThroughput number
    Represents maximum throughput, the resource can scale up to.
    max_throughput int
    Represents maximum throughput, the resource can scale up to.
    maxThroughput Number
    Represents maximum throughput, the resource can scale up to.

    CreateUpdateOptions, CreateUpdateOptionsArgs

    AutoscaleSettings Pulumi.AzureNative.DocumentDB.Inputs.AutoscaleSettings
    Specifies the Autoscale settings.
    Throughput int
    Request Units per second. For example, "throughput": 10000.
    AutoscaleSettings AutoscaleSettings
    Specifies the Autoscale settings.
    Throughput int
    Request Units per second. For example, "throughput": 10000.
    autoscaleSettings AutoscaleSettings
    Specifies the Autoscale settings.
    throughput Integer
    Request Units per second. For example, "throughput": 10000.
    autoscaleSettings AutoscaleSettings
    Specifies the Autoscale settings.
    throughput number
    Request Units per second. For example, "throughput": 10000.
    autoscale_settings AutoscaleSettings
    Specifies the Autoscale settings.
    throughput int
    Request Units per second. For example, "throughput": 10000.
    autoscaleSettings Property Map
    Specifies the Autoscale settings.
    throughput Number
    Request Units per second. For example, "throughput": 10000.

    MongoDBDatabaseGetPropertiesResponseOptions, MongoDBDatabaseGetPropertiesResponseOptionsArgs

    AutoscaleSettings Pulumi.AzureNative.DocumentDB.Inputs.AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    Throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    AutoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    Throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput Integer
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput number
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscale_settings AutoscaleSettingsResponse
    Specifies the Autoscale settings.
    throughput int
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.
    autoscaleSettings Property Map
    Specifies the Autoscale settings.
    throughput Number
    Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.

    MongoDBDatabaseGetPropertiesResponseResource, MongoDBDatabaseGetPropertiesResponseResourceArgs

    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB MongoDB database
    Rid string
    A system generated property. A unique identifier.
    Ts double
    A system generated property that denotes the last updated timestamp of the resource.
    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB MongoDB database
    Rid string
    A system generated property. A unique identifier.
    Ts float64
    A system generated property that denotes the last updated timestamp of the resource.
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB MongoDB database
    rid String
    A system generated property. A unique identifier.
    ts Double
    A system generated property that denotes the last updated timestamp of the resource.
    etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    id string
    Name of the Cosmos DB MongoDB database
    rid string
    A system generated property. A unique identifier.
    ts number
    A system generated property that denotes the last updated timestamp of the resource.
    etag str
    A system generated property representing the resource etag required for optimistic concurrency control.
    id str
    Name of the Cosmos DB MongoDB database
    rid str
    A system generated property. A unique identifier.
    ts float
    A system generated property that denotes the last updated timestamp of the resource.
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB MongoDB database
    rid String
    A system generated property. A unique identifier.
    ts Number
    A system generated property that denotes the last updated timestamp of the resource.

    MongoDBDatabaseResource, MongoDBDatabaseResourceArgs

    Id string
    Name of the Cosmos DB MongoDB database
    Id string
    Name of the Cosmos DB MongoDB database
    id String
    Name of the Cosmos DB MongoDB database
    id string
    Name of the Cosmos DB MongoDB database
    id str
    Name of the Cosmos DB MongoDB database
    id String
    Name of the Cosmos DB MongoDB database

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:documentdb:MongoDBResourceMongoDBDatabase databaseName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi