Skip to main content

connection_monitors

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

Overview

Nameconnection_monitors
TypeResource
Idazure.network.connection_monitors

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns a connection monitor.

NameDatatypeDescription
idstringID of the connection monitor.
namestringName of the connection monitor.
etagstringA unique read-only string that changes whenever the resource is updated.
locationstringConnection monitor location.
propertiesobjectProperties of the connection monitor result.
tagsobjectConnection monitor tags.
typestringConnection monitor type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdGets a connection monitor by name.
listselectresourceGroupName, networkWatcherName, subscriptionIdLists all connection monitors for the specified Network Watcher.
create_or_updateinsertresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionId, data__propertiesmigrateCreate or update a connection monitor.
deletedeleteresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdDeletes the specified connection monitor.
update_tagsexecresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdUpdate tags of the specified connection monitor.
stopexecresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdStops the specified connection monitor.
startexecresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdStarts the specified connection monitor.
queryexecresourceGroupName, networkWatcherName, connectionMonitorName, subscriptionIdQuery a snapshot of the most recent connection states.

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
connectionMonitorNamestringThe name given to the connection monitor.
networkWatcherNamestringThe name of the Network Watcher resource.
resourceGroupNamestringThe name of the resource group containing Network Watcher.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
migratestringValue indicating whether connection monitor V1 should be migrated to V2 format.

SELECT examples

Gets a connection monitor by name.

SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.network.connection_monitors
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND networkWatcherName = '{{ networkWatcherName }}' -- required
AND connectionMonitorName = '{{ connectionMonitorName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or update a connection monitor.

INSERT INTO azure.network.connection_monitors (
data__location,
data__tags,
data__properties,
resourceGroupName,
networkWatcherName,
connectionMonitorName,
subscriptionId,
migrate
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ resourceGroupName }}',
'{{ networkWatcherName }}',
'{{ connectionMonitorName }}',
'{{ subscriptionId }}',
'{{ migrate }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

DELETE examples

Deletes the specified connection monitor.

DELETE FROM azure.network.connection_monitors
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND networkWatcherName = '{{ networkWatcherName }}' --required
AND connectionMonitorName = '{{ connectionMonitorName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Update tags of the specified connection monitor.

EXEC azure.network.connection_monitors.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@networkWatcherName='{{ networkWatcherName }}' --required,
@connectionMonitorName='{{ connectionMonitorName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;