-
Notifications
You must be signed in to change notification settings - Fork 66
/
atlas-clusters-update.txt
178 lines (128 loc) · 5.42 KB
/
atlas-clusters-update.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.. _atlas-clusters-update:
=====================
atlas clusters update
=====================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
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.
You can only update a replica set to a single-shard cluster; you cannot update a replica set to a multi-sharded cluster. To learn more, see https://www.mongodb.com/docs/atlas/scale-cluster/#convert-a-replica-set-to-a-sharded-cluster and https://www.mongodb.com/docs/upcoming/tutorial/convert-replica-set-to-replicated-shard-cluster.
To use this command, you must authenticate with a user account or an API key with the Project Cluster Manager role.
Atlas supports this command only for M10+ clusters
Syntax
------
.. code-block::
:caption: Command Syntax
atlas clusters update [clusterName] [options]
.. Code end marker, please don't delete this comment
Arguments
---------
.. list-table::
:header-rows: 1
:widths: 20 10 10 60
* - Name
- Type
- Required
- Description
* - clusterName
- string
- false
- Name of the cluster to update.
Options
-------
.. list-table::
:header-rows: 1
:widths: 20 10 10 60
* - 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 cluster configuration files for the Atlas CLI, see https://dochub.mongodb.org/core/cluster-config-file-atlascli. To learn more about cluster configuration files for MongoCLI, see https://dochub.mongodb.org/core/mms-cluster-settings-file-mcli.
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 the 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
- key=value
- 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.
* - --tier
- string
- false
- Tier for each data-bearing server in the cluster. To learn more about cluster tiers, see https://dochub.mongodb.org/core/cluster-tier-atlas.
Mutually exclusive with --file.
Inherited Options
-----------------
.. list-table::
:header-rows: 1
:widths: 20 10 10 60
* - Name
- Type
- Required
- Description
* - -P, --profile
- string
- false
- Name of the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings.
Output
------
If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.
.. code-block::
Updating cluster '<Name>'.
Examples
--------
.. code-block::
# Update the tier for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tier M50
.. code-block::
# Replace tags cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tag key1=value1
.. code-block::
# Remove all tags from cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --tag =
.. code-block::
# Update the disk size for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --diskSizeGB 20
.. code-block::
# Update the MongoDB version for a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --mdbVersion 5.0
.. code-block::
# Use a configuration file named cluster-config.json to update a cluster named myCluster for the project with ID 5e2211c17a3e5a48f5497de3:
atlas cluster update myCluster --projectId 5e2211c17a3e5a48f5497de3 --file cluster-config.json --output json