Upgrades a flex cluster to a dedicated cluster (M10+) in the specified project. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role.
Path parameters
-
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.
Format should match the following pattern:
^([a-f0-9]{24})$.
Query parameters
-
Flag that indicates whether Application wraps the response in an
envelopeJSON 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. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false.Prettyprint
Body
Required
Details of the flex cluster upgrade in the specified project.
-
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
acceptDataRisksAndForceReplicaSetReconfigto the current date. This parameter expresses its value in the ISO 8601 timestamp format in UTC.Reconfiguring a Replica Set du... -
Group of settings that configures a subset of the advanced configuration details.
-
Flag that indicates whether the cluster can perform backups. If set to
true, the cluster can perform backups. You must set this value totruefor NVMe clusters. Backup uses Cloud Backups for dedicated clusters and Shared Cluster Backups for tenant clusters. If set tofalse, the cluster doesn't use backups.Default value is
false.Cloud Backups -
Settings needed to configure the MongoDB Connector for Business Intelligence for this cluster.
MongoDB Connector for Business... -
Configuration of nodes that comprise the cluster.
Values are
REPLICASET,SHARDED, orGEOSHARDED. -
Config Server Management Mode for creating or updating a sharded cluster. When configured as
ATLAS_MANAGED, Atlas may automatically switch the cluster's config server type for optimal performance and savings. When configured asFIXED_TO_DEDICATED, the cluster will always use a dedicated config server.Values are
ATLAS_MANAGEDorFIXED_TO_DEDICATED. Default value isATLAS_MANAGED.MongoDB Sharded Cluster Config... -
Disk warming mode selection.
Values are
FULLY_WARMEDorVISIBLE_EARLIER. Default value isFULLY_WARMED.Reduce Secondary Disk Warming ... -
Cloud service provider that manages your customer keys to provide an additional layer of encryption at rest for the cluster. To enable customer key management for encryption at rest, the cluster
replicationSpecs[n].regionConfigs[m].{type}Specs.instanceSizesetting must beM10or higher and"backupEnabled" : falseor omitted entirely.Values are
NONE,AWS,AZURE, orGCP.Encryption at Rest using Custo... -
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 -
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.
Resource Tags -
MongoDB employee granted access level and expiration for a cluster.
-
MongoDB major version of the cluster. Set to the binary major version.
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 ... -
Human-readable label that identifies the cluster.
Format should match the following pattern:
^[a-zA-Z0-9][a-zA-Z0-9-]*$. -
Flag that indicates whether the cluster is paused.
-
Flag that indicates whether the cluster uses continuous cloud backups.
Continuous Cloud Backups -
Enable or disable log redaction.
This setting configures the
mongodormongosto redact any document field contents from a message accompanying a given log event before logging. This prevents the program from writing potentially sensitive data stored on the database to the diagnostic log. Metadata such as error or operation codes, line numbers, and source file names are still visible in the logs.Use
redactClientLogDatain conjunction with Encryption at Rest and TLS/SSL (Transport Encryption) to assist compliance with regulatory requirements.Note: changing this setting on a cluster will trigger a rolling restart as soon as the cluster is updated.
Log Redaction -
Set this field to configure the replica set scaling mode for your cluster.
By default, Atlas scales under
WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes.When configured as
SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads.When configured as
NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads.Values are
SEQUENTIAL,WORKLOAD_TYPE, orNODE_TYPE. Default value isWORKLOAD_TYPE.Modify the Replica Set Scaling... -
List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations.
Details that explain how MongoDB Cloud replicates data on the specified MongoDB database.
-
Flag that indicates whether the cluster retains backups.
Default value is
false. -
Root Certificate Authority that MongoDB Atlas cluster uses. MongoDB Cloud supports Internet Security Research Group.
Value is
ISRGROOTX1. Default value isISRGROOTX1. -
Flag that indicates whether termination protection is enabled on the cluster. If set to
true, MongoDB Cloud won't delete the cluster. If set tofalse, MongoDB Cloud will delete the cluster.Default value is
false. -
Flag that indicates whether AWS time-based snapshot copies will be used instead of slower standard snapshot copies during fast Atlas cross-region initial syncs. This flag is only relevant for clusters containing AWS nodes.
Default value is
false. -
Method by which the cluster maintains the MongoDB versions. If value is
CONTINUOUS, you must not specifymongoDBMajorVersion.Values are
LTSorCONTINUOUS. Default value isLTS.
atlas api flexClusters tenantUpgrade --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20241113001/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.TenantGroupFlexClusterUpgradeApiParams{}
sdkResp, httpResp, err := client.FlexClustersApi.
TenantGroupFlexClusterUpgradeWithParams(ctx, params).
Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2024-11-13+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade" \
-d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest --include \
--header "Accept: application/vnd.atlas.2024-11-13+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade" \
-d '{ <Payload> }'
{
"acceptDataRisksAndForceReplicaSetReconfig": "2026-05-04T09:42:00Z",
"advancedConfiguration": {
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"customOpensslCipherConfigTls13": [
"TLS_AES_256_GCM_SHA384"
],
"minimumEnabledTlsProtocol": "TLS1_0",
"tlsCipherConfigMode": "CUSTOM"
},
"backupEnabled": false,
"biConnector": {
"enabled": true,
"readPreference": "PRIMARY"
},
"clusterType": "REPLICASET",
"configServerManagementMode": "ATLAS_MANAGED",
"diskWarmingMode": "FULLY_WARMED",
"encryptionAtRestProvider": "NONE",
"globalClusterSelfManagedSharding": true,
"labels": [
{
"key": "string",
"value": "string"
}
],
"mongoDBEmployeeAccessGrant": {
"expirationTime": "2026-05-04T09:42:00Z",
"grantType": "CLUSTER_DATABASE_LOGS"
},
"mongoDBMajorVersion": "string",
"name": "string",
"paused": true,
"pitEnabled": true,
"redactClientLogData": true,
"replicaSetScalingStrategy": "WORKLOAD_TYPE",
"replicationSpecs": [
{
"regionConfigs": [
{
"electableSpecs": {
"diskSizeGB": 42.0,
"diskIOPS": 42,
"ebsVolumeType": "STANDARD",
"instanceSize": "M10",
"nodeCount": 42
},
"priority": 42,
"providerName": "AWS",
"regionName": "US_GOV_WEST_1",
"analyticsAutoScaling": {
"compute": {
"enabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
},
"autoScaling": {
"compute": {
"enabled": true,
"scaleDownEnabled": true
},
"diskGB": {
"enabled": true
}
}
}
],
"zoneName": "string"
}
],
"retainBackups": false,
"rootCertType": "ISRGROOTX1",
"tags": [
{
"key": "string",
"value": "string"
}
],
"terminationProtectionEnabled": false,
"useAwsTimeBasedSnapshotCopyForFastInitialSync": false,
"versionReleaseSystem": "LTS"
}
# Headers
# Payload
{
"backupSettings": {
"enabled": true
},
"clusterType": "REPLICASET",
"connectionStrings": {
"standard": "string",
"standardSrv": "string"
},
"createDate": "2026-05-04T09:42:00Z",
"groupId": "32b6e34b3d91647abb20e7b8",
"id": "32b6e34b3d91647abb20e7b8",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"mongoDBVersion": "string",
"name": "string",
"providerSettings": {
"backingProviderName": "AWS",
"diskSizeGB": 42.0,
"providerName": "FLEX",
"regionName": "string"
},
"stateName": "IDLE",
"tags": [
{
"key": "string",
"value": "string"
}
],
"terminationProtectionEnabled": false,
"versionReleaseSystem": "LTS"
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 402,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Payment Required",
"errorCode": "NO_PAYMENT_INFORMATION_FOUND"
}
{
"error": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"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"
}
{
"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"
}
{
"error": 429,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Too Many Requests",
"errorCode": "RATE_LIMITED"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}