|
| 1 | +.. _api-pvt-link-create-one: |
| 2 | + |
| 3 | +======================== |
| 4 | +Add One Private Endpoint |
| 5 | +======================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +You can add an |aws| :ref:`private endpoint <private-endpoint>` for the |
| 16 | +{+dl+}\s in the project from the API. When you submit this request |
| 17 | +through the API: |
| 18 | + |
| 19 | +- If the endpoint ID already exists and there is no change to the |
| 20 | + associated comment, {+adl+} makes no change to the endpoint ID list. |
| 21 | +- If the endpoint ID already exists and there is a change to the |
| 22 | + associated comment, {+adl+} updates the ``comment`` value only in |
| 23 | + the endpoint ID list. |
| 24 | +- If the endpoint ID doesn't exist, {+adl+} appends the new endpoint |
| 25 | + to the list of endpoints in the endpoint ID list. |
| 26 | + |
| 27 | +.. include:: /includes/api-requirements.rst |
| 28 | + |
| 29 | +.. include:: /includes/fact-projects-groups-synonyms.rst |
| 30 | + |
| 31 | +.. _api-pvt-link-create-one-permissions: |
| 32 | + |
| 33 | +Permissions Required |
| 34 | +-------------------- |
| 35 | + |
| 36 | +You must have the ``GROUP_ATLAS_ADMIN`` (:authrole:`Project Owner`) |
| 37 | +role to create a private endpoint. |
| 38 | + |
| 39 | +.. _api-pvt-link-create-one-resource: |
| 40 | + |
| 41 | +Resources |
| 42 | +--------- |
| 43 | + |
| 44 | +.. include:: /includes/api-base-url.rst |
| 45 | + |
| 46 | +.. _api-pvt-link-create-one-syntax: |
| 47 | + |
| 48 | +Syntax |
| 49 | +------ |
| 50 | + |
| 51 | +.. code-block:: none |
| 52 | + |
| 53 | + POST /groups/{GROUP-ID}/privateNetworkSettings/endpointIds |
| 54 | + |
| 55 | +.. _api-pvt-link-create-one-params: |
| 56 | + |
| 57 | +Request Parameters |
| 58 | +------------------ |
| 59 | + |
| 60 | +.. _api-pvt-link-create-one-path-params: |
| 61 | + |
| 62 | +Request Path Parameters |
| 63 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 | + |
| 65 | +.. list-table:: |
| 66 | + :header-rows: 1 |
| 67 | + :widths: 15 10 75 |
| 68 | + |
| 69 | + * - Path Element |
| 70 | + - Necessity |
| 71 | + - Description |
| 72 | + |
| 73 | + * - ``GROUP-ID`` |
| 74 | + - Required |
| 75 | + - Unique 24-digit hexadecimal string that identifies the |
| 76 | + project. |
| 77 | + |
| 78 | +.. _api-pvt-link-create-one-query-params: |
| 79 | + |
| 80 | +Request Query Parameters |
| 81 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 82 | + |
| 83 | +.. include:: /includes/no-query-parameters.rst |
| 84 | + |
| 85 | +.. _api-pvt-link-create-one-body-params: |
| 86 | + |
| 87 | +Request Body Parameters |
| 88 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 89 | + |
| 90 | +.. list-table:: |
| 91 | + :header-rows: 1 |
| 92 | + :widths: 15 10 10 65 |
| 93 | + |
| 94 | + * - Name |
| 95 | + - Type |
| 96 | + - Necessity |
| 97 | + - Description |
| 98 | + |
| 99 | + * - ``comment`` |
| 100 | + - string |
| 101 | + - Optional |
| 102 | + - Human-readable string to associate with this private endpoint. |
| 103 | + |
| 104 | + * - ``endpointId`` |
| 105 | + - string |
| 106 | + - Required |
| 107 | + - Unique 22-character alphanumeric string that identifies the |
| 108 | + private endpoint. {+adl+} supports |aws| private endpoints using |
| 109 | + the `|aws| PrivateLink <https://aws.amazon.com/privatelink/>`__ |
| 110 | + feature. |
| 111 | + |
| 112 | + * - ``provider`` |
| 113 | + - string |
| 114 | + - Required |
| 115 | + - Human-readable label that identifies the cloud provider of this |
| 116 | + endpoint. {+adl+} supports |aws| only. If empty, defaults to |
| 117 | + |aws|. |
| 118 | + |
| 119 | + * - ``type`` |
| 120 | + - string |
| 121 | + - Required |
| 122 | + - Human-readable label that identifies the type of resource to |
| 123 | + associate with this private endpoint. Value must be |
| 124 | + ``DATA_LAKE``. If empty, defaults to ``DATA_LAKE``. |
| 125 | + |
| 126 | +.. _api-pvt-link-create-one-response: |
| 127 | + |
| 128 | +Response Elements |
| 129 | +----------------- |
| 130 | + |
| 131 | +``links`` Array |
| 132 | +~~~~~~~~~~~~~~~ |
| 133 | + |
| 134 | +The ``links`` array includes one or more links to sub-resources or |
| 135 | +related resources. The relations between URLs are explained in the `Web |
| 136 | +Linking Specification <http://tools.ietf.org/html/rfc5988>`_. |
| 137 | + |
| 138 | +.. list-table:: |
| 139 | + :header-rows: 1 |
| 140 | + |
| 141 | + * - Relation |
| 142 | + - Description |
| 143 | + * - ``self`` |
| 144 | + - The URL endpoint for this resource. |
| 145 | + |
| 146 | +``results`` Array |
| 147 | +~~~~~~~~~~~~~~~~~ |
| 148 | + |
| 149 | +Each element in the ``result`` array is one private endpoint. |
| 150 | + |
| 151 | +.. include:: /includes/list-table-private-link-response.rst |
| 152 | + |
| 153 | +``totalCount`` Document |
| 154 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 155 | + |
| 156 | +This value is the count of the total number of items in the result set. |
| 157 | +``totalCount`` may be greater than the number of objects in the |
| 158 | +``results`` array if the entire result set is paginated. |
| 159 | + |
| 160 | +.. _api-pvt-link-create-one-eg: |
| 161 | + |
| 162 | +Examples |
| 163 | +-------- |
| 164 | + |
| 165 | +Request |
| 166 | +~~~~~~~ |
| 167 | + |
| 168 | +.. example:: |
| 169 | + |
| 170 | + .. code-block:: shell |
| 171 | + |
| 172 | + curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ |
| 173 | + --header "Accept: application/json" \ |
| 174 | + --header "Content-Type: application/json" \ |
| 175 | + --include \ |
| 176 | + --request POST "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/privateNetworkSettings/endpointIds?pretty=true" \ |
| 177 | + --data ' |
| 178 | + { |
| 179 | + "endpointId" : "vpce-jjg5e24qp93513h03", |
| 180 | + "type": "DATA_LAKE", |
| 181 | + "provider": "AWS", |
| 182 | + "comment" : "Private endpoint for Application Server A" |
| 183 | + }' |
| 184 | + |
| 185 | +Response |
| 186 | +~~~~~~~~ |
| 187 | + |
| 188 | +.. example:: |
| 189 | + |
| 190 | + .. code-block:: json |
| 191 | + :copyable: false |
| 192 | + |
| 193 | + { |
| 194 | + "links" : [ { |
| 195 | + "href" : "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/privateNetworkSettings/endpointIds?pretty=true&pageNum=1&itemsPerPage=100", |
| 196 | + "rel" : "self" |
| 197 | + } ], |
| 198 | + "results" : [ { |
| 199 | + "comment" : "Private endpoint for Application Server A", |
| 200 | + "endpointId" : "vpce-jjg5e24qp93513h03", |
| 201 | + "provider" : "AWS", |
| 202 | + "type" : "DATA_LAKE" |
| 203 | + } ], |
| 204 | + "totalCount" : 1 |
| 205 | + } |
0 commit comments