watchers
Creates, updates, deletes, gets or lists a watchers
resource.
Overview
Name | watchers |
Type | Resource |
Id | azure.network.watchers |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- list_all
Request successful. The operation returns a network watcher resource.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network watcher. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Request successful. The operation returns a list of network watcher resources.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network watcher. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Request successful. The operation returns a list of network watcher resources.
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Properties of the network watcher. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , networkWatcherName , subscriptionId | Gets the specified network watcher by resource group. | |
list | select | resourceGroupName , subscriptionId | Gets all network watchers by resource group. | |
list_all | select | subscriptionId | Gets all network watchers by subscription. | |
create_or_update | insert | resourceGroupName , networkWatcherName , subscriptionId | Creates or updates a network watcher in the specified resource group. | |
delete | delete | resourceGroupName , networkWatcherName , subscriptionId | Deletes the specified network watcher resource. | |
update_tags | exec | resourceGroupName , networkWatcherName , subscriptionId | Updates a network watcher tags. | |
verify_ip_flow | exec | resourceGroupName , networkWatcherName , subscriptionId , targetResourceId , direction , protocol , localPort , remotePort , localIPAddress , remoteIPAddress | Verify IP flow from the specified VM to a location given the currently configured NSG rules. | |
set_flow_log_configuration | exec | resourceGroupName , networkWatcherName , subscriptionId , targetResourceId , properties | Configures flow log and traffic analytics (optional) on a specified resource. | |
check_connectivity | exec | resourceGroupName , networkWatcherName , subscriptionId , source , destination | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server. |
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.
Name | Datatype | Description |
---|---|---|
networkWatcherName | string | The name of the network watcher resource. |
resourceGroupName | string | The name of the network watcher resource group. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- get
- list
- list_all
Gets the specified network watcher by resource group.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND networkWatcherName = '{{ networkWatcherName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets all network watchers by resource group.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets all network watchers by subscription.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.network.watchers
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a network watcher in the specified resource group.
INSERT INTO azure.network.watchers (
data__properties,
resourceGroupName,
networkWatcherName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ networkWatcherName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: watchers
props:
- name: resourceGroupName
value: string
description: Required parameter for the watchers resource.
- name: networkWatcherName
value: string
description: Required parameter for the watchers resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the watchers resource.
- name: properties
value: object
description: |
Properties of the network watcher.
DELETE
examples
- delete
Deletes the specified network watcher resource.
DELETE FROM azure.network.watchers
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND networkWatcherName = '{{ networkWatcherName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- update_tags
- verify_ip_flow
- set_flow_log_configuration
- check_connectivity
Updates a network watcher tags.
EXEC azure.network.watchers.update_tags
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;
Verify IP flow from the specified VM to a location given the currently configured NSG rules.
EXEC azure.network.watchers.verify_ip_flow
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"targetResourceId": "{{ targetResourceId }}",
"direction": "{{ direction }}",
"protocol": "{{ protocol }}",
"localPort": "{{ localPort }}",
"remotePort": "{{ remotePort }}",
"localIPAddress": "{{ localIPAddress }}",
"remoteIPAddress": "{{ remoteIPAddress }}",
"targetNicResourceId": "{{ targetNicResourceId }}"
}'
;
Configures flow log and traffic analytics (optional) on a specified resource.
EXEC azure.network.watchers.set_flow_log_configuration
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"targetResourceId": "{{ targetResourceId }}",
"properties": "{{ properties }}",
"flowAnalyticsConfiguration": "{{ flowAnalyticsConfiguration }}",
"identity": "{{ identity }}"
}'
;
Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
EXEC azure.network.watchers.check_connectivity
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"source": "{{ source }}",
"destination": "{{ destination }}",
"protocol": "{{ protocol }}",
"protocolConfiguration": "{{ protocolConfiguration }}",
"preferredIPVersion": "{{ preferredIPVersion }}"
}'
;