Skip to content

Commit 388437e

Browse files
Merge pull request #249 from jvincent-mongodb/DOCSP-34286
DOCSP-34286 -- Add Online Archive Create and Update JSON config options page
2 parents cfebd8c + 65576de commit 388437e

File tree

4 files changed

+158
-0
lines changed

4 files changed

+158
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name":"myCluster",
3+
"groupId": "32y6e74b3g91947azb20e3b8",
4+
"collName": "myCollection",
5+
"collectionType": "TIMESERIES",
6+
"criteria": {
7+
"type": "DATE"
8+
},
9+
"dataExpirationRule": {
10+
"expireAfterDays": 7
11+
},
12+
"dataProcessRegion": {
13+
"cloudProvider": "AWS",
14+
"region": "US_EAST_1"
15+
},
16+
"dbName": "myDB",
17+
"partitionFields": [
18+
{
19+
"fieldName": "exampleField",
20+
"order": 0
21+
}
22+
],
23+
24+
"paused": true,
25+
"schedule": {
26+
"type": "DEFAULT"
27+
}
28+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name":"myCluster",
3+
"groupId": "32y6e74b3g91947azb20e3b8",
4+
"archiveId":"32y6e74b3g32y6e74b3gyb45",
5+
"criteria": {
6+
"type": "DATE"
7+
},
8+
"dataExpirationRule": {
9+
"expireAfterDays": 7
10+
},
11+
"paused": true,
12+
"schedule": {
13+
"type": "DEFAULT"
14+
}
15+
}

source/reference/json.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,5 @@ see :ref:`example-alert-config-file`.
142142
Cloud Backup Schedule </reference/json/cloud-backup-schedule-config-file>
143143
Atlas Data Federation </reference/json/data-federation-config-file>
144144
Atlas Search Index </reference/json/search-index-config-file>
145+
Online Archive </reference/json/file-options-online-archive>
145146
Alert </reference/json/alert-config-file>
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
.. _atlas-cli-file-options-online-archive-file:
2+
3+
========================================
4+
Online Archive Configuration File
5+
========================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
You can use a configuration file to specify the required
14+
settings for creating and updating an online archive using the
15+
{+atlas-cli+}. The {+atlas-cli+} accepts ``.json`` online archive
16+
configuration files.
17+
18+
Use the following resources to:
19+
20+
- Learn the :ref:`required settings <required-oa-settings>` you
21+
can specify in the online archive
22+
23+
- View and copy :ref:`sample configuration files <example-oa-config-file>`.
24+
25+
.. _required-oa-settings:
26+
27+
Online Archive Settings
28+
-----------------------
29+
30+
You can specify the following settings to create or
31+
update an online archive either in the configuration
32+
file or as flags in the command:
33+
34+
.. list-table::
35+
:header-rows: 1
36+
:widths: 20 10 70
37+
38+
* - Field
39+
- Type
40+
- Description
41+
42+
* - ``groupId``
43+
- string
44+
- Unique identifier for your project. Your ``groupId`` is the same
45+
as your ``projectId``. For existing groups, your
46+
``groupId`` and ``projectId`` remains the same.
47+
The resource and corresponding endpoints use the term groups.
48+
49+
* - ``archiveID``
50+
- string
51+
- Unique 24-hexadecimal digit string that identifies
52+
the online archive to update.
53+
54+
* - ``clusterName``
55+
- string
56+
- Human-readable label that identifies the cluster that contains
57+
the collection for which you want to create or update one online archive.
58+
59+
* - ``collName``
60+
- string
61+
- The name of your collection.
62+
63+
* - ``criteria``
64+
- object
65+
- Rules by which MongoDB MongoDB Cloud archives data.
66+
67+
* - ``dbName``
68+
- string
69+
- Human-readable label of the database that
70+
contains the collection that contains the online archive.
71+
72+
For detailed descriptions and a full list of available settings,
73+
see the request body schema in the API specification:
74+
75+
- :oas-atlas-op:`Create One Online Archive </createOnlineArchive>`
76+
- :oas-atlas-op:`Update One Online Archive </updateOnlineArchive>`
77+
78+
.. _example-oa-config-file:
79+
80+
Example Online Archive Create Configuration File
81+
------------------------------------------------
82+
83+
.. literalinclude:: /includes/online-archive-create.json
84+
85+
86+
Example Online Archive Update Configuration File
87+
------------------------------------------------
88+
89+
.. literalinclude:: /includes/online-archive-update.json
90+
91+
Example Online Archive Create Command
92+
-------------------------------------
93+
To create an online archive configuration, specify the ``--file`` option
94+
and the path to the file. The following example creates an
95+
online archive by using a configuration file named
96+
``online-archive-create-config.json``:
97+
98+
.. code-block::
99+
100+
atlas clusters onlineArchive create --file online-archive-create-config.json --output json
101+
102+
Example Online Archive Update Command
103+
-------------------------------------
104+
To update an online archive configuration, specify the ``--file`` option
105+
and the path to the file. The following example updates an
106+
online archive by using a configuration file named
107+
``online-archive-update-config.json``:
108+
109+
.. code-block::
110+
111+
atlas clusters onlineArchive update --file online-archive-update-config.json --output json
112+
113+
114+

0 commit comments

Comments
 (0)