AlertRulesOperations.CreateOrUpdate Method

Definition

Creates or updates a classic metric alert rule.

public virtual Azure.Response<Azure.ResourceManager.Insights.Models.AlertRuleResource> CreateOrUpdate (string resourceGroupName, string ruleName, Azure.ResourceManager.Insights.Models.AlertRuleResource parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : string * string * Azure.ResourceManager.Insights.Models.AlertRuleResource * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Insights.Models.AlertRuleResource>
override this.CreateOrUpdate : string * string * Azure.ResourceManager.Insights.Models.AlertRuleResource * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Insights.Models.AlertRuleResource>
Public Overridable Function CreateOrUpdate (resourceGroupName As String, ruleName As String, parameters As AlertRuleResource, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AlertRuleResource)

Parameters

resourceGroupName
System.String

The name of the resource group.

ruleName
System.String

The name of the rule.

parameters
AlertRuleResource

The parameters of the rule to create or update.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

Response<AlertRuleResource>

Applies to