watchers
Creates, updates, deletes, gets or lists a watchers
resource.
Overview
Name | watchers |
Type | Resource |
Id | azure.network.watchers |
Fields
- vw_watchers
- watchers
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | Resource name. |
etag | text | A unique read-only string that changes whenever the resource is updated. |
location | text | Resource location. |
networkWatcherName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
type | text | Resource type. |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
location | string | Resource location. |
properties | object | The network watcher properties. |
tags | object | Resource tags. |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | networkWatcherName, resourceGroupName, 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 | networkWatcherName, resourceGroupName, subscriptionId | Creates or updates a network watcher in the specified resource group. |
delete | DELETE | networkWatcherName, resourceGroupName, subscriptionId | Deletes the specified network watcher resource. |
check_connectivity | EXEC | networkWatcherName, resourceGroupName, subscriptionId, data__destination, data__source | 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. |
set_flow_log_configuration | EXEC | networkWatcherName, resourceGroupName, subscriptionId, data__properties, data__targetResourceId | Configures flow log and traffic analytics (optional) on a specified resource. |
update_tags | EXEC | networkWatcherName, resourceGroupName, subscriptionId | Updates a network watcher tags. |
verify_ip_flow | EXEC | networkWatcherName, resourceGroupName, subscriptionId, data__direction, data__localIPAddress, data__localPort, data__protocol, data__remoteIPAddress, data__remotePort, data__targetResourceId | Verify IP flow from the specified VM to a location given the currently configured NSG rules. |
SELECT
examples
Gets all network watchers by subscription.
- vw_watchers
- watchers
SELECT
id,
name,
etag,
location,
networkWatcherName,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type
FROM azure.network.vw_watchers
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.network.watchers
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new watchers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.watchers (
networkWatcherName,
resourceGroupName,
subscriptionId,
properties,
id,
location,
tags
)
SELECT
'{{ networkWatcherName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: etag
value: string
- name: properties
value:
- name: provisioningState
value: []
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
DELETE
example
Deletes the specified watchers
resource.
/*+ delete */
DELETE FROM azure.network.watchers
WHERE networkWatcherName = '{{ networkWatcherName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';