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:

NameDatatypeDescription
idstringID of the connection monitor.
namestringName of the connection monitor.
autoStartbooleanDetermines if the connection monitor will start automatically once created.
connectionMonitorTypestringType of connection monitor. Known values are: "MultiEndpoint" and "SingleSourceDestination". (MultiEndpoint, SingleSourceDestination)
destinationobjectDescribes the destination of connection monitor.
endpointsarrayList of connection monitor endpoints.
etagstringA unique read-only string that changes whenever the resource is updated.
locationstringConnection monitor location.
monitoringIntervalInSecondsintegerMonitoring interval in seconds.
monitoringStatusstringThe monitoring status of the connection monitor.
notesstringOptional notes to be associated with the connection monitor.
outputsarrayList of connection monitor outputs.
provisioningStatestringThe provisioning state of the connection monitor. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
sourceobjectDescribes the source of connection monitor.
startTimestring (date-time)The date and time when the connection monitor was started.
tagsobjectConnection monitor tags.
testConfigurationsarrayList of connection monitor test configurations.
testGroupsarrayList of connection monitor test groups.
typestringConnection monitor type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, network_watcher_name, connection_monitor_name, subscription_idGets a connection monitor by name.
listselectresource_group_name, network_watcher_name, subscription_idLists all connection monitors for the specified Network Watcher.
create_or_updateinsertresource_group_name, network_watcher_name, connection_monitor_name, subscription_id, propertiesmigrateCreate or update a connection monitor.
update_tagsupdateresource_group_name, network_watcher_name, connection_monitor_name, subscription_idUpdate tags of the specified connection monitor.
create_or_updatereplaceresource_group_name, network_watcher_name, connection_monitor_name, subscription_id, propertiesmigrateCreate or update a connection monitor.
deletedeleteresource_group_name, network_watcher_name, connection_monitor_name, subscription_idDeletes the specified connection monitor.
stopexecresource_group_name, network_watcher_name, connection_monitor_name, subscription_idStops the specified connection monitor.

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
connection_monitor_namestringThe name of the connection monitor. Required.
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
migratestringValue indicating whether connection monitor V1 should be migrated to V2 format. Default value is None.

SELECT examples

Gets a connection monitor by name.

SELECT
id,
name,
autoStart,
connectionMonitorType,
destination,
endpoints,
etag,
location,
monitoringIntervalInSeconds,
monitoringStatus,
notes,
outputs,
provisioningState,
source,
startTime,
tags,
testConfigurations,
testGroups,
type
FROM azure.network.connection_monitors
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND network_watcher_name = '{{ network_watcher_name }}' -- required
AND connection_monitor_name = '{{ connection_monitor_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a connection monitor.

INSERT INTO azure.network.connection_monitors (
location,
tags,
properties,
resource_group_name,
network_watcher_name,
connection_monitor_name,
subscription_id,
migrate
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ network_watcher_name }}',
'{{ connection_monitor_name }}',
'{{ subscription_id }}',
'{{ migrate }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Update tags of the specified connection monitor.

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

REPLACE examples

Create or update a connection monitor.

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

DELETE examples

Deletes the specified connection monitor.

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

Lifecycle Methods

Stops the specified connection monitor.

EXEC azure.network.connection_monitors.stop 
@resource_group_name='{{ resource_group_name }}' --required,
@network_watcher_name='{{ network_watcher_name }}' --required,
@connection_monitor_name='{{ connection_monitor_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;