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