From 222ecb7f96343059c8434c7e1f11ad892ffd8c27 Mon Sep 17 00:00:00 2001 From: AFK1194 Date: Wed, 15 May 2024 17:57:08 -0700 Subject: [PATCH] Fixing the Network Virtual Appliance Restart Http return code to match the REST API (#28959) * Fixing the Netwotk Virtual Appliance Restart Http return code to match the REST API * Adding a header to the description * Fixing error * Fixing check failures * Adding examples * Add schema to the 200 response * Adding schema to examples and 202 * Remove schema for 202 --------- Co-authored-by: Arsheen Khatib --- .../NetworkVirtualApplianceEmptyRestart.json | 8 ++++++++ ...NetworkVirtualApplianceSpecificRestart.json | 11 +++++++++++ .../2023-11-01/networkVirtualAppliance.json | 18 +++++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceEmptyRestart.json b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceEmptyRestart.json index 1f8efe3668c6..8d37c2a043c5 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceEmptyRestart.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceEmptyRestart.json @@ -7,6 +7,14 @@ }, "responses": { "200": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01" + }, + "body": { + "instanceIds": [] + } + }, + "202": { "headers": { "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01" } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSpecificRestart.json b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSpecificRestart.json index 42ff35aa069c..3d1b733e8cd0 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSpecificRestart.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSpecificRestart.json @@ -11,6 +11,17 @@ }, "responses": { "200": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01" + }, + "body": { + "instanceIds": [ + "0", + "1" + ] + } + }, + "202": { "headers": { "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/00000000-0000-0000-0000-000000000000?api-version=2023-11-01" } diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/networkVirtualAppliance.json b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/networkVirtualAppliance.json index bc3a561f751e..005f2a426d8a 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/networkVirtualAppliance.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/networkVirtualAppliance.json @@ -325,7 +325,19 @@ ], "responses": { "200": { - "description": "Request successful. The operation restarts one or more Network Virtual Appliance VM resources." + "description": "Request successful. The operation restarts one or more Network Virtual Appliance VM resources.", + "schema": { + "$ref": "#/definitions/NetworkVirtualApplianceInstanceIds" + } + }, + "202": { + "description": "Request accepted. The operation restarts one or more Network Virtual Appliance VM resources.", + "headers": { + "Location": { + "description": "The URL of the resource used to check the status of the asynchronous operation.", + "type": "string" + } + } }, "default": { "description": "Error response describing why the operation failed.", @@ -341,6 +353,10 @@ "Restart Specific NetworkVirtualAppliance VMs in VM Scale Set": { "$ref": "./examples/NetworkVirtualApplianceSpecificRestart.json" } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" } } },