Skip to content

Commit 48fce39

Browse files
authored
DOCSP-12178: [mongocli] cloud manager maintenance window commands (#268)
1 parent 6e41109 commit 48fce39

8 files changed

+692
-1
lines changed

source/reference/cloud-manager.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Cloud Manager ``mongocli`` Commands
2929
:ref:`event <mcli-reference-cm-event>`
3030
Lists events for a specified project or organization.
3131

32+
:ref:`maintenance window <mcli-reference-om-maintenanceWindow>`
33+
Manage your |cloud-short| :cloudmgr:`maintenance window
34+
</reference/api/maintenance-windows>`.
35+
3236
:ref:`metric <mcli-reference-cm-metric>`
3337
Lists metrics for MongoDB processes on a specified host.
3438

@@ -57,6 +61,7 @@ Cloud Manager ``mongocli`` Commands
5761
Clusters </reference/cloud-manager/cluster-commands>
5862
Database Users </reference/cloud-manager/dbuser-commands>
5963
Events </reference/cloud-manager/event-commands>
64+
Maintenance Window </reference/cloud-manager/maintenanceWindow-commands>
6065
Metrics </reference/cloud-manager/metric-commands>
6166
Processes </reference/cloud-manager/process-commands>
6267
Security </reference/cloud-manager/security-commands>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _mcli-reference-cm-maintenanceWindow:
2+
3+
=========================================
4+
Cloud Manager Maintenance Window Commands
5+
=========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
Create a Maintenance Window </reference/cloud-manager/maintenanceWindow-create>
13+
List Maintenance Windows </reference/cloud-manager/maintenanceWindow-list>
14+
Describe a Maintenance Window </reference/cloud-manager/maintenanceWindow-describe>
15+
Update a Maintenance Window </reference/cloud-manager/maintenanceWindow-update>
16+
Delete a Maintenance Window </reference/cloud-manager/maintenanceWindow-delete>
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.. _mcli-cm-maintenanceWindow-create-command:
2+
3+
===============================================
4+
mongocli cloud-manager maintenanceWindow create
5+
===============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``maintenanceWindow create`` command creates one |cloud-short|
16+
:cloudmgr:`maintenance window </reference/api/maintenance-windows>`
17+
for the specified project. You can also create a maintenance window
18+
through the :cloudmgr:`API </reference/api/maintenance-windows-create-one/>`.
19+
20+
.. _mcli-cm-maintenanceWindow-create-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: text
26+
27+
mongocli cloud-manager|cm maintenanceWindow create
28+
--startDate <start-date>
29+
--endDate <end-date>
30+
--alertType <alert-type>
31+
[ --desc <description> ]
32+
[ --output|-o <output-format> ]
33+
[ --profile|-P <profile-name> ]
34+
[ --projectId <project-ID> ]
35+
36+
.. _mcli-cm-maintenanceWindow-create-options:
37+
38+
Options
39+
-------
40+
41+
.. list-table::
42+
:header-rows: 1
43+
:widths: 20 10 60 10
44+
45+
* - Option
46+
- Type
47+
- Description
48+
- Required?
49+
50+
* - ``--startDate``
51+
- string
52+
- Timestamp in ``ISO 8601`` date and time format in UTC when the
53+
maintenance window starts.
54+
- yes
55+
56+
* - ``--endDate``
57+
- string
58+
- Timestamp in ``ISO 8601`` date and time format in UTC when the
59+
maintenance window ends.
60+
- yes
61+
62+
* - ``--alertType``
63+
- string
64+
- Comma-separated list of alert types to silence during maintenance
65+
window. For example: ``HOST,REPLICA_SET,CLUSTER,AGENT,BACKUP``
66+
- yes
67+
68+
* - ``--desc``
69+
- string
70+
- Description of the maintenance window.
71+
- no
72+
73+
* - ``--output``, ``-o``
74+
- string
75+
- .. include:: /includes/extracts/fact-basic-options-output.rst
76+
- no
77+
78+
* - ``--profile``, ``-P``
79+
- string
80+
- Name of the profile where the public and private
81+
keys for the project are saved. If omitted, uses the
82+
{+default-profile+}. To learn more about creating a
83+
profile, see :ref:`mcli-configure`.
84+
- no
85+
86+
* - ``--projectId``
87+
- string
88+
- Unique identifier of the project that contains the
89+
cluster. If omitted, uses the project ID in the profile or
90+
:ref:`environment variable <mcli-env-var>`.
91+
- no
92+
93+
.. _mcli-cm-maintenanceWindow-create-output:
94+
95+
Output
96+
------
97+
98+
.. include:: /includes/command-output-intro.rst
99+
100+
.. tabs::
101+
102+
.. tab:: Default
103+
:tabid: default
104+
105+
.. code-block:: none
106+
:copyable: false
107+
108+
Maintenance window <window-id> successfully created.
109+
110+
.. tab:: JSON
111+
:tabid: json
112+
113+
.. include:: /includes/maintenance-window-response.rst
114+
115+
Example
116+
-------
117+
118+
The following example uses the ``mongocli cm maintenanceWindow
119+
create`` command to create a maintenance window. It uses a profile called
120+
``myCm`` and specifies JSON output.
121+
122+
.. code-block:: none
123+
124+
mongocli cm maintenanceWindow create \
125+
--startDate 2020-10-23T22:00:00Z \
126+
--endDate 2020-10-24T22:00:00Z \
127+
--alertType HOST,BACKUP \
128+
--desc "One-day maintenance window" \
129+
-P myCm -o json
130+
131+
The above command produces the following output. For more information about
132+
these fields, see :ref:`Output <mcli-cm-maintenanceWindow-create-output>`.
133+
134+
.. code-block:: json
135+
:copyable: false
136+
137+
{
138+
"id": "5f7cb0eec902201990cb1506",
139+
"groupId": "5f1f39ffc902201990f53873",
140+
"created": "2020-10-06T18:01:18Z",
141+
"startDate": "2020-10-23T22:00:00Z",
142+
"endDate": "2020-10-24T22:00:00Z",
143+
"updated": "2020-10-06T18:05:29Z",
144+
"alertTypeNames": [
145+
"BACKUP",
146+
"HOST"
147+
],
148+
"description": "One-day maintenance window"
149+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
.. _mcli-cm-maintenanceWindow-delete-command:
2+
3+
===============================================
4+
mongocli cloud-manager maintenanceWindow delete
5+
===============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``maintenanceWindow delete`` command deletes one |cloud-short|
16+
:cloudmgr:`maintenance window </reference/api/maintenance-windows>`
17+
specified by ID. You can also delete a maintenance window
18+
through the :cloudmgr:`API </reference/api/maintenance-windows-delete-one/>`.
19+
20+
.. _mcli-cm-maintenanceWindow-delete-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: text
26+
27+
mongocli cloud-manager|cm maintenanceWindow delete <window-id>
28+
[ --force ]
29+
[ --profile|-P <profile-name> ]
30+
[ --projectId <project-ID> ]
31+
32+
Arguments
33+
---------
34+
35+
.. list-table::
36+
:header-rows: 1
37+
:widths: 20 10 60 10
38+
39+
* - Argument
40+
- Type
41+
- Description
42+
- Required?
43+
44+
* - ``<maintenance-window-id>``
45+
- string
46+
- Unique identifier of the maintenance window that you
47+
want to delete.
48+
- yes
49+
50+
.. _mcli-cm-maintenanceWindow-delete-options:
51+
52+
Options
53+
-------
54+
55+
.. list-table::
56+
:header-rows: 1
57+
:widths: 20 10 60 10
58+
59+
* - Option
60+
- Type
61+
- Description
62+
- Required?
63+
64+
* - ``--force``
65+
-
66+
- Flag that indicates that the maintenance window can
67+
be deleted without requiring confirmation.
68+
- no
69+
70+
* - ``--profile``, ``-P``
71+
- string
72+
- Name of the profile where the public and private
73+
keys for the project are saved. If omitted, uses the
74+
{+default-profile+}. To learn more about creating a
75+
profile, see :ref:`mcli-configure`.
76+
- no
77+
78+
* - ``--projectId``
79+
- string
80+
- Unique identifier of the project that contains the
81+
cluster. If omitted, uses the project ID in the profile or
82+
:ref:`environment variable <mcli-env-var>`.
83+
- no
84+
85+
.. _mcli-cm-maintenanceWindow-delete-output:
86+
87+
Output
88+
------
89+
90+
.. code-block:: none
91+
:copyable: false
92+
93+
Maintenance window <window-id> successfully deleted.
94+
95+
Example
96+
-------
97+
98+
The following example uses the ``mongocli cm maintenanceWindow
99+
delete`` command to delete a maintenance window with ID
100+
``5f7cb0eec902201990cb1506``. It uses a profile called ``myCm``.
101+
102+
.. code-block:: none
103+
104+
mongocli cm maintenanceWindow delete 5f7cb0eec902201990cb1506 --force -P myCm

0 commit comments

Comments
 (0)