From b8e0778d7d95c467c4009ed346fce1cd1ed7a699 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Wed, 14 Oct 2026 18:56:54 +0530 Subject: [PATCH 1/7] [Compute] Add VM protection resource and VM disk restore action 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> --- .../Compute/Compute/VirtualMachine.tsp | 14 + .../Compute/VirtualMachineProtection.tsp | 67 ++++ ...achineProtection_CreateOrUpdate_Basic.json | 46 +++ ...tualMachineProtection_Get_AzureBackup.json | 27 ++ .../VirtualMachineProtection_Get_Basic.json | 26 ++ .../VirtualMachineProtection_Get_None.json | 23 ++ .../VirtualMachine_Restore.json | 21 ++ .../Compute/Compute/main.tsp | 1 + .../Compute/Compute/models.tsp | 117 ++++++ .../Microsoft.Compute/Compute/readme.md | 9 + .../Compute/stable/2026-09-01/ComputeRP.json | 347 ++++++++++++++++++ ...achineProtection_CreateOrUpdate_Basic.json | 46 +++ ...tualMachineProtection_Get_AzureBackup.json | 27 ++ .../VirtualMachineProtection_Get_Basic.json | 26 ++ .../VirtualMachineProtection_Get_None.json | 23 ++ .../VirtualMachine_Restore.json | 21 ++ 16 files changed, 841 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_None.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_None.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp index 22843d879c6f..72a64507d44f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp @@ -347,6 +347,16 @@ interface VirtualMachines { OptionalRequestBody = true >; + /** + * Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine. + */ + @added(Versions.v2026_09_01) + restore is ComputeResourceActionNoResponseContentAsync< + VirtualMachine, + VirtualMachineRestoreParameters, + Error = CloudError + >; + /** * The operation to restart a virtual machine. */ @@ -459,6 +469,10 @@ interface VirtualMachines { VirtualMachines.reimage::parameters.body, "Parameters supplied to the Reimage Virtual Machine operation." ); +@@doc( + VirtualMachines.restore::parameters.body, + "Parameters supplied to restore the virtual machine disks from a restore point." +); @@doc( VirtualMachines.runCommand::parameters.body, "Parameters supplied to the Run command operation." diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp new file mode 100644 index 000000000000..30520b413bff --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp @@ -0,0 +1,67 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "./models.tsp"; +import "./VirtualMachine.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; +using Common; +using TypeSpec.Versioning; + +namespace Compute; + +/** + * Describes the protection configuration of a virtual machine. + */ +@added(Versions.v2026_09_01) +@singleton("default") +@parentResource(VirtualMachine) +model VirtualMachineProtection + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = VirtualMachineProtection, + KeyName = "vmProtectionName", + SegmentName = "vmProtection", + NamePattern = "" + >; +} + +/** + * Operations for managing the protection configuration of a virtual machine. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "The singleton protection resource is always addressable. Protection is disabled by updating protectionType to None rather than deleting the resource." +@added(Versions.v2026_09_01) +@armResourceOperations(#{ omitTags: true }) +@tag("VirtualMachineProtections") +interface VirtualMachineProtections { + /** + * Gets the protection configuration of a virtual machine. + */ + @added(Versions.v2026_09_01) + get is ComputeResourceRead; + + /** + * Creates or updates the protection configuration of a virtual machine. + */ + @added(Versions.v2026_09_01) + createOrUpdate is ComputeResourceCreateOrReplaceAsync< + VirtualMachineProtection, + LroHeaders = ArmLroLocationHeader & + Azure.Core.Foundations.RetryAfterHeader + >; +} + +@@doc(VirtualMachineProtection.name, "The singleton resource name."); +@@doc( + VirtualMachineProtection.properties, + "The properties of the virtual machine protection configuration." +); +@@doc( + VirtualMachineProtections.createOrUpdate::parameters.resource, + "Parameters supplied to create or update the virtual machine protection configuration." +); diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json new file mode 100644 index 000000000000..6189c2c9b894 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -0,0 +1,46 @@ +{ + "title": "Enable Basic VM Protection", + "operationId": "VirtualMachineProtections_CreateOrUpdate", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "resource": { + "properties": { + "protectionType": "Basic" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + } + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Retry-After": 10 + }, + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json new file mode 100644 index 000000000000..d2f7c035272e --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json @@ -0,0 +1,27 @@ +{ + "title": "Get Azure Backup VM Protection", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "AzureBackup", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", + "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json new file mode 100644 index 000000000000..27a7342872d0 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json @@ -0,0 +1,26 @@ +{ + "title": "Get Basic VM Protection", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_None.json new file mode 100644 index 000000000000..011a1ff5cbc6 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_None.json @@ -0,0 +1,23 @@ +{ + "title": "Get VM Protection when protection is not enabled", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "None", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json new file mode 100644 index 000000000000..cc44e44239e2 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json @@ -0,0 +1,21 @@ +{ + "title": "Restore all disks of a virtual machine", + "operationId": "VirtualMachines_Restore", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "body": { + "restorePointId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1/restorePoints/daily-restore-point" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Retry-After": 10 + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/main.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/main.tsp index 980a60058aa8..8b244bd68fd9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/main.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/main.tsp @@ -18,6 +18,7 @@ import "./VirtualMachineScaleSetLifecycleHookEvent.tsp"; import "./VirtualMachineScaleSetVM.tsp"; import "./VirtualMachineScaleSetVMExtension.tsp"; import "./VirtualMachine.tsp"; +import "./VirtualMachineProtection.tsp"; import "./VirtualMachineExtension.tsp"; import "./VirtualMachineExtensionImage.tsp"; import "./AvailabilitySet.tsp"; diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp index 6bc032e1681b..c399e0777dc1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp @@ -5677,6 +5677,101 @@ model ZoneMovement { isEnabled?: boolean; } +/** + * Specifies the protection type configured for a virtual machine. + */ +@added(Versions.v2026_09_01) +union VirtualMachineProtectionType { + string, + + /** + * The virtual machine is not protected. + */ + None: "None", + + /** + * The virtual machine uses Basic VM Protection. The platform creates periodic restore points for the virtual machine. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. + */ + Basic: "Basic", + + /** + * The virtual machine is protected by Azure Backup. + */ + AzureBackup: "AzureBackup", +} + +/** + * Specifies platform-managed protection configuration for a virtual machine. + */ +@added(Versions.v2026_09_01) +model VirtualMachineProtectionConfiguration { + /** + * The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. + */ + @visibility(Lifecycle.Read) + restorePointCollectionId?: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.Compute/restorePointCollections"; + } + ]>; + + /** + * The resource ID of the Azure Backup protected item associated with the virtual machine. + */ + @visibility(Lifecycle.Read) + backupResourceId?: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems"; + } + ]>; +} + +/** + * Specifies the properties of a virtual machine protection resource. + */ +@added(Versions.v2026_09_01) +model VirtualMachineProtectionProperties { + /** + * The protection type. Customers can set this property to None or Basic. AzureBackup is set only by the Azure Backup service. + */ + protectionType: VirtualMachineProtectionType; + + /** + * The provisioning state, which only appears in the response. + */ + #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; + + /** + * The platform-managed protection configuration. + */ + @visibility(Lifecycle.Read) + configuration?: VirtualMachineProtectionConfiguration; +} + +/** + * Specifies the protection information projected in the virtual machine response. + */ +@added(Versions.v2026_09_01) +model VirtualMachineProtectionProfile { + /** + * The protection type configured for the virtual machine. + */ + @visibility(Lifecycle.Read) + protectionType?: VirtualMachineProtectionType; + + /** + * The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. + */ + @visibility(Lifecycle.Read) + restorePointCollectionId?: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.Compute/restorePointCollections"; + } + ]>; +} + /** * Gets resiliency solutions enabled on the VM. This includes backup or disaster recovery solutions. */ @@ -5686,6 +5781,28 @@ model ResiliencyProfile { * Zone movement configuration. */ zoneMovement?: ZoneMovement; + + /** + * The read-only protection information for the virtual machine. + */ + @added(Versions.v2026_09_01) + @visibility(Lifecycle.Read) + vmProtection?: VirtualMachineProtectionProfile; +} + +/** + * Specifies the restore point used to restore a virtual machine. + */ +@added(Versions.v2026_09_01) +model VirtualMachineRestoreParameters { + /** + * The resource ID of the restore point whose disks are used to restore the virtual machine. + */ + restorePointId: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.Compute/restorePointCollections/restorePoints"; + } + ]>; } /** diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index 79dd291f8820..94f83aac1931 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -212,6 +212,11 @@ directive: suppress: - NestedResourcesMustHaveListOperation reason: CRP supports the list /restorePoint operation by allowing customers to call Get RestorePointCollection with $expand=RestorePoints + - where: + - $.definitions.VirtualMachineProtection + suppress: + - NestedResourcesMustHaveListOperation + reason: VirtualMachineProtection is a singleton child resource of a virtual machine, addressable only as vmProtection/default, so a list operation is not applicable. - where: - $.definitions.SubResourceWithColocationStatus.properties suppress: @@ -849,6 +854,10 @@ suppressions: reason: Existing POST response codes maintained for backward compatibility. from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart"].post + - code: PostResponseCodes + reason: The restore action is a long-running POST that returns no content, matching the 202 and default response shape used by all other Microsoft.Compute virtual machine action operations. + from: ComputeRP.json + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restore"].post - code: PostResponseCodes reason: Existing POST response codes maintained for backward compatibility. from: ComputeRP.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index dc20d96f0ed5..ee4d5430f6d2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -63,6 +63,9 @@ { "name": "VirtualMachines" }, + { + "name": "VirtualMachineProtections" + }, { "name": "VirtualMachineExtensions" }, @@ -13177,6 +13180,73 @@ "x-ms-long-running-operation": true } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restore": { + "post": { + "operationId": "VirtualMachines_Restore", + "tags": [ + "VirtualMachines" + ], + "description": "Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "vmName", + "in": "path", + "description": "The name of the virtual machine.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Parameters supplied to restore the virtual machine disks from a restore point.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualMachineRestoreParameters" + } + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Restore all disks of a virtual machine": { + "$ref": "./examples/virtualMachineExamples/VirtualMachine_Restore.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData": { "post": { "operationId": "VirtualMachines_RetrieveBootDiagnosticsData", @@ -13755,6 +13825,133 @@ "x-ms-long-running-operation": true } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmProtection/default": { + "get": { + "operationId": "VirtualMachineProtections_Get", + "tags": [ + "VirtualMachineProtections" + ], + "description": "Gets the protection configuration of a virtual machine.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "vmName", + "in": "path", + "description": "The name of the virtual machine.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/VirtualMachineProtection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get Azure Backup VM Protection": { + "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json" + }, + "Get Basic VM Protection": { + "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json" + }, + "Get VM Protection when protection is not enabled": { + "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_Get_None.json" + } + } + }, + "put": { + "operationId": "VirtualMachineProtections_CreateOrUpdate", + "tags": [ + "VirtualMachineProtections" + ], + "description": "Creates or updates the protection configuration of a virtual machine.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "vmName", + "in": "path", + "description": "The name of the virtual machine.", + "required": true, + "type": "string" + }, + { + "name": "resource", + "in": "body", + "description": "Parameters supplied to create or update the virtual machine protection configuration.", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualMachineProtection" + } + } + ], + "responses": { + "200": { + "description": "Resource 'VirtualMachineProtection' update operation succeeded", + "schema": { + "$ref": "#/definitions/VirtualMachineProtection" + } + }, + "201": { + "description": "Resource 'VirtualMachineProtection' create operation succeeded", + "schema": { + "$ref": "#/definitions/VirtualMachineProtection" + }, + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/v1/common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Enable Basic VM Protection": { + "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location", + "final-state-schema": "#/definitions/VirtualMachineProtection" + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes": { "get": { "operationId": "VirtualMachines_ListAvailableSizes", @@ -18822,6 +19019,11 @@ "zoneMovement": { "$ref": "#/definitions/ZoneMovement", "description": "Zone movement configuration." + }, + "vmProtection": { + "$ref": "#/definitions/VirtualMachineProtectionProfile", + "description": "The read-only protection information for the virtual machine.", + "readOnly": true } } }, @@ -22531,6 +22733,130 @@ } } }, + "VirtualMachineProtection": { + "type": "object", + "description": "Describes the protection configuration of a virtual machine.", + "properties": { + "properties": { + "$ref": "#/definitions/VirtualMachineProtectionProperties", + "description": "The properties of the virtual machine protection configuration." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "VirtualMachineProtectionConfiguration": { + "type": "object", + "description": "Specifies platform-managed protection configuration for a virtual machine.", + "properties": { + "restorePointCollectionId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Compute/restorePointCollections" + } + ] + } + }, + "backupResourceId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the Azure Backup protected item associated with the virtual machine.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems" + } + ] + } + } + } + }, + "VirtualMachineProtectionProfile": { + "type": "object", + "description": "Specifies the protection information projected in the virtual machine response.", + "properties": { + "protectionType": { + "$ref": "#/definitions/VirtualMachineProtectionType", + "description": "The protection type configured for the virtual machine.", + "readOnly": true + }, + "restorePointCollectionId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Compute/restorePointCollections" + } + ] + } + } + } + }, + "VirtualMachineProtectionProperties": { + "type": "object", + "description": "Specifies the properties of a virtual machine protection resource.", + "properties": { + "protectionType": { + "$ref": "#/definitions/VirtualMachineProtectionType", + "description": "The protection type. Customers can set this property to None or Basic. AzureBackup is set only by the Azure Backup service." + }, + "provisioningState": { + "type": "string", + "description": "The provisioning state, which only appears in the response.", + "readOnly": true + }, + "configuration": { + "$ref": "#/definitions/VirtualMachineProtectionConfiguration", + "description": "The platform-managed protection configuration.", + "readOnly": true + } + }, + "required": [ + "protectionType" + ] + }, + "VirtualMachineProtectionType": { + "type": "string", + "description": "Specifies the protection type configured for a virtual machine.", + "enum": [ + "None", + "Basic", + "AzureBackup" + ], + "x-ms-enum": { + "name": "VirtualMachineProtectionType", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "The virtual machine is not protected." + }, + { + "name": "Basic", + "value": "Basic", + "description": "The virtual machine uses Basic VM Protection. The platform creates periodic restore points for the virtual machine. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details." + }, + { + "name": "AzureBackup", + "value": "AzureBackup", + "description": "The virtual machine is protected by Azure Backup." + } + ] + } + }, "VirtualMachinePublicIPAddressConfiguration": { "type": "object", "description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration", @@ -22634,6 +22960,27 @@ } } }, + "VirtualMachineRestoreParameters": { + "type": "object", + "description": "Specifies the restore point used to restore a virtual machine.", + "properties": { + "restorePointId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the restore point whose disks are used to restore the virtual machine.", + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Compute/restorePointCollections/restorePoints" + } + ] + } + } + }, + "required": [ + "restorePointId" + ] + }, "VirtualMachineRunCommand": { "type": "object", "description": "Describes a Virtual Machine run command.", diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json new file mode 100644 index 000000000000..6189c2c9b894 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -0,0 +1,46 @@ +{ + "title": "Enable Basic VM Protection", + "operationId": "VirtualMachineProtections_CreateOrUpdate", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "resource": { + "properties": { + "protectionType": "Basic" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + } + } + } + }, + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Retry-After": 10 + }, + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Creating" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json new file mode 100644 index 000000000000..d2f7c035272e --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json @@ -0,0 +1,27 @@ +{ + "title": "Get Azure Backup VM Protection", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "AzureBackup", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", + "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json new file mode 100644 index 000000000000..27a7342872d0 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json @@ -0,0 +1,26 @@ +{ + "title": "Get Basic VM Protection", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "Basic", + "provisioningState": "Succeeded", + "configuration": { + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_None.json new file mode 100644 index 000000000000..011a1ff5cbc6 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_None.json @@ -0,0 +1,23 @@ +{ + "title": "Get VM Protection when protection is not enabled", + "operationId": "VirtualMachineProtections_Get", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "name": "default", + "type": "Microsoft.Compute/virtualMachines/vmProtection", + "properties": { + "protectionType": "None", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json new file mode 100644 index 000000000000..cc44e44239e2 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json @@ -0,0 +1,21 @@ +{ + "title": "Restore all disks of a virtual machine", + "operationId": "VirtualMachines_Restore", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "body": { + "restorePointId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1/restorePoints/daily-restore-point" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Retry-After": 10 + } + } + } +} From c36b8f4e46efe7885001536933ceb2298149b376 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Thu, 29 Oct 2026 11:54:48 +0530 Subject: [PATCH 2/7] Address review feedback for VirtualMachineProtection (2026-09-01) - 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 --- .../Compute/VirtualMachineProtection.tsp | 10 +- ...achineProtection_CreateOrUpdate_Basic.json | 26 +--- ...MachineProtection_CreateOrUpdate_None.json | 35 ++++++ ...tualMachineProtection_Get_AzureBackup.json | 6 +- .../VirtualMachineProtection_Get_Basic.json | 4 +- .../VirtualMachine_Restore.json | 3 +- .../Compute/Compute/models.tsp | 54 ++++---- .../Microsoft.Compute/Compute/readme.md | 10 +- .../Compute/stable/2026-09-01/ComputeRP.json | 119 ++++++++++++------ ...achineProtection_CreateOrUpdate_Basic.json | 26 +--- ...MachineProtection_CreateOrUpdate_None.json | 35 ++++++ ...tualMachineProtection_Get_AzureBackup.json | 6 +- .../VirtualMachineProtection_Get_Basic.json | 4 +- .../VirtualMachine_Restore.json | 3 +- 14 files changed, 213 insertions(+), 128 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp index 30520b413bff..71272b8fca6b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp @@ -48,11 +48,17 @@ interface VirtualMachineProtections { /** * Creates or updates the protection configuration of a virtual machine. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "CRP returns 200 for synchronous updates and 202 for asynchronous updates to the always-addressable protection singleton." @added(Versions.v2026_09_01) + @Azure.Core.useFinalStateVia("original-uri") createOrUpdate is ComputeResourceCreateOrReplaceAsync< VirtualMachineProtection, - LroHeaders = ArmLroLocationHeader & - Azure.Core.Foundations.RetryAfterHeader + Response = + | ArmResourceUpdatedResponse + | (ArmAcceptedLroResponse & + Azure.Core.Foundations.RetryAfterHeader> & { + @bodyRoot _: VirtualMachineProtection; + }) >; } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index 6189c2c9b894..c4dc850a549f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -13,32 +13,14 @@ } }, "responses": { - "200": { - "body": { - "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", - "name": "default", - "type": "Microsoft.Compute/virtualMachines/vmProtection", - "properties": { - "protectionType": "Basic", - "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" - } - } - } - }, - "201": { + "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", - "Retry-After": 10 + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { - "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", - "name": "default", - "type": "Microsoft.Compute/virtualMachines/vmProtection", "properties": { - "protectionType": "Basic", - "provisioningState": "Creating" + "protectionType": "Basic" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json new file mode 100644 index 000000000000..ac1a4a8b412d --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json @@ -0,0 +1,35 @@ +{ + "title": "Disable VM Protection", + "operationId": "VirtualMachineProtections_CreateOrUpdate", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "resource": { + "properties": { + "protectionType": "None" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "protectionType": "None" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" + }, + "body": { + "properties": { + "protectionType": "None" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json index d2f7c035272e..7af68b0020fa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json @@ -16,10 +16,8 @@ "properties": { "protectionType": "AzureBackup", "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", - "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" - } + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", + "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json index 27a7342872d0..0a2f1a91fb35 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json @@ -16,9 +16,7 @@ "properties": { "protectionType": "Basic", "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" - } + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json index cc44e44239e2..0ef0dfc596e5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachine_Restore.json @@ -13,8 +13,7 @@ "responses": { "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", - "Retry-After": 10 + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp index c399e0777dc1..9163ed06e25d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp @@ -5701,29 +5701,22 @@ union VirtualMachineProtectionType { } /** - * Specifies platform-managed protection configuration for a virtual machine. + * The provisioning state of a virtual machine protection resource. */ +// Instantiate the union to inline its schema so readOnly is not ignored beside a $ref. @added(Versions.v2026_09_01) -model VirtualMachineProtectionConfiguration { - /** - * The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. - */ - @visibility(Lifecycle.Read) - restorePointCollectionId?: Azure.Core.armResourceIdentifier<[ - { - type: "Microsoft.Compute/restorePointCollections"; - } - ]>; +union VirtualMachineProtectionProvisioningState { + string, + TerminalStates, - /** - * The resource ID of the Azure Backup protected item associated with the virtual machine. - */ - @visibility(Lifecycle.Read) - backupResourceId?: Azure.Core.armResourceIdentifier<[ - { - type: "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems"; - } - ]>; + /** The protection configuration is being created. */ + Creating: "Creating", + + /** The protection configuration is being updated. */ + Updating: "Updating", + + /** The virtual machine is being deleted. */ + Deleting: "Deleting", } /** @@ -5739,15 +5732,28 @@ model VirtualMachineProtectionProperties { /** * The provisioning state, which only appears in the response. */ - #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; + provisioningState?: VirtualMachineProtectionProvisioningState; /** - * The platform-managed protection configuration. + * The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. */ @visibility(Lifecycle.Read) - configuration?: VirtualMachineProtectionConfiguration; + restorePointCollectionId?: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.Compute/restorePointCollections"; + } + ]>; + + /** + * The resource ID of the Azure Backup protected item associated with the virtual machine. + */ + @visibility(Lifecycle.Read) + backupResourceId?: Azure.Core.armResourceIdentifier<[ + { + type: "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems"; + } + ]>; } /** diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index 94f83aac1931..e6af26a950b8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -697,6 +697,10 @@ suppressions: reason: Existing PUT response codes maintained for backward compatibility. from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}"].put + - code: PutResponseCodes + reason: VirtualMachineProtection is a singleton that always exists on the virtual machine, so the service never returns 201. It returns 200 for synchronous updates and 202 for asynchronous updates, the same response shape as VirtualMachineScaleSetVMs_Update. + from: ComputeRP.json + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmProtection/default"].put - code: PostResponseCodes reason: Existing POST response codes maintained for backward compatibility. @@ -855,7 +859,7 @@ suppressions: from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart"].post - code: PostResponseCodes - reason: The restore action is a long-running POST that returns no content, matching the 202 and default response shape used by all other Microsoft.Compute virtual machine action operations. + reason: Restore is a long-running POST with no response body. The service returns 202 with a Location header and the operation completes with an empty 200, so neither the 200-with-schema nor the 204 final response applies. This is the same response shape as migrateToVirtualMachineScaleSet. from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restore"].post - code: PostResponseCodes @@ -873,6 +877,10 @@ suppressions: reason: Existing LRO PUT operation maintained for backward compatibility. from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}"].put + - code: ProvisioningStateSpecifiedForLROPut + reason: The service never returns 201 for the VirtualMachineProtection singleton, so there is no 201 response schema. The 200 response schema includes provisioningState, the same as VirtualMachineScaleSetVMs_Update. + from: ComputeRP.json + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmProtection/default"].put - code: RequestSchemaForTrackedResourcesMustHaveTags reason: Existing tracked resource request schema for backward compatibility. from: ComputeRP.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index ee4d5430f6d2..010b99d5a679 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -13916,12 +13916,17 @@ "$ref": "#/definitions/VirtualMachineProtection" } }, - "201": { - "description": "Resource 'VirtualMachineProtection' create operation succeeded", + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/VirtualMachineProtection" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "format": "uri", + "description": "A link to the status monitor" + }, "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." @@ -13941,12 +13946,15 @@ } }, "x-ms-examples": { + "Disable VM Protection": { + "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json" + }, "Enable Basic VM Protection": { "$ref": "./examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json" } }, "x-ms-long-running-operation-options": { - "final-state-via": "location", + "final-state-via": "original-uri", "final-state-schema": "#/definitions/VirtualMachineProtection" }, "x-ms-long-running-operation": true @@ -22748,38 +22756,6 @@ } ] }, - "VirtualMachineProtectionConfiguration": { - "type": "object", - "description": "Specifies platform-managed protection configuration for a virtual machine.", - "properties": { - "restorePointCollectionId": { - "type": "string", - "format": "arm-id", - "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", - "readOnly": true, - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.Compute/restorePointCollections" - } - ] - } - }, - "backupResourceId": { - "type": "string", - "format": "arm-id", - "description": "The resource ID of the Azure Backup protected item associated with the virtual machine.", - "readOnly": true, - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems" - } - ] - } - } - } - }, "VirtualMachineProtectionProfile": { "type": "object", "description": "Specifies the protection information projected in the virtual machine response.", @@ -22815,12 +22791,77 @@ "provisioningState": { "type": "string", "description": "The provisioning state, which only appears in the response.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Updating", + "Deleting" + ], + "x-ms-enum": { + "name": "VirtualMachineProtectionProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Creating", + "value": "Creating", + "description": "The protection configuration is being created." + }, + { + "name": "Updating", + "value": "Updating", + "description": "The protection configuration is being updated." + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The virtual machine is being deleted." + } + ] + }, "readOnly": true }, - "configuration": { - "$ref": "#/definitions/VirtualMachineProtectionConfiguration", - "description": "The platform-managed protection configuration.", - "readOnly": true + "restorePointCollectionId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Compute/restorePointCollections" + } + ] + } + }, + "backupResourceId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the Azure Backup protected item associated with the virtual machine.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems" + } + ] + } } }, "required": [ diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index 6189c2c9b894..c4dc850a549f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -13,32 +13,14 @@ } }, "responses": { - "200": { - "body": { - "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", - "name": "default", - "type": "Microsoft.Compute/virtualMachines/vmProtection", - "properties": { - "protectionType": "Basic", - "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" - } - } - } - }, - "201": { + "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", - "Retry-After": 10 + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { - "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", - "name": "default", - "type": "Microsoft.Compute/virtualMachines/vmProtection", "properties": { - "protectionType": "Basic", - "provisioningState": "Creating" + "protectionType": "Basic" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json new file mode 100644 index 000000000000..ac1a4a8b412d --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json @@ -0,0 +1,35 @@ +{ + "title": "Disable VM Protection", + "operationId": "VirtualMachineProtections_CreateOrUpdate", + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2026-09-01", + "resource": { + "properties": { + "protectionType": "None" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "protectionType": "None" + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" + }, + "body": { + "properties": { + "protectionType": "None" + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json index d2f7c035272e..7af68b0020fa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_AzureBackup.json @@ -16,10 +16,8 @@ "properties": { "protectionType": "AzureBackup", "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", - "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" - } + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", + "backupResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.RecoveryServices/vaults/myRecoveryServicesVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;myResourceGroup;myVM/protectedItems/VM;iaasvmcontainerv2;myResourceGroup;myVM" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json index 27a7342872d0..0a2f1a91fb35 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_Get_Basic.json @@ -16,9 +16,7 @@ "properties": { "protectionType": "Basic", "provisioningState": "Succeeded", - "configuration": { - "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" - } + "restorePointCollectionId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/AzureManagedRPC-myVM-0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json index cc44e44239e2..0ef0dfc596e5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachine_Restore.json @@ -13,8 +13,7 @@ "responses": { "202": { "headers": { - "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", - "Retry-After": 10 + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" } } } From f120456dc1b97e6ec0e504a9b39b1f5ec16d95a5 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Thu, 29 Oct 2026 23:56:39 +0530 Subject: [PATCH 3/7] Remove Retry-After and Canceled not returned by CRP for VirtualMachineProtection 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 --- .../Compute/Compute/VirtualMachineProtection.tsp | 3 +-- .../Microsoft.Compute/Compute/Compute/models.tsp | 14 ++++++++++---- .../Microsoft.Compute/Compute/readme.md | 4 ++++ .../Compute/stable/2026-09-01/ComputeRP.json | 11 ----------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp index 71272b8fca6b..5787b143d708 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp @@ -55,8 +55,7 @@ interface VirtualMachineProtections { VirtualMachineProtection, Response = | ArmResourceUpdatedResponse - | (ArmAcceptedLroResponse & - Azure.Core.Foundations.RetryAfterHeader> & { + | (ArmAcceptedLroResponse> & { @bodyRoot _: VirtualMachineProtection; }) >; diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp index 9163ed06e25d..b3693a1c60fa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp @@ -5704,10 +5704,16 @@ union VirtualMachineProtectionType { * The provisioning state of a virtual machine protection resource. */ // Instantiate the union to inline its schema so readOnly is not ignored beside a $ref. +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "CRP never returns Canceled for the VirtualMachineProtection singleton, so only the states the service returns are listed." @added(Versions.v2026_09_01) -union VirtualMachineProtectionProvisioningState { - string, - TerminalStates, +union VirtualMachineProtectionProvisioningState { + Extensible, + + /** Resource has been created. */ + Succeeded: "Succeeded", + + /** Resource creation failed. */ + Failed: "Failed", /** The protection configuration is being created. */ Creating: "Creating", @@ -5733,7 +5739,7 @@ model VirtualMachineProtectionProperties { * The provisioning state, which only appears in the response. */ @visibility(Lifecycle.Read) - provisioningState?: VirtualMachineProtectionProvisioningState; + provisioningState?: VirtualMachineProtectionProvisioningState; /** * The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details. diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md index e6af26a950b8..a676795d2881 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/readme.md @@ -881,6 +881,10 @@ suppressions: reason: The service never returns 201 for the VirtualMachineProtection singleton, so there is no 201 response schema. The 200 response schema includes provisioningState, the same as VirtualMachineScaleSetVMs_Update. from: ComputeRP.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmProtection/default"].put + - code: ProvisioningStateValidation + reason: The service never returns Canceled for the VirtualMachineProtection singleton, so the enum lists only the provisioning states the service returns. + from: ComputeRP.json + where: $.definitions.VirtualMachineProtectionProperties.properties.provisioningState - code: RequestSchemaForTrackedResourcesMustHaveTags reason: Existing tracked resource request schema for backward compatibility. from: ComputeRP.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index 010b99d5a679..f436d240ada8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -13930,11 +13930,6 @@ "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." - }, - "Retry-After": { - "type": "integer", - "format": "int32", - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, @@ -22794,7 +22789,6 @@ "enum": [ "Succeeded", "Failed", - "Canceled", "Creating", "Updating", "Deleting" @@ -22813,11 +22807,6 @@ "value": "Failed", "description": "Resource creation failed." }, - { - "name": "Canceled", - "value": "Canceled", - "description": "Resource creation was canceled." - }, { "name": "Creating", "value": "Creating", From a4e3845d5e82bcb1f49a43d974daba5bfdab36c2 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Tue, 3 Nov 2026 02:09:54 +0530 Subject: [PATCH 4/7] Add id to VirtualMachineProtection CreateOrUpdate response examples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b --- .../VirtualMachineProtection_CreateOrUpdate_Basic.json | 1 + .../VirtualMachineProtection_CreateOrUpdate_None.json | 2 ++ .../VirtualMachineProtection_CreateOrUpdate_Basic.json | 1 + .../VirtualMachineProtection_CreateOrUpdate_None.json | 2 ++ 4 files changed, 6 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index c4dc850a549f..08d62622d7db 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -19,6 +19,7 @@ "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "Basic" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json index ac1a4a8b412d..8e251e9f78d4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json @@ -15,6 +15,7 @@ "responses": { "200": { "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "None" } @@ -26,6 +27,7 @@ "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "None" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index c4dc850a549f..08d62622d7db 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -19,6 +19,7 @@ "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "Basic" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json index ac1a4a8b412d..8e251e9f78d4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_None.json @@ -15,6 +15,7 @@ "responses": { "200": { "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "None" } @@ -26,6 +27,7 @@ "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01&monitor=true" }, "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", "properties": { "protectionType": "None" } From 855e9e5d54daaac144e2bf3672c204948db839fb Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Thu, 5 Nov 2026 18:10:31 +0530 Subject: [PATCH 5/7] Address vmProtection review feedback - Rename VirtualMachineProtectionProfile to VirtualMachineProtectionPropertiesMinimalSet - Add idempotent 200 response to CreateOrUpdate Basic example - Document that None to AzureBackup transition is handled only internally Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b --- .../Compute/VirtualMachineProtection.tsp | 1 + ...achineProtection_CreateOrUpdate_Basic.json | 8 +++ .../Compute/Compute/models.tsp | 4 +- .../Compute/stable/2026-09-01/ComputeRP.json | 52 +++++++++---------- ...achineProtection_CreateOrUpdate_Basic.json | 8 +++ 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp index 5787b143d708..3468ea9999c4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp @@ -47,6 +47,7 @@ interface VirtualMachineProtections { /** * Creates or updates the protection configuration of a virtual machine. + Transitioning from None to AzureBackup is handled only internally by the Azure Backup service. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "CRP returns 200 for synchronous updates and 202 for asynchronous updates to the always-addressable protection singleton." @added(Versions.v2026_09_01) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index 08d62622d7db..3cf613078363 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/examples/2026-09-01/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -13,6 +13,14 @@ } }, "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "properties": { + "protectionType": "Basic" + } + } + }, "202": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp index edb77dd23361..7c63794d3907 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp @@ -5794,7 +5794,7 @@ model VirtualMachineProtectionProperties { * Specifies the protection information projected in the virtual machine response. */ @added(Versions.v2026_09_01) -model VirtualMachineProtectionProfile { +model VirtualMachineProtectionPropertiesMinimalSet { /** * The protection type configured for the virtual machine. */ @@ -5827,7 +5827,7 @@ model ResiliencyProfile { */ @added(Versions.v2026_09_01) @visibility(Lifecycle.Read) - vmProtection?: VirtualMachineProtectionProfile; + vmProtection?: VirtualMachineProtectionPropertiesMinimalSet; } /** diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index e6b679c9083d..c38616191126 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -13890,7 +13890,7 @@ "tags": [ "VirtualMachineProtections" ], - "description": "Creates or updates the protection configuration of a virtual machine.", + "description": "Creates or updates the protection configuration of a virtual machine. Transitioning from None to AzureBackup is handled only internally by the Azure Backup service.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -19046,7 +19046,7 @@ "description": "Zone movement configuration." }, "vmProtection": { - "$ref": "#/definitions/VirtualMachineProtectionProfile", + "$ref": "#/definitions/VirtualMachineProtectionPropertiesMinimalSet", "description": "The read-only protection information for the virtual machine.", "readOnly": true } @@ -22784,30 +22784,6 @@ } ] }, - "VirtualMachineProtectionProfile": { - "type": "object", - "description": "Specifies the protection information projected in the virtual machine response.", - "properties": { - "protectionType": { - "$ref": "#/definitions/VirtualMachineProtectionType", - "description": "The protection type configured for the virtual machine.", - "readOnly": true - }, - "restorePointCollectionId": { - "type": "string", - "format": "arm-id", - "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", - "readOnly": true, - "x-ms-arm-id-details": { - "allowedResources": [ - { - "type": "Microsoft.Compute/restorePointCollections" - } - ] - } - } - } - }, "VirtualMachineProtectionProperties": { "type": "object", "description": "Specifies the properties of a virtual machine protection resource.", @@ -22890,6 +22866,30 @@ "protectionType" ] }, + "VirtualMachineProtectionPropertiesMinimalSet": { + "type": "object", + "description": "Specifies the protection information projected in the virtual machine response.", + "properties": { + "protectionType": { + "$ref": "#/definitions/VirtualMachineProtectionType", + "description": "The protection type configured for the virtual machine.", + "readOnly": true + }, + "restorePointCollectionId": { + "type": "string", + "format": "arm-id", + "description": "The resource ID of the restore point collection associated with the virtual machine. This collection holds the periodic restore points created by the platform. Please refer to https://aka.ms/BasicVMProtection/PeriodicRestorePoints for more details.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Compute/restorePointCollections" + } + ] + } + } + } + }, "VirtualMachineProtectionType": { "type": "string", "description": "Specifies the protection type configured for a virtual machine.", diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json index 08d62622d7db..3cf613078363 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/examples/virtualMachineExamples/VirtualMachineProtection_CreateOrUpdate_Basic.json @@ -13,6 +13,14 @@ } }, "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/vmProtection/default", + "properties": { + "protectionType": "Basic" + } + } + }, "202": { "headers": { "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus/operations/{operation-id}?api-version=2026-09-01", From c7a7969ff73c0cf56b9b437089a1f555b2537fb4 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Thu, 5 Nov 2026 20:34:24 +0530 Subject: [PATCH 6/7] Mark VirtualMachineProtection operations as [Preview Feature] Also fix createOrUpdate doc comment so the generated swagger matches tsp compile output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b --- .../Compute/Compute/VirtualMachineProtection.tsp | 5 ++--- .../Compute/stable/2026-09-01/ComputeRP.json | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp index 3468ea9999c4..e10d043f9d49 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachineProtection.tsp @@ -40,14 +40,13 @@ model VirtualMachineProtection @tag("VirtualMachineProtections") interface VirtualMachineProtections { /** - * Gets the protection configuration of a virtual machine. + * [Preview Feature] Gets the protection configuration of a virtual machine. */ @added(Versions.v2026_09_01) get is ComputeResourceRead; /** - * Creates or updates the protection configuration of a virtual machine. - Transitioning from None to AzureBackup is handled only internally by the Azure Backup service. + * [Preview Feature] Creates or updates the protection configuration of a virtual machine. Transitioning from None to AzureBackup is handled only internally by the Azure Backup service. */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "CRP returns 200 for synchronous updates and 202 for asynchronous updates to the always-addressable protection singleton." @added(Versions.v2026_09_01) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index c38616191126..15545d1a66d7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -13840,7 +13840,7 @@ "tags": [ "VirtualMachineProtections" ], - "description": "Gets the protection configuration of a virtual machine.", + "description": "[Preview Feature] Gets the protection configuration of a virtual machine.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -13890,7 +13890,7 @@ "tags": [ "VirtualMachineProtections" ], - "description": "Creates or updates the protection configuration of a virtual machine. Transitioning from None to AzureBackup is handled only internally by the Azure Backup service.", + "description": "[Preview Feature] Creates or updates the protection configuration of a virtual machine. Transitioning from None to AzureBackup is handled only internally by the Azure Backup service.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" From 5e531515c5ac9fc87e9208e88c2c297559ef63a6 Mon Sep 17 00:00:00 2001 From: Nehal Reshu Date: Thu, 5 Nov 2026 21:19:26 +0530 Subject: [PATCH 7/7] Mark VM restore and vmProtection property as [Preview Feature] Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 50dcfb8d-870b-4950-a36f-63b0ace68c4b --- .../Microsoft.Compute/Compute/Compute/VirtualMachine.tsp | 2 +- .../Microsoft.Compute/Compute/Compute/models.tsp | 2 +- .../Compute/stable/2026-09-01/ComputeRP.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp index ea005f92b709..e822f0f97c9f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/VirtualMachine.tsp @@ -351,7 +351,7 @@ interface VirtualMachines { >; /** - * Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine. + * [Preview Feature] Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine. */ @added(Versions.v2026_09_01) restore is ComputeResourceActionNoResponseContentAsync< diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp index 7c63794d3907..7e21c0970b4d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/Compute/models.tsp @@ -5823,7 +5823,7 @@ model ResiliencyProfile { zoneMovement?: ZoneMovement; /** - * The read-only protection information for the virtual machine. + * [Preview Feature] The read-only protection information for the virtual machine. */ @added(Versions.v2026_09_01) @visibility(Lifecycle.Read) diff --git a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json index 15545d1a66d7..63a1c7357cfa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json +++ b/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-09-01/ComputeRP.json @@ -13195,7 +13195,7 @@ "tags": [ "VirtualMachines" ], - "description": "Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine.", + "description": "[Preview Feature] Restores all operating system and data disks of a deallocated virtual machine from a virtual machine restore point. The restore point must contain restore point data for every disk currently attached to the virtual machine.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -19047,7 +19047,7 @@ }, "vmProtection": { "$ref": "#/definitions/VirtualMachineProtectionPropertiesMinimalSet", - "description": "The read-only protection information for the virtual machine.", + "description": "[Preview Feature] The read-only protection information for the virtual machine.", "readOnly": true } }