diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/disk.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/disk.json index 440fe1b879c7..9e46f5d80d07 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/disk.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/disk.json @@ -132,6 +132,15 @@ }, "Create a confidential VM supported disk encrypted with customer managed key": { "$ref": "./examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json" + }, + "Create a managed disk from an Azure Compute Gallery image.": { + "$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryImage.json" + }, + "Create a managed disk from an Azure Compute Gallery direct shared image.": { + "$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryDirectSharedImage.json" + }, + "Create a managed disk from an Azure Compute Gallery community image.": { + "$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryCommunityImage.json" } }, "x-ms-long-running-operation": true diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/diskRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/diskRPCommon.json index fbc92fd262ce..bd84ca1adb13 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/diskRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/diskRPCommon.json @@ -332,7 +332,7 @@ }, "galleryImageReference": { "$ref": "#/definitions/ImageDiskReference", - "description": "Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk." + "description": "Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk." }, "sourceUri": { "type": "string", @@ -371,7 +371,15 @@ "properties": { "id": { "type": "string", - "description": "A relative uri containing either a Platform Image Repository or user image reference." + "description": "A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference." + }, + "sharedGalleryImageId": { + "type": "string", + "description": "A relative uri containing a direct shared Azure Compute Gallery image reference." + }, + "communityGalleryImageId": { + "type": "string", + "description": "A relative uri containing a community Azure Compute Gallery image reference." }, "lun": { "type": "integer", @@ -379,9 +387,6 @@ "description": "If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null." } }, - "required": [ - "id" - ], "description": "The source image used for creating the disk." }, "PurchasePlan": { diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryCommunityImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryCommunityImage.json new file mode 100644 index 000000000000..653e7928851b --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryCommunityImage.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myResourceGroup", + "api-version": "2022-03-02", + "diskName": "myDisk", + "disk": { + "location": "West US", + "properties": { + "osType": "Windows", + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + }, + "responses": { + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "provisioningState": "Updating" + } + } + }, + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryDirectSharedImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryDirectSharedImage.json new file mode 100644 index 000000000000..86b42c2293f4 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryDirectSharedImage.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myResourceGroup", + "api-version": "2022-03-02", + "diskName": "myDisk", + "disk": { + "location": "West US", + "properties": { + "osType": "Windows", + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + }, + "responses": { + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "provisioningState": "Updating" + } + } + }, + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryImage.json new file mode 100644 index 000000000000..3fa048836521 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryImage.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscriptionId}", + "resourceGroupName": "myResourceGroup", + "api-version": "2022-03-02", + "diskName": "myDisk", + "disk": { + "location": "West US", + "properties": { + "osType": "Windows", + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + }, + "responses": { + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "provisioningState": "Updating" + } + } + }, + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "osType": "Windows", + "hyperVGeneration": "V1", + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + } + } + } + } + } +}