Skip to content

Commit 5ecc106

Browse files
authored
DOCSP-11804: [mongocli] mongocli atlas networking container list, delete (#199)
1 parent c15cc14 commit 5ecc106

File tree

4 files changed

+317
-1
lines changed

4 files changed

+317
-1
lines changed

source/reference/atlas.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ Atlas ``mongocli`` Commands
2828
:ref:`log <mcli-reference-atlas-log>`
2929
Retrieve various log types for a specified host.
3030

31-
:ref:`metric <mcli-reference-atlas-metric>`
31+
:ref:`metrics <mcli-reference-atlas-metric>`
3232
List metrics for MongoDB processes on a specified host.
3333

34+
:ref:`networking <mcli-reference-atlas-networking>`
35+
Manage network peering containers for an |service| project.
36+
3437
:ref:`online archive <mcli-reference-atlas-onlinearchive>`
3538
Manage :atlas:`online archives </online-archive/manage-online-archive/>`
3639
for a cluster.
@@ -58,6 +61,7 @@ Atlas ``mongocli`` Commands
5861
Events </reference/atlas/event-commands>
5962
Logs </reference/atlas/log-commands>
6063
Metrics </reference/atlas/metric-commands>
64+
Networking </reference/atlas/networking-commands>
6165
Processes </reference/atlas/process-commands>
6266
Security </reference/atlas/security-commands>
6367
Whitelists </reference/atlas/whitelist-commands>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. _mcli-reference-atlas-networking:
2+
3+
=============================
4+
Atlas ``networking`` Commands
5+
=============================
6+
7+
.. default-domain:: mongodb
8+
9+
.. toctree::
10+
:titlesonly:
11+
12+
List Containers </reference/atlas/networking-containers-list>
13+
Delete One Container </reference/atlas/networking-containers-delete>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
.. _mcli-atlas-networking-containers-delete-command:
2+
3+
===========================================
4+
mongocli atlas networking containers delete
5+
===========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``networking containers delete`` command removes one network peering
16+
container in an |service| project. You can also delete a network peering
17+
container through the |service| :atlas:`API
18+
</reference/api/vpc-delete-one-container/>`.
19+
20+
.. _networking-containers-delete-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: text
26+
27+
mongocli atlas networking containers delete <container-id>
28+
[ --force ]
29+
[ --output|-o <output-format> ]
30+
[ --profile|-P <profile-name> ]
31+
[ --projectId <project-ID> ]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _networking-containers-delete-options:
36+
37+
Options
38+
-------
39+
40+
.. list-table::
41+
:header-rows: 1
42+
:widths: 20 10 60 10
43+
44+
* - Option
45+
- Type
46+
- Description
47+
- Required?
48+
49+
* - ``<container-id>``
50+
- string
51+
- Unique identifier of the container.
52+
- yes
53+
54+
* - ``--force``
55+
-
56+
- Flag that indicates that the container can be deleted without
57+
requiring confirmation.
58+
- no
59+
60+
* - ``--output``, ``-o``
61+
- string
62+
- .. include:: /includes/extracts/fact-basic-options-output.rst
63+
- no
64+
65+
* - ``--profile``, ``-P``
66+
- string
67+
- Name of the profile where the public and private
68+
keys for the project are saved. If omitted, uses the
69+
{+default-profile+}. To learn more about creating a
70+
profile, see :ref:`mcli-configure`.
71+
- no
72+
73+
* - ``--projectId``
74+
- string
75+
- Unique identifier of the project that contains the
76+
cluster to update. If omitted, uses the project ID in
77+
the profile or :ref:`environment variable <mcli-env-var>`.
78+
- no
79+
80+
.. _networking-containers-delete-command-output:
81+
82+
Output
83+
------
84+
85+
If the command is successful, it returns the following output:
86+
87+
.. code-block:: none
88+
:copyable: false
89+
90+
Network peering container '<container-id>' deleted
91+
92+
.. _networking-containers-delete-examples:
93+
94+
Example
95+
-------
96+
97+
The following example uses the ``mongocli atlas networking containers
98+
delete`` command to delete a network peering container for the specified
99+
project. The command uses the {+default-profile+}, which contains the
100+
|svc-api-key|\s and the project ID.
101+
102+
.. code-block:: sh
103+
104+
mongocli atlas networking containers delete 5e44103f8d614b2f0b6530d8
105+
106+
The previous command prints the following output to the terminal.
107+
108+
.. code-block:: none
109+
:copyable: false
110+
111+
Network peering container '5e44103f8d614b2f0b6530d8' deleted
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
.. _mcli-atlas-networking-containers-list-command:
2+
3+
=========================================
4+
mongocli atlas networking containers list
5+
=========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``networking containers list`` command retrieves the list of |service|
16+
network peering containers on the specified |service| cluster. You can
17+
also retrieve a list of network peering containers through the |service|
18+
:atlas:`API </reference/api/vpc-get-containers-list-all/>`.
19+
20+
.. _networking-containers-list-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: text
26+
27+
mongocli atlas networking containers list
28+
[ --output|-o <output-format> ]
29+
[ --profile|-P <profile-name> ]
30+
[ --projectId <project-ID> ]
31+
[ --provider <AWS|GCP|AZURE> ]
32+
33+
.. include:: /includes/fact-command-line-help.rst
34+
35+
.. _networking-containers-list-options:
36+
37+
Options
38+
-------
39+
40+
.. list-table::
41+
:header-rows: 1
42+
:widths: 20 10 60 10
43+
44+
* - Option
45+
- Type
46+
- Description
47+
- Required?
48+
49+
* - ``--output``, ``-o``
50+
- string
51+
- .. include:: /includes/extracts/fact-basic-options-output.rst
52+
- no
53+
54+
* - ``--profile``, ``-P``
55+
- string
56+
- Name of the profile where the public and private
57+
keys for the project are saved. If omitted, uses the
58+
{+default-profile+}. To learn more about creating a
59+
profile, see :ref:`mcli-configure`.
60+
- no
61+
62+
* - ``--projectId``
63+
- string
64+
- Unique identifier of the project that contains the
65+
cluster to update. If omitted, uses the project ID in
66+
the profile or :ref:`environment variable <mcli-env-var>`.
67+
- no
68+
69+
* - ``--provider``
70+
- string
71+
- Name of the cloud service provider. Valid values are:
72+
73+
- ``AWS``
74+
- ``GCP``
75+
- ``AZURE``
76+
77+
If omitted, this option defaults to all providers.
78+
79+
- no
80+
81+
.. _networking-containers-list-command-output:
82+
83+
Output
84+
------
85+
86+
If the command is successful, it returns the following information:
87+
88+
.. list-table::
89+
:header-rows: 1
90+
:widths: 30 70
91+
92+
* - Field
93+
- Description
94+
95+
* - ``ID``
96+
- Unique identifier of the container.
97+
98+
* - ``PROVIDER``
99+
- Cloud provider of the container. Valid values are:
100+
101+
- ``AWS``
102+
- ``GCP``
103+
- ``AZURE``
104+
105+
* - ``ATLAS CIDR``
106+
- |cidr| block of the container.
107+
108+
* - ``PROVISIONED``
109+
- Boolean that indicates if the project has clusters deployed in the
110+
network peering container or Azure VNet.
111+
112+
.. _networking-containers-list-examples:
113+
114+
Example
115+
-------
116+
117+
.. tabs::
118+
119+
.. tab:: Default Output
120+
:tabid: default-output
121+
122+
The following example uses the ``mongocli atlas networking containers
123+
list`` command to retrieve the list of network containers for the
124+
specified project. The command uses the {+default-profile+}, which
125+
contains the |svc-api-key|\s and the project ID. The output is returned
126+
in the default format.
127+
128+
.. code-block:: sh
129+
130+
mongocli atlas networking containers list
131+
132+
The previous command prints the following fields to the terminal. To
133+
learn more about these fields, see :ref:`Output
134+
<networking-containers-list-command-output>`.
135+
136+
.. code-block:: none
137+
:copyable: false
138+
139+
ID PROVIDER REGION ATLAS CIDR PROVISIONED
140+
5e44103f8d614b2f0b6530d8 AWS US_EAST_1 192.168.248.0/21 false
141+
5e4d11e715702545882b82c2 GCP 192.168.0.0/16 true
142+
5e7b3ed1015d8a59863fca6e AZURE US_EAST_2 192.168.248.0/21 false
143+
144+
.. tab:: JSON Output
145+
:tabid: json-output
146+
147+
The following example uses the ``mongocli atlas networking containers
148+
list`` command to retrieve the list of network containers for the
149+
specified project. The command uses the {+default-profile+}, which
150+
contains the |svc-api-key|\s and the project ID. The output is returned
151+
in |json| format.
152+
153+
.. code-block:: sh
154+
155+
mongocli atlas networking containers list -o JSON
156+
157+
The previous command prints the following fields to the terminal. To
158+
learn more about these fields, see :ref:`Output
159+
<networking-containers-list-command-output>`.
160+
161+
.. code-block:: json
162+
:copyable: false
163+
164+
[
165+
{
166+
"atlasCidrBlock": "192.168.0.0/16",
167+
"id": "5e4d11e715702545882b82c2",
168+
"providerName": "GCP",
169+
"provisioned": true,
170+
"vpcId": "vpc-0caafc35fc49f3e51"
171+
},
172+
{
173+
"atlasCidrBlock": "192.168.248.0/21",
174+
"id": "5e44103f8d614b2f0b6530d8",
175+
"providerName": "AWS",
176+
"provisioned": false,
177+
"regionName": "US_EAST_1",
178+
"vpcId": "vpc-0caafc35fc49f3d24"
179+
},
180+
{
181+
"atlasCidrBlock": "192.168.248.0/21",
182+
"id": "5e44103f8d614b2f0b6530d8",
183+
"providerName": "5e7b3ed1015d8a59863fca6e",
184+
"provisioned": true,
185+
"regionName": "US_EAST_2",
186+
"vpcId": "vpc-0caafc35fc49f3c22"
187+
}
188+
]

0 commit comments

Comments
 (0)