Skip to content

[Do Not Merge] Onboard Az.DocumentDB (mongocluster) PowerShell module (preview 0.1.0) - #30071

Open
amatarritamicrosoft wants to merge 4 commits into
Azure:mainfrom
amatarritamicrosoft:users/amatarrita/documentdb-ps
Open

[Do Not Merge] Onboard Az.DocumentDB (mongocluster) PowerShell module (preview 0.1.0)#30071
amatarritamicrosoft wants to merge 4 commits into
Azure:mainfrom
amatarritamicrosoft:users/amatarrita/documentdb-ps

Conversation

@amatarritamicrosoft

@amatarritamicrosoftamatarritamicrosoft commented Aug 26, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Tests
⚠️ 20/20
️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.DocumentDB
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help Example Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️File Change Check
⚠️PowerShell Core - Windows
TypeCmdletDescriptionRemediation
⚠️AssemblyInfo.cs will be updated automatically. Please do not update it manually.Revert AssemblyInfo.cs to its last version.
⚠️Windows PowerShell - Windows
TypeCmdletDescriptionRemediation
⚠️AssemblyInfo.cs will be updated automatically. Please do not update it manually.Revert AssemblyInfo.cs to its last version.
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

Description

Onboards Az.DocumentDB (preview 0.1.0), a new Azure PowerShell module for Azure Cosmos DB for MongoDB (vCore) mongo clusters, generated via TypeSpec (typespec-powershell) and mirroring the Azure CLI az cosmosdb mongocluster command surface.

What's included

  • 21 cmdlets, including 8 hand-written custom cmdlets: New-AzDocumentDBReplica, Restore-AzDocumentDBMongoCluster, Reset-AzDocumentDBMongoClusterPassword, Invoke-AzDocumentDBPromoteMongoCluster, New-AzDocumentDBUser, and Add/Get/Remove-AzDocumentDBMongoClusterIdentity (user-assigned identity for CMK).
  • 21 examples (one per parameter set).
  • 9 integration-test scenarios passing in both Record and Playback modes (identity, promote, firewall, CRUD, CMK, replica, user, restore, properties).
  • tools/CreateMappings_rules.json entry (required for new modules).
  • tools/StaticAnalysis/Exceptions/Az.DocumentDB/SignatureIssues.csv for the read-only Get-*ConfirmImpact pattern accepted across existing modules.

Validation

  • Static analysis: clean (0 gating issues).
  • Recordings sanitized (test subscription, no real identifiers).

🚫 DO NOT MERGE - this PR is for review/validation only and should not be merged yet.

Assisted-By: GitHub Copilot

Add Az.DocumentDB for Azure Cosmos DB for MongoDB (vCore) mongo clusters,
generated via TypeSpec (typespec-powershell) and mirroring the Azure CLI
command surface. Includes 21 cmdlets with 8 hand-written custom cmdlets
(replica, restore, password reset, promote, user, and user-assigned
identity management), 21 examples, and 9 recorded integration-test
scenarios passing in both Record and Playback modes.
Also adds the DocumentDB entry to tools/CreateMappings_rules.json (required
for new modules) and a StaticAnalysis signature exceptions file for the
read-only Get-* ConfirmImpact pattern accepted across existing modules.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 46bb57cf-0490-4f99-a750-27ca921e5d89
CopilotAI lite review requested due to automatic review settings August 26, 2026 05:56
@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request onboards a new preview Azure PowerShell module, Az.DocumentDB (0.1.0), targeting Azure Cosmos DB for MongoDB (vCore) mongo clusters, including generated assets plus several custom wrapper cmdlets, documentation, UX metadata, and Pester-based scenario tests.

Changes:

  • Added the new src/DocumentDB module structure (manifest, csproj, help, custom cmdlets, UX metadata).
  • Added Pester scenario tests and recordings for key flows (CRUD, firewall, identity/CMK, replica, promote, restore, etc.).
  • Updated repo tooling to recognize the new module (CreateMappings rule) and added static analysis signature exceptions.

Reviewed changes

Copilot reviewed 101 out of 110 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
tools/CreateMappings_rules.jsonAdd DocumentDB module mapping
tools/StaticAnalysis/Exceptions/Az.DocumentDB/SignatureIssues.csvStatic analysis signature exceptions
src/DocumentDB/DocumentDB.slnModule solution file
src/DocumentDB/DocumentDB/Az.DocumentDB.psd1Module manifest (Az.DocumentDB)
src/DocumentDB/DocumentDB/ChangeLog.mdModule changelog
src/DocumentDB/DocumentDB/DocumentDB.csprojModule build project
src/DocumentDB/DocumentDB/Properties/AssemblyInfo.csModule assembly metadata
src/DocumentDB/DocumentDB/help/Add-AzDocumentDBMongoClusterIdentity.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Az.DocumentDB.mdModule help landing page
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBFirewallRule.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoClusterConnectionString.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoClusterIdentity.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBReplica.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Invoke-AzDocumentDBPromoteMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/New-AzDocumentDBFirewallRule.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/New-AzDocumentDBMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/New-AzDocumentDBReplica.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/New-AzDocumentDBUser.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBFirewallRule.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBMongoClusterIdentity.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBUser.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Reset-AzDocumentDBMongoClusterPassword.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Restore-AzDocumentDBMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Test-AzDocumentDBMongoClusterNameAvailability.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Update-AzDocumentDBFirewallRule.mdCmdlet help markdown
src/DocumentDB/DocumentDB/help/Update-AzDocumentDBMongoCluster.mdCmdlet help markdown
src/DocumentDB/DocumentDB.Autorest/.gitattributesAutorest directory attributes
src/DocumentDB/DocumentDB.Autorest/.gitignoreAutorest directory ignores
src/DocumentDB/DocumentDB.Autorest/Properties/AssemblyInfo.csGenerated client assembly metadata
src/DocumentDB/DocumentDB.Autorest/README.mdModule generator README
src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-firewallRules.jsonUX metadata (firewall rules)
src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.jsonUX metadata (users)
src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters.jsonUX metadata (clusters)
src/DocumentDB/DocumentDB.Autorest/custom/Add-AzDocumentDBMongoClusterIdentity.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/Az.DocumentDB.custom.psm1Custom module loader
src/DocumentDB/DocumentDB.Autorest/custom/Get-AzDocumentDBMongoClusterIdentity.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/Invoke-AzDocumentDBPromoteMongoCluster.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/New-AzDocumentDBReplica.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/New-AzDocumentDBUser.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/README.mdCustom cmdlets documentation
src/DocumentDB/DocumentDB.Autorest/custom/Remove-AzDocumentDBMongoClusterIdentity.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/Reset-AzDocumentDBMongoClusterPassword.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/custom/Restore-AzDocumentDBMongoCluster.ps1Custom wrapper cmdlet
src/DocumentDB/DocumentDB.Autorest/docs/README.mdGenerated docs folder README
src/DocumentDB/DocumentDB.Autorest/examples/Add-AzDocumentDBMongoClusterIdentity.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBFirewallRule.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoClusterConnectionString.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoClusterIdentity.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBReplica.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBUser.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Invoke-AzDocumentDBPromoteMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBFirewallRule.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBReplica.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBUser.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBFirewallRule.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBMongoClusterIdentity.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBUser.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Reset-AzDocumentDBMongoClusterPassword.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Restore-AzDocumentDBMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Test-AzDocumentDBMongoClusterNameAvailability.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Update-AzDocumentDBFirewallRule.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/examples/Update-AzDocumentDBMongoCluster.mdExample markdown
src/DocumentDB/DocumentDB.Autorest/generate-info.jsonGeneration metadata
src/DocumentDB/DocumentDB.Autorest/how-to.mdDevelopment how-to
src/DocumentDB/DocumentDB.Autorest/resources/README.mdResources folder README
src/DocumentDB/DocumentDB.Autorest/test/Add-AzDocumentDBMongoClusterIdentity.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/Add-AzDocumentDBMongoClusterIdentity.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDBMongoClusterIdentity.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbFirewallRule.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbMongoCluster.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbMongoClusterConnectionString.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbReplica.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbUser.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Invoke-AzDocumentDbPromoteMongoCluster.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/Invoke-AzDocumentDbPromoteMongoCluster.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBMongoClusterCmk.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBMongoClusterCmk.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBReplica.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBReplica.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbFirewallRule.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbFirewallRule.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbMongoCluster.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbMongoCluster.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbUser.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbUser.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/README.mdTest folder README
src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDBMongoClusterIdentity.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbFirewallRule.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbMongoCluster.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbUser.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Reset-AzDocumentDBMongoClusterPassword.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Restore-AzDocumentDBMongoCluster.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/Restore-AzDocumentDBMongoCluster.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/Test-AzDocumentDbMongoClusterNameAvailability.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbFirewallRule.Tests.ps1Pester test stub
src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbMongoCluster.Recording.jsonPester recording
src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbMongoCluster.Tests.ps1Pester scenario test
src/DocumentDB/DocumentDB.Autorest/test/env.jsonTest environment data
src/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1Test env loader script
src/DocumentDB/DocumentDB.Autorest/test/utils.ps1Test utilities
src/DocumentDB/DocumentDB.Autorest/tsp-location.yamlSpec location + commit pin
src/DocumentDB/DocumentDB.Autorest/tspconfig.yamlTypeSpec emitter configuration
src/DocumentDB/DocumentDB.Autorest/utils/Get-SubscriptionIdTestSafe.ps1Test utility script
src/DocumentDB/DocumentDB.Autorest/utils/Unprotect-SecureString.ps1SecureString utility script
Suppressed comments (2)

src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:11

  • The module description is still a placeholder; this should be set to a real description (typically aligned with the module manifest Description) before publishing help.
    src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.json:29
  • Same typo appears in the example description.
 "description": "Gets the defintion of a Mongo cluster user.",

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsrc/DocumentDB/DocumentDB/help/Az.DocumentDB.md Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Az.DocumentDB.md Outdated
Comment threadsrc/DocumentDB/DocumentDB.Autorest/README.md
Comment threadsrc/DocumentDB/DocumentDB.Autorest/how-to.md
@x-engineering-agent

Copy link
Copy Markdown

Automated sensitive-information remediation ran on this pull request.

  • Detected categories:
  • Replaced with typed [REDACTED:category] placeholders in: no PR metadata fields
  • Comment/review owners notified because Agent Assist cannot edit another user's text: none

Agent Assist does not modify source files. The PR creator must remove or replace each suspected value at the linked line:

  • No changed-file findings

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Confirm the finding · ❌ Dispute the finding

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.

CopilotAI review requested due to automatic review settings August 27, 2026 02:54

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 101 out of 110 changed files in this pull request and generated 12 comments.

Suppressed comments (2)

src/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md:41

  • Typo in description: "defintion" should be "definition".
    src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.json:29
  • Typo in example description: "defintion" should be "definition".
 "description": "Gets the defintion of a Mongo cluster user.",

Comment threadsrc/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1
Comment threadsrc/DocumentDB/DocumentDB.Autorest/test/env.json Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Az.DocumentDB.md Outdated
Comment threadsrc/DocumentDB/DocumentDB.Autorest/tspconfig.yaml
CopilotAI review requested due to automatic review settings August 27, 2026 03:39
…parity
Expose -PromoteOption (enum: Forced, required) so the promote command
surface matches the merged Azure CLI (az documentdb mongocluster replica
promote), which takes --source-cluster, --mode, and --promote-option. The
existing -SourceCluster safety check (reads the replica's actual source
and aborts on mismatch) is retained. -PromoteOption is parity-only (the
service applies the single 'Forced' value), so the recorded promote
scenario is unchanged and playback passes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 46bb57cf-0490-4f99-a750-27ca921e5d89

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 101 out of 110 changed files in this pull request and generated no new comments.

Suppressed comments (10)

src/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1:27

  • $envFilePath is computed (including fallback to the parent folder), but the JSON is read from (Join-Path $PSScriptRoot $envFile) instead. This breaks playback/live runs when env.json is only present at the fallback path.
    src/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md:11
  • Typo in SYNOPSIS: "defintion" should be "definition".
    src/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md:41
  • Typo in DESCRIPTION: "defintion" should be "definition".
    src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:6
  • The module help front-matter still contains placeholders (Module Guid, Download Help Link, Help Version, Locale). These should be populated so the published reference content is correct and consistent with other modules.
    src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:34
  • Typo in cmdlet list entry: "defintion" should be "definition".
    src/DocumentDB/DocumentDB.Autorest/README.md:20
  • This line refers to AutoRest, but Az.DocumentDB is generated via TypeSpec per tspconfig.yaml and PR description. Update the wording so it stays accurate for this module.
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.

src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:11

  • The module description is still a placeholder. This should be a real description (matching the pattern used by other Az.* modules).
    src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.json:10
  • Typo in UX description: "defintion" should be "definition".
 "description": "Gets the defintion of a Mongo cluster user.",

src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.json:29

  • Typo in UX example description: "defintion" should be "definition".
 "description": "Gets the defintion of a Mongo cluster user.",

src/DocumentDB/DocumentDB.Autorest/README.md:14

  • PR description says the module is generated via TypeSpec (typespec-powershell), but this README states it was generated via AutoRest. Please update the README generator note to match the actual generation toolchain for Az.DocumentDB.
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

CopilotAI review requested due to automatic review settings August 27, 2026 03:47
@amatarritamicrosoft
amatarritamicrosoftforce-pushed the users/amatarrita/documentdb-ps branch from bdf4997 to 06db6c9CompareAugust 27, 2026 03:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 101 out of 110 changed files in this pull request and generated 7 comments.

Suppressed comments (2)

src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:6

  • This module-level help file still contains template placeholders for metadata (Module Guid/Download link/Help version/Locale). These should be populated so generated help is consistent with other Az modules.
    src/DocumentDB/DocumentDB/help/Az.DocumentDB.md:11
  • The module description is still the template placeholder. This should be replaced with a real user-facing description (typically aligned with the module manifest Description).

Comment threadsrc/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1
Comment threadsrc/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1
Comment threadsrc/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md Outdated
Comment threadsrc/DocumentDB/DocumentDB/help/Az.DocumentDB.md Outdated
Comment threadsrc/DocumentDB/DocumentDB.Autorest/README.md
Comment threadsrc/DocumentDB/DocumentDB.Autorest/README.md
…ypo, help metadata
- Assign a fresh unique module GUID (was sharing Az.MongoDB's GUID
accceef6-..., which can cause module discovery/import conflicts).
- Guard $cluster.IdentityUserAssignedIdentity before accessing .Keys in
Add/Remove-AzDocumentDBMongoClusterIdentity, so assigning the first
user-assigned identity to a cluster (property is null) no longer throws
under StrictMode nor injects a spurious null key.
- Fix "defintion" -> "definition" typo in Get-AzDocumentDBUser help,
UX metadata, and the module cmdlet list.
- Populate the module help landing front matter (Module Guid matches the
manifest, Download Help Link, Help Version, Locale, Description).
- Document each tspconfig.yaml directive with an inline comment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 46bb57cf-0490-4f99-a750-27ca921e5d89
CopilotAI review requested due to automatic review settings August 27, 2026 07:33

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 101 out of 110 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/DocumentDB/DocumentDB.Autorest/Properties/AssemblyInfo.cs:15

  • The file header mixes an MIT license notice with the standard Apache 2.0 header used across other *.Autorest/Properties/AssemblyInfo.cs files in this repo, and duplicates the copyright line. This is confusing from a licensing/attribution perspective and makes this file inconsistent with the rest of the generated modules.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");

@olivertowers

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Commenter does not have sufficient privileges for PR 30071 in repo Azure/azure-powershell

@amatarritamicrosoft

Copy link
Copy Markdown
MemberAuthor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Commenter does not have sufficient privileges for PR 30071 in repo Azure/azure-powershell

identities are merged with any identities already assigned to the cluster; existing
identities are preserved. Only user-assigned managed identities are supported.
.Example
Add-AzDocumentDBMongoClusterIdentity -Name MyCluster -ResourceGroupName MyResourceGroup -UserAssignedIdentity /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to have custom cmdlets for identity management? Shouldn't these be generic to any azure resource?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like most examples use Get-, modify the content then apply Update-.

I'd prefer this for a few reasons

  1. It's more generic/standard pattern.
  2. It uses the ps object model - get, modify the returned object then apply.
  3. If the ps object model representation for this isn't easier to use then we should address that so it is more useable vs having a separate command.

.Link
https://learn.microsoft.com/powershell/module/az.documentdb/invoke-azdocumentdbpromotemongocluster
#>
function Invoke-AzDocumentDBPromoteMongoCluster {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why invoke if promote is the well-known verb here?

Promote-AzDocumentDbMongoCluster seems preferred here.

@x-engineering-agent

Copy link
Copy Markdown

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: credential, database credential
  • Replaced with typed [REDACTED:category] placeholders in: no PR metadata fields
  • Comment/review owners notified because X Engineering Agent cannot edit another user's text: none

X Engineering Agent does not modify source files. The PR creator must remove or replace each suspected value at the linked line:

  • src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoClusterConnectionString.md:9 — possible database credential
  • src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBMongoCluster.md:3 — possible credential

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Confirm the finding · ❌ Dispute the finding

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.

Remove the dedicated identity cmdlets and document the standard Get, modify, and Update workflow.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 46bb57cf-0490-4f99-a750-27ca921e5d89
CopilotAI review requested due to automatic review settings September 4, 2026 21:12

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

This is a full new-module onboarding (generated + custom cmdlets + tests), and at least one correctness issue was identified that should be resolved before approval.

Review details
  • Files reviewed: 109/118 changed files
  • Comments generated: 2
  • Review effort level: Lite

$PSBoundParameters['SubscriptionId'] = $SubscriptionId
$PSBoundParameters['CreateMode'] = 'PointInTimeRestore'
$PSBoundParameters['RestoreParameterSourceResourceId'] = $sourceId
$PSBoundParameters['RestoreParameterPointInTimeUtc'] = $RestoreTime.ToUniversalTime()

$env.userRg = $env.AddWithCache('userRg', 'clitest-docdb-user-' + (RandomString $false 6), $UsePreviousConfigForRecord)
$env.userCluster = $env.AddWithCache('userCluster', 'cli-mc-' + (RandomString $false 6), $UsePreviousConfigForRecord)
$env.userObjectId = '71581c6f-df31-4790-bc49-26c6b38df8bd'
@yonzhan

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines:
Successfully started running 3 pipeline(s).

@x-engineering-agent

Copy link
Copy Markdown

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: credential, database credential
  • Replaced with typed [REDACTED:category] placeholders in: no PR metadata fields
  • Comment/review owners notified because X Engineering Agent cannot edit another user's text: none

X Engineering Agent does not modify source files. The PR creator must remove or replace each suspected value at the linked line:

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Confirm the finding · ❌ Dispute the finding

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.

@x-engineering-agent

Copy link
Copy Markdown

Automated sensitive-information remediation ran on this pull request.

  • Detected categories:
  • Replaced with typed [REDACTED:category] placeholders in: no PR metadata fields
  • Comment/review owners notified because X Engineering Agent cannot edit another user's text: none

X Engineering Agent does not modify source files. The PR creator must remove or replace each suspected value at the linked line:

  • No changed-file findings

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Confirm the finding · ❌ Dispute the finding

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.

@x-engineering-agent

Copy link
Copy Markdown

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: database credential
  • Replaced with typed [REDACTED:category] placeholders in: no PR metadata fields
  • Comment/review owners notified because X Engineering Agent cannot edit another user's text: none

X Engineering Agent does not modify source files. The PR creator must remove or replace each suspected value at the linked line:

  • No changed-file findings

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Confirm the finding · ❌ Dispute the finding

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@amatarritamicrosoft@olivertowers@yonzhan@necusjz