Modify One Cluster from One Project Deprecated

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}

Updates the details for one cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. This resource can update clusters with asymmetrically-sized shards. To update a cluster's termination protection, the requesting API Key must have the Project Owner role. For all other updates, the requesting API Key must have the Project Cluster Manager role. You can't modify a paused cluster (paused : true). You must call this endpoint to set paused : false. After this endpoint responds with paused : false, you can call it again with the changes you want to make to the cluster. This feature is not available for serverless clusters.

Path parameters

  • groupId string Required

    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.

    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.

    Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

  • clusterName string Required

    Human-readable label that identifies the cluster.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

Query parameters

  • envelope boolean

    Flag that indicates whether Application wraps the response in an envelope JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.

    Default value is false.

  • pretty boolean

    Flag that indicates whether the response body should be in the prettyprint format.

    Default value is false.

application/vnd.atlas.2023-01-01+json

Body Required

Cluster to update in the specified project.

  • acceptDataRisksAndForceReplicaSetReconfig string(date-time)

    If reconfiguration is necessary to regain a primary due to a regional outage, submit this field alongside your topology reconfiguration to request a new regional outage resistant topology. Forced reconfigurations during an outage of the majority of electable nodes carry a risk of data loss if replicated writes (even majority committed writes) have not been replicated to the new primary node. MongoDB Atlas docs contain more information. To proceed with an operation which carries that risk, set acceptDataRisksAndForceReplicaSetReconfig to the current date.

    Reconfiguring a Replica Set during a regional outage
  • autoScaling object

    Range of instance sizes to which your cluster can scale.

    Cluster Auto-Scaling
    Hide autoScaling attributes Show autoScaling attributes object
    • compute object

      Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes.

      Hide compute attributes Show compute attributes object
      • enabled boolean

        Flag that indicates whether cluster tier auto-scaling is enabled. Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize also. Set to false to disable cluster tier auto-scaling.

      • scaleDownEnabled boolean

        Flag that indicates whether the cluster tier can scale down. This is required if autoScaling.compute.enabled is true. If you enable this option, specify a value for providerSettings.autoScaling.compute.minInstanceSize.

    • diskGBEnabled boolean

      Flag that indicates whether someone enabled disk auto-scaling for this cluster.

  • backupEnabled boolean

    Flag that indicates whether the cluster can perform backups. If set to true, the cluster can perform backups. You must set this value to true for NVMe clusters. Backup uses Cloud Backups for dedicated clusters and Shared Cluster Backups for tenant clusters. If set to false, the cluster doesn't use MongoDB Cloud backups.

  • biConnector object

    Settings needed to configure the MongoDB Connector for Business Intelligence for this cluster.

    MongoDB Connector for Business Intelligence
    Hide biConnector attributes Show biConnector attributes object
    • enabled boolean

      Flag that indicates whether MongoDB Connector for Business Intelligence is enabled on the specified cluster.

    • readPreference string

      Data source node designated for the MongoDB Connector for Business Intelligence on MongoDB Cloud. The MongoDB Connector for Business Intelligence on MongoDB Cloud reads data from the primary, secondary, or analytics node based on your read preferences. Defaults to ANALYTICS node, or SECONDARY if there are no ANALYTICS nodes.

      Values are PRIMARY, SECONDARY, or ANALYTICS.

      Read preferences for BI Connector
  • clusterType string

    Configuration of nodes that comprise the cluster.

    Values are REPLICASET, SHARDED, or GEOSHARDED.

  • diskSizeGB number(double)

    Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity.

    This value is not configurable on M0/M2/M5 clusters.

    MongoDB Cloud requires this parameter if you set replicationSpecs.

    If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value.

    Storage charge calculations depend on whether you choose the default value or a custom value.

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

    Minimum value is 10, maximum value is 4096.

  • diskWarmingMode string

    Disk warming mode selection.

    Values are FULLY_WARMED or VISIBLE_EARLIER. Default value is FULLY_WARMED.

    Reduce Secondary Disk Warming Impact
  • encryptionAtRestProvider string

    Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster.

    Values are NONE, AWS, AZURE, or GCP.

    Encryption at Rest using Customer Key Management
  • globalClusterSelfManagedSharding boolean

    Set this field to configure the Sharding Management Mode when creating a new Global Cluster.

    When set to false, the management mode is set to Atlas-Managed Sharding. This mode fully manages the sharding of your Global Cluster and is built to provide a seamless deployment experience.

    When set to true, the management mode is set to Self-Managed Sharding. This mode leaves the management of shards in your hands and is built to provide an advanced and flexible deployment experience.

    This setting cannot be changed once the cluster is deployed.

    Creating a Global Cluster
  • labels array[object] Deprecated

    Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels.

    Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use resource tags instead.

    Human-readable labels applied to this MongoDB Cloud component.

    Hide labels attributes Show labels attributes object
    • key string

      Key applied to tag and categorize this component.

      Minimum length is 1, maximum length is 255.

    • value string

      Value set to the Key applied to tag and categorize this component.

      Minimum length is 1, maximum length is 255.

  • mongoDBMajorVersion string

    MongoDB major version of the cluster.

    On creation: Choose from the available versions of MongoDB, or leave unspecified for the current recommended default in the MongoDB Cloud platform. The recommended version is a recent Long Term Support version. The default is not guaranteed to be the most recently released version throughout the entire release cycle. For versions available in a specific project, see the linked documentation or use the API endpoint for project LTS versions endpoint.

    On update: Increase version only by 1 major version at a time. If the cluster is pinned to a MongoDB feature compatibility version exactly one major version below the current MongoDB version, the MongoDB version can be downgraded to the previous major version.

    Available MongoDB Versions in Atlas
  • mongoDBVersion string

    Version of MongoDB that the cluster runs.

    Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

  • name string

    Human-readable label that identifies the cluster.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

  • numShards integer(int32)

    Number of shards up to 50 to deploy for a sharded cluster. The resource returns 1 to indicate a replica set and values of 2 and higher to indicate a sharded cluster. The returned value equals the number of shards in the cluster.

    Minimum value is 1, maximum value is 50. Default value is 1.

    Sharding
  • paused boolean

    Flag that indicates whether the cluster is paused.

  • pitEnabled boolean

    Flag that indicates whether the cluster uses continuous cloud backups.

    Continuous Cloud Backups
  • providerBackupEnabled boolean

    Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to true, the cluster can perform backups. If this and backupEnabled are set to false, the cluster doesn't use MongoDB Cloud backups.

  • providerSettings object

    One of:
  • replicationFactor integer(int32) Deprecated

    Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use replicationSpecs instead.

    Values are 3, 5, or 7. Default value is 3.

  • replicationSpec object

    Physical location where MongoDB Cloud provisions cluster nodes.

    Hide replicationSpec attribute Show replicationSpec attribute object
    • * object Additional properties

      Physical location where MongoDB Cloud provisions cluster nodes.

      Hide * attributes Show * attributes object
      • analyticsNodes integer(int32)

        Number of analytics nodes in the region. Analytics nodes handle analytic data such as reporting queries from MongoDB Connector for Business Intelligence on MongoDB Cloud. Analytics nodes are read-only, and can never become the primary. Use replicationSpecs[n].{region}.analyticsNodes instead.

      • electableNodes integer(int32)

        Number of electable nodes to deploy in the specified region. Electable nodes can become the primary and can facilitate local reads. Use replicationSpecs[n].{region}.electableNodes instead.

        Values are 0, 3, 5, or 7.

      • priority integer(int32)

        Number that indicates the election priority of the region. To identify the Preferred Region of the cluster, set this parameter to 7. The primary node runs in the Preferred Region. To identify a read-only region, set this parameter to 0.

        Minimum value is 0, maximum value is 7.

      • readOnlyNodes integer(int32)

        Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads. Use replicationSpecs[n].{region}.readOnlyNodes instead.

  • replicationSpecs array[object]

    List of settings that configure your cluster regions.

    • For Global Clusters, each object in the array represents one zone where MongoDB Cloud deploys your clusters nodes.
    • For non-Global sharded clusters and replica sets, the single object represents where MongoDB Cloud deploys your clusters nodes.
    Hide replicationSpecs attributes Show replicationSpecs attributes object
    • id string

      Unique 24-hexadecimal digit string that identifies the replication object for a zone in a Global Cluster.

      • If you include existing zones in the request, you must specify this parameter.

      • If you add a new zone to an existing Global Cluster, you may specify this parameter. The request deletes any existing zones in a Global Cluster that you exclude from the request.

      Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

    • numShards integer(int32)

      Positive integer that specifies the number of shards to deploy in each specified zone If you set this value to 1 and clusterType is SHARDED, MongoDB Cloud deploys a single-shard sharded cluster. Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations.

      If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards.

      Default value is 1.

    • regionsConfig object

      Physical location where MongoDB Cloud provisions cluster nodes.

      Hide regionsConfig attribute Show regionsConfig attribute object
      • * object Additional properties

        Physical location where MongoDB Cloud provisions cluster nodes.

        Hide * attributes Show * attributes object
        • analyticsNodes integer(int32)

          Number of analytics nodes in the region. Analytics nodes handle analytic data such as reporting queries from MongoDB Connector for Business Intelligence on MongoDB Cloud. Analytics nodes are read-only, and can never become the primary. Use replicationSpecs[n].{region}.analyticsNodes instead.

        • electableNodes integer(int32)

          Number of electable nodes to deploy in the specified region. Electable nodes can become the primary and can facilitate local reads. Use replicationSpecs[n].{region}.electableNodes instead.

          Values are 0, 3, 5, or 7.

        • priority integer(int32)

          Number that indicates the election priority of the region. To identify the Preferred Region of the cluster, set this parameter to 7. The primary node runs in the Preferred Region. To identify a read-only region, set this parameter to 0.

          Minimum value is 0, maximum value is 7.

        • readOnlyNodes integer(int32)

          Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads. Use replicationSpecs[n].{region}.readOnlyNodes instead.

    • zoneName string

      Human-readable label that identifies the zone in a Global Cluster. Provide this value only if clusterType is GEOSHARDED.

  • rootCertType string

    Root Certificate Authority that MongoDB Atlas clusters uses. MongoDB Cloud supports Internet Security Research Group.

    Value is ISRGROOTX1. Default value is ISRGROOTX1.

  • tags array[object]

    List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster.

    Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, environment : production.

    Resource Tags
    Hide tags attributes Show tags attributes object
    • key string Required

      Constant that defines the set of the tag. For example, environment in the environment : production tag.

      Minimum length is 1, maximum length is 255.

    • value string Required

      Variable that belongs to the set of the tag. For example, production in the environment : production tag.

      Minimum length is 1, maximum length is 255.

  • terminationProtectionEnabled boolean

    Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.

    Default value is false.

  • versionReleaseSystem string

    Method by which the cluster maintains the MongoDB versions. If value is CONTINUOUS, you must not specify mongoDBMajorVersion.

    Values are LTS or CONTINUOUS. Default value is LTS.

Responses

  • 200 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • acceptDataRisksAndForceReplicaSetReconfig string(date-time)

      If reconfiguration is necessary to regain a primary due to a regional outage, submit this field alongside your topology reconfiguration to request a new regional outage resistant topology. Forced reconfigurations during an outage of the majority of electable nodes carry a risk of data loss if replicated writes (even majority committed writes) have not been replicated to the new primary node. MongoDB Atlas docs contain more information. To proceed with an operation which carries that risk, set acceptDataRisksAndForceReplicaSetReconfig to the current date.

      Reconfiguring a Replica Set during a regional outage
    • autoScaling object

      Range of instance sizes to which your cluster can scale.

      Cluster Auto-Scaling
      Hide autoScaling attributes Show autoScaling attributes object
      • compute object

        Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down. Cluster tier auto-scaling is unavailable for clusters using Low CPU or NVME storage classes.

        Hide compute attributes Show compute attributes object
        • enabled boolean

          Flag that indicates whether cluster tier auto-scaling is enabled. Set to true to enable cluster tier auto-scaling. If enabled, you must specify a value for providerSettings.autoScaling.compute.maxInstanceSize also. Set to false to disable cluster tier auto-scaling.

        • scaleDownEnabled boolean

          Flag that indicates whether the cluster tier can scale down. This is required if autoScaling.compute.enabled is true. If you enable this option, specify a value for providerSettings.autoScaling.compute.minInstanceSize.

      • diskGBEnabled boolean

        Flag that indicates whether someone enabled disk auto-scaling for this cluster.

    • backupEnabled boolean

      Flag that indicates whether the cluster can perform backups. If set to true, the cluster can perform backups. You must set this value to true for NVMe clusters. Backup uses Cloud Backups for dedicated clusters and Shared Cluster Backups for tenant clusters. If set to false, the cluster doesn't use MongoDB Cloud backups.

    • biConnector object

      Settings needed to configure the MongoDB Connector for Business Intelligence for this cluster.

      MongoDB Connector for Business Intelligence
      Hide biConnector attributes Show biConnector attributes object
      • enabled boolean

        Flag that indicates whether MongoDB Connector for Business Intelligence is enabled on the specified cluster.

      • readPreference string

        Data source node designated for the MongoDB Connector for Business Intelligence on MongoDB Cloud. The MongoDB Connector for Business Intelligence on MongoDB Cloud reads data from the primary, secondary, or analytics node based on your read preferences. Defaults to ANALYTICS node, or SECONDARY if there are no ANALYTICS nodes.

        Values are PRIMARY, SECONDARY, or ANALYTICS.

        Read preferences for BI Connector
    • clusterType string

      Configuration of nodes that comprise the cluster.

      Values are REPLICASET, SHARDED, or GEOSHARDED.

    • connectionStrings object

      Collection of Uniform Resource Locators that point to the MongoDB database.

      Connection string URI format
      Hide connectionStrings attributes Show connectionStrings attributes object
      • awsPrivateLinkSrv object

        Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related mongodb:// connection string that you use to connect to Atlas through the interface endpoint that the key names.

        Network Peering Connection
        Hide awsPrivateLinkSrv attribute Show awsPrivateLinkSrv attribute object
        • * string Additional properties

          Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related mongodb:// connection string that you use to connect to Atlas through the interface endpoint that the key names.

          Network Peering Connection
      • private string

        Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the mongodb+srv:// protocol. The resource returns this parameter once someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (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. For Amazon Web Services (AWS) clusters, this resource returns this parameter only if you enable custom DNS.

        Network Peering Connection
      • privateEndpoint array[object]

        List of private endpoint-aware connection strings that you can use to connect to this cluster through a private endpoint. This parameter returns only if you deployed a private endpoint to all regions to which you deployed this clusters' nodes.

        Private endpoint-aware connection string that you can use to connect to this cluster through a private endpoint.

        Hide privateEndpoint attributes Show privateEndpoint attributes object
        • connectionString string

          Private endpoint-aware connection string that uses the mongodb:// protocol to connect to MongoDB Cloud through a private endpoint.

        • endpoints array[object]

          List that contains the private endpoints through which you connect to MongoDB Cloud when you use connectionStrings.privateEndpoint[n].connectionString or connectionStrings.privateEndpoint[n].srvConnectionString.

          Details of a private endpoint deployed for this cluster.

          Hide endpoints attributes Show endpoints attributes object
          • endpointId string

            Unique string that the cloud provider uses to identify the private endpoint.

          • providerName string

            Cloud provider in which MongoDB Cloud deploys the private endpoint.

            Values are AWS, AZURE, or GCP.

          • region string

            Region where the private endpoint is deployed.

        • srvConnectionString string

          Private endpoint-aware connection string that uses the mongodb+srv:// protocol to connect to MongoDB Cloud through a private endpoint. The mongodb+srv protocol tells the driver to look up the seed list of hosts in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your application supports it. If it doesn't, use connectionStrings.privateEndpoint[n].connectionString.

        • srvShardOptimizedConnectionString string

          Private endpoint-aware connection string optimized for sharded clusters that uses the mongodb+srv:// protocol to connect to MongoDB Cloud through a private endpoint. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your application and Atlas cluster supports it. If it doesn't, use and consult the documentation for connectionStrings.privateEndpoint[n].srvConnectionString.

        • type string

          MongoDB process type to which your application connects. Use MONGOD for replica sets and MONGOS for sharded clusters.

          Values are MONGOD or MONGOS.

      • privateSrv string

        Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. This connection string uses the mongodb+srv:// protocol. The resource returns this parameter when someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your driver supports it. If it doesn't, use connectionStrings.private. For Amazon Web Services (AWS) clusters, this parameter returns only if you enable custom DNS.

        Network Peering Connection
      • standard string

        Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.

        Connection String URI Format
      • standardSrv string

        Public connection string that you can use to connect to this cluster. This connection string uses the mongodb+srv:// protocol.

        Connection String URI Format
    • createDate string(date-time)

      Date and time when MongoDB Cloud created this serverless instance. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.

    • diskSizeGB number(double)

      Storage capacity of instance data volumes expressed in gigabytes. Increase this number to add capacity.

      This value is not configurable on M0/M2/M5 clusters.

      MongoDB Cloud requires this parameter if you set replicationSpecs.

      If you specify a disk size below the minimum (10 GB), this parameter defaults to the minimum disk size value.

      Storage charge calculations depend on whether you choose the default value or a custom value.

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

      Minimum value is 10, maximum value is 4096.

    • diskWarmingMode string

      Disk warming mode selection.

      Values are FULLY_WARMED or VISIBLE_EARLIER. Default value is FULLY_WARMED.

      Reduce Secondary Disk Warming Impact
    • encryptionAtRestProvider string

      Cloud service provider that manages your customer keys to provide an additional layer of Encryption at Rest for the cluster.

      Values are NONE, AWS, AZURE, or GCP.

      Encryption at Rest using Customer Key Management
    • globalClusterSelfManagedSharding boolean

      Set this field to configure the Sharding Management Mode when creating a new Global Cluster.

      When set to false, the management mode is set to Atlas-Managed Sharding. This mode fully manages the sharding of your Global Cluster and is built to provide a seamless deployment experience.

      When set to true, the management mode is set to Self-Managed Sharding. This mode leaves the management of shards in your hands and is built to provide an advanced and flexible deployment experience.

      This setting cannot be changed once the cluster is deployed.

      Creating a Global Cluster
    • groupId string

      Unique 24-hexadecimal character string that identifies the project.

      Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

    • id string

      Unique 24-hexadecimal digit string that identifies the cluster.

      Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

    • labels array[object] Deprecated

      Collection of key-value pairs between 1 to 255 characters in length that tag and categorize the cluster. The MongoDB Cloud console doesn't display your labels.

      Cluster labels are deprecated and will be removed in a future release. We strongly recommend that you use resource tags instead.

      Human-readable labels applied to this MongoDB Cloud component.

      Hide labels attributes Show labels attributes object
      • key string

        Key applied to tag and categorize this component.

        Minimum length is 1, maximum length is 255.

      • value string

        Value set to the Key applied to tag and categorize this component.

        Minimum length is 1, maximum length is 255.

    • mongoDBMajorVersion string

      MongoDB major version of the cluster.

      On creation: Choose from the available versions of MongoDB, or leave unspecified for the current recommended default in the MongoDB Cloud platform. The recommended version is a recent Long Term Support version. The default is not guaranteed to be the most recently released version throughout the entire release cycle. For versions available in a specific project, see the linked documentation or use the API endpoint for project LTS versions endpoint.

      On update: Increase version only by 1 major version at a time. If the cluster is pinned to a MongoDB feature compatibility version exactly one major version below the current MongoDB version, the MongoDB version can be downgraded to the previous major version.

      Available MongoDB Versions in Atlas
    • mongoDBVersion string

      Version of MongoDB that the cluster runs.

      Format should match the following pattern: ([\d]+\.[\d]+\.[\d]+).

    • mongoURI string

      Base connection string that you can use to connect to the cluster. MongoDB Cloud displays the string only after the cluster starts, not while it builds the cluster.

      Connection string URI format
    • mongoURIUpdated string(date-time)

      Date and time when someone last updated the connection string. MongoDB Cloud represents this timestamp in ISO 8601 format in UTC.

    • mongoURIWithOptions string

      Connection string that you can use to connect to the cluster including the replicaSet, ssl, and authSource query parameters with values appropriate for the cluster. You may need to add MongoDB database users. The response returns this parameter once the cluster can receive requests, not while it builds the cluster.

      Connection string URI format
    • name string

      Human-readable label that identifies the cluster.

      Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*$.

    • numShards integer(int32)

      Number of shards up to 50 to deploy for a sharded cluster. The resource returns 1 to indicate a replica set and values of 2 and higher to indicate a sharded cluster. The returned value equals the number of shards in the cluster.

      Minimum value is 1, maximum value is 50. Default value is 1.

      Sharding
    • paused boolean

      Flag that indicates whether the cluster is paused.

    • pitEnabled boolean

      Flag that indicates whether the cluster uses continuous cloud backups.

      Continuous Cloud Backups
    • providerBackupEnabled boolean

      Flag that indicates whether the M10 or higher cluster can perform Cloud Backups. If set to true, the cluster can perform backups. If this and backupEnabled are set to false, the cluster doesn't use MongoDB Cloud backups.

    • providerSettings object

      One of:
    • replicationFactor integer(int32) Deprecated

      Number of members that belong to the replica set. Each member retains a copy of your databases, providing high availability and data redundancy. Use replicationSpecs instead.

      Values are 3, 5, or 7. Default value is 3.

    • replicationSpec object

      Physical location where MongoDB Cloud provisions cluster nodes.

      Hide replicationSpec attribute Show replicationSpec attribute object
      • * object Additional properties

        Physical location where MongoDB Cloud provisions cluster nodes.

        Hide * attributes Show * attributes object
        • analyticsNodes integer(int32)

          Number of analytics nodes in the region. Analytics nodes handle analytic data such as reporting queries from MongoDB Connector for Business Intelligence on MongoDB Cloud. Analytics nodes are read-only, and can never become the primary. Use replicationSpecs[n].{region}.analyticsNodes instead.

        • electableNodes integer(int32)

          Number of electable nodes to deploy in the specified region. Electable nodes can become the primary and can facilitate local reads. Use replicationSpecs[n].{region}.electableNodes instead.

          Values are 0, 3, 5, or 7.

        • priority integer(int32)

          Number that indicates the election priority of the region. To identify the Preferred Region of the cluster, set this parameter to 7. The primary node runs in the Preferred Region. To identify a read-only region, set this parameter to 0.

          Minimum value is 0, maximum value is 7.

        • readOnlyNodes integer(int32)

          Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads. Use replicationSpecs[n].{region}.readOnlyNodes instead.

    • replicationSpecs array[object]

      List of settings that configure your cluster regions.

      • For Global Clusters, each object in the array represents one zone where MongoDB Cloud deploys your clusters nodes.
      • For non-Global sharded clusters and replica sets, the single object represents where MongoDB Cloud deploys your clusters nodes.
      Hide replicationSpecs attributes Show replicationSpecs attributes object
      • id string

        Unique 24-hexadecimal digit string that identifies the replication object for a zone in a Global Cluster.

        • If you include existing zones in the request, you must specify this parameter.

        • If you add a new zone to an existing Global Cluster, you may specify this parameter. The request deletes any existing zones in a Global Cluster that you exclude from the request.

        Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

      • numShards integer(int32)

        Positive integer that specifies the number of shards to deploy in each specified zone If you set this value to 1 and clusterType is SHARDED, MongoDB Cloud deploys a single-shard sharded cluster. Don't create a sharded cluster with a single shard for production environments. Single-shard sharded clusters don't provide the same benefits as multi-shard configurations.

        If you are upgrading a replica set to a sharded cluster, you cannot increase the number of shards in the same update request. You should wait until after the cluster has completed upgrading to sharded and you have reconnected all application clients to the MongoDB router before adding additional shards. Otherwise, your data might become inconsistent once MongoDB Cloud begins distributing data across shards.

        Default value is 1.

      • regionsConfig object

        Physical location where MongoDB Cloud provisions cluster nodes.

        Hide regionsConfig attribute Show regionsConfig attribute object
        • * object Additional properties

          Physical location where MongoDB Cloud provisions cluster nodes.

          Hide * attributes Show * attributes object
          • analyticsNodes integer(int32)

            Number of analytics nodes in the region. Analytics nodes handle analytic data such as reporting queries from MongoDB Connector for Business Intelligence on MongoDB Cloud. Analytics nodes are read-only, and can never become the primary. Use replicationSpecs[n].{region}.analyticsNodes instead.

          • electableNodes integer(int32)

            Number of electable nodes to deploy in the specified region. Electable nodes can become the primary and can facilitate local reads. Use replicationSpecs[n].{region}.electableNodes instead.

            Values are 0, 3, 5, or 7.

          • priority integer(int32)

            Number that indicates the election priority of the region. To identify the Preferred Region of the cluster, set this parameter to 7. The primary node runs in the Preferred Region. To identify a read-only region, set this parameter to 0.

            Minimum value is 0, maximum value is 7.

          • readOnlyNodes integer(int32)

            Number of read-only nodes in the region. Read-only nodes can never become the primary member, but can facilitate local reads. Use replicationSpecs[n].{region}.readOnlyNodes instead.

      • zoneName string

        Human-readable label that identifies the zone in a Global Cluster. Provide this value only if clusterType is GEOSHARDED.

    • rootCertType string

      Root Certificate Authority that MongoDB Atlas clusters uses. MongoDB Cloud supports Internet Security Research Group.

      Value is ISRGROOTX1. Default value is ISRGROOTX1.

    • srvAddress string

      Connection string that you can use to connect to the cluster. The +srv modifier forces the connection to use Transport Layer Security (TLS). The mongoURI parameter lists additional options.

      Connection string URI format
    • stateName string

      Human-readable label that indicates the current operating condition of the cluster.

      Values are IDLE, CREATING, UPDATING, DELETING, or REPAIRING.

    • tags array[object]

      List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster.

      Key-value pair that tags and categorizes a MongoDB Cloud organization, project, or cluster. For example, environment : production.

      Resource Tags
      Hide tags attributes Show tags attributes object
      • key string Required

        Constant that defines the set of the tag. For example, environment in the environment : production tag.

        Minimum length is 1, maximum length is 255.

      • value string Required

        Variable that belongs to the set of the tag. For example, production in the environment : production tag.

        Minimum length is 1, maximum length is 255.

    • terminationProtectionEnabled boolean

      Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.

      Default value is false.

    • versionReleaseSystem string

      Method by which the cluster maintains the MongoDB versions. If value is CONTINUOUS, you must not specify mongoDBMajorVersion.

      Values are LTS or CONTINUOUS. Default value is LTS.

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 409 application/json

    Conflict.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/clusters/{clusterName}
atlas api clusters updateCluster --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20230101001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
	client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateClusterApiParams{}
	sdkResp, httpResp, err := client.ClustersApi.
		UpdateClusterWithParams(ctx, params).
		Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2023-01-01+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest --include \
  --header "Accept: application/vnd.atlas.2023-01-01+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" \
  -d '{ <Payload> }'
Request examples
{
  "acceptDataRisksAndForceReplicaSetReconfig": "2025-05-04T09:42:00Z",
  "autoScaling": {
    "compute": {
      "enabled": true,
      "scaleDownEnabled": true
    },
    "diskGBEnabled": true
  },
  "backupEnabled": true,
  "biConnector": {
    "enabled": true,
    "readPreference": "PRIMARY"
  },
  "clusterType": "REPLICASET",
  "diskSizeGB": 42.0,
  "diskWarmingMode": "FULLY_WARMED",
  "encryptionAtRestProvider": "NONE",
  "globalClusterSelfManagedSharding": true,
  "labels": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "mongoDBMajorVersion": "string",
  "mongoDBVersion": "string",
  "name": "string",
  "numShards": 1,
  "paused": true,
  "pitEnabled": true,
  "providerBackupEnabled": true,
  "providerSettings": {
    "providerName": "AWS",
    "autoScaling": {
      "compute": {
        "maxInstanceSize": "M10",
        "minInstanceSize": "M10"
      }
    },
    "diskIOPS": 42,
    "encryptEBSVolume": true,
    "instanceSizeName": "M10",
    "regionName": "US_GOV_WEST_1",
    "volumeType": "STANDARD"
  },
  "replicationFactor": 3,
  "replicationSpec": {
    "additionalProperty1": {
      "analyticsNodes": 42,
      "electableNodes": 0,
      "priority": 42,
      "readOnlyNodes": 42
    },
    "additionalProperty2": {
      "analyticsNodes": 42,
      "electableNodes": 0,
      "priority": 42,
      "readOnlyNodes": 42
    }
  },
  "replicationSpecs": [
    {
      "id": "32b6e34b3d91647abb20e7b8",
      "numShards": 1,
      "regionsConfig": {
        "additionalProperty1": {
          "analyticsNodes": 42,
          "electableNodes": 0,
          "priority": 42,
          "readOnlyNodes": 42
        },
        "additionalProperty2": {
          "analyticsNodes": 42,
          "electableNodes": 0,
          "priority": 42,
          "readOnlyNodes": 42
        }
      },
      "zoneName": "string"
    }
  ],
  "rootCertType": "ISRGROOTX1",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "terminationProtectionEnabled": false,
  "versionReleaseSystem": "LTS"
}
Response examples (200)
{
  "acceptDataRisksAndForceReplicaSetReconfig": "2025-05-04T09:42:00Z",
  "autoScaling": {
    "compute": {
      "enabled": true,
      "scaleDownEnabled": true
    },
    "diskGBEnabled": true
  },
  "backupEnabled": true,
  "biConnector": {
    "enabled": true,
    "readPreference": "PRIMARY"
  },
  "clusterType": "REPLICASET",
  "connectionStrings": {
    "awsPrivateLink": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "awsPrivateLinkSrv": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "private": "string",
    "privateEndpoint": [
      {
        "connectionString": "string",
        "endpoints": [
          {
            "endpointId": "string",
            "providerName": "AWS",
            "region": "string"
          }
        ],
        "srvConnectionString": "string",
        "srvShardOptimizedConnectionString": "string",
        "type": "MONGOD"
      }
    ],
    "privateSrv": "string",
    "standard": "string",
    "standardSrv": "string"
  },
  "createDate": "2025-05-04T09:42:00Z",
  "diskSizeGB": 42.0,
  "diskWarmingMode": "FULLY_WARMED",
  "encryptionAtRestProvider": "NONE",
  "globalClusterSelfManagedSharding": true,
  "groupId": "32b6e34b3d91647abb20e7b8",
  "id": "32b6e34b3d91647abb20e7b8",
  "labels": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "mongoDBMajorVersion": "string",
  "mongoDBVersion": "string",
  "mongoURI": "string",
  "mongoURIUpdated": "2025-05-04T09:42:00Z",
  "mongoURIWithOptions": "string",
  "name": "string",
  "numShards": 1,
  "paused": true,
  "pitEnabled": true,
  "providerBackupEnabled": true,
  "providerSettings": {
    "providerName": "AWS",
    "autoScaling": {
      "compute": {
        "maxInstanceSize": "M10",
        "minInstanceSize": "M10"
      }
    },
    "diskIOPS": 42,
    "encryptEBSVolume": true,
    "instanceSizeName": "M10",
    "regionName": "US_GOV_WEST_1",
    "volumeType": "STANDARD"
  },
  "replicationFactor": 3,
  "replicationSpec": {
    "additionalProperty1": {
      "analyticsNodes": 42,
      "electableNodes": 0,
      "priority": 42,
      "readOnlyNodes": 42
    },
    "additionalProperty2": {
      "analyticsNodes": 42,
      "electableNodes": 0,
      "priority": 42,
      "readOnlyNodes": 42
    }
  },
  "replicationSpecs": [
    {
      "id": "32b6e34b3d91647abb20e7b8",
      "numShards": 1,
      "regionsConfig": {
        "additionalProperty1": {
          "analyticsNodes": 42,
          "electableNodes": 0,
          "priority": 42,
          "readOnlyNodes": 42
        },
        "additionalProperty2": {
          "analyticsNodes": 42,
          "electableNodes": 0,
          "priority": 42,
          "readOnlyNodes": 42
        }
      },
      "zoneName": "string"
    }
  ],
  "rootCertType": "ISRGROOTX1",
  "srvAddress": "string",
  "stateName": "IDLE",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "terminationProtectionEnabled": false,
  "versionReleaseSystem": "LTS"
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (404)
{
  "error": 404,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "reason": "Not Found",
  "errorCode": "RESOURCE_NOT_FOUND"
}
Response examples (409)
{
  "error": 409,
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
  "reason": "Conflict",
  "errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}