Uh oh!
There was an error while loading. Please reload this page.
[Do Not Merge] Onboard Az.DocumentDB (mongocluster) PowerShell module (preview 0.1.0) - #30071
[Do Not Merge] Onboard Az.DocumentDB (mongocluster) PowerShell module (preview 0.1.0)#30071amatarritamicrosoft wants to merge 4 commits into
Conversation
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
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
There was a problem hiding this comment.
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/DocumentDBmodule 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
| File | Description |
|---|---|
| tools/CreateMappings_rules.json | Add DocumentDB module mapping |
| tools/StaticAnalysis/Exceptions/Az.DocumentDB/SignatureIssues.csv | Static analysis signature exceptions |
| src/DocumentDB/DocumentDB.sln | Module solution file |
| src/DocumentDB/DocumentDB/Az.DocumentDB.psd1 | Module manifest (Az.DocumentDB) |
| src/DocumentDB/DocumentDB/ChangeLog.md | Module changelog |
| src/DocumentDB/DocumentDB/DocumentDB.csproj | Module build project |
| src/DocumentDB/DocumentDB/Properties/AssemblyInfo.cs | Module assembly metadata |
| src/DocumentDB/DocumentDB/help/Add-AzDocumentDBMongoClusterIdentity.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Az.DocumentDB.md | Module help landing page |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBFirewallRule.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoClusterConnectionString.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBMongoClusterIdentity.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBReplica.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Get-AzDocumentDBUser.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Invoke-AzDocumentDBPromoteMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/New-AzDocumentDBFirewallRule.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/New-AzDocumentDBMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/New-AzDocumentDBReplica.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/New-AzDocumentDBUser.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBFirewallRule.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBMongoClusterIdentity.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Remove-AzDocumentDBUser.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Reset-AzDocumentDBMongoClusterPassword.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Restore-AzDocumentDBMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Test-AzDocumentDBMongoClusterNameAvailability.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Update-AzDocumentDBFirewallRule.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB/help/Update-AzDocumentDBMongoCluster.md | Cmdlet help markdown |
| src/DocumentDB/DocumentDB.Autorest/.gitattributes | Autorest directory attributes |
| src/DocumentDB/DocumentDB.Autorest/.gitignore | Autorest directory ignores |
| src/DocumentDB/DocumentDB.Autorest/Properties/AssemblyInfo.cs | Generated client assembly metadata |
| src/DocumentDB/DocumentDB.Autorest/README.md | Module generator README |
| src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-firewallRules.json | UX metadata (firewall rules) |
| src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters-users.json | UX metadata (users) |
| src/DocumentDB/DocumentDB.Autorest/UX/Microsoft.DocumentDB/mongoClusters.json | UX metadata (clusters) |
| src/DocumentDB/DocumentDB.Autorest/custom/Add-AzDocumentDBMongoClusterIdentity.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/Az.DocumentDB.custom.psm1 | Custom module loader |
| src/DocumentDB/DocumentDB.Autorest/custom/Get-AzDocumentDBMongoClusterIdentity.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/Invoke-AzDocumentDBPromoteMongoCluster.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/New-AzDocumentDBReplica.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/New-AzDocumentDBUser.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/README.md | Custom cmdlets documentation |
| src/DocumentDB/DocumentDB.Autorest/custom/Remove-AzDocumentDBMongoClusterIdentity.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/Reset-AzDocumentDBMongoClusterPassword.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/custom/Restore-AzDocumentDBMongoCluster.ps1 | Custom wrapper cmdlet |
| src/DocumentDB/DocumentDB.Autorest/docs/README.md | Generated docs folder README |
| src/DocumentDB/DocumentDB.Autorest/examples/Add-AzDocumentDBMongoClusterIdentity.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBFirewallRule.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoClusterConnectionString.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBMongoClusterIdentity.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBReplica.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Get-AzDocumentDBUser.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Invoke-AzDocumentDBPromoteMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBFirewallRule.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBReplica.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/New-AzDocumentDBUser.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBFirewallRule.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBMongoClusterIdentity.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Remove-AzDocumentDBUser.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Reset-AzDocumentDBMongoClusterPassword.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Restore-AzDocumentDBMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Test-AzDocumentDBMongoClusterNameAvailability.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Update-AzDocumentDBFirewallRule.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/examples/Update-AzDocumentDBMongoCluster.md | Example markdown |
| src/DocumentDB/DocumentDB.Autorest/generate-info.json | Generation metadata |
| src/DocumentDB/DocumentDB.Autorest/how-to.md | Development how-to |
| src/DocumentDB/DocumentDB.Autorest/resources/README.md | Resources folder README |
| src/DocumentDB/DocumentDB.Autorest/test/Add-AzDocumentDBMongoClusterIdentity.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/Add-AzDocumentDBMongoClusterIdentity.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDBMongoClusterIdentity.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbFirewallRule.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbMongoCluster.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbMongoClusterConnectionString.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbReplica.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Get-AzDocumentDbUser.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Invoke-AzDocumentDbPromoteMongoCluster.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/Invoke-AzDocumentDbPromoteMongoCluster.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBMongoClusterCmk.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBMongoClusterCmk.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBReplica.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDBReplica.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbFirewallRule.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbFirewallRule.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbMongoCluster.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbMongoCluster.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbUser.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/New-AzDocumentDbUser.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/README.md | Test folder README |
| src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDBMongoClusterIdentity.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbFirewallRule.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbMongoCluster.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Remove-AzDocumentDbUser.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Reset-AzDocumentDBMongoClusterPassword.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Restore-AzDocumentDBMongoCluster.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/Restore-AzDocumentDBMongoCluster.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/Test-AzDocumentDbMongoClusterNameAvailability.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbFirewallRule.Tests.ps1 | Pester test stub |
| src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbMongoCluster.Recording.json | Pester recording |
| src/DocumentDB/DocumentDB.Autorest/test/Update-AzDocumentDbMongoCluster.Tests.ps1 | Pester scenario test |
| src/DocumentDB/DocumentDB.Autorest/test/env.json | Test environment data |
| src/DocumentDB/DocumentDB.Autorest/test/loadEnv.ps1 | Test env loader script |
| src/DocumentDB/DocumentDB.Autorest/test/utils.ps1 | Test utilities |
| src/DocumentDB/DocumentDB.Autorest/tsp-location.yaml | Spec location + commit pin |
| src/DocumentDB/DocumentDB.Autorest/tspconfig.yaml | TypeSpec emitter configuration |
| src/DocumentDB/DocumentDB.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 | Test utility script |
| src/DocumentDB/DocumentDB.Autorest/utils/Unprotect-SecureString.ps1 | SecureString 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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Automated sensitive-information remediation ran on this pull request.
Agent Assist 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. |
There was a problem hiding this comment.
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.",
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…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
There was a problem hiding this comment.
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.
bdf4997 to
06db6c9CompareThere was a problem hiding this comment.
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).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…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
There was a problem hiding this comment.
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"");
Oliver Towers (olivertowers)
commented
Sep 4, 2026
/azp run |
|
Commenter does not have sufficient privileges for PR 30071 in repo Azure/azure-powershell |
amatarritamicrosoft
commented
Sep 4, 2026
/azp run |
|
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 |
There was a problem hiding this comment.
Why do we need to have custom cmdlets for identity management? Shouldn't these be generic to any azure resource?
There was a problem hiding this comment.
It seems like most examples use Get-, modify the content then apply Update-.
I'd prefer this for a few reasons
- It's more generic/standard pattern.
- It uses the ps object model - get, modify the returned object then apply.
- 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 { |
There was a problem hiding this comment.
Why invoke if promote is the well-known verb here?
Promote-AzDocumentDbMongoCluster seems preferred here.
Uh oh!
There was an error while loading. Please reload this page.
Automated sensitive-information remediation ran on this pull request.
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. |
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
There was a problem hiding this comment.
🔵 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' |
Yong Zhang (yonzhan)
commented
Sep 4, 2026
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Automated sensitive-information remediation ran on this pull request.
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. |
Automated sensitive-information remediation ran on this pull request.
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. |
🤖 PR Validation —⚠️ Review suggested
️✔️Az.Accounts
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 CLIaz cosmosdb mongoclustercommand surface.What's included
New-AzDocumentDBReplica,Restore-AzDocumentDBMongoCluster,Reset-AzDocumentDBMongoClusterPassword,Invoke-AzDocumentDBPromoteMongoCluster,New-AzDocumentDBUser, andAdd/Get/Remove-AzDocumentDBMongoClusterIdentity(user-assigned identity for CMK).tools/CreateMappings_rules.jsonentry (required for new modules).tools/StaticAnalysis/Exceptions/Az.DocumentDB/SignatureIssues.csvfor the read-onlyGet-*ConfirmImpactpattern accepted across existing modules.Validation
Assisted-By: GitHub Copilot