You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The access list can contain trusted IP addresses, AWS security group IDs, and entries in Classless Inter-Domain Routing (CIDR) notation. You can add only one access list entry at a time. You can create one access list per project.
18
+
19
+
The command doesn't overwrite existing entries in the access list. Instead, it adds the new entries to the list of entries.
20
+
21
+
To use this command, you must authenticate with a user account or an API key that has the Read Write role.
22
+
23
+
Syntax
24
+
------
25
+
26
+
.. code-block::
27
+
:caption: Command Syntax
28
+
29
+
atlas accessLists create [entry] [options]
30
+
31
+
.. Code end marker, please don't delete this comment
32
+
33
+
Arguments
34
+
---------
35
+
36
+
.. list-table::
37
+
:header-rows: 1
38
+
:widths: 20 10 10 60
39
+
40
+
* - Name
41
+
- Type
42
+
- Required
43
+
- Description
44
+
* - entry
45
+
- string
46
+
- false
47
+
- IP address, CIDR address, or AWS security group ID that you want to add to the access list.
48
+
49
+
Options
50
+
-------
51
+
52
+
.. list-table::
53
+
:header-rows: 1
54
+
:widths: 20 10 10 60
55
+
56
+
* - Name
57
+
- Type
58
+
- Required
59
+
- Description
60
+
* - --comment
61
+
- string
62
+
- false
63
+
- Optional description or comment for the entry.
64
+
* - --currentIp
65
+
-
66
+
- false
67
+
- Flag that adds the IP address from the host that is currently executing the command to the access list. Only applicable for type ipAddress entries. You don't need the entry argument when you use the currentIp option.
68
+
* - --deleteAfter
69
+
- string
70
+
- false
71
+
- ISO-8601-formatted UTC date after which Atlas removes the entry from the access list.
72
+
* - -h, --help
73
+
-
74
+
- false
75
+
- help for create
76
+
* - -o, --output
77
+
- string
78
+
- false
79
+
- Output format. Valid values are json, json-path, go-template, or go-template-file.
80
+
* - --projectId
81
+
- string
82
+
- false
83
+
- Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
84
+
* - --type
85
+
- string
86
+
- false
87
+
- Type of access list entry. Valid values are cidrBlock, ipAddress, or awsSecurityGroup. This value defaults to "ipAddress".
88
+
89
+
Inherited Options
90
+
-----------------
91
+
92
+
.. list-table::
93
+
:header-rows: 1
94
+
:widths: 20 10 10 60
95
+
96
+
* - Name
97
+
- Type
98
+
- Required
99
+
- Description
100
+
* - -P, --profile
101
+
- string
102
+
- false
103
+
- 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.
104
+
105
+
Output
106
+
------
107
+
108
+
If the command succeeds, the CLI returns output similar to the following sample. Values in brackets represent your values.
109
+
110
+
.. code-block::
111
+
112
+
Created new IP access list.
113
+
114
+
115
+
Examples
116
+
--------
117
+
118
+
.. code-block::
119
+
120
+
# Create an IP access list entry using the current IP address:
121
+
atlas accessList create --currentIp
122
+
123
+
124
+
.. code-block::
125
+
126
+
# Create an access list entry for the IP address 192.0.2.15 in the project with ID 5e2211c17a3e5a48f5497de3:
127
+
atlas accessList create 192.0.2.15 --type ipAddress --projectId 5e2211c17a3e5a48f5497de3 --comment "IP address for app server 2" --output json
128
+
129
+
130
+
.. code-block::
131
+
132
+
# Create an access list entry in CIDR notation for 73.231.201.205/24 in the project with ID 5e2211c17a3e5a48f5497de3:
133
+
atlas accessList create 73.231.201.205/24 --type cidrBlock --projectId 5e2211c17a3e5a48f5497de3 --output json --comment "CIDR block for servers C - F"
134
+
135
+
136
+
.. code-block::
137
+
138
+
# Create an access list entry for the AWS security group sg-903004f8 in the project with ID 5e2211c17a3e5a48f5497de3:
0 commit comments