com.pulumi.azure.monitoring.kotlin.ActionRuleSuppressionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-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.azure.monitoring.kotlin
import com.pulumi.azure.monitoring.ActionRuleSuppressionArgs.builder
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionConditionArgs
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionConditionArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionScopeArgs
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionScopeArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionSuppressionArgs
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleSuppressionSuppressionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Monitor Action Rule which type is suppression.
* !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `azure.monitoring.AlertProcessingRuleSuppression` resource instead.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleActionRuleSuppression = new azure.monitoring.ActionRuleSuppression("example", {
* name: "example-amar",
* resourceGroupName: example.name,
* scope: {
* type: "ResourceGroup",
* resourceIds: [example.id],
* },
* suppression: {
* recurrenceType: "Weekly",
* schedule: {
* startDateUtc: "2019-01-01T01:02:03Z",
* endDateUtc: "2019-01-03T15:02:07Z",
* recurrenceWeeklies: [
* "Sunday",
* "Monday",
* "Friday",
* "Saturday",
* ],
* },
* },
* tags: {
* foo: "bar",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_action_rule_suppression = azure.monitoring.ActionRuleSuppression("example",
* name="example-amar",
* resource_group_name=example.name,
* scope=azure.monitoring.ActionRuleSuppressionScopeArgs(
* type="ResourceGroup",
* resource_ids=[example.id],
* ),
* suppression=azure.monitoring.ActionRuleSuppressionSuppressionArgs(
* recurrence_type="Weekly",
* schedule=azure.monitoring.ActionRuleSuppressionSuppressionScheduleArgs(
* start_date_utc="2019-01-01T01:02:03Z",
* end_date_utc="2019-01-03T15:02:07Z",
* recurrence_weeklies=[
* "Sunday",
* "Monday",
* "Friday",
* "Saturday",
* ],
* ),
* ),
* tags={
* "foo": "bar",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleActionRuleSuppression = new Azure.Monitoring.ActionRuleSuppression("example", new()
* {
* Name = "example-amar",
* ResourceGroupName = example.Name,
* Scope = new Azure.Monitoring.Inputs.ActionRuleSuppressionScopeArgs
* {
* Type = "ResourceGroup",
* ResourceIds = new[]
* {
* example.Id,
* },
* },
* Suppression = new Azure.Monitoring.Inputs.ActionRuleSuppressionSuppressionArgs
* {
* RecurrenceType = "Weekly",
* Schedule = new Azure.Monitoring.Inputs.ActionRuleSuppressionSuppressionScheduleArgs
* {
* StartDateUtc = "2019-01-01T01:02:03Z",
* EndDateUtc = "2019-01-03T15:02:07Z",
* RecurrenceWeeklies = new[]
* {
* "Sunday",
* "Monday",
* "Friday",
* "Saturday",
* },
* },
* },
* Tags =
* {
* { "foo", "bar" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = monitoring.NewActionRuleSuppression(ctx, "example", &monitoring.ActionRuleSuppressionArgs{
* Name: pulumi.String("example-amar"),
* ResourceGroupName: example.Name,
* Scope: &monitoring.ActionRuleSuppressionScopeArgs{
* Type: pulumi.String("ResourceGroup"),
* ResourceIds: pulumi.StringArray{
* example.ID(),
* },
* },
* Suppression: &monitoring.ActionRuleSuppressionSuppressionArgs{
* RecurrenceType: pulumi.String("Weekly"),
* Schedule: &monitoring.ActionRuleSuppressionSuppressionScheduleArgs{
* StartDateUtc: pulumi.String("2019-01-01T01:02:03Z"),
* EndDateUtc: pulumi.String("2019-01-03T15:02:07Z"),
* RecurrenceWeeklies: pulumi.StringArray{
* pulumi.String("Sunday"),
* pulumi.String("Monday"),
* pulumi.String("Friday"),
* pulumi.String("Saturday"),
* },
* },
* },
* Tags: pulumi.StringMap{
* "foo": pulumi.String("bar"),
* },
* })
* 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.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.monitoring.ActionRuleSuppression;
* import com.pulumi.azure.monitoring.ActionRuleSuppressionArgs;
* import com.pulumi.azure.monitoring.inputs.ActionRuleSuppressionScopeArgs;
* import com.pulumi.azure.monitoring.inputs.ActionRuleSuppressionSuppressionArgs;
* import com.pulumi.azure.monitoring.inputs.ActionRuleSuppressionSuppressionScheduleArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleActionRuleSuppression = new ActionRuleSuppression("exampleActionRuleSuppression", ActionRuleSuppressionArgs.builder()
* .name("example-amar")
* .resourceGroupName(example.name())
* .scope(ActionRuleSuppressionScopeArgs.builder()
* .type("ResourceGroup")
* .resourceIds(example.id())
* .build())
* .suppression(ActionRuleSuppressionSuppressionArgs.builder()
* .recurrenceType("Weekly")
* .schedule(ActionRuleSuppressionSuppressionScheduleArgs.builder()
* .startDateUtc("2019-01-01T01:02:03Z")
* .endDateUtc("2019-01-03T15:02:07Z")
* .recurrenceWeeklies(
* "Sunday",
* "Monday",
* "Friday",
* "Saturday")
* .build())
* .build())
* .tags(Map.of("foo", "bar"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleActionRuleSuppression:
* type: azure:monitoring:ActionRuleSuppression
* name: example
* properties:
* name: example-amar
* resourceGroupName: ${example.name}
* scope:
* type: ResourceGroup
* resourceIds:
* - ${example.id}
* suppression:
* recurrenceType: Weekly
* schedule:
* startDateUtc: 2019-01-01T01:02:03Z
* endDateUtc: 2019-01-03T15:02:07Z
* recurrenceWeeklies:
* - Sunday
* - Monday
* - Friday
* - Saturday
* tags:
* foo: bar
* ```
*
* ## Import
* Monitor Action Rule can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:monitoring/actionRuleSuppression:ActionRuleSuppression example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1
* ```
* @property condition A `condition` block as defined below.
* @property description Specifies a description for the Action Rule.
* @property enabled Is the Action Rule enabled? Defaults to `true`.
* @property name Specifies the name of the Monitor Action Rule. Changing this forces a new resource to be created.
* @property resourceGroupName Specifies the name of the resource group in which the Monitor Action Rule should exist. Changing this forces a new resource to be created.
* @property scope A `scope` block as defined below.
* @property suppression A `suppression` block as defined below.
* @property tags A mapping of tags to assign to the resource.
*/
public data class ActionRuleSuppressionArgs(
public val condition: Output? = null,
public val description: Output? = null,
public val enabled: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val scope: Output? = null,
public val suppression: Output? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy