AWS documentdb documentation change
Summary
Entire documentation file for the $max update operator was removed, including examples in MongoDB Shell, Node.js, and Python
Security assessment
This change removes documentation for a MongoDB update operator ($max) but shows no evidence of addressing a security vulnerability. The removal appears to be part of documentation restructuring or deprecation, not security remediation. No security warnings, vulnerability disclosures, or security-related content was present in the removed material.
Diff
diff --git a/documentdb/latest/developerguide/max-update.md b/documentdb/latest/developerguide/max-update.md index 50575a939..8b1378917 100644 --- a//documentdb/latest/developerguide/max-update.md +++ b//documentdb/latest/developerguide/max-update.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#max-update "Open PDF") @@ -3,113 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $max - -The `$max` update operator updates a field's value only if the specified value is greater than the current field value. This operator is useful for maintaining maximum values across updates. - -**Parameters** - - * `field`: The field to update. - - * `value`: The value to compare with the current field value. - - - - -## Example (MongoDB Shell) - -The following example demonstrates using the `$max` operator to update the highest recorded score for a player. - -**Create sample documents** - - - db.scores.insertMany([ - { _id: 1, player: "Alice", highScore: 85 }, - { _id: 2, player: "Bob", highScore: 92 }, - { _id: 3, player: "Charlie", highScore: 78 } - ]) - -**Update example** - - - db.scores.updateOne( - { _id: 1 }, - { $max: { highScore: 95 } } - ) - -**Result** - -The `highScore` field for Alice is updated to 95 because 95 is greater than the current value of 85. - - - { "_id": 1, "player": "Alice", "highScore": 95 } - -## Code examples - -To view a code example for using the `$max` 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('scores'); - - const result = await collection.updateOne( - { _id: 1 }, - { $max: { highScore: 95 } } - ); - - console.log(result); - 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['scores'] - - result = collection.update_one( - { '_id': 1 }, - { '$max': { 'highScore': 95 } } - ) - - print(result) - 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) - -$inc - -$min - -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.