Docs Home → MongoDB Command Line Interface
mongocli atlas clusters update
mongocli atlas
commands are now deprecated because there's a new, dedicated CLI available for Atlas users. Migrate to the Atlas CLI to enjoy the same capabilities and the latest features. You can use mongocli atlas
commands until April 30, 2023.Modify the settings of the specified cluster.
You can specify modifications in a JSON configuration file with the --file flag.
You can't change the name of the cluster or downgrade the MongoDB version of your cluster.
To use this command, you must authenticate with a user account or an API key that has the Project Cluster Manager role. Atlas supports this command only for M10+ clusters
Syntax
mongocli atlas clusters update [clusterName] [options]
Arguments
Name | Type | Required | Description |
---|---|---|---|
clusterName | string | false | Name of the cluster to update. |
Options
Name | Type | Required | Description |
---|---|---|---|
--disableTerminationProtection | false | Disables termination protection for your cluster. You can delete a cluster with termination protection disabled. Mutually exclusive with --enableTerminationProtection, --file. | |
--diskSizeGB | float | false | Capacity, in gigabytes, of the host's root volume. Mutually exclusive with --file. |
--enableTerminationProtection | false | Enables termination protection for your cluster. You can't delete a cluster with termination protection enabled. Mutually exclusive with --disableTerminationProtection, --file. | |
-f, --file | string | false | Path to an optional JSON configuration file that defines cluster settings. To learn more about configuration files for the Atlas CLI, see https://www.mongodb.com/docs/atlas/cli/stable/cluster-config-file/. To learn more about configuration files for MongoCLI, see https://www.mongodb.com/docs/mongocli/stable/reference/mms-cluster-settings-file/. Mutually exclusive with --tier, --diskSizeGB, --enableTerminationProtection, --disableTerminationProtection, --tag. |
-h, --help | false | help for update | |
--mdbVersion | string | false | Major MongoDB version of the cluster. |
-o, --output | string | false | Output format. Valid values are json, json-path, go-template, or go-template-file. To see full output, use the -o json option. |
--projectId | string | false | Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable. |
--tag | stringToString | false | List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. Passing this flag replaces preexisting data. Mutually exclusive with --file. This value defaults to []. |
--tier | string | false | Tier for each data-bearing server in the cluster. To learn more about cluster tiers, see https://www.mongodb.com/docs/atlas/manage-clusters/#select-cluster-tier. Mutually exclusive with --file. |
Inherited Options
Name | Type | Required | Description |
---|---|---|---|
-P, --profile | string | false | Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file. |
Output
If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.
Updating cluster '<Name>'.
Examples
# Update the tier for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tier M50
# Replace tags cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tag key1=value1
# Remove all tags from cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tag =
# Update the disk size for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --diskSizeGB 20
# Update the MongoDB version for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --mdbVersion 5.0
# Use a configuration file named cluster-config.json to update a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3: mongocli atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --file cluster-config.json --output json