.. _mongocli-iam-globalAccessLists-create:

=====================================
mongocli iam globalAccessLists create
=====================================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

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

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli iam globalAccessLists create [options]

.. Code end marker, please don't delete this comment

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - 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.

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - 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.

Examples
--------

.. code-block::
   :copyable: false

   # 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
