Skip to content

Add Azure Elastic SAN support for backup and restore operations#29738

Draft
priyansh17 wants to merge 1 commit into
Azure:mainfrom
priyansh17:features/esanOnboarding
Draft

Add Azure Elastic SAN support for backup and restore operations#29738
priyansh17 wants to merge 1 commit into
Azure:mainfrom
priyansh17:features/esanOnboarding

Conversation

@priyansh17

Copy link
Copy Markdown
  • Introduced AzureElasticSAN datasource type in DatasourceTypesInfo.json.
  • Updated documentation for Initialize-AzDataProtectionRestoreRequest to include examples for Azure Elastic SAN.
  • Enhanced New-AzDataProtectionBackupConfigurationClientObject with -ResourceSelector parameter for single volume selection.
  • Added ResourceIdentifier and ResourceNameOverride parameters to New-AzDataProtectionRestoreConfigurationClientObject for restoring volumes.
  • Implemented permission management for Azure Elastic SAN in Set-AzDataProtectionMSIPermission.
  • Created manifest file for Azure Elastic SAN with required permissions and policy settings.
  • Added tests for backup and restore configurations specific to Azure Elastic SAN.

Description

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

- Introduced `AzureElasticSAN` datasource type in `DatasourceTypesInfo.json`.
- Updated documentation for `Initialize-AzDataProtectionRestoreRequest` to include examples for Azure Elastic SAN.
- Enhanced `New-AzDataProtectionBackupConfigurationClientObject` with `-ResourceSelector` parameter for single volume selection.
- Added `ResourceIdentifier` and `ResourceNameOverride` parameters to `New-AzDataProtectionRestoreConfigurationClientObject` for restoring volumes.
- Implemented permission management for Azure Elastic SAN in `Set-AzDataProtectionMSIPermission`.
- Created manifest file for Azure Elastic SAN with required permissions and policy settings.
- Added tests for backup and restore configurations specific to Azure Elastic SAN.
Copilot AI review requested due to automatic review settings June 16, 2026 16:36
@azure-client-tools-bot-prd

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

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution @priyansh17! We will review the pull request and get back to you soon.

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds Azure Elastic SAN (AzureElasticSAN) data source support to the DataProtection PowerShell module, including backup/restore configuration, restore request wiring, permissions guidance, and supporting manifests/models.

Changes:

  • Added AzureElasticSAN to data source enums/manifests and documented cmdlet usage for backup/restore and MSI permissions.
  • Implemented AzureElasticSAN-specific parameter handling in backup/restore configuration cmdlets and updated restore request initialization logic.
  • Introduced Pester tests and hand-added (“grafted”) generated models needed for preview API compatibility.

Reviewed changes

Copilot reviewed 13 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/DataProtection/DataProtection/ChangeLog.md Announces upcoming AzureElasticSAN backup/restore support and new parameters.
src/DataProtection/DataProtection.Autorest/test/ElasticSanBackupRestoreConfiguration.Tests.ps1 Adds Pester coverage for AzureElasticSAN backup/restore configuration behavior.
src/DataProtection/DataProtection.Autorest/docs/Set-AzDataProtectionMSIPermission.md Documents MSI permission grants for AzureElasticSAN backup/restore scenarios.
src/DataProtection/DataProtection.Autorest/docs/New-AzDataProtectionRestoreConfigurationClientObject.md Documents AzureElasticSAN restore configuration parameters and examples.
src/DataProtection/DataProtection.Autorest/docs/New-AzDataProtectionBackupConfigurationClientObject.md Documents AzureElasticSAN backup configuration parameters and examples.
src/DataProtection/DataProtection.Autorest/docs/Initialize-AzDataProtectionRestoreRequest.md Adds an AzureElasticSAN restore request example using RestoreConfiguration.
src/DataProtection/DataProtection.Autorest/custom/manifests/DatasourceTypesInfo.json Maps AzureElasticSAN client type to its service resource type.
src/DataProtection/DataProtection.Autorest/custom/manifests/AzureElasticSAN.json Adds datasource manifest describing permissions and policy defaults for AzureElasticSAN.
src/DataProtection/DataProtection.Autorest/custom/Enums/Enums.cs Adds AzureElasticSAN to the DatasourceTypes enum.
src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/New-AzDataProtectionRestoreConfigurationClientObject.ps1 Adds AzureElasticSAN restore configuration parameters and object construction.
src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Initialize-AzDataProtectionRestoreRequest.ps1 Treats AzureElasticSAN similarly to AKS for restore configuration–driven paths.
src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/BackupInstance/New-AzDataProtectionBackupConfigurationClientObject.ps1 Adds AzureElasticSAN backup configuration parameter validation and object construction.
src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/BackupInstance/Initialize-AzDataProtectionBackupInstance.ps1 Updates help text to include AzureElasticSAN.
generated/DataProtection/DataProtection.Autorest/generated/api/Models/ResourceListSelectionCriteria.cs Adds a hand-written model required for eSAN restore criteria serialization.
generated/DataProtection/DataProtection.Autorest/generated/api/Models/ItemLevelRestoreCriteria.json.cs Adds discriminator support for GenericRestoreDatasourceCriteria.
generated/DataProtection/DataProtection.Autorest/generated/api/Models/GenericRestoreDatasourceCriteria.cs Adds a hand-written restore criteria model for eSAN.
generated/DataProtection/DataProtection.Autorest/generated/api/Models/GenericBackupDatasourceParameters.cs Adds a hand-written backup parameters model for eSAN.
generated/DataProtection/DataProtection.Autorest/generated/api/Models/BackupDatasourceParameters.json.cs Adds discriminator support for GenericBackupDatasourceParameters.

Comment on lines +8 to +11
while(-not $mockingPath) {
$mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File
$currentPath = Split-Path -Path $currentPath -Parent
}
"datasourceType": "Microsoft.ElasticSan/elasticSans/volumeGroups",
"allowedRestoreModes": [ "RecoveryPointBased" ],
"allowedRestoreTargetTypes": [ "AlternateLocation" ],
"itemLevelRecoveyEnabled": true,
Comment on lines +81 to +85
if($DatasourceType.ToString() -eq "AzureElasticSAN"){

if($ResourceIdentifier -eq $null -or $ResourceIdentifier.Count -eq 0){
throw "Please input parameter ResourceIdentifier for DatasourceType AzureElasticSAN."
}
Comment on lines +112 to +114
if($seenTargets.ContainsKey($value)){
throw "ResourceNameOverride target name '$value' is specified more than once. Target names must be unique."
}
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