Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added NetworkConfigurationDiagnostic rest API + example #3599

Merged
merged 10 commits into from
Aug 15, 2018
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
}
]
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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": []
}
]
}
}
]
}
}
}
}
Loading