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 Service Account or API Key must have the Project Owner or Project Charts Admin roles.
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.
Format should match the following pattern: ^([a-f0-9]{24})$.
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.
Private endpoint for Federated Database Instances and Online Archives to add to the specified project.
Link ID that identifies the Azure private endpoint connection.
Human-readable string to associate with this private endpoint.
Human-readable label to identify customer's VPC endpoint DNS name. If defined, you must also specify a value for region.
IP address used to connect to the Azure private endpoint.
Format should match the following pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$.
Unique 22-character alphanumeric string that identifies the private endpoint.
Format should match the following pattern: ^vpce-[0-9a-f]{17}$.
Error message describing a failure approving the private endpoint request.
Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.
Value is AWS. Default value is AWS.
Human-readable label to identify the region of customer's VPC endpoint. If defined, you must also specify a value for customerEndpointDNSName.
Status of the private endpoint connection request.
Values are PENDING, OK, FAILED, or DELETING.
Human-readable label that identifies the resource type associated with this private endpoint.
Value is DATA_LAKE. Default value is DATA_LAKE.
atlas api dataFederation createPrivateEndpointId --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20231001001/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.CreateGroupPrivateNetworkSettingEndpointIdApiParams{}
sdkResp, httpResp, err := client.DataFederationApi.
CreateGroupPrivateNetworkSettingEndpointIdWithParams(ctx, params).
Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2023-10-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-10-01+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/privateNetworkSettings/endpointIds" \
-d '{ <Payload> }'
{
"azureLinkId": "string",
"comment": "string",
"customerEndpointDNSName": "string",
"customerEndpointIPAddress": "string",
"endpointId": "vpce-3bf78b0ddee411ba1",
"errorMessage": "string",
"provider": "AWS",
"region": "US_EAST_1",
"status": "PENDING",
"type": "DATA_LAKE"
}
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"azureLinkId": "string",
"comment": "string",
"customerEndpointDNSName": "string",
"customerEndpointIPAddress": "string",
"endpointId": "vpce-3bf78b0ddee411ba1",
"errorMessage": "string",
"provider": "AWS",
"region": "US_EAST_1",
"status": "PENDING",
"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": 403,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Forbidden",
"errorCode": "CANNOT_CHANGE_GROUP_NAME"
}
{
"error": 404,
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"reason": "Not Found",
"errorCode": "RESOURCE_NOT_FOUND"
}
{
"error": 500,
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"reason": "Internal Server Error",
"errorCode": "UNEXPECTED_ERROR"
}