Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The mongoClusters resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DocumentDB/mongoClusters resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DocumentDB/mongoClusters@2023-03-15-preview' = {
location: 'string'
name: 'string'
properties: {
administratorLogin: 'string'
administratorLoginPassword: 'string'
createMode: 'string'
nodeGroupSpecs: [
{
diskSizeGB: int
enableHa: bool
kind: 'string'
nodeCount: int
sku: 'string'
}
]
restoreParameters: {
pointInTimeUTC: 'string'
sourceResourceId: 'string'
}
serverVersion: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.DocumentDB/mongoClusters
Name | Description | Value |
---|---|---|
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required) |
properties | Properties of the mongo cluster. | MongoClusterProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
MongoClusterProperties
Name | Description | Value |
---|---|---|
administratorLogin | The administrator's login for the mongo cluster. | string |
administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. |
createMode | The mode to create a mongo cluster. | 'Default' 'PointInTimeRestore' 'Restore' |
nodeGroupSpecs | The list of node group specs in the cluster. | NodeGroupSpec[] |
restoreParameters | Parameters used for restore operations | MongoClusterRestoreParameters |
serverVersion | The Mongo DB server version. Defaults to the latest available version if not specified. | string |
MongoClusterRestoreParameters
Name | Description | Value |
---|---|---|
pointInTimeUTC | UTC point in time to restore a mongo cluster | string |
sourceResourceId | Resource ID to locate the source cluster to restore | string |
NodeGroupSpec
Name | Description | Value |
---|---|---|
diskSizeGB | The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. | int |
enableHa | Whether high availability is enabled on the node group. | bool |
kind | The node type deployed in the node group. | 'Shard' |
nodeCount | The number of nodes in the node group. | int |
sku | The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. | string |
TrackedResourceTags
Name | Description | Value |
---|
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Cosmos DB for MongoDB (vCore) | AVM Resource Module for Cosmos DB for MongoDB (vCore) |
ARM template resource definition
The mongoClusters resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DocumentDB/mongoClusters resource, add the following JSON to your template.
{
"type": "Microsoft.DocumentDB/mongoClusters",
"apiVersion": "2023-03-15-preview",
"name": "string",
"location": "string",
"properties": {
"administratorLogin": "string",
"administratorLoginPassword": "string",
"createMode": "string",
"nodeGroupSpecs": [
{
"diskSizeGB": "int",
"enableHa": "bool",
"kind": "string",
"nodeCount": "int",
"sku": "string"
}
],
"restoreParameters": {
"pointInTimeUTC": "string",
"sourceResourceId": "string"
},
"serverVersion": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.DocumentDB/mongoClusters
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2023-03-15-preview' |
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required) |
properties | Properties of the mongo cluster. | MongoClusterProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.DocumentDB/mongoClusters' |
MongoClusterProperties
Name | Description | Value |
---|---|---|
administratorLogin | The administrator's login for the mongo cluster. | string |
administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. |
createMode | The mode to create a mongo cluster. | 'Default' 'PointInTimeRestore' 'Restore' |
nodeGroupSpecs | The list of node group specs in the cluster. | NodeGroupSpec[] |
restoreParameters | Parameters used for restore operations | MongoClusterRestoreParameters |
serverVersion | The Mongo DB server version. Defaults to the latest available version if not specified. | string |
MongoClusterRestoreParameters
Name | Description | Value |
---|---|---|
pointInTimeUTC | UTC point in time to restore a mongo cluster | string |
sourceResourceId | Resource ID to locate the source cluster to restore | string |
NodeGroupSpec
Name | Description | Value |
---|---|---|
diskSizeGB | The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. | int |
enableHa | Whether high availability is enabled on the node group. | bool |
kind | The node type deployed in the node group. | 'Shard' |
nodeCount | The number of nodes in the node group. | int |
sku | The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. | string |
TrackedResourceTags
Name | Description | Value |
---|
Usage Examples
Terraform (AzAPI provider) resource definition
The mongoClusters resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DocumentDB/mongoClusters resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DocumentDB/mongoClusters@2023-03-15-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
administratorLogin = "string"
administratorLoginPassword = "string"
createMode = "string"
nodeGroupSpecs = [
{
diskSizeGB = int
enableHa = bool
kind = "string"
nodeCount = int
sku = "string"
}
]
restoreParameters = {
pointInTimeUTC = "string"
sourceResourceId = "string"
}
serverVersion = "string"
}
}
}
Property Values
Microsoft.DocumentDB/mongoClusters
Name | Description | Value |
---|---|---|
location | The geo-location where the resource lives | string (required) |
name | The resource name | string Constraints: Min length = 3 Max length = 40 Pattern = ^[a-z0-9]+(-[a-z0-9]+)* (required) |
properties | Properties of the mongo cluster. | MongoClusterProperties |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.DocumentDB/mongoClusters@2023-03-15-preview" |
MongoClusterProperties
Name | Description | Value |
---|---|---|
administratorLogin | The administrator's login for the mongo cluster. | string |
administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. |
createMode | The mode to create a mongo cluster. | 'Default' 'PointInTimeRestore' 'Restore' |
nodeGroupSpecs | The list of node group specs in the cluster. | NodeGroupSpec[] |
restoreParameters | Parameters used for restore operations | MongoClusterRestoreParameters |
serverVersion | The Mongo DB server version. Defaults to the latest available version if not specified. | string |
MongoClusterRestoreParameters
Name | Description | Value |
---|---|---|
pointInTimeUTC | UTC point in time to restore a mongo cluster | string |
sourceResourceId | Resource ID to locate the source cluster to restore | string |
NodeGroupSpec
Name | Description | Value |
---|---|---|
diskSizeGB | The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. | int |
enableHa | Whether high availability is enabled on the node group. | bool |
kind | The node type deployed in the node group. | 'Shard' |
nodeCount | The number of nodes in the node group. | int |
sku | The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. | string |
TrackedResourceTags
Name | Description | Value |
---|