Skip to content

Commit 67c8a68

Browse files
jerryc3Jerry Chan
authored andcommitted
Add new Azure Compute Gallery image ids to ImageDiskReference for PutDisk Support in 2022-03-02 Api Version (#18868)
* new sig ids for put disk 2022-03-02 * fix errors and add example path * extra space * remove required id * prettify common Co-authored-by: Jerry Chan <[email protected]>
1 parent 2d473c8 commit 67c8a68

File tree

5 files changed

+205
-5
lines changed

5 files changed

+205
-5
lines changed

specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/disk.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@
132132
},
133133
"Create a confidential VM supported disk encrypted with customer managed key": {
134134
"$ref": "./examples/diskExamples/Disk_Create_ConfidentialVMSupportedDiskEncryptedWithCMK.json"
135+
},
136+
"Create a managed disk from an Azure Compute Gallery image.": {
137+
"$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryImage.json"
138+
},
139+
"Create a managed disk from an Azure Compute Gallery direct shared image.": {
140+
"$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryDirectSharedImage.json"
141+
},
142+
"Create a managed disk from an Azure Compute Gallery community image.": {
143+
"$ref": "./examples/diskExamples/Disk_Create_FromAnAzureComputeGalleryCommunityImage.json"
135144
}
136145
},
137146
"x-ms-long-running-operation": true

specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-02/DiskRP/diskRPCommon.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
},
333333
"galleryImageReference": {
334334
"$ref": "#/definitions/ImageDiskReference",
335-
"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."
335+
"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."
336336
},
337337
"sourceUri": {
338338
"type": "string",
@@ -371,17 +371,22 @@
371371
"properties": {
372372
"id": {
373373
"type": "string",
374-
"description": "A relative uri containing either a Platform Image Repository or user image reference."
374+
"description": "A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference."
375+
},
376+
"sharedGalleryImageId": {
377+
"type": "string",
378+
"description": "A relative uri containing a direct shared Azure Compute Gallery image reference."
379+
},
380+
"communityGalleryImageId": {
381+
"type": "string",
382+
"description": "A relative uri containing a community Azure Compute Gallery image reference."
375383
},
376384
"lun": {
377385
"type": "integer",
378386
"format": "int32",
379387
"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."
380388
}
381389
},
382-
"required": [
383-
"id"
384-
],
385390
"description": "The source image used for creating the disk."
386391
},
387392
"PurchasePlan": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscriptionId}",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2022-03-02",
6+
"diskName": "myDisk",
7+
"disk": {
8+
"location": "West US",
9+
"properties": {
10+
"osType": "Windows",
11+
"creationData": {
12+
"createOption": "FromImage",
13+
"galleryImageReference": {
14+
"communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
15+
}
16+
}
17+
}
18+
}
19+
},
20+
"responses": {
21+
"202": {
22+
"body": {
23+
"name": "myDisk",
24+
"location": "West US",
25+
"properties": {
26+
"osType": "Windows",
27+
"hyperVGeneration": "V1",
28+
"supportedCapabilities": {
29+
"acceleratedNetwork": true
30+
},
31+
"creationData": {
32+
"createOption": "FromImage",
33+
"galleryImageReference": {
34+
"communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
35+
}
36+
},
37+
"provisioningState": "Updating"
38+
}
39+
}
40+
},
41+
"200": {
42+
"body": {
43+
"name": "myDisk",
44+
"location": "West US",
45+
"properties": {
46+
"provisioningState": "Succeeded",
47+
"osType": "Windows",
48+
"hyperVGeneration": "V1",
49+
"supportedCapabilities": {
50+
"acceleratedNetwork": true
51+
},
52+
"creationData": {
53+
"createOption": "FromImage",
54+
"galleryImageReference": {
55+
"communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0"
56+
}
57+
}
58+
}
59+
}
60+
}
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscriptionId}",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2022-03-02",
6+
"diskName": "myDisk",
7+
"disk": {
8+
"location": "West US",
9+
"properties": {
10+
"osType": "Windows",
11+
"creationData": {
12+
"createOption": "FromImage",
13+
"galleryImageReference": {
14+
"sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
15+
}
16+
}
17+
}
18+
}
19+
},
20+
"responses": {
21+
"202": {
22+
"body": {
23+
"name": "myDisk",
24+
"location": "West US",
25+
"properties": {
26+
"osType": "Windows",
27+
"hyperVGeneration": "V1",
28+
"supportedCapabilities": {
29+
"acceleratedNetwork": true
30+
},
31+
"creationData": {
32+
"createOption": "FromImage",
33+
"galleryImageReference": {
34+
"sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
35+
}
36+
},
37+
"provisioningState": "Updating"
38+
}
39+
}
40+
},
41+
"200": {
42+
"body": {
43+
"name": "myDisk",
44+
"location": "West US",
45+
"properties": {
46+
"provisioningState": "Succeeded",
47+
"osType": "Windows",
48+
"hyperVGeneration": "V1",
49+
"supportedCapabilities": {
50+
"acceleratedNetwork": true
51+
},
52+
"creationData": {
53+
"createOption": "FromImage",
54+
"galleryImageReference": {
55+
"sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0"
56+
}
57+
}
58+
}
59+
}
60+
}
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscriptionId}",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2022-03-02",
6+
"diskName": "myDisk",
7+
"disk": {
8+
"location": "West US",
9+
"properties": {
10+
"osType": "Windows",
11+
"creationData": {
12+
"createOption": "FromImage",
13+
"galleryImageReference": {
14+
"id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
15+
}
16+
}
17+
}
18+
}
19+
},
20+
"responses": {
21+
"202": {
22+
"body": {
23+
"name": "myDisk",
24+
"location": "West US",
25+
"properties": {
26+
"osType": "Windows",
27+
"hyperVGeneration": "V1",
28+
"supportedCapabilities": {
29+
"acceleratedNetwork": true
30+
},
31+
"creationData": {
32+
"createOption": "FromImage",
33+
"galleryImageReference": {
34+
"id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
35+
}
36+
},
37+
"provisioningState": "Updating"
38+
}
39+
}
40+
},
41+
"200": {
42+
"body": {
43+
"name": "myDisk",
44+
"location": "West US",
45+
"properties": {
46+
"provisioningState": "Succeeded",
47+
"osType": "Windows",
48+
"hyperVGeneration": "V1",
49+
"supportedCapabilities": {
50+
"acceleratedNetwork": true
51+
},
52+
"creationData": {
53+
"createOption": "FromImage",
54+
"galleryImageReference": {
55+
"id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0"
56+
}
57+
}
58+
}
59+
}
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)