AWS documentdb documentation change
Summary
Entire documentation page for the $floor operator in Amazon DocumentDB has been removed, including all examples and code samples
Security assessment
This change removes documentation for a mathematical operator ($floor) in Amazon DocumentDB. There is no evidence in the diff that this removal is related to a security vulnerability or weakness. The removed content includes standard usage examples and code samples for Node.js and Python, but no security-related content. This appears to be routine documentation cleanup or restructuring rather than a security-related change.
Diff
diff --git a/documentdb/latest/developerguide/floor.md b/documentdb/latest/developerguide/floor.md index cbe4e14da..8b1378917 100644 --- a//documentdb/latest/developerguide/floor.md +++ b//documentdb/latest/developerguide/floor.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#floor "Open PDF") @@ -3,124 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $floor - -New from version 4.0. - -The `$floor` operator in Amazon DocumentDB returns the largest integer that is less than or equal to the specified number. This operator is useful for rounding down numeric values. - -**Parameters** - - * `expression`: The numeric expression to round down. - - - - -## Example (MongoDB Shell) - -The following example demonstrates the use of the `$floor` operator to round a decimal value down to the nearest integer. - -**Create sample documents** - - - db.numbers.insertOne({ value: 3.14 }); - -**Query example** - - - db.numbers.aggregate([ - { $project: { _id: 0, floored: { $floor: "$value" } } } - ]); - -**Output** - - - { "floored" : 3 } - -## Code examples - -To view a code example for using the `$floor` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function example() { - const uri = 'mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'; - const client = new MongoClient(uri); - - try { - await client.connect(); - - const db = client.db('test'); - const collection = db.collection('numbers'); - - const result = await collection.aggregate([ - { $project: { _id: 0, floored: { $floor: "$value" } } } - ]).toArray(); - - console.log(result); - - } catch (error) { - console.error('Error:', error); - } finally { - await client.close(); - } - } - - example(); - -Python - - - - from pymongo import MongoClient - from pprint import pprint - - def example(): - client = None - try: - 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': 0, 'floored': { '$floor': '$value' }}} - ])) - - pprint(result) - - except Exception as e: - print(f"An error occurred: {e}") - - finally: - if client: - 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) - -$first - -$geoNear - -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.