Skip to main content

network_watchers

Creates, updates, deletes, gets or lists a network_watchers resource.

Overview

Namenetwork_watchers
TypeResource
Idazure.network.network_watchers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
nextHopIpAddressstringNext hop IP Address.
nextHopTypestringNext hop type. Known values are: "Internet", "VirtualAppliance", "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "VirtualApplianceEcmp", and "None". (Internet, VirtualAppliance, VirtualNetworkGateway, VnetLocal, HyperNetGateway, VirtualApplianceEcmp, None)
routeTableIdstringThe resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_next_hopselectresource_group_name, network_watcher_name, subscription_idGets the next hop from the specified VM.
get_azure_reachability_reportselectresource_group_name, network_watcher_name, subscription_idNOTE: This feature is currently in preview and still being tested for stability. Gets the relative latency score for internet service providers from a specified location to Azure regions.
get_troubleshootingselectresource_group_name, network_watcher_name, subscription_idInitiate troubleshooting on a specified resource.
get_network_configuration_diagnosticselectresource_group_name, network_watcher_name, subscription_idGets Network Configuration Diagnostic data to help customers understand and debug network behavior. It provides detailed information on what security rules were applied to a specified traffic flow and the result of evaluating these rules. Customers must provide details of a flow like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, the rules evaluated for the specified flow and the evaluation results.
check_connectivityselectresource_group_name, network_watcher_name, subscription_idVerifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
get_vm_security_rulesselectresource_group_name, network_watcher_name, subscription_idGets the configured and effective security group rules on the specified VM.
getselectresource_group_name, network_watcher_name, subscription_idGets the specified network watcher by resource group.
listselectresource_group_name, subscription_idGets all network watchers by resource group.
list_allselectsubscription_idGets all network watchers by subscription.
create_or_updateinsertresource_group_name, network_watcher_name, subscription_idCreates or updates a network watcher in the specified resource group.
update_tagsupdateresource_group_name, network_watcher_name, subscription_idUpdates a network watcher tags.
create_or_updatereplaceresource_group_name, network_watcher_name, subscription_idCreates or updates a network watcher in the specified resource group.
deletedeleteresource_group_name, network_watcher_name, subscription_idDeletes the specified network watcher resource.
list_available_providersexecresource_group_name, network_watcher_name, subscription_idNOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.
get_topologyexecresource_group_name, network_watcher_name, subscription_idGets the current network topology by resource group.
get_troubleshooting_resultexecresource_group_name, network_watcher_name, subscription_id, targetResourceIdGet the last completed troubleshooting result on a specified resource.
get_flow_log_statusexecresource_group_name, network_watcher_name, subscription_id, targetResourceIdQueries status of flow log and traffic analytics (optional) on a specified resource.
verify_ip_flowexecresource_group_name, network_watcher_name, subscription_id, targetResourceId, direction, protocol, localPort, remotePort, localIPAddress, remoteIPAddressVerify IP flow from the specified VM to a location given the currently configured NSG rules.
set_flow_log_configurationexecresource_group_name, network_watcher_name, subscription_id, targetResourceId, propertiesConfigures flow log and traffic analytics (optional) on a specified resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
network_watcher_namestringThe name of the network watcher. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets the next hop from the specified VM.

SELECT
nextHopIpAddress,
nextHopType,
routeTableId
FROM azure.network.network_watchers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_watcher_name = '{{ network_watcher_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a network watcher in the specified resource group.

INSERT INTO azure.network.network_watchers (
id,
location,
tags,
properties,
resource_group_name,
network_watcher_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ network_watcher_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Updates a network watcher tags.

UPDATE azure.network.network_watchers
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND network_watcher_name = '{{ network_watcher_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

REPLACE examples

Creates or updates a network watcher in the specified resource group.

REPLACE azure.network.network_watchers
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND network_watcher_name = '{{ network_watcher_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

DELETE examples

Deletes the specified network watcher resource.

DELETE FROM azure.network.network_watchers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND network_watcher_name = '{{ network_watcher_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

NOTE: This feature is currently in preview and still being tested for stability. Lists all available internet service providers for a specified Azure region.

EXEC azure.network.network_watchers.list_available_providers 
@resource_group_name='{{ resource_group_name }}' --required,
@network_watcher_name='{{ network_watcher_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"azureLocations": "{{ azureLocations }}",
"country": "{{ country }}",
"state": "{{ state }}",
"city": "{{ city }}"
}'
;