mongocli ops-manager featurePolicies update
The featurePolicies update
command updates all Ops Manager
feature policies
for the external system that manages the specified project. You can also update all
feature policies for one project through the API.
Syntax
mongocli ops-manager|om featurePolicies update|updates --name <name-of-external-system> [ --output|-o <output-format> ] --policy <one-or-more-feature-policies> [ --profile|-P <profile-name> ] --projectId <project-ID> [ --systemId <id-of-external-system> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
--name | string | Name of the external system that
manages this project's deployment. | yes | ||||||||||||||||||||||
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no | ||||||||||||||||||||||
--policy | strings | Comma-separated list of policies that the external system applies to this project. Possible values and their descriptions are:
| yes | ||||||||||||||||||||||
--profile , -P | string | Name of the profile where the project ID and the Programmatic API Keys
for the project are saved. If omitted, uses the default profile.
To learn more about creating a profile, see Configure the MongoDB CLI. | no | ||||||||||||||||||||||
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no | ||||||||||||||||||||||
--systemId | string | Unique identifier of the external system that manages this Ops Manager project. | no |
Output
The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
Feature control policies updated.
If you request output in JSON format, the command returns the fields described in the API reference.
Example
The following example uses the mongocli om featurePolicies
update
command to update all feature control policies
for the project specified in the profile called myOm
.
mongocli om featurePolicies update --name my-external-system --policy EXTERNALLY_MANAGED_LOCK -P myOm
The previous command produces the following output.
Feature control policies updated.
mongocli om featurePolicies update --name my-external-system --policy EXTERNALLY_MANAGED_LOCK -P myOm --output json
The previous command produces the following output.
{ "created": "2021-01-22T15:10:39Z", "updated": "2021-01-23T03:25:40Z", "externalManagementSystem": { "name": "my-external-system" }, "policies": [ { "policy": "EXTERNALLY_MANAGED_LOCK" } ] }