Smart Detector Alert Rule Args
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
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)