Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli iam globalWhitelist describe

On this page

  • Syntax
  • Arguments
  • Options
  • Output
  • Examples

The iam globalWhitelist describe command provides details about the specified global whitelist entry. You can also retrieve details about a global whitelist entry using the API.

You must have credentials with the Global Read Only role to retrieve details about a global whitelist entry for an Ops Manager instance.

mongocli iam globalWhitelist|ipwhitelist describe
<whitelist-entry-id>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]

Note

Use -h or --help to view the command-line help for this command.

Argument
Type
Description
Required?
<whitelist-entry-id>
string
Unique identifier of the global whitelist entry to retrieve.
yes
Option
Type
Description
Required?
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format

  • go-template for custom output using the Go template

  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string

Name of the profile where your credentials are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.

You must have credentials with the Global Read Only role to retrieve details about a global whitelist entry for an Ops Manager instance.

no

If the command succeeds, it returns the following output to the terminal in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

ID CIDR BLOCK CREATED AT
<whitelist-entry-id> <cidr-block-1> <date>

The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the API reference.

The following command describes the specified global whitelist entry using the default profile, which contains credentials for accessing the Ops Manager instance. The output is returned in the default format.

mongocli iam globalWhitelists describe 5f5bb07e57aef32b04ed0770

The previous command prints the following to the terminal.

ID CIDR BLOCK CREATED AT
5f5bb07e57aef32b04ed0770 192.168.0.1/32 2020-09-11T17:59:04Z

The following command retrieves details about the specified global whitelist entry using the myOM profile, which contains credentials for accessing the Ops Manager instance. The output is returned in JSON format.

mongocli iam globalWhitelists describe 5f5bb07e57aef32b04ed0770 -P myOM --output json

The previous command prints the following to the terminal in JSON format.

{
"id": "5f5bb07e57aef32b04ed0770",
"cidrBlock": "192.168.0.1/32",
"created": "2020-09-11T18:01:01Z",
"description": "My Global IP",
"type": "GLOBAL_ROLE",
"updated": "2020-09-11T18:01:01Z"
}

Back

List Global Whitelist Entries for an Ops Manager Instance