mongocli ops-manager featurePolicies list
The featurePolicies list
command retrieves all Ops Manager
feature control policies
for the specified project. You can also retrieve all
feature policies through the Ops Manager
API.
Syntax
mongocli ops-manager|om featurePolicies list|ls [ --limit <number-of-items-per-page> ] [ --output|-o <output-format> ] [ --page <page-num> ] [ --profile|-P <profile-name> ] --projectId <id-of-project>
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
--limit | integer | Number of items per page, up to a maximum of 500. Defaults to
100 if not specified. | no |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--page | integer | Page number (1-based). Defaults to 1 if not specified. | no |
--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 |
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.
NAME SYSTEM ID POLICY <external-system-label> <external-system-id> <policy-name>
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
list
command to retrieve all feature control policies
for the project specified in the profile called myOm
.
mongocli om featurePolicies list -P myOm
The previous command produces the following output. The output lists
the EXTERNALLY_MANAGED_LOCK
policy that is specified for this project.
NAME SYSTEM ID POLICY my-external-system EXTERNALLY_MANAGED_LOCK
mongocli om featurePolicies list -P myOm --output json
The previous command produces the following output. The output lists
the EXTERNALLY_MANAGED_LOCK
policy that is specified for this project.
{ "created": "2021-01-22T15:10:39Z", "updated": "2021-01-22T15:11:32Z", "externalManagementSystem": { "name": "my-external-system" }, "policies": [ { "policy": "EXTERNALLY_MANAGED_LOCK" } ] }