Feature: Enable PowerShell for Instant Access Restore Point#29475
Conversation
…w/Update-AzRestorePointCollection Agent-Logs-Url: https://github.com/OMJayswal/azure-powershell/sessions/293138a6-53c0-42e4-b3cb-60d044135327 Co-authored-by: OMJayswal <146695766+OMJayswal@users.noreply.github.com>
- Update Test-RestorePointsInstantAccess to use eastus2euap (only region supporting InstantAccess), Win2019Datacenter image (Win2012R2Datacenter retired), and correct VM setup without policy-blocked configurations - Create restore point collection with -InstantAccess \True - Create restore point with -InstantAccessDurationInMinutes 120 - Remove assertions on InstantAccessDurationInMinutes since the Azure API accepts it on write but does not return it in GET responses - Add session recording for playback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull request overview
This PR adds PowerShell support for configuring Instant Access behavior on restore point collections and restore points in the Az.Compute module, including cmdlet parameters, output surface area updates, and scenario test coverage.
Changes:
- Added
-InstantAccesstoNew-AzRestorePointCollectionandUpdate-AzRestorePointCollection. - Added
-InstantAccessDurationInMinutestoNew-AzRestorePointand surfaced corresponding output properties via PS models and AutoMapper. - Updated help docs, changelog, and added a new scenario test for Instant Access.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Compute/Compute/help/Update-AzRestorePointCollection.md | Documents new -InstantAccess parameter and example. |
| src/Compute/Compute/help/New-AzRestorePointCollection.md | Documents new -InstantAccess parameter and example. |
| src/Compute/Compute/help/New-AzRestorePoint.md | Documents new -InstantAccessDurationInMinutes parameter and example. |
| src/Compute/Compute/RestorePoints/UpdateAzRestorePointCollection.cs | Adds InstantAccess parameter and passes it to RPC update. |
| src/Compute/Compute/RestorePoints/NewAzRestorePointCollection.cs | Adds InstantAccess parameter and sets it on create. |
| src/Compute/Compute/RestorePoints/NewAzRestorePoint.cs | Adds duration parameter with validation and sets SDK model field. |
| src/Compute/Compute/Generated/Models/PSRestorePointCollection.cs | Adds InstantAccess property to output type. |
| src/Compute/Compute/Generated/Models/PSRestorePoint.cs | Adds InstantAccessDurationInMinutes property to output type. |
| src/Compute/Compute/Generated/Models/ComputeAutoMapperProfile.cs | Maps SDK InstantAccessDurationMinutes to PS InstantAccessDurationInMinutes. |
| src/Compute/Compute/ChangeLog.md | Adds release notes entries for the new parameters/properties. |
| src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.ps1 | Adds new Test-RestorePointsInstantAccess scenario script. |
| src/Compute/Compute.Test/ScenarioTests/RestorePointsTests.cs | Wires the new scenario script into xUnit. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
audreyttt
left a comment
There was a problem hiding this comment.
Looks good to me with some small nits. Please look into the CI check failure logs and follow any remediation steps.
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). |
mask characters of password with *** Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Compute/Compute/help/New-AzRestorePoint.md:45
- Example 2 does not specify
-ConsistencyMode, but the example description claims it creates an application-consistent restore point, while the-ConsistencyModeparameter description below says onlyCrashConsistentis accepted as input. Please update the example description (or the parameter description) so the documented behavior is consistent.
### Example 2
```powershell
New-AzRestorePoint -ResourceGroupName "MyResourceGroup" -RestorePointCollectionName "MyRPCollection" -Name "MyRestorePoint" -InstantAccessDurationInMinutes 120
Creates a new application-consistent Restore Point with a 120-minute instant access snapshot duration.
PARAMETERS
-ConsistencyMode
ConsistencyMode of the restore point. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.
</details>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
audreyttt
left a comment
There was a problem hiding this comment.
Please also accept the CLA agreement following the instructions in the microsoft-github-policy-service comment, to resolve the CI check.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Adds Instant Access (IA) parameters to existing Restore Point cmdlets, enabling rapid disk restoration from application-consistent snapshots on Premium SSD v2 and Ultra disks. Requires API version 2025-04-01+ and the
AppConsistentInstantAccessSnapshotForDirectDriveDisksfeature flag.Changes
New parameters
New-AzRestorePointCollection:-InstantAccess <bool?>— enables IA at the collection levelUpdate-AzRestorePointCollection:-InstantAccess <bool?>— toggles IA on an existing collection via PATCHNew-AzRestorePoint:-InstantAccessDurationInMinutes <int?>— IA snapshot retention duration (validated 1–300 min)Output type additions
PSRestorePointCollection:InstantAccess(bool?) — mapped fromRestorePointCollection.InstantAccessPSRestorePoint:InstantAccessDurationInMinutes(int?) — custom AutoMapper mapping from SDK'sInstantAccessDurationMinutesSupporting changes
InstantAccessDurationMinutes → InstantAccessDurationInMinutesmappingTest-RestorePointsInstantAccessadded covering collection creation with IA, restore point with custom duration, output property verification, and IA toggle viaUpdateUsage
All new parameters are optional; omitting them preserves existing behavior.