다음을 통해 공유


AlertProcessingRuleCollection.CreateOrUpdateAsync Method

Definition

Create or update an alert processing rule.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}
  • Operation Id: AlertProcessingRules_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AlertsManagement.AlertProcessingRuleResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string alertProcessingRuleName, Azure.ResourceManager.AlertsManagement.AlertProcessingRuleData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.AlertsManagement.AlertProcessingRuleData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AlertsManagement.AlertProcessingRuleResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.AlertsManagement.AlertProcessingRuleData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.AlertsManagement.AlertProcessingRuleResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, alertProcessingRuleName As String, data As AlertProcessingRuleData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of AlertProcessingRuleResource))

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.

alertProcessingRuleName
String

The name of the alert processing rule that needs to be created/updated.

data
AlertProcessingRuleData

Alert processing rule to be created/updated.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

alertProcessingRuleName or data is null.

Applies to