From 546834a832d16e5fb902bf2312cbda39c1d24442 Mon Sep 17 00:00:00 2001 From: Hyonho Lee Date: Tue, 3 Dec 2019 12:13:07 -0800 Subject: [PATCH] Update examples for Images in 2019-07-01 version according to the update of 2019-03-01 version examples. --- .../stable/2019-03-01/compute.json | 192 ++++++++---------- .../stable/2019-07-01/compute.json | 21 +- .../examples/CreateAnImageFromABlob.json | 9 +- .../CreateAnImageFromAManagedDisk.json | 9 +- .../examples/CreateAnImageFromASnapshot.json | 9 +- .../examples/CreateAnImageFromAVM.json | 6 +- ...AnImageThatIncludesADataDiskFromABlob.json | 9 +- ...ThatIncludesADataDiskFromAManagedDisk.json | 9 +- ...ageThatIncludesADataDiskFromASnapshot.json | 9 +- .../examples/GetInformationAboutAnImage.json | 3 +- .../2019-07-01/examples/UpdateImage.json | 107 ++++++++++ 11 files changed, 254 insertions(+), 129 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/UpdateImage.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 5f2d800851f4..d3470a7280a8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -2065,97 +2065,97 @@ } } }, - "delete": { - "tags": [ - "Images" - ], - "operationId": "Images_Delete", - "description": "Deletes an Image.", - "parameters": [ - { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." - }, - { - "name": "imageName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the image." - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK" - }, - "202": { - "description": "Accepted" - }, - "204": { - "description": "No Content" - } + "delete": { + "tags": [ + "Images" + ], + "operationId": "Images_Delete", + "description": "Deletes an Image.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "imageName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the image." }, - "x-ms-long-running-operation": true + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "No Content" + } }, - "get": { - "tags": [ - "Images" - ], - "operationId": "Images_Get", - "description": "Gets an image.", - "parameters": [ - { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." - }, - { - "name": "imageName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the image." - }, - { - "name": "$expand", - "in": "query", - "required": false, - "type": "string", - "description": "The expand expression to apply on the operation." - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Image" - } - } + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "Images" + ], + "operationId": "Images_Get", + "description": "Gets an image.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." }, - "x-ms-examples": { - "Get information about a virtual machine image.": { - "$ref": "./examples/GetInformationAboutAnImage.json" + { + "name": "imageName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the image." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The expand expression to apply on the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Image" } } + }, + "x-ms-examples": { + "Get information about a virtual machine image.": { + "$ref": "./examples/GetInformationAboutAnImage.json" + } } - }, + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images": { "get": { "tags": [ @@ -6557,7 +6557,7 @@ }, "StorageAccountType": { "type": "string", - "description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.", + "description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types ", "enum": [ "Standard_LRS", "Premium_LRS", @@ -6566,25 +6566,7 @@ ], "x-ms-enum": { "name": "StorageAccountTypes", - "modelAsString": true, - "values": [ - { - "value": "Standard_LRS", - "description": "Standard_LRS for StorageAccountType." - }, - { - "value": "Premium_LRS", - "description": "Premium_LRS for StorageAccountType." - }, - { - "value": "StandardSSD_LRS", - "description": "StandardSSD_LRS for StorageAccountType." - }, - { - "value": "UltraSSD_LRS", - "description": "UltraSSD_LRS for StorageAccountType." - } - ] + "modelAsString": true } }, "DiffDiskOption": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json index c6ec42ff27b0..9f8e2b111def 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json @@ -2074,7 +2074,12 @@ } } }, - "x-ms-long-running-operation": true + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Updates tags of an Image.": { + "$ref": "./examples/UpdateImage.json" + } + } }, "delete": { "tags": [ @@ -7067,7 +7072,7 @@ }, "StorageAccountType": { "type": "string", - "description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.", + "description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types", "enum": [ "Standard_LRS", "Premium_LRS", @@ -8144,7 +8149,17 @@ ], "x-ms-enum": { "name": "OperatingSystemStateTypes", - "modelAsString": false + "modelAsString": false, + "values": [ + { + "value": "Generalized", + "description": "Generalized image. Needs to be provisioned during deployment time." + }, + { + "value": "Specialized", + "description": "Specialized image. Contains already provisioned OS Disk." + } + ] } } }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlob.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlob.json index 192cbe979bc8..978e18726499 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlob.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlob.json @@ -12,7 +12,8 @@ "osType": "Linux", "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", "osState": "Generalized" - } + }, + "zoneResilient": true } } } @@ -28,7 +29,8 @@ "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": true }, "provisioningState": "Creating" }, @@ -48,7 +50,8 @@ "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": true }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDisk.json index 5d6f7761a5b4..1183cb4ae11a 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDisk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDisk.json @@ -14,7 +14,8 @@ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" }, "osState": "Generalized" - } + }, + "zoneResilient": true } } } @@ -32,7 +33,8 @@ "osState": "Generalized", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": true }, "provisioningState": "Creating" }, @@ -54,7 +56,8 @@ "osState": "Generalized", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": true }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshot.json index 75ed945d1412..3e028823aef1 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshot.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshot.json @@ -14,7 +14,8 @@ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" }, "osState": "Generalized" - } + }, + "zoneResilient": false } } } @@ -32,7 +33,8 @@ "osState": "Generalized", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": false }, "provisioningState": "Creating" }, @@ -54,7 +56,8 @@ "osState": "Generalized", "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": false }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAVM.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAVM.json index 20039c541b32..991c53007d1d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAVM.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAVM.json @@ -29,7 +29,8 @@ }, "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": false }, "provisioningState": "Creating" }, @@ -54,7 +55,8 @@ }, "caching": "ReadWrite" }, - "dataDisks": [] + "dataDisks": [], + "zoneResilient": false }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromABlob.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromABlob.json index c4d1aa07e629..6d1f1192c030 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromABlob.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromABlob.json @@ -18,7 +18,8 @@ "lun": 1, "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd" } - ] + ], + "zoneResilient": false } } } @@ -39,7 +40,8 @@ "lun": 1, "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd" } - ] + ], + "zoneResilient": false }, "provisioningState": "Creating" }, @@ -64,7 +66,8 @@ "lun": 1, "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd" } - ] + ], + "zoneResilient": false }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromAManagedDisk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromAManagedDisk.json index 124198ee9856..1f497628f145 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromAManagedDisk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromAManagedDisk.json @@ -22,7 +22,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" } } - ] + ], + "zoneResilient": false } } } @@ -47,7 +48,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" } } - ] + ], + "zoneResilient": false }, "provisioningState": "Creating" }, @@ -76,7 +78,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" } } - ] + ], + "zoneResilient": false }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromASnapshot.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromASnapshot.json index 2712e8bf9abe..bd24d775f6bd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromASnapshot.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageThatIncludesADataDiskFromASnapshot.json @@ -22,7 +22,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" } } - ] + ], + "zoneResilient": true } } } @@ -47,7 +48,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" } } - ] + ], + "zoneResilient": true }, "provisioningState": "Creating" }, @@ -76,7 +78,8 @@ "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" } } - ] + ], + "zoneResilient": true }, "provisioningState": "Creating" }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetInformationAboutAnImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetInformationAboutAnImage.json index 133e970821a1..d6ae6aeb4836 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetInformationAboutAnImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetInformationAboutAnImage.json @@ -39,7 +39,8 @@ }, "storageAccountType": "Standard_LRS" } - ] + ], + "zoneResilient": true }, "provisioningState": "created" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/UpdateImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/UpdateImage.json new file mode 100644 index 000000000000..f26d12155db6 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/UpdateImage.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2019-07-01", + "imageName": "myImage", + "parameters": { + "properties": { + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + }, + "hyperVGeneration": "V1" + }, + "tags": { + "department": "HR" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "name": "myImage", + "type": "Microsoft.Compute/images", + "location": "West US", + "tags": { + "department": "HR" + }, + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Windows", + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "storageAccountType": "Standard_LRS", + "diskSizeGB": 20 + }, + "dataDisks": [ + { + "lun": 1, + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "zoneResilient": true + }, + "provisioningState": "created" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "name": "myImage", + "type": "Microsoft.Compute/images", + "location": "West US", + "tags": { + "department": "HR" + }, + "properties": { + "storageProfile": { + "osDisk": { + "osType": "Windows", + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "storageAccountType": "Standard_LRS", + "diskSizeGB": 20 + }, + "dataDisks": [ + { + "lun": 1, + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "zoneResilient": true + }, + "provisioningState": "created" + } + } + } + } + }