Crea una canalización de Data Lake.
Parámetros de ruta
-
Cadena 24hexadecimal única que identifica su proyecto. Utilice el punto de conexión /groups para recuperar todos los proyectos a los que el usuario autenticado tiene acceso.
NOTA: Grupos y proyectos son términos sinónimos. El ID de tu grupo es el mismo que el de tu proyecto. Para los grupos existentes, el ID de tu grupo/proyecto permanece igual. El recurso y los puntos finales correspondientes usan el término "grupos".
El formato debe coincidir con el siguiente patrón:
^([a-f0-9]{24})$.
Parámetros de consulta
-
Indicador que indica si la aplicación encapsula la respuesta en un objeto JSON
envelope. Algunos clientes de la API no pueden acceder a los encabezados de respuesta HTTP ni al código de estado. Para solucionar esto, configure envelope=true en la consulta. Los endpoints que devuelven una lista de resultados utilizan el objeto de resultados como encapsulado. La aplicación añade el parámetro de estado al cuerpo de la respuesta.El valor predeterminado es
false.
Cuerpo
Requerido
Crea una canalización de Data Lake.
-
Política de retención de conjuntos de datos para una canalización de Data Lake programada.
-
Nombre de esta tubería de Data Lake.
-
Atlas Data Lake Storage como destino para una canalización de Data Lake.
-
Campos que se excluirán de esta canalización de Data Lake.
Transformaciones de campo durante la ingesta de una tubería de Data Lake.
atlas api dataLakePipelines createPipeline --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20240530001/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.CreateGroupPipelineApiParams{}
sdkResp, httpResp, err := client.DataLakePipelinesApi.
CreateGroupPipelineWithParams(ctx, params).
Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2024-05-30+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/pipelines" \
-d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest --include \
--header "Accept: application/vnd.atlas.2024-05-30+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/pipelines" \
-d '{ <Payload> }'
{
"datasetRetentionPolicy": {
"units": "DAYS",
"value": 42
},
"name": "string",
"sink": {
"metadataProvider": "AWS",
"metadataRegion": "string",
"partitionFields": [
{
"fieldName": "string",
"order": 0
}
],
"type": "DLS"
},
"source": {
"type": "ON_DEMAND_CPS",
"clusterName": "string",
"collectionName": "string",
"databaseName": "string"
},
"transformations": [
{
"field": "string",
"type": "EXCLUDE"
}
]
}
{
"_id": "32b6e34b3d91647abb20e7b8",
"createdDate": "2026-05-04T09:42:00Z",
"datasetRetentionPolicy": {
"lastModifiedDate": "2026-05-04T09:42:00Z",
"units": "DAYS",
"value": 42
},
"groupId": "32b6e34b3d91647abb20e7b8",
"lastUpdatedDate": "2026-05-04T09:42:00Z",
"name": "string",
"sink": {
"type": "DLS",
"metadataProvider": "AWS",
"metadataRegion": "string",
"partitionFields": [
{
"fieldName": "string",
"order": 0
}
]
},
"source": {
"type": "ON_DEMAND_CPS",
"clusterName": "string",
"collectionName": "string",
"databaseName": "string",
"groupId": "32b6e34b3d91647abb20e7b8"
},
"state": "ACTIVE",
"transformations": [
{
"field": "string",
"type": "EXCLUDE"
}
]
}
{
"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"
}