Skip to content

Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview#41694

Open
zubairabid wants to merge 55 commits intoAzure:mainfrom
zubairabid:users/zubair/ctr-clean
Open

Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview#41694
zubairabid wants to merge 55 commits intoAzure:mainfrom
zubairabid:users/zubair/ctr-clean

Conversation

@zubairabid
Copy link
Copy Markdown
Contributor

ARM (Control Plane) API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify:
    • edit this with your clarification

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
  • A release plan has been created. If not, please create one as it will help guide you through the REST API and SDK creation process.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.
  • For guidance on SDK breaking change review, refer to https://aka.ms/ci-fix.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR is in purview of the ARM review (label: ARMReview). This PR must get ARMSignedOff label from an ARM reviewer.
    This PR has ARMChangesRequested label. Please address or respond to feedback from the ARM API reviewer.
    When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
    Automation should then add WaitForARMFeedback label.
    ❗If you don't have permissions to remove the label, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories.
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ The required check named SDK Validation Status has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

@github-actions github-actions Bot added ARMReview new-api-version resource-manager SuppressionReviewRequired TypeSpec Authored with TypeSpec WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Mar 24, 2026
- Add v2026_03_01_preview version enum to main.tsp
- Add readme.md tag block for package-preview-2026-03-01-preview
- Update api-version in all example files from 2026-01-01-preview to 2026-03-01-preview
- Regenerate swagger with updated version string
- Fix route backupCrossTenantVaultMappingsStatus -> backupCrossTenantVaultMappingStatus
- Fix type fields in examples: backupCrossTenantVaultMappingss -> backupCrossTenantVaultMappings
…gState in CTR models

Replace inline 'Succeeded | Failed | Canceled' union with the built-in
Azure.ResourceManager.ResourceProvisioningState type in CrossTenantVaultMapping
and VaultCredentialCertificateProperties models. This removes 6 suppress
directives that were only needed to work around lint rules for the inline
union pattern.
…BeReadOnly lint

ResourceProvisioningState generates a \ with sibling readOnly in the
swagger, but per JSON Schema spec sibling properties next to \ are
ignored. The ProvisioningStateMustBeReadOnly lint rule follows this strictly
and reports violations. Revert to the inline union pattern with suppress
directives which keeps readOnly directly on the property.
@zubairabid zubairabid force-pushed the users/zubair/ctr-clean branch from 07b0eb0 to dcc7b83 Compare March 26, 2026 16:52
@zubairabid zubairabid changed the title Add Cross-Tenant Restore (CTR) feature - API version 2026-03-01-preview Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview Mar 27, 2026
@gary-x-li gary-x-li requested a review from Copilot March 27, 2026 14:44
Copy link
Copy Markdown
Contributor

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

Adds a new ARM API version (2026-03-31-preview) for RecoveryServicesBackup to support Cross-Tenant Restore (CTR) and updates the spec packaging and examples accordingly.

Changes:

  • Introduces a new package-preview-2026-03-31-preview tag pointing to the new bms.json input.
  • Adds the 2026-03-31-preview API version to the TypeSpec Versions enum and imports CTR-related resources.
  • Adds numerous 2026-03-31-preview example payloads/flows (including cross-tenant vault mapping operations and related LRO polling examples).

Reviewed changes

Copilot reviewed 260 out of 261 changed files in this pull request and generated no comments.

Show a summary per file
File Description
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/readme.md Adds the new preview tag input and additional validator suppressions for the new API version.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/main.tsp Registers the new preview API version and imports the CTR vault mapping resource definitions.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TriggerRecoveryPointMove_Post.json Adds an LRO example for moving a recovery point across tiers.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/GetTieringCostOperationStatus.json Adds an example for polling tiering cost operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/GetTieringCostOperationResult.json Adds an example for fetching tiering cost operation result.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/FetchTieringCostForVault.json Adds an example for tiering cost savings query at vault scope (sync/async).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/FetchTieringCostForRehydrate.json Adds an example for rehydration cost query (sync/async).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/FetchTieringCostForProtectedItem.json Adds an example for tiering cost savings at protected item scope (sync/async).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/FetchTieringCostForPolicy.json Adds an example for tiering cost savings at policy scope (sync/async).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json Adds an example for unlocking delete on a resource guard proxy.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json Adds an example for listing resource guard proxies.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json Adds an example for getting a resource guard proxy.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json Adds an example for deleting a resource guard proxy.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json Adds an example for private endpoint connection LRO status polling.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json Adds an example for getting a private endpoint connection resource.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json Adds an example for deleting a private endpoint connection (sync/async responses).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Dpm/BackupEngines_Get.json Adds an example for retrieving DPM/Backup Engine details.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/ValidateOperation.json Adds an example for validating a cross-tenant restore operation.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/RemoveCrossTenantVaultMapping.json Adds an example for removing a cross-tenant vault mapping (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/ListCrossTenantVaultMappings.json Adds an example for listing cross-tenant vault mappings.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/ListCrossTenantProtectedItems.json Adds an example for listing protected items via a cross-tenant mapping.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/ListCrossTenantJobs.json Adds an example for listing jobs via a cross-tenant mapping.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetVaultCredentialOperationStatus.json Adds an example for polling vault credential generation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetValidateOperationStatus.json Adds an example for polling cross-tenant validate operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetValidateOperationResult.json Adds an example for fetching cross-tenant validate operation results (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetProtectedItemFromCrossTenantVault.json Adds an example for getting a protected item via cross-tenant mapping.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetCrossTenantVaultMapping.json Adds an example for getting a specific cross-tenant vault mapping.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetCrossTenantOperationStatus.json Adds an example for polling operation status for cross-tenant protected item operations.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GetCrossTenantOperationResult.json Adds an example for fetching operation result for cross-tenant protected item operations.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/GenerateCrossTenantVaultCredential.json Adds an example for generating cross-tenant vault credentials (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/CheckVaultMappingStatus.json Adds an example for checking cross-tenant vault mapping status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/TriggerExportJobs.json Adds an example for exporting jobs (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/TriggerCancelJob.json Adds an example for cancelling a job (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/TriggerBackup_Post.json Adds an example to trigger a backup (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/RefreshContainers_OperationResults.json Adds an example for container refresh operation results (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/RefreshContainers.json Adds an example to trigger container refresh (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/ProtectedItem_Delete_OperationStatus.json Adds an example for delete protected item operation status polling.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/ProtectedItem_Delete_OperationResult.json Adds an example for delete protected item operation result fetching.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/ProtectedItem_Delete.json Adds an example for deleting a protected item (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/ListJobsWithAllSupportedFilters.json Adds an example for listing jobs with OData filters.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/GetJobDetails.json Adds an example for retrieving job details.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/CancelJobOperationResult.json Adds an example for cancel job operation results.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupStorageConfig_Put.json Adds an example for updating backup storage config (PUT).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupStorageConfig_Patch.json Adds an example for updating backup storage config (PATCH).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupStorageConfig_Get.json Adds an example for getting backup storage config.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupSecurityPin_Get.json Adds an example for getting a vault security PIN.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupResourceVaultConfigs_Put.json Adds an example for updating vault security config (PUT).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupResourceVaultConfigs_Patch.json Adds an example for updating vault security config (PATCH).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupResourceVaultConfigs_Get.json Adds an example for getting vault security config.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/Common/BackupProtectionContainers_UsageSummary_Get.json Adds an example for usage summary of protection containers.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupResourceEncryptionConfig_Put.json Adds an example for updating vault encryption configuration.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupResourceEncryptionConfig_Get.json Adds an example for retrieving vault encryption configuration.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupDataMove/TriggerDataMove_Post.json Adds an example for triggering data move (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupDataMove/PrepareDataMove_Post.json Adds an example for preparing data move (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json Adds an example for fetching prepare data move results.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json Adds an example for polling data move operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureWorkload/ProtectionContainers_Unregister.json Adds an example for unregistering an Azure Workload protection container (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureWorkload/BackupProtectionIntent_List.json Adds an example for listing protection intents.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json Adds an example for getting a protection intent.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureWorkload/BackupProtectionIntent_Delete.json Adds an example for deleting a protection intent.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureStorage/SoftDeletedContainers_List.json Adds an example for listing soft-deleted containers.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureStorage/ProtectionContainers_List.json Adds an example for listing storage protection containers.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureStorage/ProtectionContainers_Inquire.json Adds an example for inquiring storage protection containers (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ValidateOperationStatus.json Adds an example for validate operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ValidateOperationResults.json Adds an example for validate operation results (sync/async).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/Revoke_Ilr.json Adds an example for revoking ILR (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json Adds an example for protection policy operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json Adds an example for protection policy operation results.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json Adds an example for getting a protection policy.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionPolicies_Delete.json Adds an example for deleting a protection policy (LRO).
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionIntent_Validate.json Adds an example for validating protection intent creation.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json Adds an example for creating/updating protection intent.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/ProtectedItemOperationStatus.json Adds an example for protected item operation status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/GetBackupStatus.json Adds an example for querying VM backup status.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/BackupProtectableItems_List.json Adds an example for listing protectable items.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/BackupFeature_Validate.json Adds an example for validating VM backup feature support.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TriggerRecoveryPointMove_Post.json Adds mirrored 2026-03-31-preview example content under the top-level examples folder.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/GetTieringCostOperationStatus.json Adds mirrored tiering cost operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/GetTieringCostOperationResult.json Adds mirrored tiering cost operation result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/FetchTieringCostForVault.json Adds mirrored tiering cost vault example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/FetchTieringCostForRehydrate.json Adds mirrored tiering cost rehydrate example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/FetchTieringCostForProtectedItem.json Adds mirrored tiering cost protected item example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TieringCost/FetchTieringCostForPolicy.json Adds mirrored tiering cost policy example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json Adds mirrored resource guard proxy unlock-delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/ResourceGuardProxyCRUD/ListResourceGuardProxy.json Adds mirrored resource guard proxy list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/ResourceGuardProxyCRUD/GetResourceGuardProxy.json Adds mirrored resource guard proxy get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json Adds mirrored resource guard proxy delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json Adds mirrored private endpoint connection operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/PrivateEndpointConnection/GetPrivateEndpointConnection.json Adds mirrored private endpoint connection get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/PrivateEndpointConnection/DeletePrivateEndpointConnection.json Adds mirrored private endpoint connection delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Dpm/BackupEngines_Get.json Adds mirrored DPM backup engine get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/ValidateOperation.json Adds mirrored cross-tenant validate example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/RemoveCrossTenantVaultMapping.json Adds mirrored cross-tenant mapping removal example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/ListCrossTenantVaultMappings.json Adds mirrored cross-tenant mappings list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/ListCrossTenantProtectedItems.json Adds mirrored cross-tenant protected items list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/ListCrossTenantJobs.json Adds mirrored cross-tenant jobs list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetVaultCredentialOperationStatus.json Adds mirrored vault credential operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetValidateOperationStatus.json Adds mirrored validate operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetValidateOperationResult.json Adds mirrored validate operation result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetProtectedItemFromCrossTenantVault.json Adds mirrored cross-tenant protected item get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetCrossTenantVaultMapping.json Adds mirrored cross-tenant vault mapping get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetCrossTenantRecoveryPoints.json Adds example for listing recovery points via cross-tenant mapping.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetCrossTenantOperationStatus.json Adds mirrored cross-tenant operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GetCrossTenantOperationResult.json Adds mirrored cross-tenant operation result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/GenerateCrossTenantVaultCredential.json Adds mirrored cross-tenant vault credential generation example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/CrossTenantVaultMappingOperations/CheckVaultMappingStatus.json Adds mirrored vault mapping status check example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/TriggerExportJobs.json Adds mirrored export jobs example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/TriggerCancelJob.json Adds mirrored cancel job example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/TriggerBackup_Post.json Adds mirrored trigger backup example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/RefreshContainers_OperationResults.json Adds mirrored refresh containers operation results example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/RefreshContainers.json Adds mirrored refresh containers trigger example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/ProtectedItem_Delete_OperationStatus.json Adds mirrored protected item delete operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/ProtectedItem_Delete_OperationResult.json Adds mirrored protected item delete operation result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/ProtectedItem_Delete.json Adds mirrored protected item delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/ListJobsWithAllSupportedFilters.json Adds mirrored list jobs with filters example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/GetJobDetails.json Adds mirrored job details example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/CancelJobOperationResult.json Adds mirrored cancel job operation result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupStorageConfig_Put.json Adds mirrored backup storage config PUT example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupStorageConfig_Patch.json Adds mirrored backup storage config PATCH example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupStorageConfig_Get.json Adds mirrored backup storage config GET example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupSecurityPin_Get.json Adds mirrored security PIN GET example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupResourceVaultConfigs_Put.json Adds mirrored vault config PUT example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupResourceVaultConfigs_Patch.json Adds mirrored vault config PATCH example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupResourceVaultConfigs_Get.json Adds mirrored vault config GET example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupProtectionContainers_UsageSummary_Get.json Adds mirrored protection containers usage summary example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/Common/BackupProtectedItem_UsageSummary_Get.json Adds mirrored protected items usage summary example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupResourceEncryptionConfig_Put.json Adds mirrored encryption config PUT example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupResourceEncryptionConfig_Get.json Adds mirrored encryption config GET example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupDataMove/TriggerDataMove_Post.json Adds mirrored trigger data move example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupDataMove/PrepareDataMove_Post.json Adds mirrored prepare data move example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupDataMove/PrepareDataMoveOperationResult_Get.json Adds mirrored prepare data move result example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/BackupDataMove/BackupDataMoveOperationStatus_Get.json Adds mirrored data move operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureWorkload/ProtectionContainers_Unregister.json Adds mirrored workload protection container unregister example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureWorkload/BackupProtectionIntent_List.json Adds mirrored workload protection intent list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureWorkload/BackupProtectionIntent_Get.json Adds mirrored workload protection intent get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureWorkload/BackupProtectionIntent_Delete.json Adds mirrored workload protection intent delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureStorage/SoftDeletedContainers_List.json Adds mirrored storage soft-deleted containers list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureStorage/ProtectionContainers_List.json Adds mirrored storage protection containers list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureStorage/ProtectionContainers_Inquire.json Adds mirrored storage protection containers inquire example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ValidateOperationStatus.json Adds mirrored IaaS VM validate operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ValidateOperationResults.json Adds mirrored IaaS VM validate operation results example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/Revoke_Ilr.json Adds mirrored IaaS VM revoke ILR example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json Adds mirrored policy operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionPolicyOperationResults_Get.json Adds mirrored policy operation results example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionPolicies_Get.json Adds mirrored protection policy get example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionPolicies_Delete.json Adds mirrored protection policy delete example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionIntent_Validate.json Adds mirrored protection intent validate example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json Adds mirrored protection intent create/update example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/ProtectedItemOperationStatus.json Adds mirrored protected item operation status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/GetBackupStatus.json Adds mirrored backup status example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/BackupProtectableItems_List.json Adds mirrored protectable items list example.
specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/AzureIaasVm/BackupFeature_Validate.json Adds mirrored feature validate example.
Comments suppressed due to low confidence (7)

specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json:1

  • The Azure-AsyncOperation URL is truncated (?api-versi), which makes the example invalid and breaks LRO polling guidance. Update the header value to include a complete api-version=... query string.
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TieringCost/GetTieringCostOperationStatus.json:1
  • This TieringCost operation status example includes privateEndpointConnectionName, which appears unrelated to tiering cost and likely indicates a copy/paste mistake. Replace it with the correct parameter (or remove it) to match the actual operation signature for TieringCost operation status.
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json:1
  • The resource ID uses provider namespace Microsoft.RecoveryServicesBVTD2, which is inconsistent with the spec namespace (Microsoft.RecoveryServices) and likely invalid for ARM resource IDs in examples. Update the provider segment to match the RP used by the API (Microsoft.RecoveryServices).
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/BackupResourceEncryptionConfig_Put.json:1
  • infrastructureEncryptionState is set to the string value \"true\", which is unlikely to conform to the schema (commonly an enum like Enabled/Disabled or a boolean). Update the example to use the correct type/value expected by the API schema to avoid example validation failures and client confusion.
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/AzureIaasVm/BackupProtectableItems_List.json:1
  • This virtualMachineId is not a valid ARM resource ID because the resourceGroups/{name} segment is incomplete (it ends at resourceGroups/). Update it to a well-formed resource ID, e.g., /subscriptions/.../resourceGroups/<rg>/providers/....
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/preview/2026-03-31-preview/examples/TriggerRecoveryPointMove_Post.json:1
  • The LRO polling URLs in Azure-AsyncOperation and Location use an older api-version (2020-09-01) while the request uses 2026-03-31-preview. Unless the polling endpoints explicitly require an older version, update these URLs to use api-version=2026-03-31-preview for consistency and to reflect how clients should poll for this API version.
    specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/examples/2026-03-31-preview/TriggerRecoveryPointMove_Post.json:1
  • This example appears duplicated under both preview/2026-03-31-preview/examples/... and examples/2026-03-31-preview/... with the same content. If both locations are not required by tooling, consider keeping a single canonical copy to prevent drift; otherwise, ensure the duplication is generated from one source of truth.

Phase 6 - empirical fixes:

1. ResourceNameRestriction (3): VirtualResource.tsp NamePattern '' -> '.*'
   so vaultName param emits 'pattern: .*' across all api-versions.

2. PostResponseCodes (1): CrossTenantVaultMappingResource.remove now uses
   ArmResourceActionNoResponseContentAsync (202-only) instead of
   ArmResourceActionAsync with void body (which emitted 200+202).
   Example file updated to drop empty 200 response.

3. ProvisioningStateMustBeReadOnly (3): Both CrossTenantVaultMapping.provisioningState
   and VaultCredentialCertificateProperties.provisioningState now use an inline
   anonymous string-literal union instead of a named/library type, so emission
   is direct enum (no \) and 'readOnly: true' survives Spectral resolution.
   Suppresses 3 TSP-side warnings (no-unnamed-union, arm-resource-provisioning-state
   false-positive, no-closed-literal-union) with documented justifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required label Apr 28, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VirtualResource.tsp NamePattern '.*' was propagating to ALL api-versions
(stable 2025-02-01, 2025-08-01, 2026-01-01 and preview 2026-01-31-preview),
tripping openapi-diff rule 1036 ConstraintChanged on every vault path
because main has no pattern.

Reverted NamePattern to '' (the original state) so stable versions are byte-
for-byte identical to main again.

Updated 3 existing readme.md ResourceNameRestriction suppressions to point
at the actual 3 violating paths (backupCrossTenantVaultMappingStatus,
backupTriggerValidateOperation, backupValidateOperation). The previous
where-clauses targeted /backupCrossTenantVaultMappings paths which the rule
never flagged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required NotReadyForARMReview labels Apr 28, 2026
…e RNR suppression to file-scope

Phase 5 lint-fix: drive LintDiff 'must fix' new-errors to zero on PR Azure#41694.

Per CI run 25071630321 job-summary, 4 net-new errors at HEAD:
- 3x ResourceNameRestriction (vaultName) at bms.json L505/554/1676
- 1x PostResponseCodes at bms.json L1677 (removeCrossTenantVaultMapping POST)

Fix 1 - ResourceNameRestriction:
The 3 narrow path-scoped suppressions only silenced 3 of ~74 paths where
RNR fires. Top-50 trim explains why different commits surface different
3-path subsets. Replaced with one file-scoped suppression matching the
azure-rest-api-specs idiom (per automation, azurearcdata, etc.).

Fix 2 - PostResponseCodes:
ArmResourceActionNoResponseContentAsync (modern, non-deprecated) emits
202-only with location-header polling. Spectral PostResponseCodes rule
lags TypeSpec evolution and still expects legacy 202+204. Switched to
deprecated ArmResourceActionNoContentAsync template which emits the
expected 202+204+default shape. Added #suppress directives for both the
'deprecated' marker and the TSP-side arm-post-operation-response-codes
warning. Updated example to include 204 response. No breaking-change
risk - path is new in 2026-03-31-preview.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zubairabid
Copy link
Copy Markdown
Contributor Author

@markcowl @mentat9 - addressed feedback. I've restructured the TSP to avoid adding the 30-odd suppressions we were having to make earlier.

  • Split into per-resource files; collapsed all CTR ops into CrossTenantVaultMappingResource.tsp.
  • Used @armResourceOperations(#{ allowStaticRoutes: true }) on 15 interfaces per your earlier guidance. The other 3 interfaces use plain @armResourceOperations because they only emit canonical ARM-template paths (no @route overrides) — so no static-routes flag is needed there.
  • Standard ARM action templates everywhere (ArmResourceActionAsync, ArmResourceActionSync, ArmResourceActionNoContentAsync).
  • Dropped the prior round of action-op suppressions (operationId-with-hyphen, action-name-camelcase, etc.) — the restructure made them unnecessary.

New suppressions added in this round (3 total):

# Suppression Why
1 ResourceNameRestriction (file-scoped, replaces 3 narrow path-scoped ones) First tried adding @pattern on the resource name parameter to satisfy the rule. The pattern propagates to all stable API versions sharing the same model, which triggered a cross-version breaking-change error. Reverted the pattern and kept a single file-scoped suppression instead, so we don't regress stable contracts. We can revisit once we have a clean way to scope the constraint to preview only.
2 "deprecated" on removeCrossTenantVaultMapping POST Started with ArmResourceActionNoResponseContentAsync (the modern template), which emits 202-only with location-header polling. LintDiff's PostResponseCodes rule expects the legacy 202+204+default shape and failed. Switched to ArmResourceActionNoContentAsync, which emits exactly that shape — TSP flags it deprecated, so we suppress the deprecation warning here. No breaking change since the path is new in 2026-03-31-preview.
3 arm-post-operation-response-codes on the same op Same root cause as #2. Even after the template swap, Spectral re-emits the rule on the TSP side under --warn-as-error. Kept as a co-located suppression on the same operation so the rationale stays together.

@sandipsh
Copy link
Copy Markdown
Contributor

Review Summary - April 28, 2026

CI Status: ✅ All checks passing (no blocking errors)

Unresolved Feedback from Previous Reviews

@markcowl raised an important architectural concern across multiple comments (starting April 8): The PR currently uses custom x-ms-examples files and manual operation decorators rather than ARM standard operation templates.

Key feedback points not yet addressed:

  • Operations should use standard templates like ArmResourceActionSync<> instead of custom implementations
  • Should leverage @armResourceOperations() and @clientName decorators for operation/interface naming
  • x-ms-examples should be auto-picked-up from operationId, not manually specified
  • Multiple comments state: "This should be able to use standard operation templates" and "Remodel using templates"

Question for author: Recent commits today (April 28) addressed linting errors. Can you clarify:

  1. Will you refactor to use standard ARM templates as suggested?
  2. Or is there a specific reason custom implementations are necessary? If so, what's the constraint?

Why this matters: Using standard patterns ensures SDK clients understand operations correctly.

Recent Progress ✅

  • Fixed LintDiff errors
  • Refactored provisioning state unions
  • Fixed ResourceNameRestriction violations

Next step: Please respond with your plan to address the standard template feedback.

@sandipsh sandipsh added ARMChangesRequested and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Apr 28, 2026
@sandipsh
Copy link
Copy Markdown
Contributor

Follow-up cleanup done on review threads:

  • I compared thread iteration state and resolved stale threads that were either outdated or explicitly marked as resolved.
  • 23 stale threads were closed.
  • 7 threads remain open because they are still on current code (not outdated).

Remaining active threads (need author response/fix):

  1. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  2. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  3. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  4. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  5. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  6. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)
  7. Add Cross-Tenant Restore (CTR) feature - API version 2026-03-31-preview #41694 (comment)

Could you please confirm whether these 7 are intended to be addressed in this PR? If not, please share rationale, because leaving them open blocks clear reviewer sign-off and increases follow-up churn in tools like CodeFlow.

*/
@added(Versions.v2026_03_31_preview)
@parentResource(VaultResource)
model CrossTenantVaultMappingResource
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rename this CrossTenantVaultMapping and the KeyName will not be necessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Resource = CrossTenantVaultMappingResource,
KeyName = "crossTenantVaultMappingName",
SegmentName = "backupCrossTenantVaultMappings",
NamePattern = ".*"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The requirement is about providing actual restrictions on the resource name (length, character set, any restrictions on furst character, etc.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the correct kind of restriction

// CRUD operations on CrossTenantVaultMappingResource
// ============================================================

#suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "CTR resource uses remove action instead of standard DELETE"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will likely require ARM review

/**
* Lists the protected items from the source vault in a different tenant.
*/
@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupCrossTenantVaultMappings/{crossTenantVaultMappingName}/backupProtectedItems")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like the main issue is that you have the same resource being accessed through different paths. Here you should use LegacyOperations, as shown in this sample: https://github.com/Azure/typespec-azure/blob/main/packages/samples/specs/resource-manager/legacy/legacy-operations/main.tsp

This will allow you to reuse parameter sets more easily, you will be able to use operation templates, and there will be no reason to use static routes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Made this change. It exposes one bug in the .NET SDK emitter, details provided in #41694 (comment).

…apping; split properties type

Mark's review feedback: rename the resource model so the explicit KeyName decorator is no longer needed (default derivation produces 'crossTenantVaultMappingName' from the model name). Resolves the name collision by also renaming the previous properties type:

- model CrossTenantVaultMapping (properties)         -> CrossTenantVaultMappingProperties
- model CrossTenantVaultMappingResource (resource)   -> CrossTenantVaultMapping
- KeyName = `crossTenantVaultMappingName` line removed (auto-derived).

Resource is @added(v2026_03_31_preview) - preview-only with no published prior, so this is a schema-name-only rename in unreleased swagger. No URL / verb / operationId / wire-JSON / api-version changes. BMS DTOs are independently named in BMS source and unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
zubairabid and others added 10 commits April 29, 2026 10:19
…RNR suppression rationale

Mark's review feedback: replace `NamePattern = `.*`` on the CrossTenantVaultMapping resource model with the actual ARM rule:

  ^[A-Za-z][A-Za-z0-9]{1,99}$  (2-100 chars, alphanumeric, no leading digit)

This flows through to the 4 model-derived crossTenantVaultMappingName path parameters in bms.json. The file-scoped ResourceNameRestriction suppression remains in readme.md because (a) vaultName is shared with stable api-versions and adding a pattern there would breaking-change-propagate, and (b) inline `@pattern(`.*`)` declarations on the static-routes pass-through interfaces will be removed in the planned LegacyOperations refactor (Phase 7c). Suppression reason text rewritten to make this scope explicit.

Also fixes a stale `CrossTenantVaultMappingResource` reference in the readme.md NestedResourcesMustHaveListOperation suppression (renamed in Phase 7a).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nantVault

Replace allowStaticRoutes-based interface with LegacyOperations alias.
- Pack vault+mapping path params into ParentParameters arg 1
- Use ProtectedItemResource as ResourceTypeParameter for child segment
- Preserve operationId 'BackupProtectedItemsFromCrossTenantVault_List' via
  ResourceName template arg
- Add inline @pattern on crossTenantVaultMappingName to keep 7b validation

Validated: 101/101 operationId triples preserved, zero functional diff.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…yPoints

Confirms LegacyOperations pattern works for arbitrary depth (5 levels:
vault -> mapping -> fabric -> container -> protectedItem -> recoveryPoints).
Validated: 101/101 operationId triples preserved, zero functional diff.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… to LegacyOperations

Addresses markcowl review feedback on PR Azure#41694: replaces 14 allowStaticRoutes interfaces
in CrossTenantVaultMappingResource.tsp with thin consuming interfaces backed by
shared LegacyOperations Ops aliases.

Introduces 4 reusable parent-parameter models (CrossTenantVaultMappingParentParameters,
CrossTenantContainerParentParameters, CrossTenantProtectedItemParentParameters,
CrossTenantVaultCredentialParentParameters) so each Ops alias declares only the leaf
segment + key. Eliminates ~50 inline @path/@pattern duplications across the file.

No functional changes:
- 101 -> 101 operationIds, zero VERB+path+operationId diff vs HEAD~1
- crossTenantVaultMappingName real pattern (Phase 7b) preserved on every emitted route
- Response types preserved exactly (LRO 202, ArmAcceptedLroResponse, ArmNoContentResponse)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…LegacyOperations ActionAsync template (fixes ModelValidation REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND)
… previous fix only edited the emitted output, but TSP source is the input that gets copied during compile)
- Remove 2x lro-location-header per-line suppressions in CrossTenantVaultMappingResource.tsp (lines 513, 704). Compile clean with --warn-as-error after removal.
- Remove AllTrackedResourcesMustHaveDelete from readme.md (templated Read<> ops via LegacyOperations no longer trip the rule on cross-tenant pass-through paths).
- Update ResourceNameRestriction reason to reflect post-7c reality (drop the ''.*'' inline-pattern source (2); refactor is now done. Suppression now only covers vaultName-inherited-from-VaultResource backcompat constraint).
LintDiff blocked the removal: ProtectedItemResource''s standard path has DELETE, but the cross-tenant pass-through mirror exposes the same resource read-only. The lint rule sees the resource model (not paths) and cannot scope by route, so the suppression is required. Updated reason to clarify the cross-tenant context. Other Phase 7d removals (2 lro-location-header per-line in TSP, ResourceNameRestriction reason rewrite) remain in place — LintDiff confirmed they introduced no new violations.
Locally reproduced .NET SDK Validation crash: ArmProviderSchema.Deserialize threw KeyNotFoundException because the CTR mapping canonical path was referenced as parentResourceId by 5 cross-tenant child resources but was itself absent from the @armProviderSchema resource list. Inspection of tspCodeModel.json showed the mgmt emitter only registers a resource when it has a Read operation; CTR mapping had only createOrUpdate + list + remove (no GET-by-name).

Adding 'get is ArmResourceRead<CrossTenantVaultMapping>' registers the mapping as a top-level resource (27 entries in armProviderSchema, 0 missing parents). ARM convention also expects GET on a named resource. Pending service-side GET handler from BMS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The TSP-level example file had operationId 'CrossTenantVaultMapping_Get' (singular)
which did not match the swagger-emitted operationId 'CrossTenantVaultMappings_Get'
(plural). This caused the autorest example pickup to skip linking it, which in turn
caused ModelValidation to fail with XMS_EXAMPLE_NOTFOUND_ERROR on the new GET-by-name
operation added in Phase 7e.

Fixed by:
- Correcting operationId in TSP-level example
- Adding provisioningState to align with model
- Re-emitting bms.json so x-ms-examples is wired and the example file is copied
  into preview/2026-03-31-preview/examples/CrossTenantVaultMappingOperations/.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zubairabid
Copy link
Copy Markdown
Contributor Author

.NET SDK Validation failure — upstream emitter bug, isolated and characterized

The single remaining red check is .NET SDK Validation. The other four language SDKs (JS / Python / Java / Go), all Swagger validators, ARM Modeling, BreakingChange (incl. cross-version), LintDiff, ModelValidation, TypeSpec Validation and api-doc-preview are all green.

TL;DR: This is an upstream defect in @azure-typespec/http-client-csharp-mgmt@1.0.0-alpha.20260428.1, not a spec problem. It is the second of two emitter defects on this code path — the first surfaced as a KeyNotFoundException in earlier commits and was unblocked by adding get is ArmResourceRead<CrossTenantVaultMapping> to the CrossTenantVaultMappings interface; that revealed a second NullReferenceException deeper in the same pipeline. I reproduced both locally on the exact CI emitter version.

First defect (already mitigated in this PR):
The TSP @armProviderSchema decorator only registers a resource in the resources list if it declares a Read operation. The CrossTenantVaultMapping resource originally had createOrUpdate + list + remove (no GET-by-name, since there is at most one mapping per vault). It was silently dropped from the resources list while still being referenced as parentResourceId by 5 child operations, causing:

KeyNotFoundException
  at ArmProviderSchema.Deserialize (pass 2 — parent lookup)

Adding get is ArmResourceRead<CrossTenantVaultMapping> makes the resource eligible for registration and clears this crash. (This GET is also useful for ARM compliance and matches reviewer feedback elsewhere in this PR.)

Second defect (current CI failure):
With the resource registered, generation proceeds to ResourceCollectionClientProvider.BuildExistsMethods() — an auto-generated Collection.Exists() accessor that is gated on the resource having a Read op. Constructing the CSharpType for the generic argument list invokes a lambda that dereferences null inside Enumerable.All:

@typespec/http-client-csharp/general-error: Failed to generate the library. Exit code: 1.
Object reference not set to an instance of an object.
   at Microsoft.TypeSpec.Generator.Primitives.CSharpType.<>c.<.ctor>b__46_1(CSharpType t)
   at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.TypeSpec.Generator.Primitives.CSharpType..ctor(Type type, IReadOnlyList`1 arguments, Boolean isNullable)
   at Microsoft.TypeSpec.Generator.Primitives.CSharpType..ctor(Type type, CSharpType[] arguments)
   ...
   at Microsoft.TypeSpec.Generator.OutputLibrary.get_TypeProviders()

ADO build: 6227145. Stack frames are byte-identical to my local repro on the same emitter version.

The lambda at CSharpType.<>c.<.ctor>b__46_1 is iterating over the type-argument list and unconditionally accessing a member of each CSharpType t; one entry is null. This is a guard-the-input bug in the emitter, not something the spec can shape around — short of removing the Read op (which would re-trigger the first defect).

Why the other SDKs are not affected: the emitters for JS / Python / Java / Go do not share this code path; they synthesize Exists() (or its equivalent) differently or not at all on this resource shape.

Proposed path forward:

  1. File an upstream issue against the .NET emitter with the local repro recipe, full tspCodeModel.json, and the stack above (have these ready locally).
  2. Apply a .NET SDK Validation suppression on this PR while upstream patches, since the spec is otherwise correct and 4/5 languages generate cleanly.

Open to alternatives. Reverting the GET-by-name would not fix .NET — it would just regress us from the second crash to the first.

cc @markcowl

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.

10 participants