|
| 1 | +.. _mcli-atlas-cluster-onlinearchive-list-command: |
| 2 | + |
| 3 | +========================================= |
| 4 | +mongocli atlas cluster onlinearchive list |
| 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 | +.. include:: /includes/fact-online-archive-beta.rst |
| 16 | + |
| 17 | +The ``onlinearchive list`` command retrieves all the :atlas:`online archives |
| 18 | +</online-archive/manage-online-archive/>` for the specified cluster. You can |
| 19 | +also view the online archives for a cluster through the |
| 20 | +|service| :atlas:`UI </online-archive/view-online-archives/>` or :atlas:`API |
| 21 | +</reference/api/online-archive-get-all-for-cluster/>`. |
| 22 | + |
| 23 | +.. _mcli-atlas-cluster-online-archive-list-syntax: |
| 24 | + |
| 25 | +Syntax |
| 26 | +------ |
| 27 | + |
| 28 | +.. code-block:: text |
| 29 | + |
| 30 | + mongocli atlas cluster onlinearchive list|ls |
| 31 | + --clusterName <cluster-name> |
| 32 | + [ --profile|-P <profile-name> ] |
| 33 | + [ --projectId <project-ID> ] |
| 34 | + |
| 35 | +.. _mcli-atlas-cluster-onlinearchive-list-options: |
| 36 | + |
| 37 | +Options |
| 38 | +------- |
| 39 | + |
| 40 | +.. list-table:: |
| 41 | + :header-rows: 1 |
| 42 | + :widths: 20 10 60 10 |
| 43 | + |
| 44 | + * - Option |
| 45 | + - Type |
| 46 | + - Description |
| 47 | + - Required? |
| 48 | + |
| 49 | + * - ``--clusterName`` |
| 50 | + - string |
| 51 | + - Name of the cluster. |
| 52 | + - yes |
| 53 | + |
| 54 | + * - ``--profile``, ``-P`` |
| 55 | + - string |
| 56 | + - Name of the profile where the public and private |
| 57 | + keys for the project are saved. If omitted, uses the |
| 58 | + {+default-profile+}. To learn more about creating a |
| 59 | + profile, see :ref:`mcli-configure`. |
| 60 | + - no |
| 61 | + |
| 62 | + * - ``--projectId`` |
| 63 | + - string |
| 64 | + - Unique identifier of the project that contains the |
| 65 | + cluster. If omitted, uses the project ID in the profile or |
| 66 | + :ref:`environment variable <mcli-env-var>`. |
| 67 | + - no |
| 68 | + |
| 69 | +.. _mcli-atlas-cluster-onlinearchive-list-output: |
| 70 | + |
| 71 | +Output |
| 72 | +------ |
| 73 | + |
| 74 | +.. include:: /includes/command-output-intro.rst |
| 75 | + |
| 76 | +.. include:: /includes/atlas-online-archive-output.rst |
| 77 | + |
| 78 | +.. _mcli-atlas-cluster-onlinearchive-list-egs: |
| 79 | + |
| 80 | +Example |
| 81 | +------- |
| 82 | + |
| 83 | +The following example uses the ``mongocli atlas cluster onlinearchive list`` |
| 84 | +command to retrieve the online archives configured for the cluster named |
| 85 | +``myTestCluster``. The command uses the {+default-profile+} to access the |
| 86 | +project. |
| 87 | + |
| 88 | +.. code-block:: sh |
| 89 | + |
| 90 | + mongocli atlas cluster onlinearchive list --clusterName myTestCluster |
| 91 | + |
| 92 | +The previous command prints the following fields in |json| format to |
| 93 | +the terminal. To learn more about these fields, see |
| 94 | +:ref:`mcli-atlas-cluster-onlinearchive-list-output`. |
| 95 | + |
| 96 | +.. code-block:: json |
| 97 | + :copyable: false |
| 98 | + |
| 99 | + [ |
| 100 | + { |
| 101 | + "_id": "5f189832e26ec075e10c32d3", |
| 102 | + "clusterName": "myTestCluster", |
| 103 | + "collName": "movies", |
| 104 | + "criteria": { |
| 105 | + "dateField": "released", |
| 106 | + "expireAfterDays": 2 |
| 107 | + }, |
| 108 | + "dbName": "sample_mflix", |
| 109 | + "groupId": "5e2211c17a3e5a48f5497de3", |
| 110 | + "partitionFields": [ |
| 111 | + { |
| 112 | + "fieldName": "title", |
| 113 | + "fieldType": "string", |
| 114 | + "order": 0 |
| 115 | + }, |
| 116 | + { |
| 117 | + "fieldName": "year", |
| 118 | + "fieldType": "int", |
| 119 | + "order": 1 |
| 120 | + }, |
| 121 | + { |
| 122 | + "fieldName": "released", |
| 123 | + "fieldType": "date", |
| 124 | + "order": 2 |
| 125 | + } |
| 126 | + ], |
| 127 | + "paused": false, |
| 128 | + "state": "ACTIVE" |
| 129 | + } |
| 130 | + ] |
0 commit comments