From 5f17a1c59bce27b14512aa3b408dcf4fc7ef73bd Mon Sep 17 00:00:00 2001 From: Irina Rogozhkina Date: Thu, 13 Sep 2018 13:57:12 -0700 Subject: [PATCH] Updated NetworkConfigurationDiagnostic API + example --- ...WatcherNetworkConfigurationDiagnostic.json | 10 ++++-- .../stable/2018-08-01/networkWatcher.json | 31 ++++++++++++++----- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json index 525c1ebba653..4700537d0242 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json @@ -6,7 +6,7 @@ "networkWatcherName" : "nw1", "parameters" : { "targetResourceId" : "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1", - "queries": [ + "profiles": [ { "direction" : "Inbound", "protocol" : "TCP", @@ -22,7 +22,7 @@ "body" : { "results": [ { - "trafficQuery": { + "profile": { "direction": "Inbound", "protocol": "TCP", "source": "10.1.0.4", @@ -34,6 +34,7 @@ "evaluatedNetworkSecurityGroups": [ { "networkSecurityGroupId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg1", + "appliedTo": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet/subnets/AppSubnet", "matchedRule": { "ruleName": "UserRule_fe_rule", "action": "Allow" @@ -83,6 +84,7 @@ }, { "networkSecurityGroupId": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NwRgCentralUSEUAP_copy/providers/Microsoft.Network/networkSecurityGroups/AppNSG", + "appliedTo": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet/networkInterfaces/nic", "matchedRule": { "ruleName": "UserRule_fe_rule", "action": "Allow" @@ -108,7 +110,7 @@ "body" : { "results": [ { - "trafficQuery": { + "profile": { "direction": "Inbound", "protocol": "TCP", "source": "10.1.0.4", @@ -120,6 +122,7 @@ "evaluatedNetworkSecurityGroups": [ { "networkSecurityGroupId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/networkSecurityGroups/nsg1", + "appliedTo": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet/subnets/AppSubnet", "matchedRule": { "ruleName": "UserRule_fe_rule", "action": "Allow" @@ -169,6 +172,7 @@ }, { "networkSecurityGroupId": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NwRgCentralUSEUAP_copy/providers/Microsoft.Network/networkSecurityGroups/AppNSG", + "appliedTo": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/virtualNetworks/vnet/networkInterfaces/nic", "matchedRule": { "ruleName": "UserRule_fe_rule", "action": "Allow" diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/networkWatcher.json b/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/networkWatcher.json index 0803437aeef0..6103a395dcf9 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/networkWatcher.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2018-08-01/networkWatcher.json @@ -3432,23 +3432,36 @@ "description": "Parameters to get network configuration diagnostic.", "required": [ "targetResourceId", - "queries" + "profiles" ], "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": { + "verbosityLevel": { + "type": "string", + "enum": [ + "Normal", + "Minimum", + "Full" + ], + "x-ms-enum": { + "name": "VerbosityLevel", + "modelAsString": true + }, + "description": "Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'." + }, + "profiles": { "type": "array", - "description": "List of traffic queries.", + "description": "List of network configuration diagnostic profiles.", "items": { - "$ref": "#/definitions/TrafficQuery" + "$ref": "#/definitions/NetworkConfigurationDiagnosticProfile" } } } }, - "TrafficQuery": { + "NetworkConfigurationDiagnosticProfile": { "description": "Parameters to compare with network configuration.", "required": [ "direction", @@ -3504,8 +3517,8 @@ "NetworkConfigurationDiagnosticResult": { "description": "Network configuration diagnostic result corresponded to provided traffic query.", "properties": { - "trafficQuery": { - "$ref": "#/definitions/TrafficQuery" + "profile": { + "$ref": "#/definitions/NetworkConfigurationDiagnosticProfile" }, "networkSecurityGroupResult": { "$ref": "#/definitions/NetworkSecurityGroupResult" @@ -3544,6 +3557,10 @@ "type": "string", "description": "Network security group ID." }, + "appliedTo": { + "type": "string", + "description": "Resource ID of nic or subnet to which network security group is applied." + }, "matchedRule": { "$ref": "#/definitions/MatchedRule" },