AlertsSuppressionRuleArgs

data class AlertsSuppressionRuleArgs(val alertType: Output<String>? = null, val alertsSuppressionRuleName: Output<String>? = null, val comment: Output<String>? = null, val expirationDateUtc: Output<String>? = null, val reason: Output<String>? = null, val state: Output<Either<String, RuleState>>? = null, val suppressionAlertsScope: Output<SuppressionAlertsScopeArgs>? = null) : ConvertibleToJava<AlertsSuppressionRuleArgs>

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

Constructors

Link copied to clipboard
constructor(alertType: Output<String>? = null, alertsSuppressionRuleName: Output<String>? = null, comment: Output<String>? = null, expirationDateUtc: Output<String>? = null, reason: Output<String>? = null, state: Output<Either<String, RuleState>>? = null, suppressionAlertsScope: Output<SuppressionAlertsScopeArgs>? = null)

Properties

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

The unique name of the suppression alert rule

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

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

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

Any comment regarding the rule

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

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 reason: Output<String>? = null

The reason for dismissing the alert

Link copied to clipboard
val state: Output<Either<String, RuleState>>? = null

Possible states of the rule

Link copied to clipboard

The suppression conditions

Functions

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