共用方式為


NetworkWatcherCollection.CreateOrUpdate Method

Definition

Creates or updates a network watcher in the specified resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}
  • Operation Id: NetworkWatchers_CreateOrUpdate
  • Default Api Version: 2024-03-01
  • Resource: NetworkWatcherResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.NetworkWatcherResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string networkWatcherName, Azure.ResourceManager.Network.NetworkWatcherData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.NetworkWatcherData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.NetworkWatcherResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Network.NetworkWatcherData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.NetworkWatcherResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, networkWatcherName As String, data As NetworkWatcherData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of NetworkWatcherResource)

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.

networkWatcherName
String

The name of the network watcher.

data
NetworkWatcherData

Parameters that define the network watcher resource.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

networkWatcherName or data is null.

Applies to