SmartDetectorAlertRuleArgs

data class SmartDetectorAlertRuleArgs(val actionGroup: Output<SmartDetectorAlertRuleActionGroupArgs>? = null, val description: Output<String>? = null, val detectorType: Output<String>? = null, val enabled: Output<Boolean>? = null, val frequency: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scopeResourceIds: Output<List<String>>? = null, val severity: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val throttlingDuration: Output<String>? = null) : ConvertibleToJava<SmartDetectorAlertRuleArgs>

Manages an Monitor Smart Detector Alert Rule.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.monitoring.ActionGroup;
import com.pulumi.azure.monitoring.ActionGroupArgs;
import com.pulumi.azure.monitoring.SmartDetectorAlertRule;
import com.pulumi.azure.monitoring.SmartDetectorAlertRuleArgs;
import com.pulumi.azure.monitoring.inputs.SmartDetectorAlertRuleActionGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.applicationType("web")
.build());
var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.shortName("example")
.build());
var exampleSmartDetectorAlertRule = new SmartDetectorAlertRule("exampleSmartDetectorAlertRule", SmartDetectorAlertRuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.severity("Sev0")
.scopeResourceIds(exampleInsights.id())
.frequency("PT1M")
.detectorType("FailureAnomaliesDetector")
.actionGroup(SmartDetectorAlertRuleActionGroupArgs.builder()
.ids(exampleActionGroup.id())
.build())
.build());
}
}

Import

Monitor Smart Detector Alert Rule can be imported using the resource id, e.g.

$ pulumi import azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/smartDetectorAlertRules/rule1

Constructors

Link copied to clipboard
fun SmartDetectorAlertRuleArgs(actionGroup: Output<SmartDetectorAlertRuleActionGroupArgs>? = null, description: Output<String>? = null, detectorType: Output<String>? = null, enabled: Output<Boolean>? = null, frequency: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, scopeResourceIds: Output<List<String>>? = null, severity: Output<String>? = null, tags: Output<Map<String, String>>? = null, throttlingDuration: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SmartDetectorAlertRuleArgs

Properties

Link copied to clipboard

An action_group block as defined below.

Link copied to clipboard
val description: Output<String>? = null

Specifies a description for the Smart Detector Alert Rule.

Link copied to clipboard
val detectorType: Output<String>? = null

Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Is the Smart Detector Alert Rule enabled? Defaults to true.

Link copied to clipboard
val frequency: Output<String>? = null

Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val scopeResourceIds: Output<List<String>>? = null

Specifies the scopes of this Smart Detector Alert Rule.

Link copied to clipboard
val severity: Output<String>? = null

Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val throttlingDuration: Output<String>? = null

Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.