Navigation

Update One Data Lake

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.

The Atlas API uses HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Base URL

https://cloud.mongodb.com/api/atlas/v1.0

Use this endpoint to update a specific Atlas Data Lake associated to an Atlas project.

Syntax

PATCH /groups/{GROUP-ID}/dataLakes/{NAME}

Request Path Parameters

Path ElementRequired/OptionalDescription
GROUP-IDRequired.The unique identifier for the project.
NAMERequired

The name of the Atlas Data Lake that you want to update.

You can use the Get All Data Lakes endpoint to retrieve all Atlas Data Lake associated to the project. The name field in the response of that endpoint corresponds to the NAME parameter.

Request Query Parameters

The following query parameters are optional:

Query ParameterTypeDescriptionDefault
prettybooleanDisplays response in a prettyprint format.false
envelopebooleanSpecifies whether or not to wrap the response in an envelope.false

Request Body Parameters

FieldRequired/OptionalDescription
cloudProviderConfigOptional

Configuration information related to the cloud service where Atlas Data Lake source data is stored.

Required if updating a Data Lake in UNVERIFIED state.

cloudProviderConfig.<provider>Required

Name of the provider of the cloud service where Data Lake can access the S3 Bucket.

Atlas Data Lake supports only aws.

Required if specifying cloudProviderConfig.

cloudProviderConfig.aws. iamAssumedRoleARNRequired

Amazon Resource Name (ARN) of the role which Atlas Data Lake uses for accessing the data stores.

The IAM Role must support the following actions against each S3 bucket:

  • s3:GetObject
  • s3:ListBucket
  • s3:GetObjectVersion

For more information on S3 actions, see Actions, Resources, and Condition Keys for Amazon S3.

Required if specifying cloudProviderConfig.

cloudProviderConfig.aws. testS3BucketRequired

Name of an S3 data bucket which Data Lake uses to validate the provided cloudProviderConfig.aws. iamAssumedRoleArn.

The provided iamAssumedRoleARN must grant read access to the S3 bucket for the Atlas user ARN and external ID provided during tenant creation. Specifically, the IAM Role must support the following actions against the S3 bucket:

  • s3:GetObject
  • s3:ListBucket
  • s3:GetObjectVersion

Required if specifying cloudProviderConfig.

dataProcessRegionOptional

The cloud provider region to which Atlas Data Lake routes client connections for data processing.

Set to null to direct Atlas Data Lake to route client connections to the region nearest to the client based on DNS resolution.

dataProcessRegion.cloudProviderRequired

Name of the cloud service provider.

Atlas Data Lake only supports AWS.

Required if specifying dataProcessRegion.

dataProcessRegion.regionRequired

Name of the region to which Data Lake routes client connections for data processing.

Atlas Data Lake only supports the following regions:

  • SYDNEY_AUS (ap-southeast-2)
  • FRANKFURT_DEU (eu-central-1)
  • DUBLIN_IRL (eu-west-1)
  • LONDON_GBR (eu-west-2)
  • VIRGINIA_USA (us-east-1)
  • OREGON_USA (us-west-2)

Required if specifying dataProcessRegion.

Response

NameTypeDescription
cloudProviderConfigobjectConfiguration information related to the cloud service where Atlas Data Lake source data is stored.
cloudProviderConfig.<provider>object

Name of the provider of the cloud service where Data Lake can access the S3 Bucket data stores.

Data Lake only supports aws.

cloudProviderConfig.aws. iamAssumedRoleARNstring

Amazon Resource Name (ARN) of the IAM Role that Data Lake assumes when accessing S3 Bucket data stores.

The IAM Role must support the following actions against each S3 bucket:

  • s3:GetObject
  • s3:ListBucket
  • s3:GetObjectVersion

For more information on S3 actions, see Actions, Resources, and Condition Keys for Amazon S3.

dataProcessRegionOptional

The cloud provider region to which Atlas Data Lake routes client connections for data processing.

If null, the Atlas Data Lake routes client connections to the region nearest to the client based on DNS resolution.

dataProcessRegion.cloudProviderRequired

Name of the cloud service provider.

Atlas Data Lake only supports AWS.

dataProcessRegion.regionRequired

Name of the region to which Atlas Data Lake routes client connections for data processing.

Atlas Data Lake only supports the following regions:

  • SYDNEY_AUS (ap-southeast-2)
  • FRANKFURT_DEU (eu-central-1)
  • DUBLIN_IRL (eu-west-1)
  • LONDON_GBR (eu-west-2)
  • VIRGINIA_USA (us-east-1)
  • OREGON_USA (us-west-2)
groupIdstringThe unique identifier for the project.
hostnamesarrayThe list of hostnames assigned to the Atlas Data Lake. Each string in the array is a hostname assigned to the Atlas Data Lake.
namestringName of the Atlas Data Lake.
statestring

Current state of the Atlas Data Lake:

  • ACTIVE - The Data Lake is active and verified. You can query the data stores associated to the Atlas Data Lake.
  • UNVERIFIED - The Atlas Data Lake has an incomplete configuration or the provided credentials do not grant the access to the data stores.

    For AWS specifically, the provided cloudProviderConfig.aws.iamAssumedRoleARN must grant access to the AWS S3 buckets associated with any data stores.

    Use the update endpoint to update the data store configuration with the required settings.

storageobjectConfiguration details for each data store and its mapping to MongoDB database(s) and collection(s).
storage.databasesobject

Configuration details for mapping each data store to queryable databases and collections. For complete documentation on this object and its nested fields, see databases.

An empty object indicates that the Data Lake has no mapping configuration for any data store.

storage.storesarray

Each object in the array represents a data store. Data Lake uses the storage.databases configuration details to map data in each data store to queryable databases and collections. For complete documentation on this object and its nested fields, see stores.

An empty object indicates that the Data Lake has no configured data stores.

Example

Request

curl -u "username:apiKey" --digest \
 --header "Accept: application/json" \
 --header "Content-Type: application/json" \
 --request PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/dataLakes/{NAME}?pretty=true"
 --data '{
   "cloudProviderConfig" : {
     "aws" : {
       "iamAssumedRoleARN" : "arn:aws:iam::123456789012:role/ReadS3BucketRole",
       "testS3Bucket" : "user-metric-data-bucket"
     }
   },
   "dataProcessRegion" : {
     "cloudProvider" : "AWS",
     "region" : "OREGON_USA"
   }
 }'

Response

{
  "cloudProviderConfig": {
    "aws": {
      "iamAssumedRoleARN": "arn:aws:iam::123456789012:role/ReadS3BucketRole"
    }
  },
  "dataProcessRegion": {
    "cloudProvider" : "AWS",
    "region" : "OREGON_USA"
  },
  "groupId": "1ab23c4567def890gh12ij34",
  "hostnames": [
    "dataLakes3tenant.mongodb.example.net"
  ],
  "name": "HardwareMetricData",
  "state": "ACTIVE",
  "storage": {
    "databases": {},
    "stores": []
  }
}