com.pulumi.azure.monitoring.kotlin.ActionRuleActionGroupArgs.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.ActionRuleActionGroupArgs.builder
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleActionGroupConditionArgs
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleActionGroupConditionArgsBuilder
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleActionGroupScopeArgs
import com.pulumi.azure.monitoring.kotlin.inputs.ActionRuleActionGroupScopeArgsBuilder
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 action group.
* !> **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.AlertProcessingRuleActionGroup` 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 exampleActionGroup = new azure.monitoring.ActionGroup("example", {
* name: "example-action-group",
* resourceGroupName: example.name,
* shortName: "example",
* });
* const exampleActionRuleActionGroup = new azure.monitoring.ActionRuleActionGroup("example", {
* name: "example-amar",
* resourceGroupName: example.name,
* actionGroupId: exampleActionGroup.id,
* scope: {
* type: "ResourceGroup",
* resourceIds: [example.id],
* },
* tags: {
* foo: "bar",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_action_group = azure.monitoring.ActionGroup("example",
* name="example-action-group",
* resource_group_name=example.name,
* short_name="example")
* example_action_rule_action_group = azure.monitoring.ActionRuleActionGroup("example",
* name="example-amar",
* resource_group_name=example.name,
* action_group_id=example_action_group.id,
* scope=azure.monitoring.ActionRuleActionGroupScopeArgs(
* type="ResourceGroup",
* resource_ids=[example.id],
* ),
* 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 exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
* {
* Name = "example-action-group",
* ResourceGroupName = example.Name,
* ShortName = "example",
* });
* var exampleActionRuleActionGroup = new Azure.Monitoring.ActionRuleActionGroup("example", new()
* {
* Name = "example-amar",
* ResourceGroupName = example.Name,
* ActionGroupId = exampleActionGroup.Id,
* Scope = new Azure.Monitoring.Inputs.ActionRuleActionGroupScopeArgs
* {
* Type = "ResourceGroup",
* ResourceIds = new[]
* {
* example.Id,
* },
* },
* 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
* }
* exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
* Name: pulumi.String("example-action-group"),
* ResourceGroupName: example.Name,
* ShortName: pulumi.String("example"),
* })
* if err != nil {
* return err
* }
* _, err = monitoring.NewActionRuleActionGroup(ctx, "example", &monitoring.ActionRuleActionGroupArgs{
* Name: pulumi.String("example-amar"),
* ResourceGroupName: example.Name,
* ActionGroupId: exampleActionGroup.ID(),
* Scope: &monitoring.ActionRuleActionGroupScopeArgs{
* Type: pulumi.String("ResourceGroup"),
* ResourceIds: pulumi.StringArray{
* example.ID(),
* },
* },
* 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.ActionGroup;
* import com.pulumi.azure.monitoring.ActionGroupArgs;
* import com.pulumi.azure.monitoring.ActionRuleActionGroup;
* import com.pulumi.azure.monitoring.ActionRuleActionGroupArgs;
* import com.pulumi.azure.monitoring.inputs.ActionRuleActionGroupScopeArgs;
* 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 exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
* .name("example-action-group")
* .resourceGroupName(example.name())
* .shortName("example")
* .build());
* var exampleActionRuleActionGroup = new ActionRuleActionGroup("exampleActionRuleActionGroup", ActionRuleActionGroupArgs.builder()
* .name("example-amar")
* .resourceGroupName(example.name())
* .actionGroupId(exampleActionGroup.id())
* .scope(ActionRuleActionGroupScopeArgs.builder()
* .type("ResourceGroup")
* .resourceIds(example.id())
* .build())
* .tags(Map.of("foo", "bar"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleActionGroup:
* type: azure:monitoring:ActionGroup
* name: example
* properties:
* name: example-action-group
* resourceGroupName: ${example.name}
* shortName: example
* exampleActionRuleActionGroup:
* type: azure:monitoring:ActionRuleActionGroup
* name: example
* properties:
* name: example-amar
* resourceGroupName: ${example.name}
* actionGroupId: ${exampleActionGroup.id}
* scope:
* type: ResourceGroup
* resourceIds:
* - ${example.id}
* tags:
* foo: bar
* ```
*
* ## Import
* Monitor Action Rule can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:monitoring/actionRuleActionGroup:ActionRuleActionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1
* ```
* @property actionGroupId Specifies the resource id of monitor action group.
* @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 tags A mapping of tags to assign to the resource.
*/
public data class ActionRuleActionGroupArgs(
public val actionGroupId: Output? = null,
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 tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy