AlertProcessingRuleSuppressionArgs

data class AlertProcessingRuleSuppressionArgs(val condition: Output<AlertProcessingRuleSuppressionConditionArgs>? = null, val description: Output<String>? = null, val enabled: Output<Boolean>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val schedule: Output<AlertProcessingRuleSuppressionScheduleArgs>? = null, val scopes: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AlertProcessingRuleSuppressionArgs>

Manages an Alert Processing Rule which suppress notifications.

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.monitoring.AlertProcessingRuleSuppression;
import com.pulumi.azure.monitoring.AlertProcessingRuleSuppressionArgs;
import com.pulumi.azure.monitoring.inputs.AlertProcessingRuleSuppressionConditionArgs;
import com.pulumi.azure.monitoring.inputs.AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs;
import com.pulumi.azure.monitoring.inputs.AlertProcessingRuleSuppressionConditionSeverityArgs;
import com.pulumi.azure.monitoring.inputs.AlertProcessingRuleSuppressionScheduleArgs;
import com.pulumi.azure.monitoring.inputs.AlertProcessingRuleSuppressionScheduleRecurrenceArgs;
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 exampleAlertProcessingRuleSuppression = new AlertProcessingRuleSuppression("exampleAlertProcessingRuleSuppression", AlertProcessingRuleSuppressionArgs.builder()
.resourceGroupName("example")
.scopes(exampleResourceGroup.id())
.condition(AlertProcessingRuleSuppressionConditionArgs.builder()
.targetResourceType(AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs.builder()
.operator("Equals")
.values("Microsoft.Compute/VirtualMachines")
.build())
.severity(AlertProcessingRuleSuppressionConditionSeverityArgs.builder()
.operator("Equals")
.values(
"Sev0",
"Sev1",
"Sev2")
.build())
.build())
.schedule(AlertProcessingRuleSuppressionScheduleArgs.builder()
.effectiveFrom("2022-01-01T01:02:03")
.effectiveUntil("2022-02-02T01:02:03")
.timeZone("Pacific Standard Time")
.recurrence(AlertProcessingRuleSuppressionScheduleRecurrenceArgs.builder()
.dailies(AlertProcessingRuleSuppressionScheduleRecurrenceDailyArgs.builder()
.startTime("17:00:00")
.endTime("09:00:00")
.build())
.weeklies(AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs.builder()
.daysOfWeeks(
"Saturday",
"Sunday")
.build())
.build())
.build())
.tags(Map.of("foo", "bar"))
.build());
}
}

Import

Alert Processing Rules can be imported using the resource id, e.g.

$ pulumi import azure:monitoring/alertProcessingRuleSuppression:AlertProcessingRuleSuppression example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1

Constructors

Link copied to clipboard
fun AlertProcessingRuleSuppressionArgs(condition: Output<AlertProcessingRuleSuppressionConditionArgs>? = null, description: Output<String>? = null, enabled: Output<Boolean>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, schedule: Output<AlertProcessingRuleSuppressionScheduleArgs>? = null, scopes: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null)

Functions

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

Properties

Link copied to clipboard

A condition block as defined below.

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

Specifies a description for the Alert Processing Rule.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Should the Alert Processing Rule be enabled? Defaults to true.

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

The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created.

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

The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created.

Link copied to clipboard

A schedule block as defined below.

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

A list of resource IDs which will be the target of Alert Processing Rule.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the Alert Processing Rule.