- API >
- Public API Tutorials >
- Update the Automation Configuration
Update the Automation Configuration¶
On this page
Overview¶
A project’s automation configuration determines the goal state of its MongoDB processes and agents. The Automation Agents build the deployment according to the goals specified.
To update the configuration, retrieve the current configuration and make
changes as needed, changing only those items you want modified. Then replace
the entire configuration using PUT
with the automationConfig endpoint. You must use PUT
.
Do not use PATCH
.
Note
Some attributes of the backupVersions and monitoringVersions objects
cannot be updated through the automationConfig
endpoint.
For details, see Update the Monitoring Agent or Backup Agent.
Prerequisites¶
You must have access to the Public API. For more information, see Configure Public API Access.
Procedure¶
Retrieve the automation configuration from Ops Manager.¶
Use the automationConfig resource to retrieve the configuration. Issue the following command, replacing:
<username>
with your user name,<apiKey>
with your API credentials,<url>
with the URL of Ops Manager, and<group_id>
with the project ID from your Project Settings:
Confirm that the version
field of the retrieved automation
configuration matches the
version
field in the mms-cluster-config-backup.json file,
which is found on any server running the Automation Agent.
Edit the automation configuration.¶
Refer to Automation Configuration for detailed descriptions of settings. If you are updating the Monitoring Agent or Backup Agent, please see Update the Monitoring Agent or Backup Agent before continuing with this procedure.
Send the updated automation configuration.¶
Use the automationConfig resource to send the updated automation configuration.
Issue the following command, replacing <configuration>
with path to the
updated configuration document. Replace the username, API key, URL, and
project ID as in previous steps.
Upon successful update of the configuration, the API returns the HTTP
200 OK
status code to indicate the request has succeeded.
Confirm successful update of the automation configuration.¶
Retrieve the automation configuration from Ops Manager and confirm it contains the changes. To retrieve the configuration, issue the following command, replacing username, API key, URL, and project ID as in previous steps.
Check the deployment status to ensure goal state is reached.¶
Use the automationStatus resource to retrieve the deployment status. Issue the following command, replacing username, API key, URL, and project ID as in previous steps.
Confirm that the values of all the lastGoalVersionAchieved
fields in the
processes
array match the goalVersion
field. For more information on
deployment status, see Automation Status.