AWS documentdb documentation change
Summary
Entire documentation page for the $min update operator was removed, including all examples and code samples
Security assessment
This change removes documentation for the $min update operator but provides no indication of security issues. The removed content was standard operator documentation with examples, and there's no evidence of security vulnerabilities, patches, or security advisories mentioned in the diff. This appears to be routine documentation maintenance or restructuring.
Diff
diff --git a/documentdb/latest/developerguide/min-update.md b/documentdb/latest/developerguide/min-update.md index e0be773b1..8b1378917 100644 --- a//documentdb/latest/developerguide/min-update.md +++ b//documentdb/latest/developerguide/min-update.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#min-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 - -# $min - -The `$min` update operator updates a field's value only if the specified value is less than the current field value. This operator is useful for maintaining minimum 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 `$min` operator to update the lowest recorded temperature for a weather station. - -**Create sample documents** - - - db.weather.insertMany([ - { _id: 1, station: "Station A", lowestTemp: 15 }, - { _id: 2, station: "Station B", lowestTemp: 20 }, - { _id: 3, station: "Station C", lowestTemp: 18 } - ]) - -**Update example** - - - db.weather.updateOne( - { _id: 1 }, - { $min: { lowestTemp: 12 } } - ) - -**Result** - -The `lowestTemp` field for Station A is updated to 12 because 12 is less than the current value of 15. - - - { "_id": 1, "station": "Station A", "lowestTemp": 12 } - -## Code examples - -To view a code example for using the `$min` 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('weather'); - - const result = await collection.updateOne( - { _id: 1 }, - { $min: { lowestTemp: 12 } } - ); - - 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['weather'] - - result = collection.update_one( - { '_id': 1 }, - { '$min': { 'lowestTemp': 12 } } - ) - - 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) - -$max - -$mul - -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.