AWS documentdb documentation change
Summary
Entire documentation page for the $millisecond operator was removed, including all examples and code samples
Security assessment
This change removes documentation for a specific MongoDB operator ($millisecond) but shows no evidence of addressing a security vulnerability. The removal appears to be part of general documentation cleanup or restructuring, not security-related remediation. No security warnings, vulnerabilities, or security-related content was present in the removed material.
Diff
diff --git a/documentdb/latest/developerguide/millisecond.md b/documentdb/latest/developerguide/millisecond.md index 3fb37eaa0..8b1378917 100644 --- a//documentdb/latest/developerguide/millisecond.md +++ b//documentdb/latest/developerguide/millisecond.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#millisecond "Open PDF") @@ -3,142 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $millisecond - -The `$millisecond` operator in Amazon DocumentDB is used to extract the millisecond portion of a date value. - -**Parameters** - -None - -## Example (MongoDB Shell) - -This example demonstrates how to use the `$millisecond` operator to extract the millisecond portion of a date value. - -**Create sample documents** - - - db.events.insert([ - { - "name": "Event 1", - "timestamp": ISODate("2023-04-21T10:30:15.123Z") - }, - { - "name": "Event 2", - "timestamp": ISODate("2023-04-21T10:30:15.456Z") - }, - { - "name": "Event 3", - "timestamp": ISODate("2023-04-21T10:30:15.789Z") - } - ]) - -**Query example** - - - db.events.aggregate([ - { - $project: { - name: 1, - milliseconds: { $millisecond: "$timestamp" } - } - } - ]) - -**Output** - - - [ - { - "_id": ObjectId("644332a42054ed1b0d15f0c1"), - "name": "Event 1", - "milliseconds": 123 - }, - { - "_id": ObjectId("644332a42054ed1b0d15f0c2"), - "name": "Event 2", - "milliseconds": 456 - }, - { - "_id": ObjectId("644332a42054ed1b0d15f0c3"), - "name": "Event 3", - "milliseconds": 789 - } - ] - -## Code examples - -To view a code example for using the `$millisecond` 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 events = db.collection('events'); - - const result = await events.aggregate([ - { - $project: { - name: 1, - milliseconds: { $millisecond: '$timestamp' } - } - } - ]).toArray(); - - console.log(result); - - await client.close(); - } - - main(); - -Python - - - - from pymongo import MongoClient - - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - events = db['events'] - - result = list(events.aggregate([ - { - '$project': { - 'name': 1, - 'milliseconds': { '$millisecond': '$timestamp' } - } - } - ])) - - print(result) - - client.close() - - **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) - -$mergeObjects - -$min - -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.