Skip to content

Expose backup storage redundancy for SQL MI LTR backups - #30110

Open
svmicano wants to merge 1 commit into
Azure:mainfrom
svmicano:svmicano/expose-mi-ltr-backup-redundancy
Open

Expose backup storage redundancy for SQL MI LTR backups#30110
svmicano wants to merge 1 commit into
Azure:mainfrom
svmicano:svmicano/expose-mi-ltr-backup-redundancy

Conversation

@svmicano

@svmicano svmicano commented Sep 4, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Tests
️✔️ 40/40

Description

Expose the backup storage redundancy type returned by Get-AzSqlInstanceDatabaseLongTermRetentionBackup.

The SQL REST API and generated .NET SDK already return backupStorageRedundancy, but the hand-written Managed Instance LTR PowerShell output model did not define the property and the adapter did not map it. This change adds the output property and maps the existing SDK value.

Related work item: https://msdata.visualstudio.com/Database%20Systems/_workitems/edit/5161960/

Validation performed:

  • Confirmed the live REST response returns backupStorageRedundancy with value Geo.
  • Added unit coverage for SDK-to-PowerShell model mapping.
  • Editor diagnostics reported no errors.
  • git diff --check passed.

Not run: module build or unit test execution, per the author's request to approve builds first.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
  • SHOULD regenerate markdown help files if there is cmdlet API change
  • SHOULD have proper test coverage for changes in pull request
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI lite review requested due to automatic review settings September 4, 2026 11:04
@azure-pipelines

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

@svmicano
svmicano force-pushed the svmicano/expose-mi-ltr-backup-redundancy branch from fd9a3c6 to b3c0b3b Compare September 4, 2026 11:04
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

Copilot AI 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.

🟢 Approval recommended

The changes are small, consistent with existing patterns, include a targeted unit test, and appear to correctly surface and map the already-returned SDK property.

Pull request overview

This PR exposes the backupStorageRedundancy value returned by the SQL REST API/.NET SDK on the PowerShell output model for Managed Instance LTR backups, so users can see the backup storage redundancy in Get-AzSqlInstanceDatabaseLongTermRetentionBackup results.

Changes:

  • Added BackupStorageRedundancy to the Managed Instance LTR backup PowerShell output model.
  • Mapped ManagedInstanceLongTermRetentionBackup.BackupStorageRedundancy into the PowerShell model in the adapter.
  • Added a unit test validating the SDK-to-PS model mapping and updated the Sql module changelog.
File summaries
File Description
src/Sql/Sql/ManagedDatabase Backup/Services/AzureSqlManagedDatabaseBackupAdapter.cs Maps the SDK BackupStorageRedundancy field into the PowerShell output model (and makes mapping callable from unit tests).
src/Sql/Sql/ManagedDatabase Backup/Model/AzureSqlManagedDatabaseLongTermRetentionBackupModel.cs Adds BackupStorageRedundancy to the output model surfaced to users.
src/Sql/Sql/ChangeLog.md Documents the user-visible output change under “Upcoming Release”.
src/Sql/Sql.Test/UnitTests/AzureSqlManagedDatabaseBackupAdapterTests.cs Adds unit coverage to ensure BackupStorageRedundancy is mapped correctly (and validates RG parsing from resource ID).
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@azure-pipelines

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

@svmicano

svmicano commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

Sign up for free to 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.

3 participants