AWS documentdb documentation change
Summary
Entire documentation file for $$PRUNE system variable has been removed, including all content about using $$PRUNE with $redact stage in aggregation pipeline, examples, and code samples.
Security assessment
This change removes documentation about a MongoDB aggregation pipeline operator ($$PRUNE) used with $redact for data filtering. While $redact can be used for security purposes like data redaction, the removal of documentation itself doesn't indicate a security issue. There's no evidence of vulnerability disclosure, security patch, or security incident in the diff. This appears to be routine documentation cleanup or restructuring.
Diff
diff --git a/documentdb/latest/developerguide/PRUNE.md b/documentdb/latest/developerguide/PRUNE.md index b787368f4..8b1378917 100644 --- a//documentdb/latest/developerguide/PRUNE.md +++ b//documentdb/latest/developerguide/PRUNE.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#PRUNE "Open PDF") @@ -3,137 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $$PRUNE - -The `$$PRUNE` system variable is used with the `$redact` stage in the aggregation pipeline to exclude documents or embedded document levels from the results. When a condition evaluates to `$$PRUNE`, the current document or subdocument is removed from the output. It is typically used with `$$DESCEND` (to keep and traverse the document) or `$$KEEP` (to keep the document at all levels). - -**Parameters** - -None. The `$$PRUNE` system variable is used without any parameters and must be used with `$redact`. - -## Example (MongoDB Shell) - -The following example demonstrates how to use `$$PRUNE` with `$redact` to exclude users over 30 years old from the results. - -**Create sample documents** - - - db.users.insert([ - { _id:1, name: "Carlos Salazar", age: 35, address: { street: "123 Main St", city: "Anytown", state: "CA" } }, - { _id:2, name: "Saanvi Sarkar", age: 28, address: { street: "456 Oak Rd", city: "Someplace", state: "NY" } }, - { _id:3, name: "Li Juan", age: 42, address: { street: "789 Pine Ave", city: "Springfield", state: "TX" } } - ]) - -**Query example** - - - db.users.aggregate([ - { - $redact: { - $cond: { - if: { $gt: ["$age", 30] }, - then: "$$PRUNE", - else: "$$DESCEND" - } - } - } - ]) - -**Output** - - - [ - { - "_id": 2, - "name": "Saanvi Sarkar", - "age": 28, - "address": { - "street": "456 Oak Rd", - "city": "Someplace", - "state": "NY" - } - } - ] - -## Code examples - -To view a code example for using the `$$PRUNE` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - const client = new MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'); - - async function main() { - await client.connect(); - const db = client.db('test'); - const users = db.collection('users'); - - const result = await users.aggregate([ - { - $redact: { - $cond: { - if: { $gt: ["$age", 30] }, - then: "$$PRUNE", - else: "$$DESCEND" - } - } - } - ]).toArray(); - - console.log(result); - await client.close(); - } - - main(); - -Python - - - - from pymongo import MongoClient - - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - users = db['users'] - - result = list(users.aggregate([ - { - '$redact': { - '$cond': { - 'if': { '$gt': ['$age', 30] }, - 'then': '$$PRUNE', - 'else': '$$DESCEND' - } - } - } - ])) - - print(result) - client.close() - - **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) - -$$KEEP - -$ROOT - -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.