ScheduledAlertRule

class ScheduledAlertRule : KotlinCustomResource

Represents scheduled alert rule. API Version: 2020-01-01.

Example Usage

Creates or updates a Fusion alert rule.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scheduledAlertRule = new AzureNative.SecurityInsights.ScheduledAlertRule("scheduledAlertRule", new()
{
ResourceGroupName = "myRg",
RuleId = "myFirstFusionRule",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewScheduledAlertRule(ctx, "scheduledAlertRule", &securityinsights.ScheduledAlertRuleArgs{
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("myFirstFusionRule"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRule;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRuleArgs;
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 scheduledAlertRule = new ScheduledAlertRule("scheduledAlertRule", ScheduledAlertRuleArgs.builder()
.resourceGroupName("myRg")
.ruleId("myFirstFusionRule")
.workspaceName("myWorkspace")
.build());
}
}

Creates or updates a MicrosoftSecurityIncidentCreation rule.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scheduledAlertRule = new AzureNative.SecurityInsights.ScheduledAlertRule("scheduledAlertRule", new()
{
ResourceGroupName = "myRg",
RuleId = "microsoftSecurityIncidentCreationRuleExample",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewScheduledAlertRule(ctx, "scheduledAlertRule", &securityinsights.ScheduledAlertRuleArgs{
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("microsoftSecurityIncidentCreationRuleExample"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRule;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRuleArgs;
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 scheduledAlertRule = new ScheduledAlertRule("scheduledAlertRule", ScheduledAlertRuleArgs.builder()
.resourceGroupName("myRg")
.ruleId("microsoftSecurityIncidentCreationRuleExample")
.workspaceName("myWorkspace")
.build());
}
}

Creates or updates a Scheduled alert rule.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scheduledAlertRule = new AzureNative.SecurityInsights.ScheduledAlertRule("scheduledAlertRule", new()
{
Description = "",
DisplayName = "Rule2",
Enabled = true,
Kind = "Scheduled",
Query = "ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity = ComputerIP_Hidden",
QueryFrequency = "PT1H",
QueryPeriod = "P2DT1H30M",
ResourceGroupName = "myRg",
RuleId = "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
Severity = "High",
SuppressionDuration = "PT1H",
SuppressionEnabled = false,
Tactics = new[]
{
"Persistence",
"LateralMovement",
},
TriggerOperator = AzureNative.SecurityInsights.TriggerOperator.GreaterThan,
TriggerThreshold = 0,
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewScheduledAlertRule(ctx, "scheduledAlertRule", &securityinsights.ScheduledAlertRuleArgs{
Description: pulumi.String(""),
DisplayName: pulumi.String("Rule2"),
Enabled: pulumi.Bool(true),
Kind: pulumi.String("Scheduled"),
Query: pulumi.String("ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity = ComputerIP_Hidden"),
QueryFrequency: pulumi.String("PT1H"),
QueryPeriod: pulumi.String("P2DT1H30M"),
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("73e01a99-5cd7-4139-a149-9f2736ff2ab5"),
Severity: pulumi.String("High"),
SuppressionDuration: pulumi.String("PT1H"),
SuppressionEnabled: pulumi.Bool(false),
Tactics: pulumi.StringArray{
pulumi.String("Persistence"),
pulumi.String("LateralMovement"),
},
TriggerOperator: securityinsights.TriggerOperatorGreaterThan,
TriggerThreshold: pulumi.Int(0),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRule;
import com.pulumi.azurenative.securityinsights.ScheduledAlertRuleArgs;
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 scheduledAlertRule = new ScheduledAlertRule("scheduledAlertRule", ScheduledAlertRuleArgs.builder()
.description("")
.displayName("Rule2")
.enabled(true)
.kind("Scheduled")
.query("ProtectionStatus | extend HostCustomEntity = Computer | extend IPCustomEntity = ComputerIP_Hidden")
.queryFrequency("PT1H")
.queryPeriod("P2DT1H30M")
.resourceGroupName("myRg")
.ruleId("73e01a99-5cd7-4139-a149-9f2736ff2ab5")
.severity("High")
.suppressionDuration("PT1H")
.suppressionEnabled(false)
.tactics(
"Persistence",
"LateralMovement")
.triggerOperator("GreaterThan")
.triggerThreshold(0)
.workspaceName("myWorkspace")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:securityinsights:ScheduledAlertRule 73e01a99-5cd7-4139-a149-9f2736ff2ab5 /subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/73e01a99-5cd7-4139-a149-9f2736ff2ab5

Properties

Link copied to clipboard

The Name of the alert rule template used to create this rule.

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

The description of the alert rule.

Link copied to clipboard
val displayName: Output<String>

The display name for alerts created by this alert rule.

Link copied to clipboard
val enabled: Output<Boolean>

Determines whether this alert rule is enabled or disabled.

Link copied to clipboard
val etag: Output<String>?

Etag of the azure resource

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val kind: Output<String>

The kind of the alert rule Expected value is 'Scheduled'.

Link copied to clipboard
val lastModifiedUtc: Output<String>

The last time that this alert rule has been modified.

Link copied to clipboard
val name: Output<String>

Azure resource name

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val query: Output<String>

The query that creates alerts for this rule.

Link copied to clipboard
val queryFrequency: Output<String>

The frequency (in ISO 8601 duration format) for this alert rule to run.

Link copied to clipboard
val queryPeriod: Output<String>

The period (in ISO 8601 duration format) that this alert rule looks at.

Link copied to clipboard
val severity: Output<String>

The severity for alerts created by this alert rule.

Link copied to clipboard

The suppression (in ISO 8601 duration format) to wait since last time this alert rule been triggered.

Link copied to clipboard

Determines whether the suppression for this alert rule is enabled or disabled.

Link copied to clipboard
val tactics: Output<List<String>>?

The tactics of the alert rule

Link copied to clipboard
val triggerOperator: Output<String>

The operation against the threshold that triggers alert rule.

Link copied to clipboard
val triggerThreshold: Output<Int>

The threshold triggers this alert rule.

Link copied to clipboard
val type: Output<String>

Azure resource type

Link copied to clipboard
val urn: Output<String>