Skip to content

Commit

Permalink
Add new Azure Compute Gallery image ids to ImageDiskReference for Put…
Browse files Browse the repository at this point in the history
…Disk Support in 2022-03-02 Api Version (Azure#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]>
  • Loading branch information
2 people authored and haagha committed May 17, 2022
1 parent 2d473c8 commit 67c8a68
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -371,17 +371,22 @@
"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",
"format": "int32",
"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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}

0 comments on commit 67c8a68

Please sign in to comment.