From 6ad7c8a080cf905ffcbe9c42c0382059ce753188 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Tue, 7 Aug 2018 11:12:03 -0700 Subject: [PATCH 01/11] Added NetworkConfigurationDiagnostic rest API + example --- ...WatcherNetworkConfigurationDiagnostic.json | 194 +++++++++++++++ .../stable/2018-06-01/networkWatcher.json | 230 ++++++++++++++++++ 2 files changed, 424 insertions(+) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json new file mode 100644 index 000000000000..525c1ebba653 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json @@ -0,0 +1,194 @@ +{ + "parameters" : { + "api-version": "2018-06-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "parameters" : { + "targetResourceId" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", + "queries": [ + { + "direction" : "Inbound", + "protocol" : "TCP", + "source" : "10.1.0.4", + "destination" : "12.11.12.14", + "destinationPort" : "12100" + } + ] + } + }, + "responses" : { + "200" : { + "body" : { + "results": [ + { + "trafficQuery": { + "direction": "Inbound", + "protocol": "TCP", + "source": "10.1.0.4", + "destination": "12.11.12.14", + "destinationPort": "12100" + }, + "networkSecurityGroupResult": { + "securityRuleAccessResult": "Allow", + "evaluatedNetworkSecurityGroups": [ + { + "networkSecurityGroupId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg1", + "matchedRule": { + "ruleName": "UserRule_fe_rule", + "action": "Allow" + }, + "rulesEvaluationResult": [ + { + "name": "UserRule_Cleanuptool-Allow-100", + "protocolMatched": true, + "sourceMatched": false, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Allow-101", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Allow-102", + "protocolMatched": true, + "sourceMatched": false, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Deny-103", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_fe_rule", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": true + } + ] + }, + { + "networkSecurityGroupId": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NwRgCentralUSEUAP_copy/providers/Microsoft.Network/networkSecurityGroups/AppNSG", + "matchedRule": { + "ruleName": "UserRule_fe_rule", + "action": "Allow" + }, + "rulesEvaluationResult": [ + { + "name": "UserRule_fe_rule", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": true + } + ] + } + ] + } + } + ] + } + }, + "202" : { + "body" : { + "results": [ + { + "trafficQuery": { + "direction": "Inbound", + "protocol": "TCP", + "source": "10.1.0.4", + "destination": "12.11.12.14", + "destinationPort": "12100" + }, + "networkSecurityGroupResult": { + "securityRuleAccessResult": "Allow", + "evaluatedNetworkSecurityGroups": [ + { + "networkSecurityGroupId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg1", + "matchedRule": { + "ruleName": "UserRule_fe_rule", + "action": "Allow" + }, + "rulesEvaluationResult": [ + { + "name": "UserRule_Cleanuptool-Allow-100", + "protocolMatched": true, + "sourceMatched": false, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Allow-101", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Allow-102", + "protocolMatched": true, + "sourceMatched": false, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_Cleanuptool-Deny-103", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": false + }, + { + "name": "UserRule_fe_rule", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": true + } + ] + }, + { + "networkSecurityGroupId": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NwRgCentralUSEUAP_copy/providers/Microsoft.Network/networkSecurityGroups/AppNSG", + "matchedRule": { + "ruleName": "UserRule_fe_rule", + "action": "Allow" + }, + "rulesEvaluationResult": [ + { + "name": "UserRule_fe_rule", + "protocolMatched": true, + "sourceMatched": true, + "sourcePortMatched": true, + "destinationMatched": true, + "destinationPortMatched": true + } + ] + } + ] + } + } + ] + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 05dc5c164a59..f5d8e6e96ef3 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1594,6 +1594,64 @@ "List connection monitors": { "$ref": "./examples/NetworkWatcherConnectionMonitorList.json" } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic": { + "post": { + "tags": [ + "NetworkWatchers" + ], + "operationId": "NetworkWatchers_GetNetworkConfigurationDiagnostic", + "x-ms-long-running-operation": true, + "description": "Get network configuration diagnostic.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the network watcher." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/NetworkConfigurationDiagnosticParameters" + }, + "description": "Parameters to get network configuration diagnostic." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns the result of network condifuration diagnostic.", + "schema": { + "$ref": "#/definitions/NetworkConfigurationDiagnosticResponse" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/NetworkConfigurationDiagnosticResponse" + } + } + }, + "x-ms-examples": { + "Ip flow verify": { "$ref": "./examples/NetworkWatcherNetworkConfigurationDiagnostic.json" } + } + } } }, "definitions": { @@ -3148,6 +3206,178 @@ } }, "description": "Connection state snapshot." + }, + "NetworkConfigurationDiagnosticParameters": { + "description": "Parameters to get network configuration diagnostic.", + "required": [ + "targetResourceId", + "queries" + ], + "properties": { + "targetResourceId": { + "type": "string", + "description": "The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway." + }, + "queries": { + "readOnly": true, + "type": "array", + "description": "List of traffic queries.", + "items": { + "$ref": "#/definitions/TrafficQuery" + } + } + } + }, + "TrafficQuery": { + "description": "Parameters to compare with network configuration.", + "required": [ + "direction", + "protocol", + "source", + "destination", + "destinationPort" + ], + "properties": { + "direction": { + "type": "string", + "enum": [ + "Inbound", + "Outbound" + ], + "x-ms-enum": { + "name": "Direction", + "modelAsString": true + }, + "description": "The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'." + }, + "protocol": { + "type": "string", + "description": "Protocol to be verified on. Accepted values are '*', TCP, UDP." + }, + "source": { + "type": "string", + "description": "Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag." + }, + "destination": { + "type": "string", + "description": "Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag." + }, + "destinationPort": { + "type": "string", + "description": "Traffice destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100)." + } + } + }, + "NetworkConfigurationDiagnosticResponse": { + "description": "Results of network configuration diagnostic on the target resource.", + "properties": { + "results": { + "readOnly": true, + "type": "array", + "description": "List of network configuration diagnostic results.", + "items": { + "$ref": "#/definitions/NetworkConfigurationDiagnosticResult" + } + } + } + }, + "NetworkConfigurationDiagnosticResult": { + "description": "Network configuration diagnostic result corresponded to provided traffic query.", + "properties": { + "trafficQuery": { + "$ref": "#/definitions/TrafficQuery" + }, + "networkSecurityGroupResult": { + "$ref": "#/definitions/NetworkSecurityGroupResult" + } + } + }, + "NetworkSecurityGroupResult": { + "description": "Network configuration diagnostic result corresponded provided traffic query.", + "properties": { + "securityRuleAccessResult": { + "type": "string", + "description": "The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "SecurityRuleAccess", + "modelAsString": true + } + }, + "evaluatedNetworkSecurityGroups": { + "readOnly": true, + "type": "array", + "description": "List of results network security groups diagnostic.", + "items": { + "$ref": "#/definitions/EvaluatedNetworkSecurityGroup" + } + } + } + }, + "EvaluatedNetworkSecurityGroup": { + "description": "Results of network security group evaluation.", + "properties": { + "networkSecurityGroupId": { + "type": "string", + "description": "Network security group ID." + }, + "matchedRule": { + "$ref": "#/definitions/MatchedRule" + }, + "rulesEvaluationResult": { + "readOnly": true, + "type": "array", + "description": "List of network security rules evaluation results.", + "items": { + "$ref": "#/definitions/NetworkSecurityRulesEvaluationResult" + } + } + } + }, + "MatchedRule": { + "description": "Matched rule.", + "properties": { + "ruleName": { + "type": "string", + "description": "Name of the matched network security rule." + }, + "action": { + "type": "string", + "description": "The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'." + } + } + }, + "NetworkSecurityRulesEvaluationResult": { + "description": "Network security rules evaluation result.", + "properties": { + "name": { + "type": "string", + "description": "Name of the network security rule." + }, + "protocolMatched": { + "type": "boolean", + "description": "Value indicating whether protocol is matched." + }, + "sourceMatched": { + "type": "boolean", + "description": "Value indicating whether source is matched." + }, + "sourcePortMatched": { + "type": "boolean", + "description": "Value indicating whether source port is matched." + }, + "destinationMatched": { + "type": "boolean", + "description": "Value indicating whether destination is matched." + }, + "destinationPortMatched": { + "type": "boolean", + "description": "Value indicating whether destination port is matched." + } + } } } } From 6909b52c5e23056444d410930b8702e7540811e2 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Tue, 7 Aug 2018 13:51:43 -0700 Subject: [PATCH 02/11] Removed 'read-only' from queries in NetworkConfigurationDiagnostic API --- .../Microsoft.Network/stable/2018-06-01/networkWatcher.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index f5d8e6e96ef3..06f4f5a1833f 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -3219,7 +3219,6 @@ "description": "The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway." }, "queries": { - "readOnly": true, "type": "array", "description": "List of traffic queries.", "items": { From 6e6b30b52851dcd98880dc07125d2fc2faf97576 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Fri, 10 Aug 2018 10:55:18 -0700 Subject: [PATCH 03/11] Added long-running-operation-options: final-state-via location to networkConfigurationDiagnostic API --- .../Microsoft.Network/stable/2018-06-01/networkWatcher.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 06f4f5a1833f..cd3a18d1d06e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1602,6 +1602,9 @@ ], "operationId": "NetworkWatchers_GetNetworkConfigurationDiagnostic", "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "description": "Get network configuration diagnostic.", "parameters": [ { @@ -1649,7 +1652,7 @@ } }, "x-ms-examples": { - "Ip flow verify": { "$ref": "./examples/NetworkWatcherNetworkConfigurationDiagnostic.json" } + "Network configuration diagnostic": { "$ref": "./examples/NetworkWatcherNetworkConfigurationDiagnostic.json" } } } } From dfeababd5df624c8c27a480af7b1102ecd6e0967 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Sat, 11 Aug 2018 09:08:04 -0700 Subject: [PATCH 04/11] Added QueryConnectionMonitors API + example --- ...NetworkWatcherQueryConnectionMonitors.json | 65 ++++++++++ .../stable/2018-06-01/networkWatcher.json | 112 +++++++++++++++++- 2 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json new file mode 100644 index 000000000000..8b2d7e870bd8 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json @@ -0,0 +1,65 @@ +{ + "parameters" : { + "api-version": "2018-06-01", + "subscriptionId" : "subid", + "resourceGroupName" : "rg1", + "networkWatcherName" : "nw1", + "parameters" : { + "properties": { + "connectionMonitorIds": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1" + ] + } + } + }, + "responses" : { + "200" : { + "body" : { + "value": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchersnw1/connectionMonitors/cm1", + "report": { + "states": [ + { + "connectionState": "Reachable", + "startTime": "2018-08-10T05:41:23", + "evaluationState": "NotStarted", + "avgLatencyInMs": 1, + "minLatencyInMs": 1, + "maxLatencyInMs": 1, + "probesSent": 3, + "probesFailed": 0, + "hops": [] + } + ] + } + } + ] + } + }, + "202" : { + "body" : { + "value": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchersnw1/connectionMonitors/cm1", + "report": { + "states": [ + { + "connectionState": "Reachable", + "startTime": "2018-08-10T05:41:23", + "evaluationState": "NotStarted", + "avgLatencyInMs": 1, + "minLatencyInMs": 1, + "maxLatencyInMs": 1, + "probesSent": 3, + "probesFailed": 0, + "hops": [] + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index cd3a18d1d06e..9caec47ab468 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1655,7 +1655,71 @@ "Network configuration diagnostic": { "$ref": "./examples/NetworkWatcherNetworkConfigurationDiagnostic.json" } } } - } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryConnectionMonitors": { + "post": { + "tags": [ + "NetworkWatchers" + ], + "operationId": "NetworkWatchers_QueryConnectionMonitors", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "description": "Query connection monitors.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "networkWatcherName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the network watcher." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/QueryConnectionMonitorsParameters" + }, + "description": "Parameters to get network configuration diagnostic." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The operation returns the result of network condifuration diagnostic.", + "schema": { + "$ref": "#/definitions/QueryConnectionMonitorsResponse" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "schema": { + "$ref": "#/definitions/QueryConnectionMonitorsResponse" + } + } + }, + "x-ms-examples": { + "Query connection monitors": { "$ref": "./examples/QueryConnectionMonitors.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } }, "definitions": { "NetworkWatcher": { @@ -3380,6 +3444,50 @@ "description": "Value indicating whether destination port is matched." } } + }, + "QueryConnectionMonitorsParameters": { + "description": "Parameters to query connection monitors.", + "properties": { + "connectionMonitorIds": { + "type": "array", + "description": "List of connection monitors ID.", + "items": { + "type": "string" + } + } + } + }, + "QueryConnectionMonitorsResponse": { + "description": "Results of query connection monitors.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ConnectionMonitorsQueryResultItem" + }, + "description": "The list query connection monitor results." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of results." + } + } + }, + "ConnectionMonitorsQueryResultItem": { + "description": "Results of query particular connection monitor.", + "properties": { + "resourceId": { + "type": "string", + "description": "Connection monitor resource ID." + }, + "report": { + "type": "array", + "description": "List of connection monitors query results.", + "items": { + "$ref": "#/definitions/ConnectionMonitorQueryResult" + } + } + } } } -} +} \ No newline at end of file From f12e6b41326c05506097b75dce076c297074a3d2 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Sat, 11 Aug 2018 09:51:18 -0700 Subject: [PATCH 05/11] Fixed example name --- .../Microsoft.Network/stable/2018-06-01/networkWatcher.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 9caec47ab468..f2a1feb24ea3 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1713,7 +1713,7 @@ } }, "x-ms-examples": { - "Query connection monitors": { "$ref": "./examples/QueryConnectionMonitors.json" } + "Query connection monitors": { "$ref": "./examples/NetworkWatcherQueryConnectionMonitors.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" From 00fefeb8fe315113ffdd403ffae7e3e221b4f04b Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Mon, 13 Aug 2018 22:40:59 -0700 Subject: [PATCH 06/11] Added default response to all APIs --- .../stable/2018-06-01/networkWatcher.json | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index f2a1feb24ea3..2f45ce03ee9e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -84,6 +84,12 @@ "schema": { "$ref": "#/definitions/NetworkWatcher" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -124,6 +130,12 @@ "schema": { "$ref": "#/definitions/NetworkWatcher" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -165,6 +177,12 @@ }, "204": { "description": "Delete successful." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -214,6 +232,12 @@ "schema": { "$ref": "#/definitions/NetworkWatcher" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -249,6 +273,12 @@ "schema": { "$ref": "#/definitions/NetworkWatcherListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -280,6 +310,12 @@ "schema": { "$ref": "#/definitions/NetworkWatcherListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -334,6 +370,12 @@ "schema": { "$ref": "#/definitions/Topology" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -394,6 +436,12 @@ "schema": { "$ref": "#/definitions/VerificationIPFlowResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -452,6 +500,12 @@ "schema": { "$ref": "#/definitions/NextHopResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -510,6 +564,12 @@ "schema": { "$ref": "#/definitions/SecurityGroupViewResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -569,6 +629,12 @@ "schema": { "$ref": "#/definitions/PacketCaptureResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -616,6 +682,12 @@ "schema": { "$ref": "#/definitions/PacketCaptureResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -664,6 +736,12 @@ }, "202": { "description": "Accepted and the operation will complete asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -714,6 +792,12 @@ }, "202": { "description": "Accepted and the operation will complete asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -770,6 +854,12 @@ "schema": { "$ref": "#/definitions/PacketCaptureQueryStatusResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -812,6 +902,12 @@ "schema": { "$ref": "#/definitions/PacketCaptureListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -873,6 +969,12 @@ "schema": { "$ref": "#/definitions/TroubleshootingResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -931,6 +1033,12 @@ "schema": { "$ref": "#/definitions/TroubleshootingResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -990,6 +1098,12 @@ "schema": { "$ref": "#/definitions/FlowLogInformation" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1049,6 +1163,12 @@ "schema": { "$ref": "#/definitions/FlowLogInformation" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1107,6 +1227,12 @@ "schema": { "$ref": "#/definitions/ConnectivityInformation" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1165,6 +1291,12 @@ "schema": { "$ref": "#/definitions/AzureReachabilityReport" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1225,6 +1357,12 @@ "schema": { "$ref": "#/definitions/AvailableProvidersList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1292,6 +1430,12 @@ "schema": { "$ref": "#/definitions/ConnectionMonitorResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1339,6 +1483,12 @@ "schema": { "$ref": "#/definitions/ConnectionMonitorResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1387,6 +1537,12 @@ }, "202": { "description": "Accepted. The operation will complete asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1437,6 +1593,12 @@ }, "202": { "description": "Accepted. The operation will complete asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1487,6 +1649,12 @@ }, "202": { "description": "Accepted. The operation will complete asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1543,6 +1711,12 @@ "schema": { "$ref": "#/definitions/ConnectionMonitorQueryResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1585,6 +1759,12 @@ "schema": { "$ref": "#/definitions/ConnectionMonitorListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-pageable": { @@ -1649,6 +1829,12 @@ "schema": { "$ref": "#/definitions/NetworkConfigurationDiagnosticResponse" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1710,6 +1896,12 @@ "schema": { "$ref": "#/definitions/QueryConnectionMonitorsResponse" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } } }, "x-ms-examples": { @@ -1722,6 +1914,32 @@ } }, "definitions": { + "ErrorResponse": { + "description": "The error object.", + "properties": { + "error": { + "title": "Error", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "type": "string" + }, + "message": { + "description": "A human-readable representation of the error.", + "type": "string" + }, + "details": { + "description": "A human-readable representation of the error's details.", + "type": "string" + } + } + }, "NetworkWatcher": { "properties": { "etag": { From 9e5daf5f1cd3c59140eec06d6fb55e6456323c54 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Mon, 13 Aug 2018 22:56:59 -0700 Subject: [PATCH 07/11] Fixed reference to ErrorDetails --- .../stable/2018-06-01/networkWatcher.json | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 2f45ce03ee9e..56bf2ac4152b 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1919,24 +1919,7 @@ "properties": { "error": { "title": "Error", - "$ref": "#/definitions/ErrorDetails" - } - } - }, - "ErrorDetails": { - "description": "The details of the error.", - "properties": { - "code": { - "description": "One of a server-defined set of error codes.", - "type": "string" - }, - "message": { - "description": "A human-readable representation of the error.", - "type": "string" - }, - "details": { - "description": "A human-readable representation of the error's details.", - "type": "string" + "$ref": "./network.json#/definitions/ErrorDetails" } } }, From 0858a238c818aa119584a9d61deddc2a26494de9 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Wed, 15 Aug 2018 10:54:54 -0700 Subject: [PATCH 08/11] Fixed response for QueryConnectionMonitors API + fixed example --- .../examples/NetworkWatcherQueryConnectionMonitors.json | 8 +++----- .../stable/2018-06-01/networkWatcher.json | 6 +----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json index 8b2d7e870bd8..543612e1db01 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json @@ -5,11 +5,9 @@ "resourceGroupName" : "rg1", "networkWatcherName" : "nw1", "parameters" : { - "properties": { - "connectionMonitorIds": [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1" - ] - } + "connectionMonitorIds": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1" + ] } }, "responses" : { diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 56bf2ac4152b..e9a0bf5182ff 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -3682,11 +3682,7 @@ "description": "Connection monitor resource ID." }, "report": { - "type": "array", - "description": "List of connection monitors query results.", - "items": { - "$ref": "#/definitions/ConnectionMonitorQueryResult" - } + "$ref": "#/definitions/ConnectionMonitorQueryResult" } } } From 83e3d199bfefb33bf30457c624627a4d0bc13b8f Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Wed, 15 Aug 2018 13:23:20 -0700 Subject: [PATCH 09/11] Added properties to ConnectionStateSnapshot --- ...NetworkWatcherQueryConnectionMonitors.json | 4 ++-- .../stable/2018-06-01/networkWatcher.json | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json index 543612e1db01..751adc32a538 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json @@ -20,7 +20,7 @@ "states": [ { "connectionState": "Reachable", - "startTime": "2018-08-10T05:41:23", + "startTime": "2018-08-10T05:41:23Z", "evaluationState": "NotStarted", "avgLatencyInMs": 1, "minLatencyInMs": 1, @@ -44,7 +44,7 @@ "states": [ { "connectionState": "Reachable", - "startTime": "2018-08-10T05:41:23", + "startTime": "2018-08-10T05:41:23Z", "evaluationState": "NotStarted", "avgLatencyInMs": 1, "minLatencyInMs": 1, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index e9a0bf5182ff..9053ee2ac3c5 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -3464,6 +3464,26 @@ }, "description": "Connectivity analysis evaluation state." }, + "avgLatencyInMs": { + "type": "int", + "description": "Average latency in ms." + }, + "minLatencyInMs": { + "type": "int", + "description": "Minimum latency in ms." + }, + "maxLatencyInMs": { + "type": "int", + "description": "Maximum latency in ms." + }, + "probesSent": { + "type": "int", + "description": "The number of sent probes." + }, + "probesFailed": { + "type": "int", + "description": "The number of failed probes." + }, "hops": { "readOnly": true, "type": "array", From 377e5cc3f8f10f71d7816d78462fbb68685453bd Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Wed, 15 Aug 2018 13:31:53 -0700 Subject: [PATCH 10/11] Fixed types for latencies in networkwatcher.json --- .../stable/2018-06-01/networkWatcher.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index 9053ee2ac3c5..5247d834ab36 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -3465,23 +3465,23 @@ "description": "Connectivity analysis evaluation state." }, "avgLatencyInMs": { - "type": "int", + "type": "integer", "description": "Average latency in ms." }, "minLatencyInMs": { - "type": "int", + "type": "integer", "description": "Minimum latency in ms." }, "maxLatencyInMs": { - "type": "int", + "type": "integer", "description": "Maximum latency in ms." }, "probesSent": { - "type": "int", + "type": "integer", "description": "The number of sent probes." }, "probesFailed": { - "type": "int", + "type": "integer", "description": "The number of failed probes." }, "hops": { From 6b8368dd434d71e004539fe305ae2c2c9cc100a3 Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Thu, 16 Aug 2018 14:14:39 -0700 Subject: [PATCH 11/11] Removed QueryConnectionMonitors API --- ...NetworkWatcherQueryConnectionMonitors.json | 63 ---------- .../stable/2018-06-01/networkWatcher.json | 112 +----------------- 2 files changed, 1 insertion(+), 174 deletions(-) delete mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json deleted file mode 100644 index 751adc32a538..000000000000 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "parameters" : { - "api-version": "2018-06-01", - "subscriptionId" : "subid", - "resourceGroupName" : "rg1", - "networkWatcherName" : "nw1", - "parameters" : { - "connectionMonitorIds": [ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/connectionMonitors/cm1" - ] - } - }, - "responses" : { - "200" : { - "body" : { - "value": [ - { - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchersnw1/connectionMonitors/cm1", - "report": { - "states": [ - { - "connectionState": "Reachable", - "startTime": "2018-08-10T05:41:23Z", - "evaluationState": "NotStarted", - "avgLatencyInMs": 1, - "minLatencyInMs": 1, - "maxLatencyInMs": 1, - "probesSent": 3, - "probesFailed": 0, - "hops": [] - } - ] - } - } - ] - } - }, - "202" : { - "body" : { - "value": [ - { - "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchersnw1/connectionMonitors/cm1", - "report": { - "states": [ - { - "connectionState": "Reachable", - "startTime": "2018-08-10T05:41:23Z", - "evaluationState": "NotStarted", - "avgLatencyInMs": 1, - "minLatencyInMs": 1, - "maxLatencyInMs": 1, - "probesSent": 3, - "probesFailed": 0, - "hops": [] - } - ] - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json index b8a538464326..53c78cec97ca 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-06-01/networkWatcher.json @@ -1844,77 +1844,7 @@ "Network configuration diagnostic": { "$ref": "./examples/NetworkWatcherNetworkConfigurationDiagnostic.json" } } } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryConnectionMonitors": { - "post": { - "tags": [ - "NetworkWatchers" - ], - "operationId": "NetworkWatchers_QueryConnectionMonitors", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" - }, - "description": "Query connection monitors.", - "parameters": [ - { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." - }, - { - "name": "networkWatcherName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the network watcher." - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/QueryConnectionMonitorsParameters" - }, - "description": "Parameters to get network configuration diagnostic." - }, - { - "$ref": "./network.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "./network.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "Request successful. The operation returns the result of network condifuration diagnostic.", - "schema": { - "$ref": "#/definitions/QueryConnectionMonitorsResponse" - } - }, - "202": { - "description": "Accepted and the operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/QueryConnectionMonitorsResponse" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Query connection monitors": { "$ref": "./examples/NetworkWatcherQueryConnectionMonitors.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } + } }, "definitions": { "ErrorResponse": { @@ -3668,46 +3598,6 @@ "description": "Value indicating whether destination port is matched." } } - }, - "QueryConnectionMonitorsParameters": { - "description": "Parameters to query connection monitors.", - "properties": { - "connectionMonitorIds": { - "type": "array", - "description": "List of connection monitors ID.", - "items": { - "type": "string" - } - } - } - }, - "QueryConnectionMonitorsResponse": { - "description": "Results of query connection monitors.", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ConnectionMonitorsQueryResultItem" - }, - "description": "The list query connection monitor results." - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of results." - } - } - }, - "ConnectionMonitorsQueryResultItem": { - "description": "Results of query particular connection monitor.", - "properties": { - "resourceId": { - "type": "string", - "description": "Connection monitor resource ID." - }, - "report": { - "$ref": "#/definitions/ConnectionMonitorQueryResult" - } - } } } } \ No newline at end of file