Mongo DB Resources - Get Mongo DB Database

Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided name.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}?api-version=2021-03-01-preview

URI Parameters

Name In Required Type Description
accountName
path True
  • string

Cosmos DB database account name.

Regex pattern: ^[a-z0-9]+(-[a-z0-9]+)*

databaseName
path True
  • string

Cosmos DB database name.

resourceGroupName
path True
  • string

The name of the resource group. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True
  • string

The ID of the target subscription.

api-version
query True
  • string

The API version to use for this operation.

Responses

Name Type Description
200 OK

The MongoDB database property was retrieved successfully.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Impersonate your user account

Examples

CosmosDBMongoDBDatabaseGet

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName?api-version=2021-03-01-preview

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/mongodbDatabases/databaseName",
  "name": "databaseName",
  "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases",
  "location": "West US",
  "tags": {},
  "properties": {
    "resource": {
      "id": "databaseName",
      "_rid": "PD5DALigDgw=",
      "_ts": 1459200611,
      "_etag": "\"00005900-0000-0000-0000-56f9a2630000\""
    }
  }
}

Definitions

AutoscaleSettings
ManagedServiceIdentity

Identity for the resource.

MongoDBDatabaseGetResults

An Azure Cosmos DB MongoDB database.

Options
Resource
ResourceIdentityType

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

UserAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

AutoscaleSettings

Name Type Description
maxThroughput
  • integer

Represents maximum throughput, the resource can scale up to.

ManagedServiceIdentity

Identity for the resource.

Name Type Description
principalId
  • string

The principal id of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId
  • string

The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.

type

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

userAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

MongoDBDatabaseGetResults

An Azure Cosmos DB MongoDB database.

Name Type Description
id
  • string

The unique resource identifier of the ARM resource.

identity

Identity for the resource.

location
  • string

The location of the resource group to which the resource belongs.

name
  • string

The name of the ARM resource.

properties.options
properties.resource
tags
  • object

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".

type
  • string

The type of Azure resource.

Options

Name Type Description
autoscaleSettings

Specifies the Autoscale settings.

throughput
  • integer

Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details.

Resource

Name Type Description
_etag
  • string

A system generated property representing the resource etag required for optimistic concurrency control.

_rid
  • string

A system generated property. A unique identifier.

_ts
  • number

A system generated property that denotes the last updated timestamp of the resource.

id
  • string

Name of the Cosmos DB MongoDB database

ResourceIdentityType

The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.

Name Type Description
None
  • string
SystemAssigned
  • string
SystemAssigned,UserAssigned
  • string
UserAssigned
  • string

UserAssignedIdentities

The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

Name Type Description