AWS Security ChangesHomeSearch

AWS documentdb documentation change

Service: documentdb · 2026-03-28 · Documentation low

File: documentdb/latest/developerguide/addToSet.md

Summary

Entire documentation page for the $addToSet operator was removed, including all examples, code samples, and usage instructions.

Security assessment

This change removes documentation content entirely but does not indicate any security vulnerability or weakness. The removal includes code examples showing TLS connections with CA certificates, but this appears to be routine documentation cleanup or restructuring rather than a security-related change. No security issues are mentioned in the diff.

Diff

diff --git a/documentdb/latest/developerguide/addToSet.md b/documentdb/latest/developerguide/addToSet.md
index 8cb47a405..8b1378917 100644
--- a//documentdb/latest/developerguide/addToSet.md
+++ b//documentdb/latest/developerguide/addToSet.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#addToSet "Open PDF")
@@ -3,117 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $addToSet
-
-The `$addToSet` operator in Amazon DocumentDB is used to add a value to an array only if the value is not already present in the array. This is useful for ensuring that an array contains unique elements.
-
-**Parameters**
-
-  * `field`: The field to update.
-
-  * `value`: The value to add to the array field. This can be a single value or an expression.
-
-
-
-
-## Example (MongoDB Shell)
-
-The following example demonstrates how to use the `$addToSet` operator to add unique elements to an array.
-
-**Create sample documents**
-    
-    
-    db.products.insertMany([
-      { "_id": 1, "item": "apple", "tags": ["fruit", "red", "round"] },
-      { "_id": 2, "item": "banana", "tags": ["fruit", "yellow"] },
-      { "_id": 3, "item": "cherry", "tags": ["fruit", "red"] }
-    ])
-
-**Query example**
-    
-    
-    db.products.update(
-      { "item": "apple" },
-      { $addToSet: { "tags": "green" } }
-    )
-
-**Output**
-    
-    
-    { "_id": 1, "item": "apple", "tags": ["fruit", "red", "round", "green"] }
-
-In this example, the `$addToSet` operator adds the "green" tag to the "tags" array of the document where the "item" field is "apple". Since "green" was not already in the array, it was added.
-
-## Code examples
-
-To view a code example for using the `$addToSet` 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('products');
-    
-      await collection.updateOne(
-        { "item": "apple" },
-        { $addToSet: { "tags": "green" } }
-      );
-    
-      const updatedDoc = await collection.findOne({ "item": "apple" });
-      console.log(updatedDoc);
-    
-      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.products
-    
-        collection.update_one(
-            {"item": "apple"},
-            {"$addToSet": {"tags": "green"}}
-        )
-    
-        updated_doc = collection.find_one({"item": "apple"})
-        print(updated_doc)
-    
-        client.close()
-    
-    example()
-
-![Warning](https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png) **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)
-
-$[<identifier>]
-
-$bit
-
-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.