ConnectionMonitorCollection.CreateOrUpdate Method

Definition

Overloads

Name Description
CreateOrUpdate(WaitUntil, String, ConnectionMonitorContent, String, CancellationToken)

Create or update a connection monitor.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}.
  • Operation Id. : ConnectionMonitorResults_CreateOrUpdate.
  • Default Api Version. : 2025-07-01.
CreateOrUpdate(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, String, CancellationToken)

Invokes the CreateOrUpdate compatibility operation.

CreateOrUpdate(WaitUntil, String, ConnectionMonitorContent, String, CancellationToken)

Source:
ConnectionMonitorCollection.cs

Create or update a connection monitor.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}.
  • Operation Id. : ConnectionMonitorResults_CreateOrUpdate.
  • Default Api Version. : 2025-07-01.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionMonitorName, Azure.ResourceManager.Network.Models.ConnectionMonitorContent content, string migrate = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, connectionMonitorName As String, content As ConnectionMonitorContent, Optional migrate As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ConnectionMonitorResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

connectionMonitorName
String

The name of the connection monitor.

content
ConnectionMonitorContent

Parameters that define the operation to create a connection monitor.

migrate
String

Value indicating whether connection monitor V1 should be migrated to V2 format.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

connectionMonitorName or content is null.

connectionMonitorName is an empty string, and was expected to be non-empty.

Applies to

CreateOrUpdate(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, String, CancellationToken)

Source:
ConnectionMonitorCollection.OperationCompatibility.cs
Source:
ConnectionMonitorCollection.cs

Invokes the CreateOrUpdate compatibility operation.

public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionMonitorName, Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent content, string migrate, System.Threading.CancellationToken cancellationToken);
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionMonitorName, Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent content, string migrate = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, connectionMonitorName As String, content As ConnectionMonitorCreateOrUpdateContent, migrate As String, cancellationToken As CancellationToken) As ArmOperation(Of ConnectionMonitorResource)
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, connectionMonitorName As String, content As ConnectionMonitorCreateOrUpdateContent, Optional migrate As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ConnectionMonitorResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

connectionMonitorName
String

The name of the connection monitor.

content
ConnectionMonitorCreateOrUpdateContent

Parameters that define the operation to create a connection monitor.

migrate
String

Value indicating whether connection monitor V1 should be migrated to V2 format.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

connectionMonitorName is an empty string, and was expected to be non-empty.

connectionMonitorName or content is null.

Applies to