AlertsSuppressionRule

class AlertsSuppressionRule : KotlinCustomResource

Describes the suppression rule API Version: 2019-01-01-preview.

Example Usage

Update or create suppression rule for subscription

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var alertsSuppressionRule = new AzureNative.Security.AlertsSuppressionRule("alertsSuppressionRule", new()
{
AlertType = "IpAnomaly",
AlertsSuppressionRuleName = "dismissIpAnomalyAlerts",
Comment = "Test VM",
ExpirationDateUtc = "2019-12-01T19:50:47.083633Z",
Reason = "FalsePositive",
State = "Enabled",
SuppressionAlertsScope = new AzureNative.Security.Inputs.SuppressionAlertsScopeArgs
{
AllOf = new[]
{
new AzureNative.Security.Inputs.ScopeElementArgs
{
Field = "entities.ip.address",
},
new AzureNative.Security.Inputs.ScopeElementArgs
{
Field = "entities.process.commandline",
},
},
},
});
});
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewAlertsSuppressionRule(ctx, "alertsSuppressionRule", &security.AlertsSuppressionRuleArgs{
AlertType: pulumi.String("IpAnomaly"),
AlertsSuppressionRuleName: pulumi.String("dismissIpAnomalyAlerts"),
Comment: pulumi.String("Test VM"),
ExpirationDateUtc: pulumi.String("2019-12-01T19:50:47.083633Z"),
Reason: pulumi.String("FalsePositive"),
State: pulumi.String("Enabled"),
SuppressionAlertsScope: security.SuppressionAlertsScopeResponse{
AllOf: security.ScopeElementArray{
&security.ScopeElementArgs{
Field: pulumi.String("entities.ip.address"),
},
&security.ScopeElementArgs{
Field: pulumi.String("entities.process.commandline"),
},
},
},
})
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.security.AlertsSuppressionRule;
import com.pulumi.azurenative.security.AlertsSuppressionRuleArgs;
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 alertsSuppressionRule = new AlertsSuppressionRule("alertsSuppressionRule", AlertsSuppressionRuleArgs.builder()
.alertType("IpAnomaly")
.alertsSuppressionRuleName("dismissIpAnomalyAlerts")
.comment("Test VM")
.expirationDateUtc("2019-12-01T19:50:47.083633Z")
.reason("FalsePositive")
.state("Enabled")
.suppressionAlertsScope(Map.of("allOf",
Map.of("field", "entities.ip.address"),
Map.of("field", "entities.process.commandline")))
.build());
}
}

Import

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

$ pulumi import azure-native:security:AlertsSuppressionRule dismissIpAnomalyAlerts /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/alertsSuppressionRules/dismissIpAnomalyAlerts

Properties

Link copied to clipboard
val alertType: Output<String>

Type of the alert to automatically suppress. For all alert types, use '*'

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

Any comment regarding the rule

Link copied to clipboard

Expiration date of the rule, if value is not provided or provided as null this field will default to the maximum allowed expiration date.

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

The last time this rule was modified

Link copied to clipboard
val name: Output<String>

Resource name

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

The reason for dismissing the alert

Link copied to clipboard
val state: Output<String>

Possible states of the rule

Link copied to clipboard

The suppression conditions

Link copied to clipboard
val type: Output<String>

Resource type

Link copied to clipboard
val urn: Output<String>