Поделиться через


DatabaseWatcherTargetCollection.CreateOrUpdateAsync Method

Definition

Create a Target

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName}
  • Operation Id: Target_CreateOrUpdate
  • Default Api Version: 2025-01-02
  • Resource: DatabaseWatcherTargetResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string targetName, Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DatabaseWatcher.DatabaseWatcherTargetResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, targetName As String, data As DatabaseWatcherTargetData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of DatabaseWatcherTargetResource))

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.

targetName
String

The target resource name.

data
DatabaseWatcherTargetData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

targetName or data is null.

Applies to