From b67fc2d4fbeecd8a81b8a2a8a3c9b670b86ade39 Mon Sep 17 00:00:00 2001 From: kjilla Date: Mon, 9 May 2022 11:21:25 -0700 Subject: [PATCH 1/5] Adding a new operation to get a list of VMImages in an edgezone by Edgezone --- custom-words.txt | 1 + ...dgeZone_ListByEdgeZone_MaximumSet_Gen.json | 25 +++++++ ...dgeZone_ListByEdgeZone_MinimumSet_Gen.json | 20 ++++++ .../ComputeRP/virtualMachineImage.json | 72 +++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json diff --git a/custom-words.txt b/custom-words.txt index a965a8dd7d73..65158527ecfa 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2310,6 +2310,7 @@ Vldb vmextension VMILR vmimage +vmimages vmname VMOS vmotion diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json new file mode 100644 index 000000000000..e0c229d47adb --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "location": "aaaaaaaaaaaaaaa", + "edgeZone": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "api-version": "2022-03-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "aaaaaaaa", + "location": "aaaaaaaaaaaaaaaaaa", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "aaaaaaaaaaa" + } + ] + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json new file mode 100644 index 000000000000..8a612b183c3b --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "location": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "edgeZone": "aaaaa", + "api-version": "2022-03-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "aaaaaaaa", + "location": "aaaaaaaaaaaaaaaaaa" + } + ] + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json index c7ffb344bc8c..ebaceea3f3d7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json @@ -665,6 +665,59 @@ } } }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages": { + "get": { + "tags": [ + "VirtualMachineImages" + ], + "operationId": "VirtualMachineImagesEdgeZone_ListVMImagesByEdgeZone", + "description": "Gets a list of all virtual machine image versions for the specified edge zone", + "parameters": [ + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The name of a supported Azure region." + }, + { + "name": "edgeZone", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the edge zone." + }, + { + "$ref": "../common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../common.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/VmImagesInEdgeZoneListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../common.json#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen": { + "$ref": "./examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json" + }, + "VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen": { + "$ref": "./examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json" + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus": { "get": { "tags": [ @@ -925,6 +978,25 @@ ], "description": "Describes a Virtual Machine Image." }, + "VmImagesInEdgeZoneListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineImageResource" + }, + "description": "The list of VMImages in EdgeZone" + }, + "nextLink": { + "type": "string", + "description": "The URI to fetch the next page of VMImages in Edgezone. Call ListNext() with this URI to fetch the next page of VmImages." + } + }, + "required": [ + "value" + ], + "description": "The List VmImages in EdgeZone operation response." + }, "ArchitectureType": { "type": "string", "description": "Specifies the Architecture Type", From 260a3a9090d4445c1ac859f92701525e92b7ab60 Mon Sep 17 00:00:00 2001 From: kjilla Date: Mon, 9 May 2022 18:16:18 -0700 Subject: [PATCH 2/5] Incorporated review comments --- ...agesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | 14 +++++++------- ...agesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json | 10 +++------- .../2022-03-01/ComputeRP/virtualMachineImage.json | 3 ++- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json index e0c229d47adb..12f271594a19 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json @@ -1,22 +1,22 @@ { "parameters": { - "location": "aaaaaaaaaaaaaaa", - "edgeZone": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "WestUS", + "edgeZone": "microsoftlosangeles1", "api-version": "2022-03-01", - "subscriptionId": "{subscription-id}" + "subscriptionId": "5ece5940-d962-4dad-a98f-ca9ac0f021a5" }, "responses": { "200": { "body": { "value": [ { - "name": "aaaaaaaa", - "location": "aaaaaaaaaaaaaaaaaa", + "name": "18.04.202107200", + "location": "WestUS", "extendedLocation": { - "name": "aaaaaaaaaaaaaaaaaaaaa", + "name": "microsoftlosangeles1", "type": "EdgeZone" }, - "id": "aaaaaaaaaaa" + "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" } ] } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json index 8a612b183c3b..a22c7592650e 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json @@ -1,18 +1,14 @@ { "parameters": { - "location": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "edgeZone": "aaaaa", + "location": "WestUS", + "edgeZone": "microsoftlosangeles1", "api-version": "2022-03-01", - "subscriptionId": "{subscription-id}" + "subscriptionId": "5ece5940-d962-4dad-a98f-ca9ac0f021a5" }, "responses": { "200": { "body": { "value": [ - { - "name": "aaaaaaaa", - "location": "aaaaaaaaaaaaaaaaaa" - } ] } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json index ebaceea3f3d7..0f5ae5042260 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json @@ -979,6 +979,7 @@ "description": "Describes a Virtual Machine Image." }, "VmImagesInEdgeZoneListResult": { + "type": "object", "properties": { "value": { "type": "array", @@ -989,7 +990,7 @@ }, "nextLink": { "type": "string", - "description": "The URI to fetch the next page of VMImages in Edgezone. Call ListNext() with this URI to fetch the next page of VmImages." + "description": "The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages." } }, "required": [ From 232c261d9e95b41037ed5998a57ae4cc25cf5b6f Mon Sep 17 00:00:00 2001 From: kjilla Date: Tue, 10 May 2022 09:36:57 -0700 Subject: [PATCH 3/5] Fixing code as per comments --- .../stable/2022-03-01/ComputeRP/virtualMachineImage.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json index 0f5ae5042260..c311a30d2517 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineImage.json @@ -670,7 +670,7 @@ "tags": [ "VirtualMachineImages" ], - "operationId": "VirtualMachineImagesEdgeZone_ListVMImagesByEdgeZone", + "operationId": "VirtualMachineImages_ListByEdgeZone", "description": "Gets a list of all virtual machine image versions for the specified edge zone", "parameters": [ { @@ -993,9 +993,6 @@ "description": "The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages." } }, - "required": [ - "value" - ], "description": "The List VmImages in EdgeZone operation response." }, "ArchitectureType": { From e2528bdfe271d24f562046c8e7ce295d0b16de12 Mon Sep 17 00:00:00 2001 From: kjilla Date: Tue, 10 May 2022 11:31:10 -0700 Subject: [PATCH 4/5] Ran prettier to fix the error. --- ...tualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | 2 +- ...tualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json index 12f271594a19..c5c1a5d1e4ca 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json @@ -22,4 +22,4 @@ } } } -} +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json index a22c7592650e..5eac128ff70f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json @@ -13,4 +13,4 @@ } } } -} +} \ No newline at end of file From 7c6e00a844eb2df4c0e211c5c253222aba7416ce Mon Sep 17 00:00:00 2001 From: kjilla Date: Tue, 10 May 2022 12:17:13 -0700 Subject: [PATCH 5/5] Fixing prettier failure --- ...lMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json | 2 +- ...lMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json index c5c1a5d1e4ca..12f271594a19 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MaximumSet_Gen.json @@ -22,4 +22,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json index 5eac128ff70f..d5eb230eb85b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineImageExamples/VirtualMachineImagesEdgeZone_ListByEdgeZone_MinimumSet_Gen.json @@ -8,9 +8,8 @@ "responses": { "200": { "body": { - "value": [ - ] + "value": [] } } } -} \ No newline at end of file +}