From f7d1dfca3e938cc0e98fe51cbd37da99c41bd5fb Mon Sep 17 00:00:00 2001 From: Manasi Date: Fri, 24 Jan 2025 14:01:46 -0800 Subject: [PATCH 1/2] disk resize changes --- .../VirtualHardDisks.tsp | 11 +++++- .../models.tsp | 15 ++++++++ .../2025-02-01-preview/stackhcivm.json | 34 +++++++++++-------- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/VirtualHardDisks.tsp b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/VirtualHardDisks.tsp index 6e6e69f6d29b..466b56043ca1 100644 --- a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/VirtualHardDisks.tsp +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/VirtualHardDisks.tsp @@ -43,7 +43,16 @@ interface VirtualHardDisks { >; @doc("The operation to update a virtual hard disk.") - update is ArmTagsPatchAsync; + @removed(Versions.v2025_02_01_preview) + @sharedRoute + @renamedFrom(Versions.v2025_02_01_preview, "update") + updateOld is ArmTagsPatchAsync; + + @doc("The operation to update a virtual hard disk.") + @parameterVisibility + @added(Versions.v2025_02_01_preview) + @sharedRoute + update is ArmCustomPatchAsync; @doc("The operation to delete a virtual hard disk.") delete is ArmResourceDeleteWithoutOkAsync; diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp index 171c9f613453..a5ccff9b035c 100644 --- a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp @@ -1267,6 +1267,21 @@ model VirtualHardDisksUpdateRequest { #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "existing API" @doc("Resource tags") tags?: Record; + + @added(Versions.v2025_02_01_preview) + @doc("Defines the resource properties for the update.") + properties?: VirtualHardDisksUpdateProperties; +} + +@added(Versions.v2025_02_01_preview) +@doc("Defines the resource properties for the update.") +model VirtualHardDisksUpdateProperties { + #suppress "@azure-tools/typespec-azure-core/casing-style" "GB is a short form." + @doc("Size of the disk in GB") + diskSizeGB?: int64; + + @doc("Boolean for enabling dynamic sizing on the virtual hard disk") + dynamic?: boolean; } @added(Versions.v2024_05_01_preview) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json index 5c7e8514334f..e1669b10c6dd 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json @@ -3344,7 +3344,7 @@ "description": "The resource properties to be updated.", "required": true, "schema": { - "$ref": "#/definitions/VirtualHardDiskTagsUpdate" + "$ref": "#/definitions/VirtualHardDisksUpdateRequest" } } ], @@ -6464,19 +6464,6 @@ } } }, - "VirtualHardDiskTagsUpdate": { - "type": "object", - "description": "The type used for updating tags in VirtualHardDisk resources.", - "properties": { - "tags": { - "type": "object", - "description": "Resource tags.", - "additionalProperties": { - "type": "string" - } - } - } - }, "VirtualHardDiskUploadRequest": { "type": "object", "description": "Request for uploading virtual hard disk.", @@ -6544,6 +6531,21 @@ } } }, + "VirtualHardDisksUpdateProperties": { + "type": "object", + "description": "Defines the resource properties for the update.", + "properties": { + "diskSizeGB": { + "type": "integer", + "format": "int64", + "description": "Size of the disk in GB" + }, + "dynamic": { + "type": "boolean", + "description": "Boolean for enabling dynamic sizing on the virtual hard disk" + } + } + }, "VirtualHardDisksUpdateRequest": { "type": "object", "description": "The virtual hard disk resource patch definition.", @@ -6554,6 +6556,10 @@ "additionalProperties": { "type": "string" } + }, + "properties": { + "$ref": "#/definitions/VirtualHardDisksUpdateProperties", + "description": "Defines the resource properties for the update." } } }, From 4585531aa15793f8469cd34121798d693b4fdb86 Mon Sep 17 00:00:00 2001 From: Manasi Date: Mon, 27 Jan 2025 11:41:40 -0800 Subject: [PATCH 2/2] remove dynamic flag --- .../AzureStackHCI.StackHCIVM.Management/models.tsp | 3 --- .../StackHCIVM/preview/2025-02-01-preview/stackhcivm.json | 4 ---- 2 files changed, 7 deletions(-) diff --git a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp index a5ccff9b035c..df5bd0694d14 100644 --- a/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp +++ b/specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/models.tsp @@ -1279,9 +1279,6 @@ model VirtualHardDisksUpdateProperties { #suppress "@azure-tools/typespec-azure-core/casing-style" "GB is a short form." @doc("Size of the disk in GB") diskSizeGB?: int64; - - @doc("Boolean for enabling dynamic sizing on the virtual hard disk") - dynamic?: boolean; } @added(Versions.v2024_05_01_preview) diff --git a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json index e1669b10c6dd..8195f9b54a76 100644 --- a/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json +++ b/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2025-02-01-preview/stackhcivm.json @@ -6539,10 +6539,6 @@ "type": "integer", "format": "int64", "description": "Size of the disk in GB" - }, - "dynamic": { - "type": "boolean", - "description": "Boolean for enabling dynamic sizing on the virtual hard disk" } } },