Removed EnableSoftDelete parameter from New-AzSqlServer and Set-AzSqlServer commands#29576
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
To the author of the pull request, |
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated -EnableSoftDelete switch from the Az.Sql server cmdlets and consolidates soft-delete configuration on the -SoftDeleteRetentionDays parameter, updating help docs, resources, and tests accordingly.
Changes:
- Removed
-EnableSoftDeletefromNew-AzSqlServerandSet-AzSqlServerand deleted the associated validation/translation logic. - Updated cmdlet help markdown and module ChangeLog entry to reflect the API change.
- Updated unit/scenario tests and session recordings to stop using
-EnableSoftDelete.
Reviewed changes
Copilot reviewed 10 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Sql/Sql/Server/Cmdlet/SetAzureSqlServer.cs | Removes EnableSoftDelete parameter usage and adjusts soft-delete retention update behavior. |
| src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs | Removes EnableSoftDelete parameter and sends SoftDeleteRetentionDays directly. |
| src/Sql/Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs | Simplifies validation to only validate SoftDeleteRetentionDays range. |
| src/Sql/Sql/Properties/Resources.resx | Removes strings only used by the old EnableSoftDelete validation paths. |
| src/Sql/Sql/Properties/Resources.Designer.cs | Regenerates designer to match resource removals. |
| src/Sql/Sql/help/Set-AzSqlServer.md | Removes -EnableSoftDelete from syntax and parameter documentation. |
| src/Sql/Sql/help/New-AzSqlServer.md | Removes -EnableSoftDelete from syntax and parameter documentation. |
| src/Sql/Sql/ChangeLog.md | Adds an upcoming-release note describing the breaking change and replacement parameter. |
| src/Sql/Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs | Updates attribute tests to no longer expect EnableSoftDelete. |
| src/Sql/Sql.Test/SessionRecords/.../TestRestoreNonExistentDeletedServer.json | Updates recorded HTTP interactions after test changes/rerecording. |
| src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 | Updates scenarios to use SoftDeleteRetentionDays only and adjusts expectations. |
Files not reviewed (1)
- src/Sql/Sql/Properties/Resources.Designer.cs: Language not supported
| // If the user supplied -SoftDeleteRetentionDays use it; otherwise fall back to the value returned by GET. | ||
| // The GET value may be -1 when soft-delete was never configured on the server, which the backend safely | ||
| // ignores in a PUT request (no-op), so existing server state is preserved. | ||
| updateData[0].SoftDeleteRetentionDays = this.SoftDeleteRetentionDays ?? updateData[0].SoftDeleteRetentionDays; |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
3807e4e to
c9841a2
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Hi @rambabu-yalla, please resolve the conflicts of the following files:
|
|
Hi @rambabu-yalla, FYI, the code complete date of Major Release is 05/26. |
224c696 to
f6e1ea9
Compare
Hi @YanaXu : I have just resolved merge conflicts. Could you please proceed with merge.?. thanks |
|
/azp run azure-powershell - security-tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| ## Version 6.5.0 | ||
| * Added support for User Assigned Managed Identity (UAMI) authentication in Data Sync cmdlets (`New-AzSqlSyncGroup`, `Update-AzSqlSyncGroup`, `New-AzSqlSyncMember`, `Update-AzSqlSyncMember`) | ||
| * Removed legacy usage of 2014 APIs in Firewall Rule cmdlets | ||
| * Removed the `EnableSoftDelete` parameter from `New-AzSqlServer` and `Set-AzSqlServer` cmdlets. Use the `SoftDeleteRetentionDays` parameter instead: setting `SoftDeleteRetentionDays` to 1-7 enables soft-delete, and setting it to 0 disables soft-delete. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run azure-powershell - security-tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| "Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.NewAzureSqlServer","New-AzSqlServer","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzSqlServer' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzSqlServer'." | ||
| "Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.SetAzureSqlServer","Set-AzSqlServer","0","2000","The cmdlet 'Set-AzSqlServer' no longer supports the parameter 'EnableSoftDelete' and no alias was found for the original parameter name.","Add the parameter 'EnableSoftDelete' back to the cmdlet 'Set-AzSqlServer', or add an alias to the original parameter name." | ||
| "Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.SetAzureSqlServer","Set-AzSqlServer","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Set-AzSqlServer' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Set-AzSqlServer'." | ||
| "Module","ClassName","Target","Severity","ProblemId","Description","Remediation" |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
This PR removes EnableSoftDelete parameter from New-AzSqlServer and Set-AzSqlServer commands as earlier announced.
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.