AWS documentdb documentation change
Summary
Entire documentation page for the $in query operator was removed, including examples in MongoDB Shell, Node.js, and Python
Security assessment
This change removes documentation about the $in query operator functionality. There is no evidence in the diff that this removal addresses a security vulnerability, weakness, or incident. The removed content appears to be standard operator documentation with code examples, and no security-related content is mentioned in the removed text. The change appears to be routine documentation maintenance or restructuring, possibly consolidating documentation.
Diff
diff --git a/documentdb/latest/developerguide/in.md b/documentdb/latest/developerguide/in.md index 52b53bf19..8b1378917 100644 --- a//documentdb/latest/developerguide/in.md +++ b//documentdb/latest/developerguide/in.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#in "Open PDF") @@ -3,110 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $in - -The `$in` operator in Amazon DocumentDB is a logical query operator that allows you to find documents where the value of a field equals any of the values specified in an array. - -**Parameters** - - * `field`: The field to check against the provided array. - - * `[value1, value2, ...]`: An array of values to match against the specified field. - - - - -**Dollar (`$`) in field names** - -See [Dollar($) and dot(.) in field names](./functional-differences.html#functional-differences-dollardot) for limitations regarding querying `$` prefixed fields in `$in` in nested objects. - -## Example (MongoDB Shell) - -The following example demonstrates how to use the `$in` operator to find documents where the `color` field is one of the values in the provided array. - -**Create sample documents** - - - db.colors.insertMany([ - { "_id": 1, "color": "red" }, - { "_id": 2, "color": "green" }, - { "_id": 3, "color": "blue" }, - { "_id": 4, "color": "yellow" }, - { "_id": 5, "color": "purple" } - ]) - -**Query example** - - - db.colors.find({ "color": { "$in": ["red", "blue", "purple"] } }) - -**Output** - - - { "_id": 1, "color": "red" }, - { "_id": 3, "color": "blue" }, - { "_id": 5, "color": "purple" } - -## Code examples - -To view a code example for using the `$in` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function findByIn() { - 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('colors'); - - const result = await collection.find({ "color": { "$in": ["red", "blue", "purple"] } }).toArray(); - console.log(result); - - await client.close(); - } - - findByIn(); - -Python - - - - from pymongo import MongoClient - - def find_by_in(): - 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.colors - - result = list(collection.find({ "color": { "$in": ["red", "blue", "purple"] } })) - print(result) - - client.close() - - find_by_in() - - **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) - -$gte - -$jsonSchema - -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.