mongocli atlas whitelist describe
The whitelist describe
command retrieves details about the
specified whitelist entry in the specified Atlas project. You can
also retrieve details about a whitelist entry through the Atlas
UI or
API.
Syntax
mongocli atlas cluster describe <whitelist-entry> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Options
Option | Type | Description | Required? |
---|---|---|---|
<whitelist-entry> | string | IP address, CIDR block, or AWS security group ID of the
whitelist entry to retrieve. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private
keys for the project are set. 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.
Field | Description |
---|---|
groupId | Unique identifier of the project. |
cidrBlock | Whitelist entry in Classless Inter-Domain Routing (CIDR)
notation. Mutually exclusive with awsSecurityGroup and
ipAddress . |
ipAddress | Whitelisted IP address. Mutually exclusive with awsSecurityGroup and ciderBlock . |
deleteAfter | Date in ISO 8601 format after which Atlas deletes the
whitelist entry. |
awsSecurityGroup | Whitelisted ID of an AWS security group. Mutually exclusive with cidrBlock and ipAddress . |
comment | Description of the whitelist entry. |
Example
The following example uses the mongocli atlas whitelist describe
command to retrieve details about the whitelist entry 192.0.2.0/24
.
It uses the default profile to access the Atlas project that
contains the whitelist.
mongocli atlas whitelist describe 192.0.2.0/24 --output json --projectId 5e1234c17a3e5a48f5497de3
The example command prints the following fields to the terminal. To learn more about these fields, see Output.
{ "groupId": "5e1234c17a3e5a48f5497de3", "cidrBlock": "192.0.2.0/24", "ipAddress": "192.0.2.0", "comment": "Sample" }