Create One Federated Database Instance and Online Archive Private Endpoint for One Project
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
-
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 is24
. Format should match the following pattern:^([a-f0-9]{24})$
.
Query parameters
-
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
. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false
.
Body
Required
Private endpoint for Federated Database Instances and Online Archives to add to the specified project.
-
Human-readable string to associate with this private endpoint.
-
Human-readable label to identify customer's VPC endpoint DNS name.
-
Unique 22-character alphanumeric string that identifies the private endpoint.
Minimum length is
22
, maximum length is22
. 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 -
Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.
Value is
AWS
. Default value isAWS
. -
Human-readable label to identify the region of customer's VPC endpoint.
-
Human-readable label that identifies the resource type associated with this private endpoint.
Value is
DATA_LAKE
. Default value isDATA_LAKE
.
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> }'
{
"comment": "string",
"customerEndpointDNSName": "string",
"endpointId": "vpce-3bf78b0ddee411ba1",
"provider": "AWS",
"region": "string",
"type": "DATA_LAKE"
}
{
"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
}
{
"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"
}
{
"error": 401,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Unauthorized",
"errorCode": "NOT_ORG_GROUP_CREATOR"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}