Docs Menu
Docs Home
/ /
Atlas CLI
/

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

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:

  • Create, update, or upgrade a cluster.

  • Update a cloud backup schedule.

  • Create or update an Atlas Search Index.

  • Create or update search nodes.

  • Create a Data Federation database.

  • Create or update an alert configuration.

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.

For example, consider the following configuration file to enable backups and add a label:

/example.json
{
"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

To learn more about cluster configuration files, see Cluster Configuration File. For sample files, see:

To learn more about cloud backup schedule configuration files, see Cloud Backup Schedule Configuration File. For a sample file, see Create a Configuration File.

To learn more about Atlas Search index configuration files, see Atlas Search Index Configuration File. For a sample file, see Example Atlas Search Index Configuration File.

To learn more about search nodes configuration files, see Search Nodes Configuration File. For a sample file, see Example Search Nodes Configuration File.

To learn more about Atlas Data Federation configuration files, see Atlas Data Federation Configuration File. For a sample file, see Example Atlas Data Federation Configuration File.

To learn more about alert configuration files, see Alert Configuration File. For a sample file, see Example Alert Configuration File.

Back

Reference