AlertsSuppressionRule

class AlertsSuppressionRule : KotlinCustomResource

Describes the suppression rule Uses Azure REST API version 2019-01-01-preview. In version 2.x of the Azure Native provider, it used 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 = AzureNative.Security.RuleState.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/v2"
"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(security.RuleStateEnabled),
SuppressionAlertsScope: &security.SuppressionAlertsScopeArgs{
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 com.pulumi.azurenative.security.inputs.SuppressionAlertsScopeArgs;
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(SuppressionAlertsScopeArgs.builder()
.allOf(
ScopeElementArgs.builder()
.field("entities.ip.address")
.build(),
ScopeElementArgs.builder()
.field("entities.process.commandline")
.build())
.build())
.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/{subscriptionId}/providers/Microsoft.Security/alertsSuppressionRules/{alertsSuppressionRuleName}

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 azureApiVersion: Output<String>

The Azure API version of the resource.

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 there will no expiration at all

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>