Docs Menu

Docs HomeMongoDB Command Line Interface

mongocli iam globalAccessLists create

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

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

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 that you want to add to the access list for your API key. To add more than one IP address, you can specify each address with a separate ip flag or specify the 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.
Name
Type
Required
Description
-P, --profile
string
false
Human-readable label that identifies the profile to use from your configuration file. To learn about profiles for the Atlas CLI, see https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. 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
←  mongocli iam globalAccessListsmongocli iam globalAccessLists delete →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.