Update Advanced Configuration Options for One Cluster
Updates the advanced configuration details for one cluster in the specified project. Clusters contain a group of hosts that maintain the same data set. Advanced configuration details include the read/write concern, index and oplog limits, and other database settings. To use this resource, the requesting Service Account or API Key must have the Project Cluster Manager role. This feature isn't available for M0
free clusters, M2
and M5
shared-tier clusters, flex clusters, or serverless clusters. Deprecated versions: v2-{2023-01-01}
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})$
. -
Human-readable label that identifies the cluster.
Format should match the following pattern:
^[a-zA-Z0-9][a-zA-Z0-9-]*$
.
Query parameters
-
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
. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false
.Prettyprint
Body
Required
Advanced configuration details to add for one cluster in the specified project.
-
The minimum pre- and post-image retention time in seconds.
Default value is
-1
.This option corresponds to the ``changeStreamOptionspreAndPostImagesexpireAfterSeconds`` cluster parameter This setting controls the retention policy of change stream pre- and post-images Pre- and post-images are the versions of a document before and after document modification, respectively ``expireAfterSeconds`` controls how long MongoDB retains pre- and post-images When set to -1 (off), MongoDB uses the default retention policy: pre- and post-images are retained until the corresponding change stream events are removed from the oplog To set the minimum pre- and post-image retention time, specify an integer value greater than zero Setting this too low could increase the risk of interrupting Realm sync or triggers processing The default value is -1 (off) -
Number of threads on the source shard and the receiving shard for chunk migration. The number of threads should not exceed the half the total number of CPU cores in the sharded cluster.
This option corresponds to the `chunkMigrationConcurrency` `mongod` configuration file option -
The custom OpenSSL cipher suite list for TLS 1.2. This field is only valid when
tlsCipherConfigMode
is set toCUSTOM
.Values are
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
orTLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
. -
Default time limit in milliseconds for individual read operations to complete.
This option corresponds to the defaultMaxTimeMS cluster parameter -
Default level of acknowledgment requested from MongoDB for write operations when none is specified by the driver.
This option corresponds to the the implicit default write concern -
Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript. When using 8.0+, we recommend disabling server-side JavaScript and using operators of aggregation pipeline as more performant alternative.
This option corresponds to modifying the `securityjavascriptEnabled` configuration file option for each `mongod` and `mongos` in the cluster -
Minimum Transport Layer Security (TLS) version that the cluster accepts for incoming connections. Clusters using TLS 1.0 or 1.1 should consider setting TLS 1.2 as the minimum TLS protocol version.
Values are
TLS1_0
,TLS1_1
, orTLS1_2
.This option corresponds to the `netssldisabledProtocols` `mongod` configuration file option -
Flag that indicates whether the cluster disables executing any query that requires a collection scan to return results.
This option corresponds to the `notablescan` `mongod` configuration file option -
Minimum retention window for cluster's oplog expressed in hours. A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates.
This option corresponds to the `storageoplogMinRetentionHours` `mongod` configuration file option -
Storage limit of cluster's oplog expressed in megabytes. A value of null indicates that the cluster uses the default oplog size that MongoDB Cloud calculates.
This option corresponds to the `replicationoplogSizeMB` `mongod` configuration file option -
May be set to 1 (disabled) or 3 (enabled). When set to 3, Atlas will include redacted and anonymized $queryStats output in MongoDB logs. $queryStats output does not contain literals or field values. Enabling this setting might impact the performance of your cluster.
This option corresponds to the queryStats component for the logComponentVerbosity server parameter -
Interval in seconds at which the mongosqld process re-samples data to create its relational schema.
Minimum value is
0
. Default value is0
.This option corresponds to the `sampleRefreshIntervalSecs` `mongosqld` option -
Number of documents per database to sample when gathering schema information.
Minimum value is
0
.This option corresponds to the `sampleSize` `mongosqld` option -
The TLS cipher suite configuration mode. The default mode uses the default cipher suites. The custom mode allows you to specify custom cipher suites for both TLS 1.2 and TLS 1.3.
Values are
CUSTOM
orDEFAULT
. -
Lifetime, in seconds, of multi-document transactions. Atlas considers the transactions that exceed this limit as expired and so aborts them through a periodic cleanup process.
Minimum value is
1
.This option corresponds to the `transactionLifetimeLimitSeconds` `mongod` configuration file option
atlas api updateClusterAdvancedConfiguration --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)
func main() {
ctx := context.Background()
clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")
client, err := sdk.NewClient(
sdk.UseOAuthAuth(clientID, clientSecret),
sdk.UseBaseURL(url))
if err != nil {
log.Fatalf("Error: %v", err)
}
params = &sdk.UpdateClusterAdvancedConfigurationApiParams{}
sdkResp, httpResp, err := client.ClustersApi.
UpdateClusterAdvancedConfigurationWithParams(ctx, params).
Execute()
}
curl --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2025-03-12+json" \
--header "Content-Type: application/json" \
-X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" \
-d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest \
--header "Accept: application/vnd.atlas.2025-03-12+json" \
--header "Content-Type: application/json" \
-X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" \
-d '{ <Payload> }'
{
"changeStreamOptionsPreAndPostImagesExpireAfterSeconds": -1,
"chunkMigrationConcurrency": 42,
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"defaultMaxTimeMS": 42,
"defaultWriteConcern": "string",
"javascriptEnabled": true,
"minimumEnabledTlsProtocol": "TLS1_0",
"noTableScan": true,
"oplogMinRetentionHours": 42.0,
"oplogSizeMB": 42,
"queryStatsLogVerbosity": 42,
"sampleRefreshIntervalBIConnector": 0,
"sampleSizeBIConnector": 42,
"tlsCipherConfigMode": "CUSTOM",
"transactionLifetimeLimitSeconds": 42
}
{
"changeStreamOptionsPreAndPostImagesExpireAfterSeconds": -1,
"chunkMigrationConcurrency": 42,
"customOpensslCipherConfigTls12": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
],
"defaultMaxTimeMS": 42,
"defaultWriteConcern": "string",
"javascriptEnabled": true,
"minimumEnabledTlsProtocol": "TLS1_0",
"noTableScan": true,
"oplogMinRetentionHours": 42.0,
"oplogSizeMB": 42,
"queryStatsLogVerbosity": 42,
"sampleRefreshIntervalBIConnector": 0,
"sampleSizeBIConnector": 42,
"tlsCipherConfigMode": "CUSTOM",
"transactionLifetimeLimitSeconds": 42
}
{
"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": 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": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}