Repository navigation
Conversation
Adds the Basic VM Protection feature to the Microsoft.Compute 2026-09-01
API version:
- New singleton proxy resource `virtualMachines/{vmName}/vmProtection/default`
(VirtualMachineProtections_Get / _CreateOrUpdate) describing the protection
type configured for a virtual machine.
- New `vmProtection` property on ResiliencyProfile.
- New long-running POST action `virtualMachines/{vmName}/restore` to restore
a virtual machine's disks from a platform restore point.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thank you for your contribution nehalR12! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 7 pipeline(s). 8 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
Contributor readiness: required accessWarning Access issues can block approvals, Azure DevOps pipelines, or labeling.
Internal contributors: set up / renew access. Recheck: Non-blocking check; fix access issues to unblock affected actions. Last updated: 2026-11-02T20:41:25.729Z |
TypeSpec suppressions requiring reviewStatus: ❌ Approval required — 3 suppressions This PR adds or updates the TypeSpec suppressions listed below. Suppressions are strongly discouraged — they bypass linter rules that protect API quality and consistency. Authors should avoid adding new suppressions and prefer fixing the underlying issue; reviewers should approve only when there is a clear, compelling justification and no reasonable alternative. Review each linked rule and source location, then apply New suppressions (3)
For an overview of TypeSpec linting rules click here. 💬 Have feedback on the TypeSpec suppression flow? Let us know. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
| "properties": { | ||
| "protectionType": "Basic", | ||
| "provisioningState": "Succeeded", | ||
| "configuration": { |
There was a problem hiding this comment.
why are these nested inside configuration?
| * The platform-managed protection configuration. | ||
| */ | ||
| @visibility(Lifecycle.Read) | ||
| configuration?: VirtualMachineProtectionConfiguration; |
There was a problem hiding this comment.
this doesn't match the CRP api model, please check.
There was a problem hiding this comment.
The service returns restorePointCollectionId and backupResourceId directly under properties, not under properties.configuration
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "Consistent with established Compute RP patterns (e.g. DedicatedHost, VirtualMachine, CapacityReservation) for SDK and behavioral consistency." | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: string; |
There was a problem hiding this comment.
I think we can model the enum values to string here and not suppress
There was a problem hiding this comment.
To clarify: define the provisioning states as a union instead of a plain string, e.g. union VirtualMachineProtectionProvisioningState { string, ResourceProvisioningState, Creating: "Creating", Deleting: "Deleting" }. That removes the suppression.
| "$ref": "#/definitions/VirtualMachineProtection" | ||
| } | ||
| }, | ||
| "201": { |
There was a problem hiding this comment.
validate what we actually send in CRP response, I think its 202.
- Align the protection PUT with service behavior: 200 for synchronous updates, 202 with Azure-AsyncOperation/Location for asynchronous updates, final state via original-uri. - Flatten restorePointCollectionId/backupResourceId into read-only properties and remove VirtualMachineProtectionConfiguration. - Add an extensible provisioningState union (Creating/Updating/Deleting plus terminal states). - Update examples to match service responses and add a CreateOrUpdate None example. - Add LintDiff suppressions for the protection PUT (PutResponseCodes, ProvisioningStateSpecifiedForLROPut) and clarify the restore PostResponseCodes reason. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b
…eProtection CRP never sends Retry-After on the vmProtection PUT 202 and never sets the Canceled provisioning state, so remove both from the 2026-09-01 spec. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b
…026-09-01 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b
ARM (Control Plane) API Specification Update Pull Request
Tip
Overwhelmed by all this guidance? See the
Getting helpsection 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.
Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!
compute-2026-09-01release branch, notmain. The2026-09-01API version is still unreleased and is being assembled on that branch, so this change adds a feature to a version that has not shipped yet.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:
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.
Summary of changes
Adds the Basic VM Protection feature to
Microsoft.Compute, API version2026-09-01..../virtualMachines/{vmName}/vmProtection/defaultwithVirtualMachineProtections_GetandVirtualMachineProtections_CreateOrUpdatePOST .../virtualMachines/{vmName}/restore(VirtualMachines_Restore) to restore a VM's disks from a platform restore pointvmProtectiononResiliencyProfileVirtualMachineProtection,VirtualMachineProtectionProperties,VirtualMachineProtectionConfiguration,VirtualMachineProtectionProfile,VirtualMachineProtectionType,VirtualMachineRestoreParametersSource of truth is TypeSpec;
ComputeRP.jsonwas regenerated withtsp compile .using the toolchain versions pinned inpnpm-workspace.yamlon this branch (compiler1.16.0, Azure emitters0.72.x). Compilation completed with no diagnostics, and the only regenerated file isCompute/stable/2026-09-01/ComputeRP.json— no other API version folder is touched.The change is purely additive: 16 files changed, 841 insertions, 0 deletions. All new TypeSpec declarations are gated with
@added(Versions.v2026_09_01).Two suppressions are added in
readme.md:NestedResourcesMustHaveListOperationonVirtualMachineProtection— it is a singleton (default), so a list operation is not meaningful.PostResponseCodeson the/restorepath — the action is a long-running operation returning202.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 ApiViewcomment 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
Purpose of this PRandDue diligence checklist.write accessper aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositoriesNext Steps to Mergecomment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.and https://aka.ms/ci-fix.
queuedstate, please add a comment with contents/azp run.This should result in a new comment denoting a
PR validation pipelinehas started and the checks should be updated after few minutes.