Online Archive Configuration File
On this page
You can use a configuration file to specify the required
settings for creating and updating an online archive using the
Atlas CLI. The Atlas CLI accepts .json
online archive
configuration files.
Use the following resources to:
Learn the required settings you can specify in the online archive
View and copy sample configuration files.
Online Archive Settings
You can specify the following settings to create or update an online archive either in the configuration file or as flags in the command:
Field | Type | Description |
---|---|---|
| string | Unique identifier for your project. Your |
| string | Unique 24-hexadecimal digit string that identifies the online archive to update. |
| string | Human-readable label that identifies the cluster that contains the collection for which you want to create or update one online archive. |
| string | The name of your collection. |
| object | Rules by which MongoDB MongoDB Cloud archives data. |
| string | Human-readable label of the database that contains the collection that contains the online archive. |
For detailed descriptions and a full list of available settings, see the request body schema in the API specification:
Example Online Archive Create Configuration File
{ "name":"myCluster", "groupId": "32y6e74b3g91947azb20e3b8", "collName": "myCollection", "collectionType": "TIMESERIES", "criteria": { "type": "DATE" }, "dataExpirationRule": { "expireAfterDays": 7 }, "dataProcessRegion": { "cloudProvider": "AWS", "region": "US_EAST_1" }, "dbName": "myDB", "partitionFields": [ { "fieldName": "exampleField", "order": 0 } ], "paused": true, "schedule": { "type": "DEFAULT" } }
Example Online Archive Update Configuration File
{ "name":"myCluster", "groupId": "32y6e74b3g91947azb20e3b8", "archiveId":"32y6e74b3g32y6e74b3gyb45", "criteria": { "type": "DATE" }, "dataExpirationRule": { "expireAfterDays": 7 }, "paused": true, "schedule": { "type": "DEFAULT" } }
Example Online Archive Create Command
To create an online archive configuration, specify the --file
option
and the path to the file. The following example creates an
online archive by using a configuration file named
online-archive-create-config.json
:
atlas clusters onlineArchive create --file online-archive-create-config.json --output json
Example Online Archive Update Command
To update an online archive configuration, specify the --file
option
and the path to the file. The following example updates an
online archive by using a configuration file named
online-archive-update-config.json
:
atlas clusters onlineArchive update --file online-archive-update-config.json --output json