AWS documentdb documentation change
Summary
Entire documentation page for the $abs operator in Amazon DocumentDB has been removed, including all examples, code samples, and usage instructions.
Security assessment
This change removes documentation for a mathematical operator ($abs) and associated code examples. There is no evidence in the diff that this removal is related to a security vulnerability, weakness, or incident. The removed content appears to be standard operational documentation without any security context mentioned. The change appears to be routine documentation maintenance or reorganization rather than security-related.
Diff
diff --git a/documentdb/latest/developerguide/abs.md b/documentdb/latest/developerguide/abs.md index 0879466f7..8b1378917 100644 --- a//documentdb/latest/developerguide/abs.md +++ b//documentdb/latest/developerguide/abs.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#abs "Open PDF") @@ -3,122 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $abs - -The `$abs` operator in Amazon DocumentDB returns the absolute value of a number. It can be used in the aggregation pipeline to perform mathematical operations on numeric fields. - -**Parameters** - - * `number`: The numeric expression for which the absolute value will be returned. - - - - -## Example (MongoDB Shell) - -This example demonstrates the usage of the `$abs` operator to find the absolute value of a numeric field. - -**Create sample documents** - - - db.numbers.insertMany([ - { "_id": 1, "value": -5 }, - { "_id": 2, "value": 10 }, - { "_id": 3, "value": -3.14 }, - { "_id": 4, "value": 0 } - ]); - -**Query example** - - - db.numbers.aggregate([ - { $project: { - "_id": 1, - "absolute_value": { $abs: "$value" } - }} - ]); - -**Output** - - - [ - { "_id": 1, "absolute_value": 5 }, - { "_id": 2, "absolute_value": 10 }, - { "_id": 3, "absolute_value": 3.14 }, - { "_id": 4, "absolute_value": 0 } - ] - -## Code examples - -To view a code example for using the `$abs` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function main() { - 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('numbers'); - - const result = await collection.aggregate([ - { $project: { - "_id": 1, - "absolute_value": { $abs: "$value" } - }} - ]).toArray(); - - console.log(result); - await client.close(); - } - - main(); - -Python - - - - from pymongo import MongoClient - - def main(): - 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['numbers'] - - result = list(collection.aggregate([ - { '$project': { - "_id": 1, - "absolute_value": { "$abs": "$value" } - }} - ])) - - print(result) - client.close() - - if __name__ == "__main__": - main() - - **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) - -$ROOT - -$add - -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.