AWS documentdb documentation change
Summary
Entire documentation page for the $pow operator in Amazon DocumentDB has been removed, including all content, examples, and code samples.
Security assessment
This change removes documentation for a mathematical operator ($pow) 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 includes standard MongoDB shell and programming language examples with TLS connection parameters, but their removal appears to be part of general documentation restructuring rather than security remediation. The change does not add any security documentation.
Diff
diff --git a/documentdb/latest/developerguide/pow.md b/documentdb/latest/developerguide/pow.md index 69f65c94b..8b1378917 100644 --- a//documentdb/latest/developerguide/pow.md +++ b//documentdb/latest/developerguide/pow.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#pow "Open PDF") @@ -3,118 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $pow - -Introduced in 8.0 - -The `$pow` operator in Amazon DocumentDB allows you to raise a number to a power. This can be useful for performing exponential calculations within your aggregation pipeline. - -**Parameters** - - * `<number>` (required): The number to be raised to a power. - - * `<exponent>` (required): The power to which the number should be raised. - - - - -## Example (MongoDB Shell) - -The following example demonstrates how to use the `$pow` operator to calculate the square of a number. - -**Create sample documents** - - - db.numbers.insertMany([ - { "_id": 1, "value": 2 }, - { "_id": 2, "value": 3 }, - { "_id": 3, "value": 4 } - ]); - -**Query example** - - - db.numbers.aggregate([ - { $addFields: { "square": { $pow: ["$value", 2] } } } - ]) - -**Output** - - - [ - { "_id": 1, "value": 2, "square": 4 }, - { "_id": 2, "value": 3, "square": 9 }, - { "_id": 3, "value": 4, "square": 16 } - ] - -## Code examples - -To view a code example for using the `$pow` command, choose the tab for the language that you want to use: - -Node.js - - -Here's an example of using the $pow operator in a Node.js application: - - - 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('numbers'); - - const result = await collection.aggregate([ - { $addFields: { "square": { $pow: ["$value", 2] } } } - ]).toArray(); - - console.log(result); - await client.close(); - } - - example(); - -Python - - -Here's an example of using the $pow operator in a Python application: - - - 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['numbers'] - - result = list(collection.aggregate([ - { "$addFields": { "square": { "$pow": ["$value", 2] } } } - ])) - - 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) - -$out - -$push - -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.