Share via


ConnectionMonitorCollection.CreateOrUpdateAsync Method

Definition

Create or update a connection monitor.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}
  • Operation Id: ConnectionMonitors_CreateOrUpdate
  • Default Api Version: 2024-03-01
  • Resource: ConnectionMonitorResource
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, 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