Skip to content

[dataprotection] Add 2026-06-01 API models for Elastic SAN backup/restore - #1083

Merged
Ethan Yang (necusjz) merged 1 commit into
Azure:mainfrom
priyansh17:dataprotection/2026-06-01-esan
Sep 9, 2026
Merged

[dataprotection] Add 2026-06-01 API models for Elastic SAN backup/restore#1083
Ethan Yang (necusjz) merged 1 commit into
Azure:mainfrom
priyansh17:dataprotection/2026-06-01-esan

Conversation

@priyansh17

Copy link
Copy Markdown

Adds the 2026-06-01 DataProtection API command models for the Azure Elastic SAN (eSAN) backup/restore onboarding, keeping the aaz command models in sync with the changes made in the azure-cli-extensions dataprotection extension (Azure/azure-cli-extensions#9938).

What changed

Adds 2026-06-01 version sections + resource models for the backup-instance operations that the eSAN feature bumped to the GA 2026-06-01 API:

  • backup-instance create (backupInstances/{} PUT) — now carries GenericBackupDatasourceParameters.resourceSelectors (the eSAN volume selectors)
  • backup-instance validate-for-backup (backupVaults/{}/validateForBackup)
  • backup-instance validate-for-restore (backupInstances/{}/validateRestore)
  • backup-instance restore trigger (backupInstances/{}/restore)

Per the standard aaz pattern, adding the backupInstances/{} resource version also appends a ### [2026-06-01] section to the sibling delete/show/update commands of that resource; the extension independently pins those commands to their existing versions (same as the prior 2026-03-01 autoprotection PR #993).

Why

The eSAN extension changes hand-edited the aaz-generated code (api-version bump + resourceSelectors). Syncing them here ensures future regenerations reproduce these customizations instead of engineers re-creating them from scratch.

Validation

  • aaz-dev command-model verify passes (models consistent).
  • resourceSelectors present in the new 2026-06-01 create model; absent in 2026-03-01 (confirms it is new to 2026-06-01).

…tore

Add command models and mgmt-plane resource models for
Microsoft.DataProtection API version 2026-06-01, covering the
backup-instance create / validate-for-backup / validate-for-restore /
restore trigger commands used by the Elastic SAN (eSAN) datasource.

The 2026-06-01 backupInstances model adds the resourceSelectors property
on GenericBackupDatasourceParameters required by eSAN backup/restore.
Priyansh Choudhary (priyansh17) pushed a commit to priyansh17/azure-cli-extensions that referenced this pull request Sep 8, 2026
…r aaz reproducibility (eSAN)

The eSAN change hand-edited the api-version and resource_selectors in these aaz-generated commands but left the _aaz_info version metadata stale, so regenerating reverted the customizations. Regenerate create/update/validate-for-backup/validate-for-restore/restore-trigger from the 2026-06-01 command model (Azure/aaz#1083) so _aaz_info, api-version, and schema are consistent and the commands reproduce cleanly. No runtime change for create/validate/restore (already called 2026-06-01); update moves 2026-03-01 to 2026-06-01 where resource_selectors is valid.
@necusjz
Ethan Yang (necusjz) merged commit 2935b33 into Azure:main Sep 9, 2026
2 checks passed
Ethan Yang (necusjz) pushed a commit to Azure/azure-cli-extensions that referenced this pull request Sep 9, 2026
* [DATAPROTECTION] Add AzureElasticSAN support: update HISTORY, manifest, and command configurations

* [DATAPROTECTION] Enhance AzureElasticSAN support: add configuration and restore scripts, update permissions, and refine help documentation

* [DATAPROTECTION] Enhance AzureElasticSAN support: update README for restore request, add JSON validation in backup initialization, and implement tests for backup/restore configurations

* [DATAPROTECTION] Add AzureElasticSAN support: update HISTORY, modify API version for backup/restore, enhance validation, and implement tests for backup/restore workflows

* [DATAPROTECTION] Update AzureElasticSAN support: refine backup and restore configurations, enhance help documentation, and improve error handling

* [DataProtection] Update backup-instance test recordings for api-version 2026-06-01 bump

The eSAN change bumped backup-instance create/update/validate-for-backup/validate-for-restore/restore-trigger operations to api-version=2026-06-01. Update the recorded request URIs in the 8 affected backup-instance cassettes so VCR playback matches the version the CLI now sends; polling, show, delete and non-bumped operations are left at their recorded versions.

* [DataProtection] Make blob client lazy in initialize-backupconfig so non-blob datasource types don't require az login

The initialize-backupconfig command was registered with client_factory=cf_blob_container_mgmt, which eagerly builds a storage management client (requiring an authenticated account) before the handler runs. This made AzureElasticSAN/AzureKubernetesService unit tests fail with 'Please run az login'. Build the blob client lazily inside the AzureBlob/AzureDataLakeStorage branch only when --include-all-containers is used, so eSAN/AKS paths no longer require login.

* docs: update TODO comment with owner information for RBAC guidance on Elastic SAN backup/restore

* [DataProtection] Regenerate backup-instance commands at 2026-06-01 for aaz reproducibility (eSAN)

The eSAN change hand-edited the api-version and resource_selectors in these aaz-generated commands but left the _aaz_info version metadata stale, so regenerating reverted the customizations. Regenerate create/update/validate-for-backup/validate-for-restore/restore-trigger from the 2026-06-01 command model (Azure/aaz#1083) so _aaz_info, api-version, and schema are consistent and the commands reproduce cleanly. No runtime change for create/validate/restore (already called 2026-06-01); update moves 2026-03-01 to 2026-06-01 where resource_selectors is valid.

---------

Co-authored-by: Priyansh Choudhary <choudharypr@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants