Skip to content

Commit 92c0094

Browse files
kjilla03kjilla
andauthored
Adding a new operation to get a list of VMImages in an edgezone by Ed… (#18980)
* Adding a new operation to get a list of VMImages in an edgezone by Edgezone * Incorporated review comments * Fixing code as per comments * Ran prettier to fix the error. * Fixing prettier failure Co-authored-by: kjilla <[email protected]>
1 parent 80fee25 commit 92c0094

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,6 +2324,7 @@ Vldb
23242324
vmextension
23252325
VMILR
23262326
vmimage
2327+
vmimages
23272328
vmname
23282329
VMOS
23292330
vmotion
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"location": "WestUS",
4+
"edgeZone": "microsoftlosangeles1",
5+
"api-version": "2022-03-01",
6+
"subscriptionId": "5ece5940-d962-4dad-a98f-ca9ac0f021a5"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"name": "18.04.202107200",
14+
"location": "WestUS",
15+
"extendedLocation": {
16+
"name": "microsoftlosangeles1",
17+
"type": "EdgeZone"
18+
},
19+
"id": "/Subscriptions/5ece5940-d962-4dad-a98f-ca9ac0f021a5/Providers/Microsoft.Compute/Locations/westus/Publishers/CANONICAL/ArtifactTypes/VMImage/Offers/UBUNTUSERVER/Skus/18_04-LTS-GEN2/Versions/18.04.202107200"
20+
}
21+
]
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"parameters": {
3+
"location": "WestUS",
4+
"edgeZone": "microsoftlosangeles1",
5+
"api-version": "2022-03-01",
6+
"subscriptionId": "5ece5940-d962-4dad-a98f-ca9ac0f021a5"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": []
12+
}
13+
}
14+
}
15+
}

specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,59 @@
665665
}
666666
}
667667
},
668+
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages": {
669+
"get": {
670+
"tags": [
671+
"VirtualMachineImages"
672+
],
673+
"operationId": "VirtualMachineImages_ListByEdgeZone",
674+
"description": "Gets a list of all virtual machine image versions for the specified edge zone",
675+
"parameters": [
676+
{
677+
"name": "location",
678+
"in": "path",
679+
"required": true,
680+
"type": "string",
681+
"description": "The name of a supported Azure region."
682+
},
683+
{
684+
"name": "edgeZone",
685+
"in": "path",
686+
"required": true,
687+
"type": "string",
688+
"description": "The name of the edge zone."
689+
},
690+
{
691+
"$ref": "../common.json#/parameters/ApiVersionParameter"
692+
},
693+
{
694+
"$ref": "../common.json#/parameters/SubscriptionIdParameter"
695+
}
696+
],
697+
"responses": {
698+
"200": {
699+
"description": "OK",
700+
"schema": {
701+
"$ref": "#/definitions/VmImagesInEdgeZoneListResult"
702+
}
703+
},
704+
"default": {
705+
"description": "Error response describing why the operation failed.",
706+
"schema": {
707+
"$ref": "../common.json#/definitions/CloudError"
708+
}
709+
}
710+
},
711+
"x-ms-examples": {
712+
"VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen": {
713+
"$ref": "./examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json"
714+
},
715+
"VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen": {
716+
"$ref": "./examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json"
717+
}
718+
}
719+
}
720+
},
668721
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus": {
669722
"get": {
670723
"tags": [
@@ -925,6 +978,23 @@
925978
],
926979
"description": "Describes a Virtual Machine Image."
927980
},
981+
"VmImagesInEdgeZoneListResult": {
982+
"type": "object",
983+
"properties": {
984+
"value": {
985+
"type": "array",
986+
"items": {
987+
"$ref": "#/definitions/VirtualMachineImageResource"
988+
},
989+
"description": "The list of VMImages in EdgeZone"
990+
},
991+
"nextLink": {
992+
"type": "string",
993+
"description": "The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages."
994+
}
995+
},
996+
"description": "The List VmImages in EdgeZone operation response."
997+
},
928998
"ArchitectureType": {
929999
"type": "string",
9301000
"description": "Specifies the Architecture Type",

0 commit comments

Comments
 (0)