Update Advanced Configuration Options for One Cluster
Deprecated
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 API Key must have the Project Cluster Manager role. This feature isn't available for M0
free clusters, M2
and M5
shared-tier clusters, or serverless clusters.
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.
Minimum length is
24
, maximum length is24
. Format should match the following pattern:^([a-f0-9]{24})$
. -
Human-readable label that identifies the cluster.
Minimum length is
1
, maximum length is64
. 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
.
Body
Required
Advanced configuration details to add for one cluster in the specified project.
-
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 -
Default level of acknowledgment requested from MongoDB for read operations set for this cluster.
MongoDB 4.4 clusters default to
available
. MongoDB 5.0 and later clusters default tolocal
.Values are
local
oravailable
. Default value isavailable
.This option corresponds to the global default read concern -
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 you can insert or update documents where all indexed entries don't exceed 1024 bytes. If you set this to false, mongod writes documents that exceed this limit but doesn't index them. This parameter has been removed as of MongoDB 4.4.
Default value is
true
.This option corresponds to the `failIndexKeyTooLong` `mongod` configuration file option -
Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.
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 -
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 clusters updateClusterAdvancedConfiguration --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.UpdateClusterAdvancedConfigurationApiParams{}
sdkResp, httpResp, err := client.ClustersApi.
UpdateClusterAdvancedConfigurationWithParams(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}/processArgs" \
-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}/processArgs" \
-d '{ <Payload> }'
{
"chunkMigrationConcurrency": 42,
"defaultReadConcern": "available",
"defaultWriteConcern": "string",
"failIndexKeyTooLong": true,
"javascriptEnabled": true,
"minimumEnabledTlsProtocol": "TLS1_0",
"noTableScan": true,
"oplogMinRetentionHours": 42.0,
"oplogSizeMB": 42,
"queryStatsLogVerbosity": 42,
"sampleRefreshIntervalBIConnector": 0,
"sampleSizeBIConnector": 42,
"transactionLifetimeLimitSeconds": 42
}
{
"chunkMigrationConcurrency": 42,
"defaultReadConcern": "available",
"defaultWriteConcern": "string",
"failIndexKeyTooLong": true,
"javascriptEnabled": true,
"minimumEnabledTlsProtocol": "TLS1_0",
"noTableScan": true,
"oplogMinRetentionHours": 42.0,
"oplogSizeMB": 42,
"queryStatsLogVerbosity": 42,
"sampleRefreshIntervalBIConnector": 0,
"sampleSizeBIConnector": 42,
"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": 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"
}