[Az.CosmosDB] Add support for capabilities and disableLocalAuth updates in UpdateAzCosmosDBAccount#29290
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds support in Az.CosmosDB for updating Cosmos DB account Capabilities and the DisableLocalAuth property, and updates scenario tests accordingly.
Changes:
- Plumbs
DisableLocalAuththrough create/update cmdlets and result model. - Adds
-CapabilitiestoUpdate-AzCosmosDBAccountand maps string names to SDKCapabilityobjects. - Extends scenario tests to validate
DisableLocalAuthandCapabilitiesupdates.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/CosmosDB/CosmosDB/Models/DatabaseAccount/PSDatabaseAccountGetResults.cs | Exposes DisableLocalAuth on the PS model and maps it from SDK results. |
| src/CosmosDB/CosmosDB/Helpers/Constants.cs | Adds help messages for DisableLocalAuth and Capabilities. |
| src/CosmosDB/CosmosDB/CosmosDBAccount/UpdateAzCosmosDBAccount.cs | Adds -Capabilities parameter and maps it into update parameters; applies DisableLocalAuth on update. |
| src/CosmosDB/CosmosDB/CosmosDBAccount/NewOrUpdateAzCosmosDBAccount.cs | Adds shared DisableLocalAuth parameter for create/update cmdlets. |
| src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs | Sends DisableLocalAuth on account creation. |
| src/CosmosDB/CosmosDB.Test/ScenarioTests/AccountTests.ps1 | Updates scenario coverage for DisableLocalAuth and Capabilities. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| [Parameter(Mandatory = false, HelpMessage = Constants.CapabilitiesHelpMessage)] | ||
| public string[] Capabilities { get; set; } | ||
|
|
There was a problem hiding this comment.
This PR introduces new user-facing behavior/parameters (-Capabilities updates on Update-AzCosmosDBAccount and -DisableLocalAuth exposure) but src/CosmosDB/CosmosDB/ChangeLog.md still has an empty “## Upcoming Release” section. Please add an entry describing these changes for the next release.
|
Hi please suppress the error here if that's a false positive: https://github.com/tiffanytsang/azure-powershell/tree/users/tiffanytsang/UpdateAzCosmosDBAccount/tools/StaticAnalysis/Exceptions/Az.CosmosDB, after suppressing, we will re-run the macOS test to see the result. |
|
This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.