Skip to content

Conversation

hiaga
Copy link
Member

@hiaga hiaga commented Sep 29, 2025

Description

Added support for vault soft delete

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Added ARG SDK
Added support for vault soft delete
- Get soft deleted vault
- Undelete softdeleted vault
- Get deleted backup items in a soft deleted vault using ARG
@Copilot Copilot AI review requested due to automatic review settings September 29, 2025 03:17
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@hiaga hiaga added this to the Az 14.5.0 (10/14/2025) milestone Sep 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 PR adds support for vault soft delete functionality to the Azure Recovery Services module. The soft delete feature allows vaults to be recoverable for a retention period after deletion rather than being permanently removed.

Key changes include:

  • Addition of three new cmdlets for managing soft-deleted vaults and retrieving their backup items
  • Implementation of Azure Resource Graph (ARG) integration for querying soft-deleted vault backup items
  • Extended model classes to support soft-deleted vault scenarios

Reviewed Changes

Copilot reviewed 29 out of 110 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
UndoAzRecoveryServicesVaultDeletion.cs Implements cmdlet to restore soft-deleted vaults to active state
GetAzureRmRecoveryServicesSoftDeletedVault.cs Implements cmdlet to retrieve soft-deleted vaults by location and filters
GetAzureRmRecoveryServicesSoftDeletedVaultBackupItem.cs Implements cmdlet to query backup items from soft-deleted vaults using ARG
PSRecoveryServicesVaultClient.cs Adds client methods for soft-deleted vault operations
ConversionHelpers.cs Adds conversion logic for ARG responses to backup item models
Multiple model files Defines soft-deleted vault item classes extending existing backup item types
Help documentation Provides comprehensive cmdlet documentation and usage examples
Comments suppressed due to low confidence (1)

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesSoftDeletedVaultBackupItem.md:1

  • The description should be 'Gets backup items from soft-deleted Recovery Services vaults' (plural) to match the cmdlet's functionality of querying multiple vaults.
---

/// Undeletes a soft deleted Azure Recovery Services Vault.
/// </summary>
[Cmdlet("Undo", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "RecoveryServicesVaultDeletion", SupportsShouldProcess = true)]
[OutputType(typeof(Object))] // chck: ServeClientModel.OperationStatus
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains a typo 'chck' which should be 'check'.

Copilot uses AI. Check for mistakes.


WriteVerbose($"Undelete operation completed for vault '{this.Name}'");

this.WriteObject(new ARSSoftDeletedVault(undeleteResult)); // chck with Rishav what should be the output type here.
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains a typo 'chck' which should be 'check'.

Suggested change
this.WriteObject(new ARSSoftDeletedVault(undeleteResult)); // chck with Rishav what should be the output type here.
this.WriteObject(new ARSSoftDeletedVault(undeleteResult)); // check with Rishav what should be the output type here.

Copilot uses AI. Check for mistakes.

@isra-fel
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete this file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do


### Example 1: Get all soft-deleted vaults in a location
```powershell
PS C:\> Get-AzRecoveryServicesSoftDeletedVault -Location "westus"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete "PS C:>" in all examples

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

Copy link
Collaborator

@VeryEarly VeryEarly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix failed test cases

@hiaga
Copy link
Member Author

hiaga commented Sep 29, 2025

please fix failed test cases

rerecording the failed tests

@isra-fel isra-fel changed the base branch from main to release-2025-10-14 October 2, 2025 07:16
-->
## Upcoming Release
* Added Cross region restore support for new region - eastus3.
* Added support for vault soft delete feature - Get soft deleted vault, Undelete softdeleted vault, Get deleted backup items in a soft deleted vault using ARG.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Added support for vault soft delete feature - Get soft deleted vault, Undelete softdeleted vault, Get deleted backup items in a soft deleted vault using ARG.
* Added support for vault soft delete feature - Get soft deleted vault, undelete soft deleted vault, get deleted backup items in a soft deleted vault using ARG.

---
external help file: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.dll-Help.xml
Module Name: Az.RecoveryServices
online version:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

github-actions bot commented Oct 2, 2025

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

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