-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[PS] Migrate DataProtection module to autorest v4 #29023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
@microsoft-github-policy-service agree company="Microsoft" |
| ```powershell | ||
| {{ Add code here }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve these placeholder examples
There was a problem hiding this comment.
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 migrates the DataProtection module from AutoRest v3 to AutoRest v4. The migration includes regenerating help documentation files, updating module manifests, adding new cmdlets, updating tests, and modifying examples to align with the new API version.
Key Changes:
- Added 3 new cmdlets:
Update-AzDataProtectionBackupPolicy,Update-AzDataProtectionResourceGuardMapping, andUnlock-AzDataProtectionDppResourceGuardProxyDelete - Updated help documentation across ~80 files to reflect API changes (type namespace changes from
Api20250201to base types) - Updated module manifest with new required Az.Accounts version (5.3.1) and new exported functions
- Modified parameter types from enum types to strings for better flexibility
- Updated examples to use simplified syntax for user-assigned identities
Reviewed changes
Copilot reviewed 152 out of 152 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ChangeLog.md | Added entry for breaking changes with link to migration guide |
| Az.DataProtection.psd1 | Updated module version dependencies and exported functions |
| Help/*.md (80+ files) | Updated documentation with API v4 changes, parameter type updates, and namespace changes |
| Test files | Added placeholder tests for new cmdlets; updated existing test with namespace change |
| Example files | Updated examples with simplified UAMI syntax |
| Solution files | Updated project GUIDs for regenerated project |
| .gitignore | Removed unnecessary ignore entries |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
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 151 out of 151 changed files in this pull request and generated 19 comments.
|
|
||
| The first, second commands fetch the instance and recovery point for the instance. | ||
| The third and fourth command initializes the target container id and target storage account ARM id. | ||
| The third and fourthcommand initializes the target container id and target storage account ARM id. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "fourthcommand" should be "fourth command"
| The last command triggers the restore for AzureDatabaseForPGFlexServer. | ||
|
|
||
| ### Example 10: Trigger vaulted backup containers ItemLevelRestore with PrefixMatch for Azureblob. | ||
| ### Example 10: Trigger vaulted backup conatiners ItemLevelRestore with PrefixMatch for Azureblob. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "conatiners" should be "containers"
| ``` | ||
|
|
||
| This command creates an hourly schedule for Azure Backup Rule. | ||
| This command creates an hourly scheudle for Azure Backup Rule. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "scheudle" should be "schedule"
| The sixth command assigns the necessary permissions for configure backup. | ||
|
|
||
| The seventh and eight command initializes custom tags and configure backup finally by creating a backup instance. | ||
| The sevnth and eight command initializes custom tags and configure backup finally by creating a backup instance. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "sevnth" should be "seventh"
| This command adds a weekly tag to given backup policy | ||
|
|
||
| ### Example 2: Remove Weekly tag from Backup Policy | ||
| ### Example 2: Remove Weeky tag from Backup Policy |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "Weeky" should be "Weekly"
| ``` | ||
|
|
||
| First command gets a specific vault by given vault name, subsequent three commands fetch the specified properties of encryption settings. | ||
| First command gets a specific vault by given vault name, subsequent three commands fetch the specity properites of encryption settings. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "specity" should be "specify"
|
|
||
| The first command is used to fetch the resource guard to be updated. | ||
| The second and third command is used to fetch the critical operations user want to update. | ||
| The second and third command is used to fecth the critical operations user want to update. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "fecth" should be "fetch"
| Fetch the backup instance. | ||
| Fetch valid time ranges for Backup Instance $instance[0]. | ||
| Display RestorableTimeRange, note that this can be multiple discrete ranges. | ||
| Dispaly RestorableTimeRange, note that this can be multiple dicrete ranges. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "Dispaly" should be "Display"
| Fetch the backup instance. | ||
| Fetch valid time ranges for Backup Instance $instance[0]. | ||
| Display RestorableTimeRange, note that this can be multiple discrete ranges. | ||
| Dispaly RestorableTimeRange, note that this can be multiple dicrete ranges. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "dicrete" should be "discrete"
| ``` | ||
|
|
||
| First command gets a specific vault by given vault name, subsequent three commands fetch the specified properties of encryption settings. | ||
| First command gets a specific vault by given vault name, subsequent three commands fetch the specity properites of encryption settings. |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling error: "properites" should be "properties"
|
To the author of the pull request, |
3c0a1a8 to
8c9f55e
Compare
There was a problem hiding this comment.
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 148 out of 148 changed files in this pull request and generated 9 comments.
|
|
||
| This command is used to change CmkIdentityType from SystemAssigned to UserAssigned. | ||
| CmkIdentityId is a required parameter. | ||
| This command is used to change CmkIdentityType from SystemAssigned to UserAssgined. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "UserAssgined" should be "UserAssigned"
| This command is used to change CmkIdentityType from SystemAssigned to UserAssigned. | ||
| CmkIdentityId is a required parameter. | ||
| This command is used to change CmkIdentityType from SystemAssigned to UserAssgined. | ||
| CmkIdenityId is a required parameter. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "CmkIdenityId" should be "CmkIdentityId"
|
|
||
| The first command is used to fetch the resource guard to be updated. | ||
| The second and third command is used to fetch the critical operations user want to update. | ||
| The second and third command is used to fecth the critical operations user want to update. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "fecth" should be "fetch"
| The last command triggers the restore for AzureDatabaseForPGFlexServer. | ||
|
|
||
| ### Example 10: Trigger vaulted backup containers ItemLevelRestore with PrefixMatch for Azureblob. | ||
| ### Example 10: Trigger vaulted backup conatiners ItemLevelRestore with PrefixMatch for Azureblob. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "conatiners" should be "containers"
| The seventh command updates the policy object with custom schedule. | ||
| The eighth, ninth, tenth commands update the Monthly retention rule with custom lifecycles. | ||
| The eleventh, twelfth commands create a tag criteria for Monthly policy. | ||
| The eleventh, twelth commands create a tag criteria for Monthly policy. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "twelth" should be "twelfth"
| - Additional information about change #1 | ||
| --> | ||
| ## Upcoming Release | ||
| * Improved user experience and consistency. This may introduce breaking changes. Please refer to [here](https://go.microsoft.com/fwlink/?linkid=2340249). |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ChangeLog entry should be written in the past tense to describe what was changed, not as a generic statement about user experience. Consider a more specific entry like: "Migrated module to AutoRest v4 for improved consistency. This introduces breaking changes documented at [link]."
| This command adds a weekly tag to given backup policy | ||
|
|
||
| ### Example 2: Remove Weekly tag from Backup Policy | ||
| ### Example 2: Remove Weeky tag from Backup Policy |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "Weeky" should be "Weekly"
| The sixth command assigns the necessary permissions for configure backup. | ||
|
|
||
| The seventh and eight command initializes custom tags and configure backup finally by creating a backup instance. | ||
| The sevnth and eight command initializes custom tags and configure backup finally by creating a backup instance. |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "sevnth" should be "seventh"
| Start-Sleep -Seconds 10 | ||
| } | ||
| $backupinstanceCreate = New-AzDataProtectionBackupInstance -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject | ||
| $backupnstanceCreate = New-AzDataProtectionBackupInstance -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "backupnstanceCreate" should be "backupInstanceCreate"
There was a problem hiding this comment.
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 154 out of 154 changed files in this pull request and generated no new comments.
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.