|
| 1 | +.. _mcli-atlas-private-endpoint-provider-create-cmd: |
| 2 | + |
| 3 | +================================================ |
| 4 | +mongocli atlas privateendpoint <provider> create |
| 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 ``privateendpoint <provider> create`` command creates one private |
| 16 | +endpoint connection for |aws| or Azure in an |service| project. You can |
| 17 | +also create a private endpoint connections through the |service| |
| 18 | +:atlas:`UI </security-private-endpoint/>` or :atlas:`API |
| 19 | +</reference/api/private-endpoints-service-create-one/>`. |
| 20 | + |
| 21 | +Syntax |
| 22 | +------ |
| 23 | + |
| 24 | +.. code-block:: text |
| 25 | + |
| 26 | + mongocli atlas privateendpoint(s)|privateEndpoint(s) aws|azure create |
| 27 | + --region <cloud-provider-region> |
| 28 | + [ --output|-o <output-format> ] |
| 29 | + [ --profile|-P <profile-name> ] |
| 30 | + [ --projectId <project-ID> ] |
| 31 | + |
| 32 | +.. include:: /includes/fact-command-line-help.rst |
| 33 | + |
| 34 | +.. _atlas-private-endpoint-provider-create-options: |
| 35 | + |
| 36 | +Options |
| 37 | +------- |
| 38 | + |
| 39 | +.. list-table:: |
| 40 | + :widths: 20 10 60 10 |
| 41 | + :header-rows: 1 |
| 42 | + |
| 43 | + * - Option |
| 44 | + - Type |
| 45 | + - Description |
| 46 | + - Required? |
| 47 | + |
| 48 | + * - ``--region`` |
| 49 | + - string |
| 50 | + - Cloud provider region in which you want to create the private |
| 51 | + endpoint connection. |
| 52 | + |
| 53 | + .. note:: |
| 54 | + |
| 55 | + |service| supports private endpoint connections only for |
| 56 | + |aws|. |
| 57 | + |
| 58 | + See the :atlas:`Atlas documentation |
| 59 | + </security-private-endpoint/#limitations>` for limitations on |
| 60 | + the number of private endpoints you can create in different |
| 61 | + regions. |
| 62 | + |
| 63 | + See the supported region values for the following providers: |
| 64 | + |
| 65 | + - :atlas:`AWS </reference/amazon-aws>` |
| 66 | + - :atlas:`Azure </reference/microsoft-azure>` |
| 67 | + |
| 68 | + - yes |
| 69 | + |
| 70 | + * - ``--output``, ``-o`` |
| 71 | + - string |
| 72 | + - .. include:: /includes/extracts/fact-basic-options-output.rst |
| 73 | + - no |
| 74 | + |
| 75 | + * - ``--profile``, ``-P`` |
| 76 | + - string |
| 77 | + - Name of the profile where the public and private |
| 78 | + keys for the project are saved. If omitted, uses the |
| 79 | + {+default-profile+}. To learn more about creating a |
| 80 | + profile, see :ref:`mcli-configure`. |
| 81 | + - no |
| 82 | + |
| 83 | + * - ``--projectId`` |
| 84 | + - string |
| 85 | + - .. include:: /includes/extracts/fact-basic-options-project-id.rst |
| 86 | + - no |
| 87 | + |
| 88 | +.. _atlas-private-endpoint-provider-create-output: |
| 89 | + |
| 90 | +Output |
| 91 | +------ |
| 92 | + |
| 93 | +If the command succeeds, it returns the following output in the default |
| 94 | +format. If the command returns errors, see |
| 95 | +:ref:`Troubleshooting <troubleshooting>` for recommended solutions. |
| 96 | + |
| 97 | +.. code-block:: sh |
| 98 | + :copyable: false |
| 99 | + |
| 100 | + Private endpoint '<private-endpoint-id>' created. |
| 101 | + |
| 102 | +.. include:: /includes/fact-default-output.rst |
| 103 | + |
| 104 | +- :atlas:`Atlas API </reference/api/private-endpoints-service-create-one/#response-elements>` |
| 105 | + |
| 106 | +Example |
| 107 | +------- |
| 108 | + |
| 109 | +.. tabs:: |
| 110 | + |
| 111 | + .. tab:: Default Output |
| 112 | + :tabid: default-output |
| 113 | + |
| 114 | + The following command creates one private endpoint connection |
| 115 | + for |aws| in a project using the {+default-profile+}, which |
| 116 | + contains credentials and the project ID. The output is returned |
| 117 | + in the default format. |
| 118 | + |
| 119 | + .. code-block:: sh |
| 120 | + |
| 121 | + mongocli atlas privateendpoint aws create --region us-east-1 |
| 122 | + |
| 123 | + The previous command prints the following to the terminal. |
| 124 | + |
| 125 | + .. code-block:: sh |
| 126 | + :copyable: false |
| 127 | + |
| 128 | + Private endpoint '5f4fc829a2b47835a58c6d04' created. |
| 129 | + |
| 130 | + .. tab:: JSON Output |
| 131 | + :tabid: json-output |
| 132 | + |
| 133 | + The following command creates one private endpoint connection |
| 134 | + for |aws| in a project using the {+default-profile+}, which |
| 135 | + contains credentials and the project ID. The output is returned |
| 136 | + in |json| format. |
| 137 | + |
| 138 | + .. code-block:: sh |
| 139 | + |
| 140 | + mongocli atlas privateendpoint aws create --region us-east-1 --output json |
| 141 | + |
| 142 | + The previous command prints the following to the terminal in |
| 143 | + |json| format. |
| 144 | + |
| 145 | + .. code-block:: json |
| 146 | + :copyable: false |
| 147 | + |
| 148 | + { |
| 149 | + "id": "5f4fc81c1f03a835c2728ff7", |
| 150 | + "status": "INITIATING" |
| 151 | + } |
| 152 | + |
0 commit comments