ConnectionMonitorCollection.CreateOrUpdateAsync Method

Definition

Overloads

Name Description
CreateOrUpdateAsync(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, CancellationToken)

Create or update a connection monitor.

CreateOrUpdateAsync(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.
CreateOrUpdateAsync(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, String, CancellationToken)

Invokes the CreateOrUpdateAsync compatibility operation.

CreateOrUpdateAsync(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, CancellationToken)

Source:
ConnectionMonitorCollection.OperationCompatibility.cs

Create or update a connection monitor.

public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectionMonitorName, Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, connectionMonitorName As String, content As ConnectionMonitorCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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 the method should return after starting the operation.

connectionMonitorName
String

The name of the connection monitor.

content
ConnectionMonitorCreateOrUpdateContent

Parameters that define the operation to create a connection monitor.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An ArmOperation<T> that can be used to wait for completion and retrieve the created or updated resource.

Applies to

CreateOrUpdateAsync(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 System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectionMonitorName, Azure.ResourceManager.Network.Models.ConnectionMonitorContent content, string migrate = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorContent * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.Models.ConnectionMonitorContent * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.ConnectionMonitorResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, connectionMonitorName As String, content As ConnectionMonitorContent, Optional migrate As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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

CreateOrUpdateAsync(WaitUntil, String, ConnectionMonitorCreateOrUpdateContent, String, CancellationToken)

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

Invokes the CreateOrUpdateAsync compatibility operation.

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