From cb01370bae16cce8a604d118f5378f5655894566 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Wed, 5 Sep 2018 13:06:55 -0700 Subject: [PATCH 01/12] Add networkTrace resource and APIs --- .../stable/2018-02-01/WebApps.json | 410 +++++++++++++++++- 1 file changed, 406 insertions(+), 4 deletions(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index 8fddaeb3ddaf..d9179fc016ed 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5103,13 +5103,68 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraceOperation", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start": { "post": { "tags": [ "WebApps" ], - "summary": "Start capturing network packets for the site.", - "description": "Start capturing network packets for the site.", + "summary": "Start capturing network packets for the site (To be deprecated).", + "description": "Start capturing network packets for the site (To be deprecated).", "operationId": "WebApps_StartWebSiteNetworkTrace", "parameters": [ { @@ -5165,6 +5220,75 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Start capturing network packets for the site.", + "description": "Start capturing network packets for the site.", + "operationId": "WebApps_StartWebSiteNetworkTraceOperation", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "name": "durationInSeconds", + "in": "query", + "description": "The duration to keep capturing in seconds.", + "type": "integer", + "format": "int32" + }, + { + "name": "maxFrameLength", + "in": "query", + "description": "The maximum frame length in bytes (Optional).", + "type": "integer", + "format": "int32" + }, + { + "name": "sasUrl", + "in": "query", + "description": "The Blob URL to store capture file.", + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop": { "post": { "tags": [ @@ -5207,6 +5331,58 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraces", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword": { "post": { "tags": [ @@ -12248,13 +12424,75 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraceOperationSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "name": "slot", + "in": "path", + "description": "Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start": { "post": { "tags": [ "WebApps" ], - "summary": "Start capturing network packets for the site.", - "description": "Start capturing network packets for the site.", + "summary": "Start capturing network packets for the site (To be deprecated).", + "description": "Start capturing network packets for the site (To be deprecated).", "operationId": "WebApps_StartWebSiteNetworkTraceSlot", "parameters": [ { @@ -12317,6 +12555,82 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Start capturing network packets for the site.", + "description": "Start capturing network packets for the site.", + "operationId": "WebApps_StartWebSiteNetworkTraceOperationSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "name": "durationInSeconds", + "in": "query", + "description": "The duration to keep capturing in seconds.", + "type": "integer", + "format": "int32" + }, + { + "name": "slot", + "in": "path", + "description": "The name of the slot for this web app.", + "required": true, + "type": "string" + }, + { + "name": "maxFrameLength", + "in": "query", + "description": "The maximum frame length in bytes (Optional).", + "type": "integer", + "format": "int32" + }, + { + "name": "sasUrl", + "in": "query", + "description": "The Blob URL to store capture file.", + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop": { "post": { "tags": [ @@ -12366,6 +12680,65 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTracesSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "name": "slot", + "in": "path", + "description": "Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword": { "post": { "tags": [ @@ -18326,6 +18699,35 @@ } } }, + "NetworkTrace": { + "description": "Network trace", + "type": "object", + "allOf": [ + { + "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" + } + ], + "properties": { + "properties": { + "description": "NetworkTrace resource specific properties", + "properties": { + "path": { + "description": "Local file path for the captured network trace file.", + "type": "string" + }, + "status": { + "description": "Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed).", + "type": "string" + }, + "message": { + "description": "Detailed message of a network trace operation, e.g. error message in case of failure.", + "type": "string" + } + }, + "x-ms-client-flatten": true + } + } + }, "PerfMonCounterCollection": { "description": "Collection of performance monitor counters.", "required": [ From 2e7fe256771fef728f32dccb89f8caac5d60bbb3 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Mon, 10 Sep 2018 14:40:31 -0700 Subject: [PATCH 02/12] Add examples of network trace APIs --- .../GetWebSiteNetworkTraceOperation.json | 51 +++++++++++++++++++ .../examples/GetWebSiteNetworkTraces.json | 30 +++++++++++ .../StartWebSiteNetworkTraceOperation.json | 51 +++++++++++++++++++ .../examples/StopWebSiteNetworkTrace.json | 13 +++++ 4 files changed, 145 insertions(+) create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json new file mode 100644 index 000000000000..31a956aada0f --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "siteName": "SampleApp", + "slot": "Production", + "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", + "api-version": "2018-02-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": { + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + }, + "body": { + "value": { + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json new file mode 100644 index 000000000000..4976634e562c --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "siteName": "SampleApp", + "slot": "Production", + "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", + "api-version": "2018-02-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": { + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] + } + } + }, + } +} \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json new file mode 100644 index 000000000000..ef85422fbb23 --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "siteName": "SampleApp", + "slot": "Production", + "durationInSeconds": "60", + "api-version": "2018-02-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": { + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + }, + "body": { + "value": { + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json new file mode 100644 index 000000000000..04a230a4efcf --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "siteName": "SampleApp", + "slot": "Production", + "api-version": "2018-02-01" + }, + "responses": { + "200": { }, + "204": { } + } +} \ No newline at end of file From e22e59dd9e63bdce4108caef3d2cfa53dfaddc0c Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Mon, 10 Sep 2018 21:52:46 -0700 Subject: [PATCH 03/12] Add x-ms-examples to network trace APIs --- .../stable/2018-02-01/WebApps.json | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index d9179fc016ed..4e917e6f9990 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5155,6 +5155,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Get the current status of a network trace operation for a site": { + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + } } } }, @@ -5286,6 +5291,11 @@ } } }, + "x-ms-examples": { + "Start a new network trace operation for a site": { + "$ref": "./examples/StartWebSiteNetworkTraceOperation.json" + } + }, "x-ms-long-running-operation": true } }, @@ -5328,6 +5338,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Stop a currently running network trace operation for a site": { + "$ref": "./examples/StopWebSiteNetworkTrace.json" + } } } }, @@ -5380,6 +5395,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Get NetworkTraces for a site": { + "$ref": "./examples/GetWebSiteNetworkTrace.json" + } } } }, @@ -12483,6 +12503,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Get the current status of a network trace operation for a site": { + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + } } } }, @@ -12628,6 +12653,11 @@ } } }, + "x-ms-examples": { + "Start a new network trace operation for a site": { + "$ref": "./examples/StartWebSiteNetworkTraceOperation.json" + } + }, "x-ms-long-running-operation": true } }, @@ -12677,6 +12707,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Stop a currently running network trace operation for a site": { + "$ref": "./examples/StopWebSiteNetworkTrace.json" + } } } }, @@ -12736,6 +12771,11 @@ "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } + }, + "x-ms-examples": { + "Get NetworkTraces for a site": { + "$ref": "./examples/GetWebSiteNetworkTrace.json" + } } } }, From 4cf9c58d93370fcbbb947706137465706962d979 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Mon, 10 Sep 2018 21:56:08 -0700 Subject: [PATCH 04/12] Fix file name typo of GetWebSiteNetworkTraces.json --- .../Microsoft.Web/stable/2018-02-01/WebApps.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index 4e917e6f9990..9d879ba04625 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5398,7 +5398,7 @@ }, "x-ms-examples": { "Get NetworkTraces for a site": { - "$ref": "./examples/GetWebSiteNetworkTrace.json" + "$ref": "./examples/GetWebSiteNetworkTraces.json" } } } @@ -12774,7 +12774,7 @@ }, "x-ms-examples": { "Get NetworkTraces for a site": { - "$ref": "./examples/GetWebSiteNetworkTrace.json" + "$ref": "./examples/GetWebSiteNetworkTraces.json" } } } From d62d8ac930e64ecadde0b50a329151c308118b70 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Tue, 11 Sep 2018 09:07:06 -0700 Subject: [PATCH 05/12] Fix syntax error in examples/GetWebSiteNetworkTraces.json --- .../stable/2018-02-01/examples/GetWebSiteNetworkTraces.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json index 4976634e562c..fa03cfcebe65 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json @@ -25,6 +25,6 @@ ] } } - }, + } } } \ No newline at end of file From 713c368961f26ac2ac5f1c074ba05ab66a2b1df4 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Tue, 11 Sep 2018 10:02:30 -0700 Subject: [PATCH 06/12] Fix more validation errors --- .../GetWebSiteNetworkTraceOperation.json | 50 +++++++++---------- .../examples/GetWebSiteNetworkTraces.json | 26 +++++----- .../StartWebSiteNetworkTraceOperation.json | 50 +++++++++---------- .../examples/StopWebSiteNetworkTrace.json | 5 +- 4 files changed, 60 insertions(+), 71 deletions(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json index 31a956aada0f..39246db574ec 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "testrg123", - "siteName": "SampleApp", + "name": "SampleApp", "slot": "Production", "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", "api-version": "2018-02-01" @@ -11,19 +11,17 @@ "200": { "headers": {}, "body": { - "value": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] } }, "202": { @@ -32,19 +30,17 @@ "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, "body": { - "value": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] } } } diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json index fa03cfcebe65..89bcd2349820 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "testrg123", - "siteName": "SampleApp", + "name": "SampleApp", "slot": "Production", "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", "api-version": "2018-02-01" @@ -11,19 +11,17 @@ "200": { "headers": {}, "body": { - "value": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] } } } diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json index ef85422fbb23..da8688c06e35 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "testrg123", - "siteName": "SampleApp", + "name": "SampleApp", "slot": "Production", "durationInSeconds": "60", "api-version": "2018-02-01" @@ -11,19 +11,17 @@ "200": { "headers": {}, "body": { - "value": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] } }, "202": { @@ -32,19 +30,17 @@ "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, "body": { - "value": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", + "name": "SampleApp", + "type": "Microsoft.Web/sites", + "location": "USAAnywhere", + "properties": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" + } + ] } } } diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json index 04a230a4efcf..826a86bbc493 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json @@ -2,12 +2,11 @@ "parameters": { "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "testrg123", - "siteName": "SampleApp", + "name": "SampleApp", "slot": "Production", "api-version": "2018-02-01" }, "responses": { - "200": { }, - "204": { } + "200": "" } } \ No newline at end of file From 42dc9bbc89fd6944d626b9d71b887921094b74ce Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Tue, 11 Sep 2018 10:25:44 -0700 Subject: [PATCH 07/12] Fix StopWebSiteNetworkTrace.json --- .../stable/2018-02-01/examples/StopWebSiteNetworkTrace.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json index 826a86bbc493..d44f7f957752 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json @@ -7,6 +7,6 @@ "api-version": "2018-02-01" }, "responses": { - "200": "" + "200": { } } } \ No newline at end of file From 890632e8e01a40080edde5f84b6a8aa1178c14c3 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Mon, 17 Sep 2018 09:58:35 -0700 Subject: [PATCH 08/12] Fix network trace APIs --- .../stable/2018-02-01/WebApps.json | 85 ++++++++----------- .../GetWebSiteNetworkTraceOperation.json | 34 ++------ .../examples/GetWebSiteNetworkTraces.json | 20 ++--- .../StartWebSiteNetworkTraceOperation.json | 36 ++------ .../examples/StopWebSiteNetworkTrace.json | 3 +- 5 files changed, 63 insertions(+), 115 deletions(-) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index 9d879ba04625..a568c9ef584c 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5138,9 +5138,12 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "202": { @@ -5273,9 +5276,12 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "202": { @@ -5327,16 +5333,10 @@ ], "responses": { "200": { - "description": "OK.", - "schema": { - "type": "string" - } + "description": "Stopped." }, - "default": { - "description": "App Service error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } + "204": { + "description": "Stopped." } }, "x-ms-examples": { @@ -12486,9 +12486,12 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "202": { @@ -12635,9 +12638,12 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "202": { @@ -12696,16 +12702,10 @@ ], "responses": { "200": { - "description": "OK.", - "schema": { - "type": "string" - } + "description": "Stopped." }, - "default": { - "description": "App Service error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } + "204": { + "description": "Stopped." } }, "x-ms-examples": { @@ -18742,29 +18742,18 @@ "NetworkTrace": { "description": "Network trace", "type": "object", - "allOf": [ - { - "$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource" - } - ], "properties": { - "properties": { - "description": "NetworkTrace resource specific properties", - "properties": { - "path": { - "description": "Local file path for the captured network trace file.", - "type": "string" - }, - "status": { - "description": "Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed).", - "type": "string" - }, - "message": { - "description": "Detailed message of a network trace operation, e.g. error message in case of failure.", - "type": "string" - } - }, - "x-ms-client-flatten": true + "path": { + "description": "Local file path for the captured network trace file.", + "type": "string" + }, + "status": { + "description": "Current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed).", + "type": "string" + }, + "message": { + "description": "Detailed message of a network trace operation, e.g. error message in case of failure.", + "type": "string" } } }, diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json index 39246db574ec..72a7fd4e6b1e 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -10,38 +10,20 @@ "responses": { "200": { "headers": {}, - "body": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] }, "202": { "headers": { "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, - "body": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "body": { } } } } \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json index 89bcd2349820..9632f83b3b4f 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraces.json @@ -10,19 +10,13 @@ "responses": { "200": { "headers": {}, - "body": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] } } } \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json index da8688c06e35..4259fde0568a 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json @@ -4,44 +4,26 @@ "resourceGroupName": "testrg123", "name": "SampleApp", "slot": "Production", - "durationInSeconds": "60", + "durationInSeconds": 60, "api-version": "2018-02-01" }, "responses": { "200": { "headers": {}, - "body": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] }, "202": { "headers": { "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, - "body": { - "id":"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp", - "name": "SampleApp", - "type": "Microsoft.Web/sites", - "location": "USAAnywhere", - "properties": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_09_10T00_00_00.zip" - } - ] - } + "body": {} } } } \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json index d44f7f957752..d01dd784dae1 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StopWebSiteNetworkTrace.json @@ -7,6 +7,7 @@ "api-version": "2018-02-01" }, "responses": { - "200": { } + "200": { }, + "204": { } } } \ No newline at end of file From 5d96e9d924cbd71c7d5a54352736be5621364013 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Fri, 19 Oct 2018 00:06:50 -0700 Subject: [PATCH 09/12] Fix network trace API REST format --- .../stable/2018-02-01/WebApps.json | 504 ++++++++++++++++++ 1 file changed, 504 insertions(+) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index a568c9ef584c..be6e8847ecb7 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5403,6 +5403,126 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraceOperation", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get the current status of a network trace operation for a site": { + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraces", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get NetworkTraces for a site": { + "$ref": "./examples/GetWebSiteNetworkTraces.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword": { "post": { "tags": [ @@ -12779,6 +12899,140 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTraceOperationSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "name": "slot", + "in": "path", + "description": "Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get the current status of a network trace operation for a site": { + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}": { + "get": { + "tags": [ + "WebApps" + ], + "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", + "operationId": "WebApps_GetNetworkTracesSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the app.", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "description": "GUID of the operation.", + "required": true, + "type": "string" + }, + { + "name": "slot", + "in": "path", + "description": "Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get NetworkTraces for a site": { + "$ref": "./examples/GetWebSiteNetworkTraces.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword": { "post": { "tags": [ @@ -14933,6 +15187,90 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Start capturing network packets for the site.", + "description": "Start capturing network packets for the site.", + "operationId": "WebApps_StartNetworkTraceSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "name": "durationInSeconds", + "in": "query", + "description": "The duration to keep capturing in seconds.", + "type": "integer", + "format": "int32" + }, + { + "name": "slot", + "in": "path", + "description": "The name of the slot for this web app.", + "required": true, + "type": "string" + }, + { + "name": "maxFrameLength", + "in": "query", + "description": "The maximum frame length in bytes (Optional).", + "type": "integer", + "format": "int32" + }, + { + "name": "sasUrl", + "in": "query", + "description": "The Blob URL to store capture file.", + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Start a new network trace operation for a site": { + "$ref": "./examples/StartWebSiteNetworkTraceOperation.json" + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop": { "post": { "tags": [ @@ -14973,6 +15311,54 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Stop ongoing capturing network packets for the site.", + "description": "Stop ongoing capturing network packets for the site.", + "operationId": "WebApps_StopNetworkTraceSlot", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "name": "slot", + "in": "path", + "description": "The name of the slot for this web app.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Stopped." + }, + "204": { + "description": "Stopped." + } + }, + "x-ms-examples": { + "Stop a currently running network trace operation for a site": { + "$ref": "./examples/StopWebSiteNetworkTrace.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync": { "post": { "tags": [ @@ -16413,6 +16799,83 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Start capturing network packets for the site.", + "description": "Start capturing network packets for the site.", + "operationId": "WebApps_StartNetworkTrace", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "name": "durationInSeconds", + "in": "query", + "description": "The duration to keep capturing in seconds.", + "type": "integer", + "format": "int32" + }, + { + "name": "maxFrameLength", + "in": "query", + "description": "The maximum frame length in bytes (Optional).", + "type": "integer", + "format": "int32" + }, + { + "name": "sasUrl", + "in": "query", + "description": "The Blob URL to store capture file.", + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } + } + }, + "202": { + "description": "Operation is in progress.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/Operation" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Start a new network trace operation for a site": { + "$ref": "./examples/StartWebSiteNetworkTraceOperation.json" + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop": { "post": { "tags": [ @@ -16446,6 +16909,47 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace": { + "post": { + "tags": [ + "WebApps" + ], + "summary": "Stop ongoing capturing network packets for the site.", + "description": "Stop ongoing capturing network packets for the site.", + "operationId": "WebApps_StopNetworkTrace", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "The name of the web app.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Stopped." + }, + "204": { + "description": "Stopped." + } + }, + "x-ms-examples": { + "Stop a currently running network trace operation for a site": { + "$ref": "./examples/StopWebSiteNetworkTrace.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync": { "post": { "tags": [ From f05337dd6b902f7f9125a4cc1d2096d315646214 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Mon, 22 Oct 2018 14:43:49 -0700 Subject: [PATCH 10/12] Fix operationIds --- .../stable/2018-02-01/WebApps.json | 10 +++---- .../GetWebSiteNetworkTraceOperation.json | 4 +-- .../GetWebSiteNetworkTraceOperationOld.json | 29 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index be6e8847ecb7..a138b75da7c3 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5110,7 +5110,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperation", + "operationId": "WebApps_GetNetworkTraceOperationOld", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -5161,7 +5161,7 @@ }, "x-ms-examples": { "Get the current status of a network trace operation for a site": { - "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + "$ref": "./examples/GetWebSiteNetworkTraceOperationOld.json" } } } @@ -5353,7 +5353,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraces", + "operationId": "WebApps_GetNetworkTracesOld", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12571,7 +12571,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperationSlot", + "operationId": "WebApps_GetNetworkTraceOperationSlotOld", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12842,7 +12842,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTracesSlot", + "operationId": "WebApps_GetNetworkTracesSlotOld", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json index 72a7fd4e6b1e..0921bcd01c37 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -20,8 +20,8 @@ }, "202": { "headers": { - "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", - "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, "body": { } } diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json new file mode 100644 index 000000000000..72a7fd4e6b1e --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "name": "SampleApp", + "slot": "Production", + "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", + "api-version": "2018-02-01" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + }, + "body": { } + } + } +} \ No newline at end of file From 25ba387503fdb8834ed08a9334068c0d8a0b2698 Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Wed, 24 Oct 2018 15:00:24 -0700 Subject: [PATCH 11/12] Fix operation Ids --- .../stable/2018-02-01/WebApps.json | 20 +++++++++---------- .../GetWebSiteNetworkTraceOperation.json | 4 ++-- ...=> GetWebSiteNetworkTraceOperationV2.json} | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) rename specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/{GetWebSiteNetworkTraceOperationOld.json => GetWebSiteNetworkTraceOperationV2.json} (80%) diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index a138b75da7c3..08e0da54a7e8 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5110,7 +5110,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperationOld", + "operationId": "WebApps_GetNetworkTraceOperation", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -5161,7 +5161,7 @@ }, "x-ms-examples": { "Get the current status of a network trace operation for a site": { - "$ref": "./examples/GetWebSiteNetworkTraceOperationOld.json" + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" } } } @@ -5353,7 +5353,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTracesOld", + "operationId": "WebApps_GetNetworkTraces", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -5410,7 +5410,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperation", + "operationId": "WebApps_GetNetworkTraceOperationV2", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -5461,7 +5461,7 @@ }, "x-ms-examples": { "Get the current status of a network trace operation for a site": { - "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" + "$ref": "./examples/GetWebSiteNetworkTraceOperationV2.json" } } } @@ -5473,7 +5473,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraces", + "operationId": "WebApps_GetNetworkTracesV2", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12571,7 +12571,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperationSlotOld", + "operationId": "WebApps_GetNetworkTraceOperationSlot", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12842,7 +12842,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTracesSlotOld", + "operationId": "WebApps_GetNetworkTracesSlot", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12906,7 +12906,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperationSlot", + "operationId": "WebApps_GetNetworkTraceOperationSlotV2", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12976,7 +12976,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTracesSlot", + "operationId": "WebApps_GetNetworkTracesSlotV2", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json index 0921bcd01c37..72a7fd4e6b1e 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -20,8 +20,8 @@ }, "202": { "headers": { - "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", - "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, "body": { } } diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json similarity index 80% rename from specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json rename to specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json index 72a7fd4e6b1e..0921bcd01c37 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationOld.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json @@ -20,8 +20,8 @@ }, "202": { "headers": { - "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", - "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, "body": { } } From 83ea2572ee55cb78457251d30e72eaea304564dc Mon Sep 17 00:00:00 2001 From: Michimune Kohno Date: Tue, 30 Oct 2018 15:32:13 -0700 Subject: [PATCH 12/12] Fix network trace APIs again --- .../stable/2018-02-01/WebApps.json | 50 ++++++++++++++----- .../GetWebSiteNetworkTraceOperation.json | 12 +++-- .../GetWebSiteNetworkTraceOperationV2.json | 29 ----------- .../StartWebSiteNetworkTraceOperation.json | 8 ++- 4 files changed, 53 insertions(+), 46 deletions(-) delete mode 100644 specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json index 08e0da54a7e8..f4059d7a1e03 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/WebApps.json @@ -5149,7 +5149,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -5214,7 +5217,7 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { "type": "string" } @@ -5287,7 +5290,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -5449,7 +5455,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -5461,7 +5470,7 @@ }, "x-ms-examples": { "Get the current status of a network trace operation for a site": { - "$ref": "./examples/GetWebSiteNetworkTraceOperationV2.json" + "$ref": "./examples/GetWebSiteNetworkTraceOperation.json" } } } @@ -12617,7 +12626,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -12689,7 +12701,7 @@ ], "responses": { "200": { - "description": "OK.", + "description": "OK", "schema": { "type": "string" } @@ -12769,7 +12781,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -12906,7 +12921,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTraceOperationSlotV2", + "operationId": "WebApps_GetNetworkTraceOperationV2Slot", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -12952,7 +12967,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -12976,7 +12994,7 @@ ], "summary": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", "description": "Gets a named operation for a network trace capturing (or deployment slot, if specified).", - "operationId": "WebApps_GetNetworkTracesSlotV2", + "operationId": "WebApps_GetNetworkTracesV2Slot", "parameters": [ { "$ref": "#/parameters/resourceGroupNameParameter" @@ -15253,7 +15271,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { @@ -16858,7 +16879,10 @@ "202": { "description": "Operation is in progress.", "schema": { - "$ref": "./CommonDefinitions.json#/definitions/Operation" + "type": "array", + "items": { + "$ref": "#/definitions/NetworkTrace" + } } }, "default": { diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json index 72a7fd4e6b1e..cce0885ef8af 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperation.json @@ -20,10 +20,16 @@ }, "202": { "headers": { - "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", - "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, - "body": { } + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] } } } \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json deleted file mode 100644 index 0921bcd01c37..000000000000 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/GetWebSiteNetworkTraceOperationV2.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parameters": { - "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - "resourceGroupName": "testrg123", - "name": "SampleApp", - "slot": "Production", - "operationId": "c291433b-53ad-4c49-8cae-0a293eae1c6d", - "api-version": "2018-02-01" - }, - "responses": { - "200": { - "headers": {}, - "body": [ - { - "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", - "status": "Succeeded", - "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" - } - ] - }, - "202": { - "headers": { - "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", - "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/networktraces/current/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" - }, - "body": { } - } - } -} \ No newline at end of file diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json index 4259fde0568a..24465b2d26ee 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2018-02-01/examples/StartWebSiteNetworkTraceOperation.json @@ -23,7 +23,13 @@ "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d", "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/SampleApp/operationresults/c291433b-53ad-4c49-8cae-0a293eae1c6d" }, - "body": {} + "body": [ + { + "path": "D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip", + "status": "Succeeded", + "message": "Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip" + } + ] } } } \ No newline at end of file