AWS documentdb documentation change
Summary
Entire documentation page for the $natural operator in Amazon DocumentDB has been removed, including all content, examples, and code samples.
Security assessment
The change removes documentation about the $natural operator used for sorting documents in natural order. There is no evidence in the diff that this removal addresses a specific security vulnerability, weakness, or incident. The removal appears to be a routine documentation update, possibly due to deprecation, restructuring, or consolidation of content. No security implications are mentioned or evident from the removed content.
Diff
diff --git a/documentdb/latest/developerguide/natural.md b/documentdb/latest/developerguide/natural.md index ba565e22a..8b1378917 100644 --- a//documentdb/latest/developerguide/natural.md +++ b//documentdb/latest/developerguide/natural.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#natural "Open PDF") @@ -3,110 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $natural - -The `$natural` operator in Amazon DocumentDB is used to sort the documents in their natural order, which is the order in which they were inserted into the collection. This is in contrast to the default sorting behavior, which is to sort the documents based on the values of the specified fields. - -**Parameters** - -None - -## Example (MongoDB Shell) - -The following example demonstrates how to use the `$natural` operator to sort the documents in a collection in their natural order. - -**Create sample documents** - - - db.people.insertMany([ - { "_id": 1, "name": "María García", "age": 28 }, - { "_id": 2, "name": "Arnav Desai", "age": 32 }, - { "_id": 3, "name": "Li Juan", "age": 25 }, - { "_id": 4, "name": "Carlos Salazar", "age": 41 }, - { "_id": 5, "name": "Sofia Martínez", "age": 35 } - ]); - -**Query example** - - - db.people.find({}, { "_id": 1, "name": 1 }).sort({ "$natural": 1 }); - -**Output** - - - [ - { "_id": 1, "name": "María García" }, - { "_id": 2, "name": "Arnav Desai" }, - { "_id": 3, "name": "Li Juan" }, - { "_id": 4, "name": "Carlos Salazar" }, - { "_id": 5, "name": "Sofia Martínez" } - ] - -The query sorts the documents in the collection in their natural order, which is the order in which they were inserted. - -## Code examples - -To view a code example for using the `$natural` 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'); - const db = client.db('test'); - const collection = db.collection('people'); - - const documents = await collection.find({}, { projection: { _id: 1, name: 1 } }) - .sort({ $natural: 1 }) - .toArray(); - - console.log(documents); - - 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['people'] - - documents = list(collection.find({}, {'_id': 1, 'name': 1}).sort('$natural', 1)) - print(documents) - - 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) - -$multiply - -$ne - -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.