AWS documentdb documentation change
Summary
Entire documentation file for the $lookup aggregation stage in Amazon DocumentDB has been removed, including all examples, parameters, and code samples in MongoDB Shell, Node.js, and Python.
Security assessment
This change removes documentation content entirely without any indication of security vulnerabilities or security-related updates. The removal appears to be a documentation restructuring or deprecation of content, not related to addressing security issues. The examples removed included standard MongoDB $lookup functionality and connection strings with TLS parameters, but their removal doesn't indicate a security fix.
Diff
diff --git a/documentdb/latest/developerguide/lookup.md b/documentdb/latest/developerguide/lookup.md index 799c7548e..8b1378917 100644 --- a//documentdb/latest/developerguide/lookup.md +++ b//documentdb/latest/developerguide/lookup.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#lookup "Open PDF") @@ -3,162 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $lookup - -The `$lookup` aggregation stage in Amazon DocumentDB allows you to perform a left outer join between two collections. This operation lets you combine data from multiple collections based on matching field values. It is particularly useful when you need to incorporate data from related collections into your query results. - -**Parameters** - - * `from`: The name of the collection to perform the join with. - - * `localField`: The field from the input documents to match against the `foreignField`. - - * `foreignField`: The field from the documents in the `from` collection to match against the `localField`. - - * `as`: The name of the new field to add to the output documents containing the matching documents from the `from` collection. - - - - -## Example (MongoDB Shell) - -The following example demonstrates a simple `$lookup` operation that joins data from the `orders` collection into the `customers` collection. - -**Create sample documents** - - - db.customers.insertMany([ - { _id: 1, name: "Alice" }, - { _id: 2, name: "Bob" }, - { _id: 3, name: "Charlie" } - ]); - - db.orders.insertMany([ - { _id: 1, customer_id: 1, total: 50 }, - { _id: 2, customer_id: 1, total: 100 }, - { _id: 3, customer_id: 2, total: 75 } - ]); - -**Query example** - - - db.customers.aggregate([ - { - $lookup: { - from: "orders", - localField: "_id", - foreignField: "customer_id", - as: "orders" - } - } - ]); - -**Output** - - - [ - { - _id: 1, - name: 'Alice', - orders: [ - { _id: 2, customer_id: 1, total: 100 }, - { _id: 1, customer_id: 1, total: 50 } - ] - }, - { _id: 3, name: 'Charlie', orders: [] }, - { - _id: 2, - name: 'Bob', - orders: [ { _id: 3, customer_id: 2, total: 75 } ] - } - ] - -## Code examples - -To view a code example for using the `$lookup` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function example() { - const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'); - - await client.connect(); - - const db = client.db('test'); - - const result = await db.collection('customers').aggregate([ - { - $lookup: { - from: 'orders', - localField: '_id', - foreignField: 'customer_id', - as: 'orders' - } - } - ]).toArray(); - - console.log(JSON.stringify(result, null, 2)); - await client.close(); - } - - example(); - -Python - - - - from pymongo import MongoClient - - def example(): - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - - db = client.test - - collection = db.customers - - pipeline = [ - { - "$lookup": { - "from": "orders", - "localField": "_id", - "foreignField": "customer_id", - "as": "orders" - } - } - ] - - result = collection.aggregate(pipeline) - - for doc in result: - print(doc) - - client.close() - - example() - - **Javascript is disabled or is unavailable in your browser.** - -To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions. - -[Document Conventions](/general/latest/gr/docconventions.html) - -$lte - -$ltrim - -Did this page help you? - Yes - -Thanks for letting us know we're doing a good job! - -If you've got a moment, please tell us what we did right so we can do more of it. - -Did this page help you? - No - -Thanks for letting us know this page needs work. We're sorry we let you down. - -If you've got a moment, please tell us how we can make the documentation better.