Navigation

Modify a Cluster

Multi-Cloud Clusters Unsupported

This endpoint returns the MULTI_CLOUD_CLUSTER_INVALID error if you specify a multi-cloud cluster.

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

Feature unavailable in Free and Shared-Tier Clusters

This feature is not available for M0 (Free Tier), M2, and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Tier), M2, and M5 Limitations.

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

Considerations

For a given region in an Atlas project with multi-region clusters or clusters in multiple regions, there is a limit of 40 MongoDB nodes on all other regions in that project. This limit applies across all cloud service providers and can be raised upon request. GCP regions communicating with each other do not count against this limit.

Example

If an Atlas project has:

  • 30 nodes in Region A
  • 10 nodes in Region B
  • 5 nodes in Region C

You can no longer add any nodes to your project in Region A or Region B. This is because the nodes in those clusters add up to 40, which is the maximum allowed per project. You can add up to 5 nodes in Region C while still satisfying the project limit.

This limit applies even if Regions A, B, and C are backed by different cloud service providers.

For Atlas projects where every cluster is deployed to a single region, you cannot create a multi-region cluster in that project if there are already 40 or more nodes in that single region unless you request that the limit be raised.

Please contact Atlas support for questions or assistance with raising this limit.

Request

Base URL: https://cloud.mongodb.com/api/atlas/v1.0

PATCH /groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}

Request Path Parameters

Path Parameter Type Necessity Description
PROJECT-ID string Required Unique identifier for the project containing the cluster.
CLUSTER-NAME string Required Name of the cluster to modify.

Request Body Parameters

Important

If modifying any of the providerSettings or replicationSpec values, you must specify the providerSettings.providerName. For M2 and M5 clusters, you must also specify the providerSettings.backingProviderName.

You cannot modify a paused cluster other than to resume the cluster. Nor can you pause a cluster with pending changes.

You do not need to provide all parameters when modifying a cluster, only the parameters you want to change and any parameters required to make that change.

Body Parameter Type Necessity Description
autoScaling object Optional

Collection of settings that configures auto-scaling information for the cluster.

If you specify the autoScaling object, you must also specify the providerSettings.autoScaling object.

autoScaling.compute object Optional

Specifies whether the cluster automatically scales its cluster tier and whether the cluster can scale down.

Important

Cluster tier auto-scaling is not available for clusters using Low CPU or NVME storage classes.

autoScaling.compute.enabled boolean Optional

Flag that indicates whether cluster tier auto-scaling is enabled. The default is false.

  • Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize.
  • Set to false to disable cluster tier auto-scaling.

Note

If you disable auto-scaling for your cluster, Atlas sets your minimum and maximum autoscaling bounds to null. If you re-enable autoscaling at a later time, you must set new values for providerSettings.autoScaling.compute.minInstanceSize and providerSettings.autoScaling.compute.maxInstanceSize.

autoScaling.compute.scaleDownEnabled boolean Conditional

Flag that indicates whether the cluster tier may scale down. Atlas requires this parameter if “autoScaling.compute.enabled” : true.

If you enable this option, specify a value for providerSettings.autoScaling.compute.minInstanceSize.

Note

To configure this value, you must set autoScaling.compute.enabled to true. In previous versions of Atlas, you could configure this value when autoScaling.compute.enabled was false.

autoScaling.diskGBEnabled boolean Optional

Flag that indicates whether disk auto-scaling is enabled. The default is true.

  • Set to true to enable disk auto-scaling.
  • Set to false to disable disk auto-scaling.

Note

Disk auto-scaling is subject to limitations based on the maximum amount of RAM for the selected cluster tier and the oplog size. See Customize Your Storage for details.

backupEnabled boolean Optional

Flag that indicates whether legacy backups have been enabled.

Set to false to disable legacy backups for the cluster. Atlas deletes any stored snapshots. See the legacy backup Snapshot Schedule for more information.

You cannot enable legacy backups if you have an existing cluster in the project with Cloud Backups enabled.

The default value is false.

Note

This option is not supported on clusters running MongoDB 4.2. Clusters running MongoDB 4.2 must use Cloud Backups.

Important

Clusters running MongoDB FCV 4.2 or later and any newnew Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backups: providerBackupEnabled

If you create a new Atlas cluster and set “backupEnabled” : true, the API responds with an error.

This change doesn’t affect existing clusters that use legacy backups.

biConnector object Optional

Configuration of BI Connector for Atlas on this cluster.

The MongoDB Connector for Business Intelligence for Atlas (BI Connector) is only available for M10 and larger clusters.

The BI Connector is a powerful tool which provides users SQL-based access to their MongoDB databases. As a result, the BI Connector performs operations which may be CPU and memory intensive. Given the limited hardware resources on M10 and M20 cluster tiers, you may experience performance degradation of the cluster when enabling the BI Connector. If this occurs, upgrade to an M30 or larger cluster or disable the BI Connector.

biConnector.enabled boolean Optional

Flag that indicates whether or not BI Connector for Atlas is enabled on the cluster.

  • Set to true to enable BI Connector for Atlas.
  • Set to false to disable BI Connector for Atlas.
biConnector.readPreference string Optional

Source from which the BI Connector for Atlas reads data. Each BI Connector for Atlas read preference contains a distinct combination of readPreference and readPreferenceTags options.

Value Description
primary BI Connector for Atlas reads data from the primary.
secondary BI Connector for Atlas reads data from a secondary. The preference defaults to this value if there are no analytics nodes in the cluster.
analytics BI Connector for Atlas reads data from an analytics node. Default if the cluster contains analytics nodes.

Note

To set the readPreference value to “analytics”, the cluster must have at least one analytics node.

If the readPreference value is “analytics”, you cannot remove all analytics nodes from the cluster.

clusterType string Conditional

Type of the cluster that you want to modify.

You cannot convert a sharded cluster deployment to a replica set deployment.

When should you use clusterType?

Condition Necessity
You set replicationSpecs. Required
You are deploying Global Clusters. Required
You are deploying non-Global replica sets and sharded clusters. Optional

Atlas accepts:

Value Cluster Type
REPLICASET replica set
SHARDED sharded cluster
GEOSHARDED global cluster
diskSizeGB number Conditional

Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (4 TB). This value must be a positive integer.

When should you use diskSizeGB?

This setting:

The minimum disk size for dedicated clusters is 10 GB for AWS and GCP, and 32 GB for Azure. If you specify diskSizeGB with a lower disk size, Atlas defaults to the minimum disk size value.

Each cluster tier has its own default value. If you set a value below the cluster default, Atlas replaces it with the default value. To view default values: open the Atlas web interface; click the button to add a new cluster; view the available default sizes; close the window without saving changes.

Important

Atlas calculates storage charges differently depending on whether you choose the default value or a custom value. For details, see Storage Capacity.

Note

The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require additional storage space beyond this limitation, consider upgrading your cluster to a higher tier.

Note

When you increase the storage capacity of a cluster, Atlas increases the cluster’s oplog size. Atlas scales the oplog to 5% of the cluster capacity, not to exceed 50 GB. NVMe storage requires an oplog which is 10% of the storage capacity. Atlas doesn’t change the oplog size if it exceeds 5% of the new storage capacity (10% in the case of NVMe storage).

As cluster storage capacity decreases, Atlas doesn’t change the oplog size unless it exceeds a certain maximum determined according to MongoDB best practices.

encryptionAtRestProvider string Optional

Cloud service provider that offers Encryption at Rest.

Specify AWS to enable Encryption at Rest using the Atlas project AWS Key Management System settings. The cluster must meet the following requirements:

Parameter Requirement
providerSettings.instanceSizeName M10 or greater
backupEnabled false or omitted

You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project.

Specify GCP to enable Encryption at Rest using the Atlas project GCP Key Management System settings. The cluster must meet the following requirements:

Parameter Requirement
providerSettings.instanceSizeName M10 or greater
backupEnabled false or omitted

You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project.

Specify AZURE to enable Encryption at Rest using the Atlas project Azure Key Management System settings. The cluster must meet the following requirements:

Parameter Requirement
providerSettings.instanceSizeName M10 or greater
backupEnabled false or omitted

You must configure encryption at rest for the Atlas project before enabling it on any cluster in the project.

Specify NONE to disable encryption at rest.

labels array of objects Optional

Collection of key-value pairs that tag and categorize the cluster.

Each key and value has a maximum length of 255 characters.

"labels": [
   {
     "key": "example key",
     "value": "example value"
   }
 ]

Note

The Atlas console doesn’t display your labels. Atlas returns them in the response body when you use the Atlas API to

mongoDBMajorVersion string Optional

Version of the cluster to deploy. Atlas supports the following MongoDB versions for M10+ clusters:

  • 3.6
  • 4.0
  • 4.2
  • 4.4

You must set this value to 4.4 if providerSettings.instanceSizeName is either M2 or M5.

MongoDB 4.4 on Shared Tier Clusters

You can deploy MongoDB 4.4 in Atlas free and shared-tier clusters (M0, M2 and M5) only in AWS region us-east-1.

Atlas always deploys the cluster with the latest stable release of the specified version. You can upgrade to a newer version of MongoDB when you modify a cluster

Note

If you are upgrading from version 4.0 to 4.2 and you have legacy backups enabled, you must set backupEnabled to false and set providerBackupEnabled to true as part of the API request. Continuous backups are no longer supported in MongoDB version 4.2. Instead, use Cloud Backups.

name string Optional Name of the cluster as it appears in Atlas. After Atlas creates the cluster, you can’t change its name.
numShards number Conditional

Positive integer that specifies the number of shards to deploy for a sharded cluster.

Important

If you use the replicationSpecs parameter, you must set numShards.

Atlas accepts 1 through 50, inclusive. The default value is 1.

  • If you specify a numShards value of 1 and a clusterType of SHARDED, Atlas deploys a single-shard sharded cluster.
  • If you specify a numShards value of 1 and a clusterType of REPLICASET, Atlas deploys a replica set.

Note

A sharded cluster with a single shard is not recommended for production environments. Single-shard sharded clusters do not provide the same high availability and horizontal scaling benefits as configurations with multiple shards.

For more information on sharded clusters, see Sharding in the MongoDB manual.

For details on how this setting affects costs, see Number of Nodes.

Note

Do not include in the request body for Global Clusters.

paused boolean Optional

Indicates whether the cluster is paused or not. The default value is false.

You cannot create a paused cluster. Either omit the parameter or explicitly set to false.

pitEnabled boolean Optional Indicates if the cluster uses continuous cloud backups. If set to true, providerBackupEnabled must also be set to true.
providerBackupEnabled boolean Conditional

Set true or false to enable or disable Cloud Backups for cluster backups. If providerBackupEnabled and backupEnabled are false, the cluster does not use Atlas backups.

If you disable legacy backups for the cluster, Atlas deletes all stored snapshots. See the legacy backup Snapshot Schedule for more information.

You cannot enable Cloud Backups if you have an existing cluster in the project with Legacy Backups enabled.

Important

You must set this value to true for NVMe clusters.

providerSettings object Optional Configuration for the provisioned servers on which MongoDB runs. The available options are specific to the cloud service provider.
providerSettings.autoScaling object Conditional

Contains the minInstanceSize and maxInstanceSize parameters which specify the range of instance sizes to which your cluster can scale. Atlas requires this parameter if “autoScaling.compute.enabled” : true.

Important

To configure this value, you must set autoScaling.compute.enabled to true. In previous versions of Atlas, you could configure this value when autoScaling.compute.enabled was false.

providerSettings.autoScaling.compute object Conditional Range of instance sizes to which your cluster can scale. Atlas requires this parameter if “autoScaling.compute.enabled” : true.
providerSettings.autoScaling.compute.minInstanceSize string Conditional Minimum instance size to which your cluster can automatically scale (such as M10). Atlas requires this parameter if “autoScaling.compute.scaleDownEnabled” : true.
providerSettings.autoScaling.compute.maxInstanceSize string Conditional Maximum instance size to which your cluster can automatically scale (such as M40). Atlas requires this parameter if “autoScaling.compute.enabled” : true.
providerSettings.backingProviderName string Conditional

Cloud service provider on which the server for a multi-tenant cluster is provisioned.

This setting only works when “providerSetting.providerName” : “TENANT” and “providerSetting.instanceSizeName” : M2 or M5.

Atlas accepts the following values:

AWS Amazon AWS
GCP Google Cloud Platform
AZURE Microsoft Azure
providerSettings.diskIOPS number Conditional

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider.

Maximum input/output operations per second (IOPS) the system can perform. The possible values depend on the selected providerSettings.instanceSizeName and diskSizeGB.

This setting requires that providerSettings.instanceSizeName to be M30 or greater and cannot be used with clusters with local NVMe SSDs.

To view the possible range of IOPS values for the selected instance size and storage capacity:

  1. Open the Atlas web interface.
  2. Select Build a New Cluster.
  3. Under Cloud Provider & Region, select AWS.
  4. Under Cloud Provider & Region, select the region corresponding to your configured providerSettings.regionName.
  5. Under Cluster Tier, select the cluster tier corresponding to your configured providerSettings.instanceSizeName.
  6. Under Cluster Tier, set the Storage Capacity slider to your configured diskSizeGB. Alternatively, input the exact value of diskSizeGB in the input box to the right of the slider.

You can see the available IOPS range by checking the Provision IOPS box.

Note

If you set the diskIOPS value to a value higher than the default value for the selected volume size, Atlas automatically sets providerSettings.volumeType to PROVISIONED. If you manually set diskIOPS to the default value, you must specify providerSettings.volumeType to be either PROVISIONED or STANDARD.

The default value for providerSettings.diskIOPS is the same as the cluster tier’s Standard IOPS value, as viewable in the Atlas interface.

Changing this value affects the cost of running the cluster as described in the billing documentation.

Atlas enforces the following minimum ratios for given cluster tiers. This keeps cluster performance consistent with large datasets.

Tier Ratio of Disk Capacity : System Memory
M10 - M40 60:1
=> M50 120:1

Example

To support 3 TB (or 3,072 GB) of disk capacity, select a cluster tier with a minimum of 32 GB of RAM. This would be M50 or greater.

providerSettings.diskTypeName string Conditional

Type of disk if you selected Azure as your cloud service provider.

Disk type of the server’s root volume for Azure instances. If omitted, Atlas uses the default disk type for the selected providerSettings.instanceSizeName.

The following table lists the possible values for this field, and their corresponding storage size.

diskTypeName Storage Size
P4 1 32GB
P6 64GB
P10 2 128GB
P15 256GB
P20 512GB
P30 1024GB
P40 2048GB
P50 4095GB

1 Default for M20 and M30 Azure clusters

2 Default for M40+ Azure clusters

providerSettings.encryptEBSVolume boolean Conditional

Flag that indicates whether the Amazon EBS encryption feature encrypts the host’s root volume for both data at rest within the volume and for data moving between the volume and the cluster.

Note

This setting is always enabled for clusters with local NVMe SSDs.

The default value is true.

providerSettings.instanceSizeName string Required

Atlas provides different cluster tiers, each with a default storage capacity and RAM size. The cluster you select is used for all the data-bearing servers in your cluster.

See also

Number of Nodes.

Instance Size Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 10 GB 2 GB
M20 20 GB 4 GB
M30 40 GB 8 GB
M40 80 GB 16 GB
M40 Low-CPU (R40) 80 GB 16 GB
M40_NVME 380 GB 15.25 GB
M50 160 GB 32 GB
M50 Low-CPU (R50) 160 GB 32 GB
M50_NVME 760 GB 30.5 GB
M60 320 GB 64 GB
M60 Low-CPU (R60) 320 GB 64 GB
M60_NVME 1.6 TB 61 GB
M80 760 GB 131 GB
M80 Low-CPU (R80) 750 GB 122 GB
M80_NVME 1.6 TB 122 GB
M100 1 TB 160 GB
M140 1 1 TB 192 GB
M200 1.5 TB 256 GB
M200 Low-CPU (R200) 1.5 TB 256 GB
M200_NVME 3.1 TB 244 GB
M300 1 2 TB 384 GB
M300 Low-CPU (R300) 2 TB 384 GB
M400 Low-CPU (R400) 3 TB 488 GB
M400_NVME 2 4 TB 512 GB
M700 Low-CPU (R700) 4 TB 768 GB

1 Unavailable in the AP_SOUTHEAST_2 region.

2 Availability limited to the following regions:

  • US_EAST_1
  • US_EAST_2
  • US_WEST_2
  • EU_WEST_1
  • EU_CENTRAL_1
  • AP_NORTHEAST_1

Atlas supports the following cluster tiers. Atlas supports deploying M2 and M5 tiers into a subset of available regions. The documentation for providersettings.regionName includes a list of these regions.

Cluster Tier Naming Conventions

Cluster tier names that are:

  • Appended with _NVME (M40_NVME for example) use direct attached NVMe storage for exceptional performance with the most I/O-intensive workloads.
  • Prepended with R instead of an M (R40 for example) run a low CPU version of the cluster.
Cluster Tiers Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 32 GB 2 GB
M20 32 GB 4 GB
M30 32 GB 8 GB
M40 128 GB 16 GB
M40 Low-CPU (R40) 128 GB 16 GB
M50 128 GB 32 GB
M50 Low-CPU (R50) 128 GB 32 GB
M60 128 GB 64 GB
M60 Low-CPU (R60) 128 GB 64 GB
M80 256 GB 128 GB
M80 Low-CPU (R80) 256 GB 128 GB
M200 256 GB 256 GB
M200 Low-CPU (R200) 256 GB 256 GB
M300 Low-CPU (R300) 1 512 GB 384 GB
M400 Low-CPU (R400) 512 GB 432 GB

1 Not available in the following regions:

  • germanywestcentral
  • switzerlandnorth
  • switzerlandwest
Cluster Tiers Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 10 GB 1.7 GB
M20 20 GB 3.8 GB
M30 40 GB 7.5 GB
M40 80 GB 15 GB
M40 Low-CPU (R40) 2 80 GB 16 GB
M50 160 GB 30 GB
M50 Low-CPU (R50) 2 160 GB 32 GB
M60 320 GB 60 GB
M60 Low-CPU (R60) 2 320 GB 64 GB
M80 750 GB 120 GB
M80 Low-CPU (R80) 2 750 GB 128 GB
M200 1500 GB 240 GB
M200 Low-CPU (R200) 2 1500 GB 256 GB
M300 1 2000 GB 360 GB
M300 Low-CPU (R300) 2 2000 GB 384 GB
M400 Low-CPU (R400) 2 3000 GB 512 GB
M400 Low-CPU (R600) 2 4096 GB 640 GB

1 Unavailable in the following regions:

  • SOUTH_AMERICA_EAST_1
  • EUROPE_WEST_3
  • NORTHEASTERN_ASIA_PACIFIC
  • AUSTRALIA_SOUTHEAST_1

2 Atlas limits R-class instances to the following regions:

  • asia-east1
  • asia-northeast1
  • asia-southeast1
  • europe-west1
  • europe-west2
  • europe-west4
  • us-central1
  • us-west1

Important

M2 and M5 clusters are multi-tenant deployments. You must set providerSettings.providerName to TENANT and specify the cloud service provider in providerSettings.backingProviderName.

providerSettings.providerName string Conditional

Cloud service provider on which Atlas provisions the hosts.

AWS Amazon AWS
GCP Google Cloud Platform
AZURE Microsoft Azure
TENANT

M2 or M5 multi-tenant cluster.

See providerSettings.backingProviderName for the cloud service provider where Atlas provisioned the host serving the cluster.

Important

M2 and M5 clusters are multi-tenant deployments. You must set providerSettings.providerName to TENANT and specify the cloud service provider in providerSettings.backingProviderName.

providerSettings.regionName string Conditional

Required if setting replicationSpecs array to empty

This parameter is required if you have not set any values in the replicationSpecs array.

Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases.

Do not specify this parameter when creating a multi-region cluster using the replicationSpec document.

During deployment of an M10+ dedicated paid cluster, Atlas creates a VPC for the selected provider and region or regions if no existing VPC or VPC peering connection exists for that provider and region. Atlas assigns the VPC a Classless Inter-Domain Routing (CIDR) block.

For clusters deployed on AWS, if you want to create a VPC peering connection to an AWS VPC and require a specific CIDR block for a given region, you must create a VPC connection before deploying the cluster. See Set up a Network Peering Connection for for complete documentation on VPC peering connections.

Important

Multi-region clusters require one VPC peering connection for each region. MongoDB nodes can use only the peering connection that resides in the same region as the nodes to communicate with the peered VPC.

Select your cloud provider’s tab for example cluster region names:

  • US_EAST_1
  • US_WEST_2
  • EU_WEST_1

For a complete list of supported AWS regions, see Amazon Web Services (AWS).

  • US_EAST_2
  • US_WEST
  • EUROPE_NORTH

For a complete list of supported Azure regions, see Microsoft Azure.

  • CENTRAL_US
  • WESTERN_EUROPE
  • EASTERN_ASIA_PACIFIC

For a complete list of supported GCP regions, see Google Cloud Platform (GCP).

providerSettings.volumeType string Conditional

Disk IOPS setting for AWS storage. Set only if you selected AWS as your cloud service provider.

Possible values are:

Volume Type providerSettings.diskIOPS Value
STANDARD Must not exceed the default IOPS rate for the selected volume size.
PROVISIONED Must fall within the allowable IOPS range for the selected volume size.
replicationFactor number Optional

Use replicationSpecs

replicationFactor is deprecated. Use replicationSpecs.

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy. Atlas accepts 3, 5, or 7. The default value is 3.

Don’t specify this parameter when creating a multi-region cluster using the replicationSpec object.

If your cluster is a sharded cluster, each shard is a replica set with the specified replication factor.

Atlas ignores this value if you pass the replicationSpec object.

replicationSpec object Optional

Use replicationSpecs

replicationSpec is deprecated. Use replicationSpecs.

Configuration of each region in a multi-region cluster. Each element in this document represents a region where Atlas deploys your cluster.

For single-region clusters, you can either specify the providerSettings.regionName and replicationFactor, or you can use the replicationSpec document to define a single region.

For multi-region clusters, omit the providerSettings.regionName parameter.

For Global Clusters, specify the replicationSpecs parameter rather than a replicationSpec parameter.

Important

If you use replicationSpec, you must specify a minimum of one replicationSpec.<region> object.

Use the replicationSpecs parameter to modify a Global Cluster.

Note

You cannot specify both the replicationSpec and replicationSpecs parameters in the same request body.

replicationSpec.<region> object Optional

Physical location of the region. Replace <region> with the name of the region. Each <region> document describes the region’s priority in elections and the number and type of MongoDB nodes Atlas deploys to the region. You must order each <region> by replicationSpec.priority descending.

You must specify at least one replicationSpec.<region> document.

Select your cloud provider’s tab for example cluster region names:

  • US_EAST_1
  • US_WEST_2
  • EU_WEST_1

For a complete list of supported AWS regions, see Amazon Web Services (AWS).

  • US_EAST_2
  • US_WEST
  • EUROPE_NORTH

For a complete list of supported Azure regions, see Microsoft Azure.

  • CENTRAL_US
  • WESTERN_EUROPE
  • EASTERN_ASIA_PACIFIC

For a complete list of supported GCP regions, see Google Cloud Platform (GCP).

For each <region> document, you must specify the analyticsNodes, electableNodes, priority, and readOnlyNodes parameters.

See also

Considerations.

During deployment of an M10+ dedicated paid cluster, Atlas creates a VPC for the selected provider and region or regions if no existing VPC or VPC peering connection exists for that provider and region. Atlas assigns the VPC a Classless Inter-Domain Routing (CIDR) block.

For clusters deployed on AWS, if you want to create a VPC peering connection to an AWS VPC and require a specific CIDR block for a given region, you must create a VPC connection before deploying the cluster. See Set up a Network Peering Connection for for complete documentation on VPC peering connections.

Important

Multi-region clusters require one VPC peering connection for each region. MongoDB nodes can use only the peering connection that resides in the same region as the nodes to communicate with the peered VPC.

replicationSpec.<region>.analyticsNodes number Optional

The number of analytics nodes for Atlas to deploy to the region. Analytics nodes are useful for handling analytic data such as reporting queries from BI Connector for Atlas. Analytics nodes are read-only, and can never become the primary.

If you do not specify this option, no analytics nodes are deployed to the region.

replicationSpec.<region>.electableNodes number Optional

Number of electable nodes for Atlas to deploy to the region. Electable nodes can become the primary and can facilitate local reads.

The total number of electableNodes across all replicationSpec.<region> document must be 3, 5, or 7.

Specify 0 if you do not want any electable nodes in the region.

You cannot create electable nodes if the replicationSpec.<region>.priority is 0.

replicationSpec.<region>.priority number Optional

Election priority of the region. For regions with only replicationSpec.<region>.readOnlyNodes, set this value to 0.

For regions where replicationSpec.<region>.electableNodes is at least 1, each replicationSpec.<region> must have a priority of exactly one (1) less than the previous region. The first region must have a priority of 7. The lowest possible priority is 1.

The priority 7 region identifies the Preferred Region of the cluster. Atlas places the primary node in the Preferred Region. Priorities 1 through 7 are exclusive - no more than one region per cluster can be assigned a given priority.

For example, if you have three regions, their priorities would be 7, 6, and 5 respectively. If you added two more regions for supporting electable nodes, the priorities of those regions would be 4 and 3 respectively.

replicationSpec.<region>.readOnlyNodes number Optional

Number of read-only nodes for Atlas to deploy to the region. Read-only nodes can never become the primary, but can facilitate local-reads.

Specify 0 if you do not want any read-only nodes in the region.

replicationSpecs array of objects Conditional

Configuration for cluster regions.

When should you use replicationSpecs?

Condition Necessity Values
You are deploying Global Clusters. Required Each document in the array represents a zone where Atlas deploys your cluster’s nodes.
You are deploying non-Global replica sets and sharded clusters. Optional This array has one document representing where Atlas deploys your cluster’s nodes.

You must specify all parameters in replicationSpecs object array.

What parameters depend on replicationSpecs?

If you set replicationSpecs, you must:

  • Set clusterType
  • Set numShards
  • Not set replicationSpec
  • Not use clusters with local NVMe SSDs
  • Not use Azure clusters
replicationSpecs[n].id string Conditional

Unique identifier of the replication object for a zone in a Global Cluster. Must be exactly 24 hexadecimal digits in length.

When is this value needed?
Condition Necessity
Existing zones included in a cluster modification request body. Required
Adding a new zone to an existing Global Cluster. Optional

Warning

Atlas deletes any existing zones in a Global Cluster that are not included in a cluster modification request.

replicationSpecs[n].numShards number Required Number of shards to deploy in the specified zone. The default value is 1.
replicationSpecs[n].regionsConfig object Optional

Physical location of the region. Each regionsConfig document describes the region’s priority in elections and the number and type of MongoDB nodes Atlas deploys to the region. You must order each regionsConfigs document by regionsConfig.priority, descending.

During deployment of an M10+ dedicated paid cluster, Atlas creates a VPC for the selected provider and region or regions if no existing VPC or VPC peering connection exists for that provider and region. Atlas assigns the VPC a Classless Inter-Domain Routing (CIDR) block.

For clusters deployed on AWS, if you want to create a VPC peering connection to an AWS VPC and require a specific CIDR block for a given region, you must create a VPC connection before deploying the cluster. See Set up a Network Peering Connection for for complete documentation on VPC peering connections.

Important

Multi-region clusters require one VPC peering connection for each region. MongoDB nodes can use only the peering connection that resides in the same region as the nodes to communicate with the peered VPC.

Select your cloud service provider’s tab for example cluster region names:

  • US_EAST_1
  • US_WEST_2
  • EU_WEST_1

For a complete list of supported AWS regions, see Amazon Web Services (AWS).

  • US_EAST_2
  • US_WEST
  • EUROPE_NORTH

For a complete list of supported Azure regions, see Microsoft Azure.

  • CENTRAL_US
  • WESTERN_EUROPE
  • EASTERN_ASIA_PACIFIC

For a complete list of supported GCP regions, see Google Cloud Platform (GCP).

replicationSpecs[n].regionsConfig.electableNodes number Optional Number of electable nodes for Atlas to deploy to the region. Electable nodes can become the primary and can facilitate local reads.
replicationSpecs[n].regionsConfig.readOnlyNodes number Optional

Number of read-only nodes for Atlas to deploy to the region. Read-only nodes can never become the primary, but can facilitate local-reads.

Specify 0 if you do not want any read-only nodes in the region.

replicationSpecs[n].regionsConfig.analyticsNodes number Optional

The number of analytics nodes for Atlas to deploy to the region. Analytics nodes are useful for handling analytic data such as reporting queries from BI Connector for Atlas. Analytics nodes are read-only, and can never become the primary.

If you do not specify this option, no analytics nodes are deployed to the region.

replicationSpecs[n].regionsConfig.priority number Optional Election priority of the region. For regions with only read-only nodes, set this value to 0.
replicationSpecs[n].zoneName string Optional Name for the zone in a Global Cluster. Don’t provide this value if clusterType is not GEOSHARDED.

Response

Name Type Description
autoScaling object

Collection of settings that configures auto-scaling information for the cluster.

autoScaling.compute object Collection of settings that configure how a cluster might scale its cluster tier and whether the cluster can scale down.
autoScaling.compute.enabled boolean Flag that indicates whether cluster tier auto-scaling is enabled.
autoScaling.compute.scaleDownEnabled boolean Flag that indicates whether the cluster tier can scale down.
autoScaling.diskGBEnabled boolean Flag that indicates whether disk auto-scaling is enabled.
backupEnabled boolean

Flag that indicates whether legacy backup has been enabled.

Important

Clusters running MongoDB FCV 4.2 or later and any newnew Atlas clusters of any type do not support this parameter. These clusters must use Cloud Backups: providerBackupEnabled

This change doesn’t affect existing Atlas clusters that use legacy backups.

biConnector object

Collection of settings that configure a BI Connector for Atlas for the cluster.

The MongoDB Connector for Business Intelligence for Atlas (BI Connector) is only available for M10 and larger clusters.

The BI Connector is a powerful tool which provides users SQL-based access to their MongoDB databases. As a result, the BI Connector performs operations which may be CPU and memory intensive. Given the limited hardware resources on M10 and M20 cluster tiers, you may experience performance degradation of the cluster when enabling the BI Connector. If this occurs, upgrade to an M30 or larger cluster or disable the BI Connector.

biConnector.enabled boolean Flag that indicates whether Atlas enabled the BI Connector for Atlas for this cluster.
biConnector.readPreference string

Source from which the BI Connector for Atlas reads data.

Value Description
primary BI Connector for Atlas reads data from the primary.
secondary BI Connector for Atlas reads data from a secondary.
analytics
BI Connector for Atlas reads data from an
analytics node.
clusterType string

Type of the cluster:

Value Description
REPLICASET replica set
SHARDED sharded cluster
GEOSHARDED global cluster
connectionStrings object

Set of connection strings that your applications use to connect to this cluster.

Use the parameters in this object to connect your applications to this cluster.

Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.

connectionStrings.privateEndpoint array of objects Private endpoint connection strings. Each object describes the connection strings you can use to connect to this cluster through a private endpoint. Atlas returns this parameter only if you deployed a private endpoint to all regions to which you deployed this cluster’s nodes.
connectionStrings.privateEndpoint[n].connectionString string Private-endpoint-aware mongodb://connection string for this private endpoint.
connectionStrings.privateEndpoint[n].endpoints array of objects Private endpoint through which you connect to Atlas when you use connectionStrings.privateEndpoint[n].connectionString or connectionStrings.privateEndpoint[n].srvConnectionString.
connectionStrings.privateEndpoint[n].endpoints[n].endpointId string Unique identifier of the private endpoint.
connectionStrings.privateEndpoint[n].endpoints[n].providerName string Cloud provider to which you deployed the private endpoint. Atlas returns AWS or AZURE.
connectionStrings.privateEndpoint[n].endpoints[n].region string Region to which you deployed the private endpoint.
connectionStrings.privateEndpoint[n].srvConnectionString string

Private-endpoint-aware mongodb+srv:// connection string for this private endpoint.

The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to:

  • Append the seed list or
  • Change the URI if the nodes change.

Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.privateEndpoint[n].connectionString.

See also

Seedlist format

connectionStrings.privateEndpoint[n].type string

Type of MongoDB process that you connect to with the connection strings. Atlas returns:

  • MONGOD for replica sets, or
  • MONGOS for sharded clusters.
connectionStrings.standard string Public mongodb:// connection string for this cluster.
connectionStrings.standardSrv string

Public mongodb+srv:// connection string for this cluster.

See also

Seedlist format

connectionStrings.private string

Network-peering-endpoint-aware mongodb://connection strings for each interface VPC endpoint you configured to connect to this cluster. Atlas returns this parameter only if you created a network peering connection to this cluster.

Note

For AWS clusters, Atlas doesn’t return this parameter unless you enable custom DNS.

connectionStrings.privateSrv string

Network-peering-endpoint-aware mongodb+srv:// connection strings for each interface VPC endpoint you configured to connect to this cluster. Atlas returns this parameter only if you created a network peering connection to this cluster.

The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to:

  • Append the seed list or
  • Change the URI if the nodes change.

Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.private.

See also

Seedlist format

Note

For AWS clusters, Atlas doesn’t return this parameter unless you enable custom DNS.

connectionStrings.awsPrivateLink object

Important

This field is deprecated. Use connectionStrings.privateEndpoint[n].connectionString instead.

Note

Atlas returns this parameter only if:

  • the cluster is deployed to AWS, and
  • you deployed a AWS PrivateLink private endpoint to the same regions as all of this cluster’s nodes.

Private-endpoint-aware mongodb://connection strings for each AWS PrivateLink private endpoint. Atlas returns this parameter only if you deployed a AWS PrivateLink private endpoint to the same regions as all of this cluster’s nodes.

In this object:

  • Each key is the unique identifier of an interface endpoint.
  • Each value is the mongodb:// connection string you use to connect to Atlas through the interface endpoint the key names.
connectionStrings.awsPrivateLinkSrv object

Important

This field is deprecated. Use connectionStrings.privateEndpoint[n].srvConnectionString instead.

Note

Atlas returns this parameter only if:

  • the cluster is deployed to AWS, and
  • you deployed a AWS PrivateLink private endpoint to the same regions as all of this cluster’s nodes.

Private-endpoint-aware mongodb+srv:// connection strings for each AWS PrivateLink private endpoint.

In this object:

  • Each key is the unique identifier of an interface endpoint.
  • Each value is the mongodb+srv:// connection string you use to connect to Atlas through the interface endpoint the key names.

The mongodb+srv protocol tells the driver to look up the seed list of hosts in DNS. Atlas synchronizes this list with the nodes in a cluster. If the connection string uses this URI format, you don’t need to:

  • Append the seed list or
  • Change the URI if the nodes change.

Use this URI format if your driver supports it. If it doesn’t, use connectionStrings.awsPrivateLink.

See also

Seedlist format

createDate string Timestamp in ISO 8601 date and time format in UTC when Atlas created the cluster.
diskSizeGB number

Capacity, in gigabytes, of the host’s root volume. Increase this number to add capacity, up to a maximum possible value of 4096 (4 TB). This value must be a positive integer.

When should you use diskSizeGB?

This setting:

The minimum disk size for dedicated clusters is 10 GB for AWS and GCP, and 32 GB for Azure. If you specify diskSizeGB with a lower disk size, Atlas defaults to the minimum disk size value.

Important

Atlas calculates storage charges differently depending on whether you choose the default value or a custom value.

See also

Storage Capacity.

Note

The maximum value for disk storage cannot exceed 50 times the maximum RAM for the selected cluster. If you require additional storage space beyond this limitation, consider upgrading your cluster to a higher tier.

encryptionAtRestProvider string

Cloud service provider that offers Encryption at Rest.

groupId string Unique identifier of the project to which the cluster belongs.
id string Unique identifier of the cluster.
labels array of documents Collection of key-value pairs that tag and categorize the cluster.
mongoDBVersion string Version of MongoDB the cluster runs, in <major version>.<minor version> format.
mongoDBMajorVersion string

Major version of MongoDB the cluster runs:

  • 3.6
  • 4.0
  • 4.2
  • 4.4
mongoURI string

Base connection string for the cluster.

Atlas only displays this parameter after the cluster is operational, not while it builds the cluster.

mongoURIUpdated string Timestamp in ISO 8601 date and time format in UTC when the connection string was last updated. The connection string changes if you update any of the other values.
mongoURIWithOptions string

connection string for connecting to the Atlas cluster. Includes the replicaSet, ssl, and authSource query parameters in the connection string with values appropriate for the cluster.

To review the connection string format, see the connection string format documentation. To add database users to a Atlas project, see Configure Database Users.

Atlas only displays this parameter after the cluster is operational, not while it builds the cluster.

name string Name of the cluster as it appears in Atlas.
numShards number

Positive integer that specifies the number of shards for a sharded cluster.

If this is set to 1, the cluster is a replica set.

If this is set to 2 or higher, the cluster is a sharded cluster with the number of shards specified.

See also

Number of Nodes.

Atlas might return values between 1 and 12.

Note

Atlas doesn’t return this value in the response body for Global Clusters.

paused boolean Flag that indicates whether the cluster is paused.
pitEnabled boolean Flag that indicates if the cluster uses Continuous Cloud Backup backups.
providerBackupEnabled boolean

Applicable only for M10+ clusters.

Flag that indicates if the cluster uses Cloud Backups for backups.

If true, the cluster uses Cloud Backups for backups. If providerBackupEnabled and backupEnabled are false, the cluster does not use Atlas backups.

providerSettings object Configuration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider.
providerSettings.autoScaling object

Range of instance sizes to which your cluster can scale.

Important

You can’t specify the providerSettings.autoScaling object if “autoScaling.compute.enabled” : false.

providerSettings.autoScaling.compute object Range of instance sizes to which your cluster can scale. Atlas requires this parameter if “autoScaling.compute.enabled” : true.
providerSettings.autoScaling.compute.minInstanceSize string Minimum instance size to which your cluster can automatically scale.
providerSettings.autoScaling.compute.maxInstanceSize string Maximum instance size to which your cluster can automatically scale.
providerSettings.backingProviderName string

Cloud service provider on which the multi-tenant host is provisioned. Atlas returns this parameter only if “providerSettings.providerName” : “TENANT”.

Atlas can return:

AWS Amazon AWS
GCP Google Cloud Platform
AZURE Microsoft Azure
providerSettings.providerName string

Cloud service provider on which Atlas provisioned the hosts.

Atlas can return:

AWS Amazon AWS
GCP Google Cloud Platform
AZURE Microsoft Azure
TENANT

M2 or M5 multi-tenant cluster.

See providerSettings.backingProviderName for the cloud service provider where Atlas provisioned the host serving the cluster.

providerSettings.regionName string

Physical location of your MongoDB cluster. The region you choose can affect network latency for clients accessing your databases.

For a complete list of region name values, refer to the the cloud provider reference pages:

For multi-region clusters, see replicationSpec.<region>.

providerSettings.diskIOPS number Maximum IOPS the system can perform.
providerSettings.diskTypeName string

Disk type of the host’s root volume for Azure instances.

The following table lists the possible values for this parameter, and their corresponding storage size.

diskTypeName Storage Size
P4 [1] 32GB
P6 64GB
P10 [2] 128GB
P15 256GB
P20 512GB
P30 1024GB
P40 2048GB
P50 4095GB
[1]Default for M20 and M30 Azure cluster tiers
[2]Default for M40+ Azure cluster tiers
providerSettings.encryptEBSVolume boolean Flag that indicates whether the Amazon EBS encryption feature encrypts the host’s root volume for both data at rest within the volume and for data moving between the volume and the cluster.
providerSettings.instanceSizeName string

Name of the cluster tier used for the Atlas cluster.

Atlas supports the following cluster tiers. Atlas supports deploying M2 and M5 tiers into a subset of available regions. The documentation for providersettings.regionName includes a list of these regions.

Cluster Tier Naming Conventions

Cluster tier names that are:

  • Appended with _NVME (M40_NVME for example) use direct attached NVMe storage for exceptional performance with the most I/O-intensive workloads.
  • Prepended with R instead of an M (R40 for example) run a low CPU version of the cluster.
Instance Size Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 10 GB 2 GB
M20 20 GB 4 GB
M30 40 GB 8 GB
M40 80 GB 16 GB
M40 Low-CPU (R40) 80 GB 16 GB
M40_NVME 380 GB 15.25 GB
M50 160 GB 32 GB
M50 Low-CPU (R50) 160 GB 32 GB
M50_NVME 760 GB 30.5 GB
M60 320 GB 64 GB
M60 Low-CPU (R60) 320 GB 64 GB
M60_NVME 1.6 TB 61 GB
M80 760 GB 131 GB
M80 Low-CPU (R80) 750 GB 122 GB
M80_NVME 1.6 TB 122 GB
M100 1 TB 160 GB
M140 1 1 TB 192 GB
M200 1.5 TB 256 GB
M200 Low-CPU (R200) 1.5 TB 256 GB
M200_NVME 3.1 TB 244 GB
M300 1 2 TB 384 GB
M300 Low-CPU (R300) 2 TB 384 GB
M400 Low-CPU (R400) 3 TB 488 GB
M400_NVME 2 4 TB 512 GB
M700 Low-CPU (R700) 4 TB 768 GB

1 Unavailable in the AP_SOUTHEAST_2 region.

2 Availability limited to the following regions:

  • US_EAST_1
  • US_EAST_2
  • US_WEST_2
  • EU_WEST_1
  • EU_CENTRAL_1
  • AP_NORTHEAST_1
Cluster Tiers Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 32 GB 2 GB
M20 32 GB 4 GB
M30 32 GB 8 GB
M40 128 GB 16 GB
M40 Low-CPU (R40) 128 GB 16 GB
M50 128 GB 32 GB
M50 Low-CPU (R50) 128 GB 32 GB
M60 128 GB 64 GB
M60 Low-CPU (R60) 128 GB 64 GB
M80 256 GB 128 GB
M80 Low-CPU (R80) 256 GB 128 GB
M200 256 GB 256 GB
M200 Low-CPU (R200) 256 GB 256 GB
M300 Low-CPU (R300) 1 512 GB 384 GB
M400 Low-CPU (R400) 512 GB 432 GB

1 Not available in the following regions:

  • germanywestcentral
  • switzerlandnorth
  • switzerlandwest
Cluster Tiers Default Storage Default RAM
M2 2 GB Shared
M5 5 GB Shared
M10 10 GB 1.7 GB
M20 20 GB 3.8 GB
M30 40 GB 7.5 GB
M40 80 GB 15 GB
M40 Low-CPU (R40) 2 80 GB 16 GB
M50 160 GB 30 GB
M50 Low-CPU (R50) 2 160 GB 32 GB
M60 320 GB 60 GB
M60 Low-CPU (R60) 2 320 GB 64 GB
M80 750 GB 120 GB
M80 Low-CPU (R80) 2 750 GB 128 GB
M200 1500 GB 240 GB
M200 Low-CPU (R200) 2 1500 GB 256 GB
M300 1 2000 GB 360 GB
M300 Low-CPU (R300) 2 2000 GB 384 GB
M400 Low-CPU (R400) 2 3000 GB 512 GB
M400 Low-CPU (R600) 2 4096 GB 640 GB

1 Unavailable in the following regions:

  • SOUTH_AMERICA_EAST_1
  • EUROPE_WEST_3
  • NORTHEASTERN_ASIA_PACIFIC
  • AUSTRALIA_SOUTHEAST_1

2 Atlas limits R-class instances to the following regions:

  • asia-east1
  • asia-northeast1
  • asia-southeast1
  • europe-west1
  • europe-west2
  • europe-west4
  • us-central1
  • us-west1

Important

M2 and M5 clusters are multi-tenant deployments. You must set providerSettings.providerName to TENANT and specify the cloud service provider in providerSettings.backingProviderName.

replicationFactor number

Number of replica set members. Each member keeps a copy of your databases, providing high availability and data redundancy.

For multi-region clusters, add the total number of replicationSpec.<region>.electableNodes to calculate the replication factor of the cluster.

If your cluster is a sharded cluster, each shard is a replica set with the specified replication factor.

Atlas may return 3, 5, or 7.

replicationSpec object Configuration of each region in the cluster. Each element in this object represents a region where Atlas deploys your cluster.
replicationSpec.<region> object

Physical location of the region. The <region> string corresponds to a region where Atlas deploys your cluster.

Each <region> object describes the region’s priority in elections and the number and type of MongoDB nodes Atlas deploys to the region.

replicationSpec.<region>.analyticsNodes number Number of analytics nodes in the region. Analytics nodes are useful for handling analytic data such as reporting queries from BI Connector for Atlas. Analytics nodes are read-only, and can never become the primary.
replicationSpec.<region>.electableNodes number Number of electable nodes in the region. Electable nodes can become the primary and can facilitate local reads.
replicationSpec.<region>.priority number

Election priority of the region. The highest possible priority is 7, which identifies the Preferred Region of the cluster. Atlas places the primary node in the Preferred Region. The lowest possible priority is 0, which identifies a read-only region.

You can have any number of priority 0 read only regions. Priorities 1 through 7 are exclusive: only one region per cluster can be assigned a given priority.

replicationSpec.<region>.readOnlyNodes number Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads.
replicationSpecs array Configuration for each zone in a Global Cluster. Each object in this array represents a zone where Atlas deploys nodes for your Global Cluster.
replicationSpecs[n].id string Unique identifier of the replication object.
replicationSpecs[n].zoneName string Name for the zone.
replicationSpecs[n].numShards number Number of shards to deploy in the specified zone.
replicationSpecs[n].regionsConfig object Physical location of the region. Each regionsConfig object describes the region’s priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region.
replicationSpecs[n].regionsConfig.analyticsNodes number

The number of analytics nodes for Atlas to deploy to the region. Analytics nodes are useful for handling analytic data such as reporting queries from BI Connector for Atlas. Analytics nodes are read-only, and can never become the primary.

If you do not specify this option, no analytics nodes are deployed to the region.

replicationSpecs[n].regionsConfig.<regionName>.electableNodes number Number of electable nodes for Atlas to deploy to the region. Electable nodes can become the primary and can facilitate local reads.
replicationSpecs[n].regionsConfig.<regionName>.readOnlyNodes number

Number of read-only nodes for Atlas to deploy to the region. Read-only nodes can never become the primary, but can facilitate local-reads.

Specify 0 if you do not want any read-only nodes in the region.

replicationSpecs[n].regionsConfig.<regionName>.priority number Election priority of the region. If you have regions with only read-only nodes, set this value to 0.
replicationSpecs[n].zoneName string Name for the zone in a Global Cluster. Do not provide this value if clusterType is not GEOSHARDED.
srvAddress string Connection string for connecting to the Atlas cluster. The +srv modifier forces the connection to use TLS. The mongoURI parameter lists additional options.
stateName string

Current state of the cluster. The possible states are:

  • IDLE
  • CREATING
  • UPDATING
  • DELETING
  • DELETED
  • REPAIRING

Example Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Content-Type: application/json" \
     --include \
     --request PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/5356823b3794de37132bb7b/clusters/SingleRegionCluster" \
     --data '
       {
         "diskSizeGB": 320,
         "providerSettings": {
           "diskIOPS": 2400,
           "instanceSizeName": "M40",
         },
         "encryptionAtRestProvider": "AWS"
       }'
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Content-Type: application/json" \
     --include \
     --request PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/5fac2d0cd2124a40ce0cfc5c/clusters/MultiRegionCluster?pretty=true" \
     --data '
       {
         "diskSizeGB": 100,
         "clusterType": "REPLICASET",
         "providerSettings": {
           "providerName": "AWS",
           "instanceSizeName": "M30"
         },
         "replicationSpecs": [
           {
             "id": "5fac2d0cd2124a40ce0cfc5c",
             "numShards": 1,
             "regionsConfig": {
               "US_EAST_1": {
                 "analyticsNodes": 0,
                 "electableNodes": 2,
                 "priority": 7,
                 "readOnlyNodes": 0
               },
               "US_WEST_1": {
                 "analyticsNodes": 0,
                 "electableNodes": 1,
                 "priority": 6,
                 "readOnlyNodes": 0
               }
             }
           }
         ]
       }'
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
     --header "Content-Type: application/json" \
     --include \
     --request PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/5fac2d90d2124a40ce0cfdb5/clusters/TestGlobalCluster?pretty=true" \
     --data '
       {
         "replicationSpecs": [
         {
           "id" : "5fac2d90d2124a40ce0cfdb5",
           "regionsConfig" : {
             "US_WEST_1" : {
               "electableNodes" : 5,
               "priority" : 7,
               "readOnlyNodes" : 0
             }
           },
           "zoneName" : "Zone 1"
         }]
       }'

Example Response

Response Header

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}

Response Body

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
  "autoScaling": {
    "autoIndexingEnabled": false,
    "compute": {
      "enabled": false,
      "scaleDownEnabled": false
    },
    "diskGBEnabled": true
  },
  "backupEnabled": true,
  "biConnector": {
    "enabled": false,
    "readPreference": "secondary"
  },
  "clusterType": "REPLICASET",
  "connectionStrings": {
    "privateEndpoint": [
      {
        "connectionString": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1029,pl-0-us-east-1.uzgh6.mongodb.net:1027,pl-0-us-east-1.uzgh6.mongodb.net:1028/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0",
        "endpoints": [
          {
            "endpointId": "vpce-02be68a507d60cea4",
            "providerName": "AWS",
            "region": "US_WEST_1"
          },
          {
            "endpointId": "vpce-0c86b555d9a233152",
            "providerName": "AWS",
            "region": "US_EAST_1"
          }
        ],
        "srvConnectionString": "mongodb+srv://cluster3-pl-0.uzgh6.mongodb.net",
        "type": "MONGOD"
      }
    ],
    "standardSrv": "mongodb+srv://cluster3.uzgh6.mongodb.net",
    "awsPrivateLink": {
      "crossRegion-0": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1029,pl-0-us-east-1.uzgh6.mongodb.net:1027,pl-0-us-east-1.uzgh6.mongodb.net:1028/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0"
    },
    "awsPrivateLinkSrv": {
      "crossRegion-0": "mongodb+srv://cluster3-pl-0.uzgh6.mongodb.net"
    },
    "standard": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0"
  },
  "createDate": "2020-11-11T18:27:44Z",
  "diskSizeGB": 100,
  "encryptionAtRestProvider": "NONE",
  "groupId": "5f0e15e3d52a043fed8b1c92",
  "id": "5fac2d20d2124a40ce0cfca1",
  "labels": [],
  "links": [],
  "mongoDBMajorVersion": "4.2",
  "mongoDBVersion": "4.2.10",
  "mongoURI": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017",
  "mongoURIUpdated": "2020-11-11T18:36:16Z",
  "mongoURIWithOptions": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0",
  "name": "MultiRegionCluster",
  "numShards": 1,
  "paused": false,
  "pitEnabled": true,
  "providerBackupEnabled": true,
  "providerSettings": {
    "providerName": "AWS",
    "autoScaling": {
      "compute": {
        "maxInstanceSize": null,
        "minInstanceSize": null
      }
    },
    "diskIOPS": 100,
    "encryptEBSVolume": true,
    "instanceSizeName": "M30",
    "volumeType": "STANDARD"
  },
  "replicationSpec": {
    "US_EAST_1": {
      "analyticsNodes": 0,
      "electableNodes": 2,
      "priority": 7,
      "readOnlyNodes": 0
    },
    "US_WEST_1": {
      "analyticsNodes": 0,
      "electableNodes": 1,
      "priority": 6,
      "readOnlyNodes": 0
    }
  },
  "replicationSpecs": [
    {
      "id": "5fac2d0cd2124a40ce0cfc5c",
      "numShards": 1,
      "regionsConfig": {
        "US_EAST_1": {
          "analyticsNodes": 0,
          "electableNodes": 2,
          "priority": 7,
          "readOnlyNodes": 0
        },
        "US_WEST_1": {
          "analyticsNodes": 0,
          "electableNodes": 1,
          "priority": 6,
          "readOnlyNodes": 0
        }
      },
      "zoneName": "Zone 1"
    }
  ],
  "srvAddress": "mongodb+srv://cluster3.uzgh6.mongodb.net",
  "stateName": "UPDATING"
}
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
  "autoScaling": {
    "autoIndexingEnabled": false,
    "compute": {
      "enabled": false,
      "scaleDownEnabled": false
    },
    "diskGBEnabled": true
  },
  "backupEnabled": true,
  "biConnector": {
    "enabled": false,
    "readPreference": "secondary"
  },
  "clusterType": "REPLICASET",
  "connectionStrings": {
    "privateEndpoint": [
      {
        "connectionString": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1029,pl-0-us-east-1.uzgh6.mongodb.net:1027,pl-0-us-east-1.uzgh6.mongodb.net:1028/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0",
        "endpoints": [
          {
            "endpointId": "vpce-02be68a507d60cea4",
            "providerName": "AWS",
            "region": "US_WEST_1"
          },
          {
            "endpointId": "vpce-0c86b555d9a233152",
            "providerName": "AWS",
            "region": "US_EAST_1"
          }
        ],
        "srvConnectionString": "mongodb+srv://cluster3-pl-0.uzgh6.mongodb.net",
        "type": "MONGOD"
      }
    ],
    "standardSrv": "mongodb+srv://cluster3.uzgh6.mongodb.net",
    "awsPrivateLink": {
      "crossRegion-0": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1029,pl-0-us-east-1.uzgh6.mongodb.net:1027,pl-0-us-east-1.uzgh6.mongodb.net:1028/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0"
    },
    "awsPrivateLinkSrv": {
      "crossRegion-0": "mongodb+srv://cluster3-pl-0.uzgh6.mongodb.net"
    },
    "standard": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0"
  },
  "createDate": "2020-11-11T18:27:44Z",
  "diskSizeGB": 100,
  "encryptionAtRestProvider": "NONE",
  "groupId": "5f0e15e3d52a043fed8b1c92",
  "id": "5fac2d20d2124a40ce0cfca1",
  "labels": [],
  "links": [],
  "mongoDBMajorVersion": "4.2",
  "mongoDBVersion": "4.2.10",
  "mongoURI": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017",
  "mongoURIUpdated": "2020-11-11T18:36:16Z",
  "mongoURIWithOptions": "mongodb://cluster3-shard-00-00.uzgh6.mongodb.net:27017,cluster3-shard-00-01.uzgh6.mongodb.net:27017,cluster3-shard-00-02.uzgh6.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=atlas-95n5jj-shard-0",
  "name": "MultiRegionCluster",
  "numShards": 1,
  "paused": false,
  "pitEnabled": true,
  "providerBackupEnabled": true,
  "providerSettings": {
    "providerName": "AWS",
    "autoScaling": {
      "compute": {
        "maxInstanceSize": null,
        "minInstanceSize": null
      }
    },
    "diskIOPS": 100,
    "encryptEBSVolume": true,
    "instanceSizeName": "M30",
    "volumeType": "STANDARD"
  },
  "replicationSpec": {
    "US_EAST_1": {
      "analyticsNodes": 0,
      "electableNodes": 2,
      "priority": 7,
      "readOnlyNodes": 0
    },
    "US_WEST_1": {
      "analyticsNodes": 0,
      "electableNodes": 1,
      "priority": 6,
      "readOnlyNodes": 0
    }
  },
  "replicationSpecs": [
    {
      "id": "5fac2d0cd2124a40ce0cfc5c",
      "numShards": 1,
      "regionsConfig": {
        "US_EAST_1": {
          "analyticsNodes": 0,
          "electableNodes": 2,
          "priority": 7,
          "readOnlyNodes": 0
        },
        "US_WEST_1": {
          "analyticsNodes": 0,
          "electableNodes": 1,
          "priority": 6,
          "readOnlyNodes": 0
        }
      },
      "zoneName": "Zone 1"
    }
  ],
  "srvAddress": "mongodb+srv://cluster3.uzgh6.mongodb.net",
  "stateName": "UPDATING"
}
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
{
  "autoScaling": {
    "autoIndexingEnabled": false,
    "compute": {
      "enabled": false,
      "scaleDownEnabled": false
    },
    "diskGBEnabled": true
  },
  "backupEnabled": true,
  "biConnector": {
    "enabled": false,
    "readPreference": "secondary"
  },
  "clusterType": "GEOSHARDED",
  "connectionStrings": {
    "privateEndpoint": [
      {
        "connectionString": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1030,pl-0-us-west-1.uzgh6.mongodb.net:1031,pl-0-us-west-1.uzgh6.mongodb.net:1032,pl-0-us-east-1.uzgh6.mongodb.net:1033,pl-0-us-east-1.uzgh6.mongodb.net:1034,pl-0-us-east-1.uzgh6.mongodb.net:1035/?ssl=true&authSource=admin",
        "endpoints": [
          {
            "endpointId": "vpce-02be68a507d60cea4",
            "providerName": "AWS",
            "region": "US_WEST_1"
          },
          {
            "endpointId": "vpce-0c86b555d9a233152",
            "providerName": "AWS",
            "region": "US_EAST_1"
          }
        ],
        "srvConnectionString": "mongodb+srv://cluster4-pl-0.uzgh6.mongodb.net",
        "type": "MONGOS"
      }
    ],
    "standardSrv": "mongodb+srv://cluster4.uzgh6.mongodb.net",
    "awsPrivateLink": {
      "crossRegion-0": "mongodb://pl-0-us-west-1.uzgh6.mongodb.net:1030,pl-0-us-west-1.uzgh6.mongodb.net:1031,pl-0-us-west-1.uzgh6.mongodb.net:1032,pl-0-us-east-1.uzgh6.mongodb.net:1033,pl-0-us-east-1.uzgh6.mongodb.net:1034,pl-0-us-east-1.uzgh6.mongodb.net:1035/?ssl=true&authSource=admin"
    },
    "awsPrivateLinkSrv": {
      "crossRegion-0": "mongodb+srv://cluster4-pl-0.uzgh6.mongodb.net"
    },
    "standard": "mongodb://cluster4-shard-00-00.uzgh6.mongodb.net:27016,cluster4-shard-00-01.uzgh6.mongodb.net:27016,cluster4-shard-00-02.uzgh6.mongodb.net:27016,cluster4-shard-01-00.uzgh6.mongodb.net:27016,cluster4-shard-01-01.uzgh6.mongodb.net:27016,cluster4-shard-01-02.uzgh6.mongodb.net:27016/?ssl=true&authSource=admin"
  },
  "createDate": "2020-11-11T18:31:18Z",
  "diskSizeGB": 40,
  "encryptionAtRestProvider": "NONE",
  "groupId": "5f0e15e3d52a043fed8b1c92",
  "id": "5fac2df6ec7fc20d390d7837",
  "labels": [],
  "links": [],
  "mongoDBMajorVersion": "4.2",
  "mongoDBVersion": "4.2.10",
  "mongoURI": "mongodb://cluster4-shard-00-00.uzgh6.mongodb.net:27016,cluster4-shard-00-01.uzgh6.mongodb.net:27016,cluster4-shard-00-02.uzgh6.mongodb.net:27016,cluster4-shard-01-00.uzgh6.mongodb.net:27016,cluster4-shard-01-01.uzgh6.mongodb.net:27016,cluster4-shard-01-02.uzgh6.mongodb.net:27016",
  "mongoURIUpdated": "2020-11-11T18:39:47Z",
  "mongoURIWithOptions": "mongodb://cluster4-shard-00-00.uzgh6.mongodb.net:27016,cluster4-shard-00-01.uzgh6.mongodb.net:27016,cluster4-shard-00-02.uzgh6.mongodb.net:27016,cluster4-shard-01-00.uzgh6.mongodb.net:27016,cluster4-shard-01-01.uzgh6.mongodb.net:27016,cluster4-shard-01-02.uzgh6.mongodb.net:27016/?ssl=true&authSource=admin",
  "name": "TestGlobalCluster",
  "paused": false,
  "pitEnabled": true,
  "providerBackupEnabled": true,
  "providerSettings": {
    "providerName": "AWS",
    "autoScaling": {
      "compute": {
        "maxInstanceSize": null,
        "minInstanceSize": null
      }
    },
    "diskIOPS": 120,
    "encryptEBSVolume": true,
    "instanceSizeName": "M30",
    "volumeType": "STANDARD"
  },
  "replicationSpecs": [
    {
      "id": "5fac2d90d2124a40ce0cfdb5",
      "numShards": 1,
      "regionsConfig": {
        "US_WEST_1": {
          "analyticsNodes": 0,
          "electableNodes": 5,
          "priority": 7,
          "readOnlyNodes": 0
        }
      },
      "zoneName": "Zone 1"
    },
    {
      "id": "5fac2dacc0108761496a76c5",
      "numShards": 1,
      "regionsConfig": {
        "US_EAST_1": {
          "analyticsNodes": 0,
          "electableNodes": 3,
          "priority": 7,
          "readOnlyNodes": 0
        }
      },
      "zoneName": "Zone 2"
    }
  ],
  "srvAddress": "mongodb+srv://cluster4.uzgh6.mongodb.net",
  "stateName": "UPDATING"
}