|
| 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