JSON
On this page
- Usage
- Cluster Configuration File
- Cloud Backup Schedule Configuration File
- Atlas Search Index Configuration File
- Search Nodes Configuration File
- Atlas Data Federation Configuration File
- Alert Configuration File
- Rolling Index Configuration File
- Project Configuration File
- Federated Authentication Configuration File
If an Atlas CLI command accepts the --file
option, you can pass
a .json
configuration file to define specific settings. For example,
you can pass a configuration file when using the Atlas CLI to:
Usage
To learn which settings are accepted by the Atlas CLI, view the request body schema and copy the request samples in the Atlas Admin API Specification for the endpoint that corresponds to the Atlas CLI command. The commands you can use include but are not limited to:
Atlas CLI Command | API Endpoint |
---|---|
When you run the command in your terminal, specify the --file
option
and provide the path to the JSON configuration file that defines your
desired settings.
Example
For example, consider the following configuration file to enable backups and add a label:
{ "backupEnabled" : true, "labels": [ { "key": "<myKey>", "value": "<myValue>" } ] }
The following command updates the myCluster
deployment
based on the settings specified in the configuration file:
atlas clusters update myCluster --file example.json
Cluster Configuration File
To learn more about cluster configuration files, see Cluster Configuration File. For sample files, see:
Cloud Backup Schedule Configuration File
To learn more about cloud backup schedule configuration files, see Cloud Backup Schedule Configuration File. To learn the syntax for a file, see Create a Configuration File.
Atlas Search Index Configuration File
To learn more about Atlas Search index configuration files, see Atlas Search Index Configuration File. To learn the syntax for a file, see Create a Configuration File.
Search Nodes Configuration File
To learn more about search nodes configuration files, see Search Nodes Configuration File. To learn the syntax for a file, see Create a Configuration File.
Atlas Data Federation Configuration File
To learn more about Atlas Data Federation configuration files, see Atlas Data Federation Configuration File. To learn the syntax for a file, see Create a Configuration File.
Alert Configuration File
To learn more about alert configuration files, see Alert Configuration File. To learn the syntax for a file, see Create a Configuration File.
Rolling Index Configuration File
To learn more about rolling index configuration files, see Rolling Index Configuration File. For example files, see:
Project Configuration File
To learn more about project configuration files, see Project Configuration File. To learn the syntax for a file, see Create a Configuration File.
Federated Authentication Configuration File
To learn more about federated authentication configuration files, see Federated Authentication Configuration File. To learn the syntax for a file, see Create a Configuration File.