Docs Menu
Docs Home
/ /
MongoDB CLI
/ / /

mongocli iam globalAccessLists create

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Create an IP access list entry for your global API key.

Command Syntax
mongocli iam globalAccessLists create [options]
Name
Type
Required
Description
--cidr
string
true
Access list entry in CIDR notation to be added for your API key. To add more than one entry, you can specify each entry with a separate cidr flag or specify all the entries as a comma-separated list using one cidr flag. You can't set both cidr and ip in the same command.
--desc
string
true
IP address to add to the access list for your API key. To add more than one IP address, specify each address with a separate ip flag or specify all addresses as a comma-separated list using one ip flag. You can't set both ip and cidr in the same command.
-h, --help
false
help for create
-o, --output
string
false
Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.
Name
Type
Required
Description
-P, --profile
string
false
Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.
# Create an access list entry for your global API key to allow access from 192.0.2.0/24:
mongocli iam globalAccessLists create --cidr 192.0.2.0/24 --desc "My Global IP" --output json

Back

globalAccessLists