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