Create One Federated Database Instance and Online Archive Private Endpoint for One Project

POST /api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds

Adds one private endpoint for Federated Database Instances and Online Archives to the specified projects. If the endpoint ID already exists and the associated comment is unchanged, Atlas Data Federation makes no change to the endpoint ID list. If the endpoint ID already exists and the associated comment is changed, Atlas Data Federation updates the comment value only in the endpoint ID list. If the endpoint ID doesn't exist, Atlas Data Federation appends the new endpoint to the list of endpoints in the endpoint ID list. Each region has an associated service name for the various endpoints in each region.

us-east-1 is com.amazonaws.vpce.us-east-1.vpce-svc-00e311695874992b4.

us-west-1 is com.amazonaws.vpce.us-west-2.vpce-svc-09d86b19e59d1b4bb.

eu-west-1 is com.amazonaws.vpce.eu-west-1.vpce-svc-0824460b72e1a420e.

eu-west-2 is com.amazonaws.vpce.eu-west-2.vpce-svc-052f1840aa0c4f1f9.

eu-central-1 is com.amazonaws.vpce.eu-central-1.vpce-svc-0ac8ce91871138c0d.

sa-east-1 is com.amazonaws.vpce.sa-east-1.vpce-svc-0b56e75e8cdf50044.

ap-southeast-2 is com.amazonaws.vpce.ap-southeast-2.vpce-svc-036f1de74d761706e.

ap-south-1 is com.amazonaws.vpce.ap-south-1.vpce-svc-03eb8a541f96d356d.

To use this resource, the requesting API Key must have the Project Owner or Project Charts Admin roles.

Path parameters

  • groupId string Required

    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

    Minimum length is 24, maximum length is 24. Format should match the following pattern: ^([a-f0-9]{24})$.

Query parameters

  • envelope boolean

    Flag that indicates whether Application wraps the response in an envelope JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.

    Default value is false.

  • pretty boolean

    Flag that indicates whether the response body should be in the prettyprint format.

    Default value is false.

application/vnd.atlas.2023-01-01+json

Body Required

Private endpoint for Federated Database Instances and Online Archives to add to the specified project.

  • comment string

    Human-readable string to associate with this private endpoint.

  • customerEndpointDNSName string

    Human-readable label to identify customer's VPC endpoint DNS name.

  • endpointId string Required

    Unique 22-character alphanumeric string that identifies the private endpoint.

    Minimum length is 22, maximum length is 22. Format should match the following pattern: ^vpce-[0-9a-f]{17}$.

    Atlas Data Lake supports Amazon Web Services private endpoints using the AWS PrivateLink feature
  • provider string

    Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.

    Value is AWS. Default value is AWS.

  • region string

    Human-readable label to identify the region of customer's VPC endpoint.

  • type string

    Human-readable label that identifies the resource type associated with this private endpoint.

    Value is DATA_LAKE. Default value is DATA_LAKE.

Responses

  • 201 application/vnd.atlas.2023-01-01+json

    OK

    Hide response attributes Show response attributes object
    • results array[object]

      List of returned documents that MongoDB Cloud providers when completing this request.

      Hide results attributes Show results attributes object
      • comment string

        Human-readable string to associate with this private endpoint.

      • customerEndpointDNSName string

        Human-readable label to identify customer's VPC endpoint DNS name.

      • endpointId string Required

        Unique 22-character alphanumeric string that identifies the private endpoint.

        Minimum length is 22, maximum length is 22. Format should match the following pattern: ^vpce-[0-9a-f]{17}$.

        Atlas Data Lake supports Amazon Web Services private endpoints using the AWS PrivateLink feature
      • provider string

        Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.

        Value is AWS. Default value is AWS.

      • region string

        Human-readable label to identify the region of customer's VPC endpoint.

      • type string

        Human-readable label that identifies the resource type associated with this private endpoint.

        Value is DATA_LAKE. Default value is DATA_LAKE.

    • totalCount integer(int32)

      Total number of documents available. MongoDB Cloud omits this value if includeCount is set to false.

      Minimum value is 0.

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • detail string

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32)

      HTTP status code returned with this error.

      External documentation
    • errorCode string

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string

      Application error message returned with this error.

POST /api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds
atlas api dataFederation createDataFederationPrivateEndpoint --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20230101001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
	client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.CreateDataFederationPrivateEndpointApiParams{}
	sdkResp, httpResp, err := client.DataFederationApi.
		CreateDataFederationPrivateEndpointWithParams(ctx, params).
		Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2023-01-01+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest --include \
  --header "Accept: application/vnd.atlas.2023-01-01+json" \
  --header "Content-Type: application/json" \
  -X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds" \
  -d '{ <Payload> }'
Request examples
{
  "comment": "string",
  "customerEndpointDNSName": "string",
  "endpointId": "vpce-3bf78b0ddee411ba1",
  "provider": "AWS",
  "region": "string",
  "type": "DATA_LAKE"
}
Response examples (201)
{
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas",
      "rel": "self"
    }
  ],
  "results": [
    {
      "comment": "string",
      "customerEndpointDNSName": "string",
      "endpointId": "vpce-3bf78b0ddee411ba1",
      "provider": "AWS",
      "region": "string",
      "type": "DATA_LAKE"
    }
  ],
  "totalCount": 42
}
Response examples (400)
{
  "error": 400,
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "reason": "Bad Request",
  "errorCode": "VALIDATION_ERROR"
}
Response examples (401)
{
  "error": 401,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Unauthorized",
  "errorCode": "NOT_ORG_GROUP_CREATOR"
}
Response examples (500)
{
  "error": 500,
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "reason": "Internal Server Error",
  "errorCode": "UNEXPECTED_ERROR"
}