-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added NetworkConfigurationDiagnostic rest API + example (#3599)
* Added NetworkConfigurationDiagnostic rest API + example * Removed 'read-only' from queries in NetworkConfigurationDiagnostic API * Added long-running-operation-options: final-state-via location to networkConfigurationDiagnostic API * Added QueryConnectionMonitors API + example * Fixed example name * Added default response to all APIs * Fixed reference to ErrorDetails * Fixed response for QueryConnectionMonitors API + fixed example * Added properties to ConnectionStateSnapshot * Fixed types for latencies in networkwatcher.json
- Loading branch information
Showing
3 changed files
with
816 additions
and
2 deletions.
There are no files selected for viewing
194 changes: 194 additions & 0 deletions
194
...soft.Network/stable/2018-06-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...r/Microsoft.Network/stable/2018-06-01/examples/NetworkWatcherQueryConnectionMonitors.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"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": [] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.