From c3bf1fcc936dc5f77708600e44eaf13ea3bba014 Mon Sep 17 00:00:00 2001 From: Meet Shah Date: Wed, 3 Feb 2021 11:04:28 -0800 Subject: [PATCH 1/2] supportsHibernation property added --- .../stable/2020-12-01/disk.json | 19 ++++++ .../GetInformationAboutAManagedDisk.json | 1 + .../GetInformationAboutASnapshot.json | 1 + ...eAManagedDiskToAddSupportsHibernation.json | 61 +++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json index d07c2195b62e..8c4dbb488516 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json @@ -171,6 +171,9 @@ }, "Create or update a bursting enabled managed disk.": { "$ref": "./examples/CreateOrUpdateABurstingEnabledManagedDisk.json" + }, + "Update a managed disk to add supportsHibernation.": { + "$ref": "./examples/UpdateAManagedDiskToAddSupportsHibernation.json" } } }, @@ -1986,6 +1989,10 @@ "burstingEnabled": { "type": "boolean", "description": "Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks." + }, + "supportsHibernation": { + "type": "boolean", + "description": "Indicates the OS on a particular disk supports hibernation." } }, "required": [ @@ -2076,6 +2083,10 @@ "diskAccessId": { "type": "string", "description": "ARM id of the DiskAccess resource for using private endpoints on disks." + }, + "supportsHibernation": { + "type": "boolean", + "description": "Indicates the OS on a particular disk supports hibernation." } }, "required": [ @@ -2369,6 +2380,10 @@ "purchasePlan": { "$ref": "#/definitions/PurchasePlan", "description": "Purchase plan information to be added on the OS disk" + }, + "supportsHibernation": { + "type": "boolean", + "description": "Indicates the OS on a particular disk supports hibernation." } }, "description": "Disk resource update properties." @@ -3103,6 +3118,10 @@ "$ref": "#/definitions/Encryption", "description": "Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.", "readOnly": true + }, + "supportsHibernation": { + "type": "boolean", + "description": "Indicates the OS on a particular disk supports hibernation." } }, "description": "Properties of an incremental disk restore point" diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutAManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutAManagedDisk.json index 109412d3b262..f5b32221e284 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutAManagedDisk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutAManagedDisk.json @@ -20,6 +20,7 @@ "publisher": "test_test_pmc2pc1", "product": "marketplace_vm_test" }, + "supportsHibernation": true, "creationData": { "createOption": "FromImage", "imageReference": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutASnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutASnapshot.json index 33155a554e22..25f7e3e18032 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutASnapshot.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/GetInformationAboutASnapshot.json @@ -16,6 +16,7 @@ "publisher": "test_test_pmc2pc1", "product": "marketplace_vm_test" }, + "supportsHibernation": true, "creationData": { "createOption": "Copy", "sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json new file mode 100644 index 000000000000..5114b4b3e9f4 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2020-12-01", + "diskName": "myDisk", + "disk": { + "properties": { + "supportsHibernation": true + } + } + }, + "responses": { + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "osType": "Windows", + "hyperVGeneration": "V1", + "supportsHibernation": true, + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "provisioningState": "Updating" + } + } + }, + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "osType": "Windows", + "hyperVGeneration": "V1", + "supportsHibernation": true, + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "provisioningState": "Succeeded" + } + } + } + } +} From 853c7e896bf14a5b106c6d982be84f425b74bda0 Mon Sep 17 00:00:00 2001 From: Meet Shah Date: Thu, 18 Feb 2021 13:21:00 -0800 Subject: [PATCH 2/2] Addressed comments and updated the example --- .../Microsoft.Compute/stable/2020-12-01/disk.json | 12 ++++++++---- .../UpdateAManagedDiskToAddSupportsHibernation.json | 12 ++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json index 8c4dbb488516..01465e5d66bf 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/disk.json @@ -1992,7 +1992,7 @@ }, "supportsHibernation": { "type": "boolean", - "description": "Indicates the OS on a particular disk supports hibernation." + "description": "Indicates the OS on a disk supports hibernation." } }, "required": [ @@ -2086,7 +2086,7 @@ }, "supportsHibernation": { "type": "boolean", - "description": "Indicates the OS on a particular disk supports hibernation." + "description": "Indicates the OS on a snapshot supports hibernation." } }, "required": [ @@ -2383,7 +2383,7 @@ }, "supportsHibernation": { "type": "boolean", - "description": "Indicates the OS on a particular disk supports hibernation." + "description": "Indicates the OS on a disk supports hibernation." } }, "description": "Disk resource update properties." @@ -2421,6 +2421,10 @@ "diskAccessId": { "type": "string", "description": "ARM id of the DiskAccess resource for using private endpoints on disks." + }, + "supportsHibernation": { + "type": "boolean", + "description": "Indicates the OS on a snapshot supports hibernation." } }, "description": "Snapshot resource update properties." @@ -3121,7 +3125,7 @@ }, "supportsHibernation": { "type": "boolean", - "description": "Indicates the OS on a particular disk supports hibernation." + "description": "Indicates the OS on a disk supports hibernation." } }, "description": "Properties of an incremental disk restore point" diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json index 5114b4b3e9f4..fb95fcb3b9d1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2020-12-01/examples/UpdateAManagedDiskToAddSupportsHibernation.json @@ -24,10 +24,8 @@ "hyperVGeneration": "V1", "supportsHibernation": true, "creationData": { - "createOption": "FromImage", - "imageReference": { - "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" - } + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" }, "diskSizeGB": 127, "provisioningState": "Updating" @@ -47,10 +45,8 @@ "hyperVGeneration": "V1", "supportsHibernation": true, "creationData": { - "createOption": "FromImage", - "imageReference": { - "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" - } + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" }, "diskSizeGB": 127, "provisioningState": "Succeeded"