![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.alertsmanagement.kotlin.ActionRuleByNameArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.alertsmanagement.kotlin
import com.pulumi.azurenative.alertsmanagement.ActionRuleByNameArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Action rule object containing target scope, conditions and suppression logic
* Azure REST API version: 2019-05-05-preview. Prior API version in Azure Native 1.x: 2019-05-05-preview.
* Other available API versions: 2018-11-02-privatepreview.
* ## Example Usage
* ### PutActionRule
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var actionRuleByName = new AzureNative.AlertsManagement.ActionRuleByName("actionRuleByName", new()
* {
* ActionRuleName = "DailySuppression",
* Location = "Global",
* Properties = new AzureNative.AlertsManagement.Inputs.SuppressionArgs
* {
* Conditions = new AzureNative.AlertsManagement.Inputs.ConditionsArgs
* {
* MonitorCondition = new AzureNative.AlertsManagement.Inputs.ConditionArgs
* {
* Operator = AzureNative.AlertsManagement.Operator.EqualsValue,
* Values = new[]
* {
* "Fired",
* },
* },
* MonitorService = new AzureNative.AlertsManagement.Inputs.ConditionArgs
* {
* Operator = AzureNative.AlertsManagement.Operator.EqualsValue,
* Values = new[]
* {
* "Platform",
* "Application Insights",
* },
* },
* Severity = new AzureNative.AlertsManagement.Inputs.ConditionArgs
* {
* Operator = AzureNative.AlertsManagement.Operator.EqualsValue,
* Values = new[]
* {
* "Sev0",
* "Sev2",
* },
* },
* TargetResourceType = new AzureNative.AlertsManagement.Inputs.ConditionArgs
* {
* Operator = AzureNative.AlertsManagement.Operator.NotEquals,
* Values = new[]
* {
* "Microsoft.Compute/VirtualMachines",
* },
* },
* },
* Description = "Action rule on resource group for daily suppression",
* Scope = new AzureNative.AlertsManagement.Inputs.ScopeArgs
* {
* ScopeType = AzureNative.AlertsManagement.ScopeType.ResourceGroup,
* Values = new[]
* {
* "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg",
* },
* },
* Status = AzureNative.AlertsManagement.ActionRuleStatus.Enabled,
* SuppressionConfig = new AzureNative.AlertsManagement.Inputs.SuppressionConfigArgs
* {
* RecurrenceType = AzureNative.AlertsManagement.SuppressionType.Daily,
* Schedule = new AzureNative.AlertsManagement.Inputs.SuppressionScheduleArgs
* {
* EndDate = "12/18/2018",
* EndTime = "14:00:00",
* StartDate = "12/09/2018",
* StartTime = "06:00:00",
* },
* },
* Type = "Suppression",
* },
* ResourceGroupName = "alertscorrelationrg",
* Tags = null,
* });
* });
* ```
* ```go
* package main
* import (
* alertsmanagement "github.com/pulumi/pulumi-azure-native-sdk/alertsmanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := alertsmanagement.NewActionRuleByName(ctx, "actionRuleByName", &alertsmanagement.ActionRuleByNameArgs{
* ActionRuleName: pulumi.String("DailySuppression"),
* Location: pulumi.String("Global"),
* Properties: &alertsmanagement.SuppressionArgs{
* Conditions: &alertsmanagement.ConditionsArgs{
* MonitorCondition: &alertsmanagement.ConditionArgs{
* Operator: pulumi.String(alertsmanagement.OperatorEquals),
* Values: pulumi.StringArray{
* pulumi.String("Fired"),
* },
* },
* MonitorService: &alertsmanagement.ConditionArgs{
* Operator: pulumi.String(alertsmanagement.OperatorEquals),
* Values: pulumi.StringArray{
* pulumi.String("Platform"),
* pulumi.String("Application Insights"),
* },
* },
* Severity: &alertsmanagement.ConditionArgs{
* Operator: pulumi.String(alertsmanagement.OperatorEquals),
* Values: pulumi.StringArray{
* pulumi.String("Sev0"),
* pulumi.String("Sev2"),
* },
* },
* TargetResourceType: &alertsmanagement.ConditionArgs{
* Operator: pulumi.String(alertsmanagement.OperatorNotEquals),
* Values: pulumi.StringArray{
* pulumi.String("Microsoft.Compute/VirtualMachines"),
* },
* },
* },
* Description: pulumi.String("Action rule on resource group for daily suppression"),
* Scope: &alertsmanagement.ScopeArgs{
* ScopeType: pulumi.String(alertsmanagement.ScopeTypeResourceGroup),
* Values: pulumi.StringArray{
* pulumi.String("/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"),
* },
* },
* Status: pulumi.String(alertsmanagement.ActionRuleStatusEnabled),
* SuppressionConfig: &alertsmanagement.SuppressionConfigArgs{
* RecurrenceType: pulumi.String(alertsmanagement.SuppressionTypeDaily),
* Schedule: &alertsmanagement.SuppressionScheduleArgs{
* EndDate: pulumi.String("12/18/2018"),
* EndTime: pulumi.String("14:00:00"),
* StartDate: pulumi.String("12/09/2018"),
* StartTime: pulumi.String("06:00:00"),
* },
* },
* Type: pulumi.String("Suppression"),
* },
* ResourceGroupName: pulumi.String("alertscorrelationrg"),
* Tags: nil,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.alertsmanagement.ActionRuleByName;
* import com.pulumi.azurenative.alertsmanagement.ActionRuleByNameArgs;
* 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 actionRuleByName = new ActionRuleByName("actionRuleByName", ActionRuleByNameArgs.builder()
* .actionRuleName("DailySuppression")
* .location("Global")
* .properties(SuppressionArgs.builder()
* .conditions(ConditionsArgs.builder()
* .monitorCondition(ConditionArgs.builder()
* .operator("Equals")
* .values("Fired")
* .build())
* .monitorService(ConditionArgs.builder()
* .operator("Equals")
* .values(
* "Platform",
* "Application Insights")
* .build())
* .severity(ConditionArgs.builder()
* .operator("Equals")
* .values(
* "Sev0",
* "Sev2")
* .build())
* .targetResourceType(ConditionArgs.builder()
* .operator("NotEquals")
* .values("Microsoft.Compute/VirtualMachines")
* .build())
* .build())
* .description("Action rule on resource group for daily suppression")
* .scope(ScopeArgs.builder()
* .scopeType("ResourceGroup")
* .values("/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg")
* .build())
* .status("Enabled")
* .suppressionConfig(SuppressionConfigArgs.builder()
* .recurrenceType("Daily")
* .schedule(SuppressionScheduleArgs.builder()
* .endDate("12/18/2018")
* .endTime("14:00:00")
* .startDate("12/09/2018")
* .startTime("06:00:00")
* .build())
* .build())
* .type("Suppression")
* .build())
* .resourceGroupName("alertscorrelationrg")
* .tags()
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:alertsmanagement:ActionRuleByName DailySuppression /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}
* ```
* @property actionRuleName The name of action rule that needs to be created/updated
* @property location Resource location
* @property properties action rule properties
* @property resourceGroupName Resource group name where the resource is created.
* @property tags Resource tags
*/
public data class ActionRuleByNameArgs(
public val actionRuleName: Output? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy