1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. arms
  5. DispatchRule
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi

alicloud.arms.DispatchRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi

    Provides a Application Real-Time Monitoring Service (ARMS) Alert Dispatch Rule resource.

    For information about Application Real-Time Monitoring Service (ARMS) Alert Dispatch Rule and how to use it, see What is Alert Dispatch_Rule.

    NOTE: Available since v1.136.0.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultAlertContact = new AliCloud.Arms.AlertContact("defaultAlertContact", new()
        {
            AlertContactName = "example_value",
            Email = "example_value@aaa.com",
        });
    
        var defaultAlertContactGroup = new AliCloud.Arms.AlertContactGroup("defaultAlertContactGroup", new()
        {
            AlertContactGroupName = "example_value",
            ContactIds = new[]
            {
                defaultAlertContact.Id,
            },
        });
    
        var defaultDispatchRule = new AliCloud.Arms.DispatchRule("defaultDispatchRule", new()
        {
            DispatchRuleName = "example_value",
            DispatchType = "CREATE_ALERT",
            GroupRules = new[]
            {
                new AliCloud.Arms.Inputs.DispatchRuleGroupRuleArgs
                {
                    GroupWaitTime = 5,
                    GroupInterval = 15,
                    RepeatInterval = 100,
                    GroupingFields = new[]
                    {
                        "alertname",
                    },
                },
            },
            LabelMatchExpressionGrids = new[]
            {
                new AliCloud.Arms.Inputs.DispatchRuleLabelMatchExpressionGridArgs
                {
                    LabelMatchExpressionGroups = new[]
                    {
                        new AliCloud.Arms.Inputs.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArgs
                        {
                            LabelMatchExpressions = new[]
                            {
                                new AliCloud.Arms.Inputs.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArgs
                                {
                                    Key = "_aliyun_arms_involvedObject_kind",
                                    Value = "app",
                                    Operator = "eq",
                                },
                            },
                        },
                    },
                },
            },
            NotifyRules = new[]
            {
                new AliCloud.Arms.Inputs.DispatchRuleNotifyRuleArgs
                {
                    NotifyObjects = new[]
                    {
                        new AliCloud.Arms.Inputs.DispatchRuleNotifyRuleNotifyObjectArgs
                        {
                            NotifyObjectId = defaultAlertContact.Id,
                            NotifyType = "ARMS_CONTACT",
                            Name = "example_value",
                        },
                        new AliCloud.Arms.Inputs.DispatchRuleNotifyRuleNotifyObjectArgs
                        {
                            NotifyObjectId = defaultAlertContactGroup.Id,
                            NotifyType = "ARMS_CONTACT_GROUP",
                            Name = "example_value",
                        },
                    },
                    NotifyChannels = new[]
                    {
                        "dingTalk",
                        "wechat",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultAlertContact, err := arms.NewAlertContact(ctx, "defaultAlertContact", &arms.AlertContactArgs{
    			AlertContactName: pulumi.String("example_value"),
    			Email:            pulumi.String("example_value@aaa.com"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAlertContactGroup, err := arms.NewAlertContactGroup(ctx, "defaultAlertContactGroup", &arms.AlertContactGroupArgs{
    			AlertContactGroupName: pulumi.String("example_value"),
    			ContactIds: pulumi.StringArray{
    				defaultAlertContact.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = arms.NewDispatchRule(ctx, "defaultDispatchRule", &arms.DispatchRuleArgs{
    			DispatchRuleName: pulumi.String("example_value"),
    			DispatchType:     pulumi.String("CREATE_ALERT"),
    			GroupRules: arms.DispatchRuleGroupRuleArray{
    				&arms.DispatchRuleGroupRuleArgs{
    					GroupWaitTime:  pulumi.Int(5),
    					GroupInterval:  pulumi.Int(15),
    					RepeatInterval: pulumi.Int(100),
    					GroupingFields: pulumi.StringArray{
    						pulumi.String("alertname"),
    					},
    				},
    			},
    			LabelMatchExpressionGrids: arms.DispatchRuleLabelMatchExpressionGridArray{
    				&arms.DispatchRuleLabelMatchExpressionGridArgs{
    					LabelMatchExpressionGroups: arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArray{
    						&arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArgs{
    							LabelMatchExpressions: arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArray{
    								&arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArgs{
    									Key:      pulumi.String("_aliyun_arms_involvedObject_kind"),
    									Value:    pulumi.String("app"),
    									Operator: pulumi.String("eq"),
    								},
    							},
    						},
    					},
    				},
    			},
    			NotifyRules: arms.DispatchRuleNotifyRuleArray{
    				&arms.DispatchRuleNotifyRuleArgs{
    					NotifyObjects: arms.DispatchRuleNotifyRuleNotifyObjectArray{
    						&arms.DispatchRuleNotifyRuleNotifyObjectArgs{
    							NotifyObjectId: defaultAlertContact.ID(),
    							NotifyType:     pulumi.String("ARMS_CONTACT"),
    							Name:           pulumi.String("example_value"),
    						},
    						&arms.DispatchRuleNotifyRuleNotifyObjectArgs{
    							NotifyObjectId: defaultAlertContactGroup.ID(),
    							NotifyType:     pulumi.String("ARMS_CONTACT_GROUP"),
    							Name:           pulumi.String("example_value"),
    						},
    					},
    					NotifyChannels: pulumi.StringArray{
    						pulumi.String("dingTalk"),
    						pulumi.String("wechat"),
    					},
    				},
    			},
    		})
    		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.alicloud.arms.AlertContact;
    import com.pulumi.alicloud.arms.AlertContactArgs;
    import com.pulumi.alicloud.arms.AlertContactGroup;
    import com.pulumi.alicloud.arms.AlertContactGroupArgs;
    import com.pulumi.alicloud.arms.DispatchRule;
    import com.pulumi.alicloud.arms.DispatchRuleArgs;
    import com.pulumi.alicloud.arms.inputs.DispatchRuleGroupRuleArgs;
    import com.pulumi.alicloud.arms.inputs.DispatchRuleLabelMatchExpressionGridArgs;
    import com.pulumi.alicloud.arms.inputs.DispatchRuleNotifyRuleArgs;
    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 defaultAlertContact = new AlertContact("defaultAlertContact", AlertContactArgs.builder()        
                .alertContactName("example_value")
                .email("example_value@aaa.com")
                .build());
    
            var defaultAlertContactGroup = new AlertContactGroup("defaultAlertContactGroup", AlertContactGroupArgs.builder()        
                .alertContactGroupName("example_value")
                .contactIds(defaultAlertContact.id())
                .build());
    
            var defaultDispatchRule = new DispatchRule("defaultDispatchRule", DispatchRuleArgs.builder()        
                .dispatchRuleName("example_value")
                .dispatchType("CREATE_ALERT")
                .groupRules(DispatchRuleGroupRuleArgs.builder()
                    .groupWaitTime(5)
                    .groupInterval(15)
                    .repeatInterval(100)
                    .groupingFields("alertname")
                    .build())
                .labelMatchExpressionGrids(DispatchRuleLabelMatchExpressionGridArgs.builder()
                    .labelMatchExpressionGroups(DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArgs.builder()
                        .labelMatchExpressions(DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArgs.builder()
                            .key("_aliyun_arms_involvedObject_kind")
                            .value("app")
                            .operator("eq")
                            .build())
                        .build())
                    .build())
                .notifyRules(DispatchRuleNotifyRuleArgs.builder()
                    .notifyObjects(                
                        DispatchRuleNotifyRuleNotifyObjectArgs.builder()
                            .notifyObjectId(defaultAlertContact.id())
                            .notifyType("ARMS_CONTACT")
                            .name("example_value")
                            .build(),
                        DispatchRuleNotifyRuleNotifyObjectArgs.builder()
                            .notifyObjectId(defaultAlertContactGroup.id())
                            .notifyType("ARMS_CONTACT_GROUP")
                            .name("example_value")
                            .build())
                    .notifyChannels(                
                        "dingTalk",
                        "wechat")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_alert_contact = alicloud.arms.AlertContact("defaultAlertContact",
        alert_contact_name="example_value",
        email="example_value@aaa.com")
    default_alert_contact_group = alicloud.arms.AlertContactGroup("defaultAlertContactGroup",
        alert_contact_group_name="example_value",
        contact_ids=[default_alert_contact.id])
    default_dispatch_rule = alicloud.arms.DispatchRule("defaultDispatchRule",
        dispatch_rule_name="example_value",
        dispatch_type="CREATE_ALERT",
        group_rules=[alicloud.arms.DispatchRuleGroupRuleArgs(
            group_wait_time=5,
            group_interval=15,
            repeat_interval=100,
            grouping_fields=["alertname"],
        )],
        label_match_expression_grids=[alicloud.arms.DispatchRuleLabelMatchExpressionGridArgs(
            label_match_expression_groups=[alicloud.arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArgs(
                label_match_expressions=[alicloud.arms.DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArgs(
                    key="_aliyun_arms_involvedObject_kind",
                    value="app",
                    operator="eq",
                )],
            )],
        )],
        notify_rules=[alicloud.arms.DispatchRuleNotifyRuleArgs(
            notify_objects=[
                alicloud.arms.DispatchRuleNotifyRuleNotifyObjectArgs(
                    notify_object_id=default_alert_contact.id,
                    notify_type="ARMS_CONTACT",
                    name="example_value",
                ),
                alicloud.arms.DispatchRuleNotifyRuleNotifyObjectArgs(
                    notify_object_id=default_alert_contact_group.id,
                    notify_type="ARMS_CONTACT_GROUP",
                    name="example_value",
                ),
            ],
            notify_channels=[
                "dingTalk",
                "wechat",
            ],
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultAlertContact = new alicloud.arms.AlertContact("defaultAlertContact", {
        alertContactName: "example_value",
        email: "example_value@aaa.com",
    });
    const defaultAlertContactGroup = new alicloud.arms.AlertContactGroup("defaultAlertContactGroup", {
        alertContactGroupName: "example_value",
        contactIds: [defaultAlertContact.id],
    });
    const defaultDispatchRule = new alicloud.arms.DispatchRule("defaultDispatchRule", {
        dispatchRuleName: "example_value",
        dispatchType: "CREATE_ALERT",
        groupRules: [{
            groupWaitTime: 5,
            groupInterval: 15,
            repeatInterval: 100,
            groupingFields: ["alertname"],
        }],
        labelMatchExpressionGrids: [{
            labelMatchExpressionGroups: [{
                labelMatchExpressions: [{
                    key: "_aliyun_arms_involvedObject_kind",
                    value: "app",
                    operator: "eq",
                }],
            }],
        }],
        notifyRules: [{
            notifyObjects: [
                {
                    notifyObjectId: defaultAlertContact.id,
                    notifyType: "ARMS_CONTACT",
                    name: "example_value",
                },
                {
                    notifyObjectId: defaultAlertContactGroup.id,
                    notifyType: "ARMS_CONTACT_GROUP",
                    name: "example_value",
                },
            ],
            notifyChannels: [
                "dingTalk",
                "wechat",
            ],
        }],
    });
    
    resources:
      defaultAlertContact:
        type: alicloud:arms:AlertContact
        properties:
          alertContactName: example_value
          email: example_value@aaa.com
      defaultAlertContactGroup:
        type: alicloud:arms:AlertContactGroup
        properties:
          alertContactGroupName: example_value
          contactIds:
            - ${defaultAlertContact.id}
      defaultDispatchRule:
        type: alicloud:arms:DispatchRule
        properties:
          dispatchRuleName: example_value
          dispatchType: CREATE_ALERT
          groupRules:
            - groupWaitTime: 5
              groupInterval: 15
              repeatInterval: 100
              groupingFields:
                - alertname
          labelMatchExpressionGrids:
            - labelMatchExpressionGroups:
                - labelMatchExpressions:
                    - key: _aliyun_arms_involvedObject_kind
                      value: app
                      operator: eq
          notifyRules:
            - notifyObjects:
                - notifyObjectId: ${defaultAlertContact.id}
                  notifyType: ARMS_CONTACT
                  name: example_value
                - notifyObjectId: ${defaultAlertContactGroup.id}
                  notifyType: ARMS_CONTACT_GROUP
                  name: example_value
              notifyChannels:
                - dingTalk
                - wechat
    

    Create DispatchRule Resource

    new DispatchRule(name: string, args: DispatchRuleArgs, opts?: CustomResourceOptions);
    @overload
    def DispatchRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     dispatch_rule_name: Optional[str] = None,
                     dispatch_type: Optional[str] = None,
                     group_rules: Optional[Sequence[DispatchRuleGroupRuleArgs]] = None,
                     is_recover: Optional[bool] = None,
                     label_match_expression_grids: Optional[Sequence[DispatchRuleLabelMatchExpressionGridArgs]] = None,
                     notify_rules: Optional[Sequence[DispatchRuleNotifyRuleArgs]] = None)
    @overload
    def DispatchRule(resource_name: str,
                     args: DispatchRuleArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewDispatchRule(ctx *Context, name string, args DispatchRuleArgs, opts ...ResourceOption) (*DispatchRule, error)
    public DispatchRule(string name, DispatchRuleArgs args, CustomResourceOptions? opts = null)
    public DispatchRule(String name, DispatchRuleArgs args)
    public DispatchRule(String name, DispatchRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:arms:DispatchRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DispatchRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DispatchRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DispatchRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DispatchRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DispatchRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DispatchRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DispatchRule resource accepts the following input properties:

    DispatchRuleName string

    The name of the dispatch policy.

    GroupRules List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleGroupRule>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    LabelMatchExpressionGrids List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleLabelMatchExpressionGrid>

    Sets the dispatch rule. See label_match_expression_grid below.

    NotifyRules List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleNotifyRule>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    DispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    IsRecover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    DispatchRuleName string

    The name of the dispatch policy.

    GroupRules []DispatchRuleGroupRuleArgs

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    LabelMatchExpressionGrids []DispatchRuleLabelMatchExpressionGridArgs

    Sets the dispatch rule. See label_match_expression_grid below.

    NotifyRules []DispatchRuleNotifyRuleArgs

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    DispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    IsRecover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    dispatchRuleName String

    The name of the dispatch policy.

    groupRules List<DispatchRuleGroupRule>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    labelMatchExpressionGrids List<DispatchRuleLabelMatchExpressionGrid>

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules List<DispatchRuleNotifyRule>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    dispatchType String

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    isRecover Boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    dispatchRuleName string

    The name of the dispatch policy.

    groupRules DispatchRuleGroupRule[]

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    labelMatchExpressionGrids DispatchRuleLabelMatchExpressionGrid[]

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules DispatchRuleNotifyRule[]

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    dispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    isRecover boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    dispatch_rule_name str

    The name of the dispatch policy.

    group_rules Sequence[DispatchRuleGroupRuleArgs]

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    label_match_expression_grids Sequence[DispatchRuleLabelMatchExpressionGridArgs]

    Sets the dispatch rule. See label_match_expression_grid below.

    notify_rules Sequence[DispatchRuleNotifyRuleArgs]

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    dispatch_type str

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    is_recover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    dispatchRuleName String

    The name of the dispatch policy.

    groupRules List<Property Map>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    labelMatchExpressionGrids List<Property Map>

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules List<Property Map>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    dispatchType String

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    isRecover Boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DispatchRule resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The resource status of Alert Dispatch Rule.

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The resource status of Alert Dispatch Rule.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The resource status of Alert Dispatch Rule.

    id string

    The provider-assigned unique ID for this managed resource.

    status string

    The resource status of Alert Dispatch Rule.

    id str

    The provider-assigned unique ID for this managed resource.

    status str

    The resource status of Alert Dispatch Rule.

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The resource status of Alert Dispatch Rule.

    Look up Existing DispatchRule Resource

    Get an existing DispatchRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DispatchRuleState, opts?: CustomResourceOptions): DispatchRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dispatch_rule_name: Optional[str] = None,
            dispatch_type: Optional[str] = None,
            group_rules: Optional[Sequence[DispatchRuleGroupRuleArgs]] = None,
            is_recover: Optional[bool] = None,
            label_match_expression_grids: Optional[Sequence[DispatchRuleLabelMatchExpressionGridArgs]] = None,
            notify_rules: Optional[Sequence[DispatchRuleNotifyRuleArgs]] = None,
            status: Optional[str] = None) -> DispatchRule
    func GetDispatchRule(ctx *Context, name string, id IDInput, state *DispatchRuleState, opts ...ResourceOption) (*DispatchRule, error)
    public static DispatchRule Get(string name, Input<string> id, DispatchRuleState? state, CustomResourceOptions? opts = null)
    public static DispatchRule get(String name, Output<String> id, DispatchRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DispatchRuleName string

    The name of the dispatch policy.

    DispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    GroupRules List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleGroupRule>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    IsRecover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    LabelMatchExpressionGrids List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleLabelMatchExpressionGrid>

    Sets the dispatch rule. See label_match_expression_grid below.

    NotifyRules List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleNotifyRule>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    Status string

    The resource status of Alert Dispatch Rule.

    DispatchRuleName string

    The name of the dispatch policy.

    DispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    GroupRules []DispatchRuleGroupRuleArgs

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    IsRecover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    LabelMatchExpressionGrids []DispatchRuleLabelMatchExpressionGridArgs

    Sets the dispatch rule. See label_match_expression_grid below.

    NotifyRules []DispatchRuleNotifyRuleArgs

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    Status string

    The resource status of Alert Dispatch Rule.

    dispatchRuleName String

    The name of the dispatch policy.

    dispatchType String

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    groupRules List<DispatchRuleGroupRule>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    isRecover Boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    labelMatchExpressionGrids List<DispatchRuleLabelMatchExpressionGrid>

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules List<DispatchRuleNotifyRule>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    status String

    The resource status of Alert Dispatch Rule.

    dispatchRuleName string

    The name of the dispatch policy.

    dispatchType string

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    groupRules DispatchRuleGroupRule[]

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    isRecover boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    labelMatchExpressionGrids DispatchRuleLabelMatchExpressionGrid[]

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules DispatchRuleNotifyRule[]

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    status string

    The resource status of Alert Dispatch Rule.

    dispatch_rule_name str

    The name of the dispatch policy.

    dispatch_type str

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    group_rules Sequence[DispatchRuleGroupRuleArgs]

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    is_recover bool

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    label_match_expression_grids Sequence[DispatchRuleLabelMatchExpressionGridArgs]

    Sets the dispatch rule. See label_match_expression_grid below.

    notify_rules Sequence[DispatchRuleNotifyRuleArgs]

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    status str

    The resource status of Alert Dispatch Rule.

    dispatchRuleName String

    The name of the dispatch policy.

    dispatchType String

    The alert handling method. Valid values: CREATE_ALERT: generates an alert. DISCARD_ALERT: discards the alert event and generates no alert.

    groupRules List<Property Map>

    Sets the event group. See group_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    isRecover Boolean

    Specifies whether to send the restored alert. Valid values: true: sends the alert. false: does not send the alert.

    labelMatchExpressionGrids List<Property Map>

    Sets the dispatch rule. See label_match_expression_grid below.

    notifyRules List<Property Map>

    Sets the notification rule. See notify_rules below. It will be ignored when dispatch_type = "DISCARD_ALERT".

    status String

    The resource status of Alert Dispatch Rule.

    Supporting Types

    DispatchRuleGroupRule, DispatchRuleGroupRuleArgs

    GroupInterval int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    GroupWaitTime int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    GroupingFields List<string>

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    GroupId int

    The ID of the group rule.

    RepeatInterval int

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    GroupInterval int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    GroupWaitTime int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    GroupingFields []string

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    GroupId int

    The ID of the group rule.

    RepeatInterval int

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    groupInterval Integer

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupWaitTime Integer

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupingFields List<String>

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    groupId Integer

    The ID of the group rule.

    repeatInterval Integer

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    groupInterval number

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupWaitTime number

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupingFields string[]

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    groupId number

    The ID of the group rule.

    repeatInterval number

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    group_interval int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    group_wait_time int

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    grouping_fields Sequence[str]

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    group_id int

    The ID of the group rule.

    repeat_interval int

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    groupInterval Number

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupWaitTime Number

    The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.

    groupingFields List<String>

    The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.

    groupId Number

    The ID of the group rule.

    repeatInterval Number

    The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.

    DispatchRuleLabelMatchExpressionGrid, DispatchRuleLabelMatchExpressionGridArgs

    LabelMatchExpressionGroups []DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroup

    Sets the dispatch rule. See label_match_expression_groups below.

    labelMatchExpressionGroups List<DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroup>

    Sets the dispatch rule. See label_match_expression_groups below.

    labelMatchExpressionGroups DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroup[]

    Sets the dispatch rule. See label_match_expression_groups below.

    labelMatchExpressionGroups List<Property Map>

    Sets the dispatch rule. See label_match_expression_groups below.

    DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroup, DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupArgs

    labelMatchExpressions List<Property Map>

    Sets the dispatch rule. See label_match_expressions below.

    DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpression, DispatchRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpressionArgs

    Key string

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    Operator string

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    Value string

    The value of the tag.

    Key string

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    Operator string

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    Value string

    The value of the tag.

    key String

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    operator String

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    value String

    The value of the tag.

    key string

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    operator string

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    value string

    The value of the tag.

    key str

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    operator str

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    value str

    The value of the tag.

    key String

    The key of the tag of the dispatch rule. Valud values:

    • _aliyun_arms_userid: user ID
    • _aliyun_arms_involvedObject_kind: type of the associated object
    • _aliyun_arms_involvedObject_id: ID of the associated object
    • _aliyun_arms_involvedObject_name: name of the associated object
    • _aliyun_arms_alert_name: alert name
    • _aliyun_arms_alert_rule_id: alert rule ID
    • _aliyun_arms_alert_type: alert type
    • _aliyun_arms_alert_level: alert severity
    operator String

    The operator used in the dispatch rule. Valid values:

    • eq: equals to.
    • re: matches a regular expression.
    value String

    The value of the tag.

    DispatchRuleNotifyRule, DispatchRuleNotifyRuleArgs

    NotifyChannels List<string>

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    NotifyObjects List<Pulumi.AliCloud.Arms.Inputs.DispatchRuleNotifyRuleNotifyObject>

    Sets the notification object. See notify_objects below.

    NotifyChannels []string

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    NotifyObjects []DispatchRuleNotifyRuleNotifyObject

    Sets the notification object. See notify_objects below.

    notifyChannels List<String>

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    notifyObjects List<DispatchRuleNotifyRuleNotifyObject>

    Sets the notification object. See notify_objects below.

    notifyChannels string[]

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    notifyObjects DispatchRuleNotifyRuleNotifyObject[]

    Sets the notification object. See notify_objects below.

    notify_channels Sequence[str]

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    notify_objects Sequence[DispatchRuleNotifyRuleNotifyObject]

    Sets the notification object. See notify_objects below.

    notifyChannels List<String>

    The notification method. Valid values: dingTalk, sms, webhook, email, and wechat.

    notifyObjects List<Property Map>

    Sets the notification object. See notify_objects below.

    DispatchRuleNotifyRuleNotifyObject, DispatchRuleNotifyRuleNotifyObjectArgs

    Name string

    The name of the contact or contact group.

    NotifyObjectId string

    The ID of the contact or contact group.

    NotifyType string

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    Name string

    The name of the contact or contact group.

    NotifyObjectId string

    The ID of the contact or contact group.

    NotifyType string

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    name String

    The name of the contact or contact group.

    notifyObjectId String

    The ID of the contact or contact group.

    notifyType String

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    name string

    The name of the contact or contact group.

    notifyObjectId string

    The ID of the contact or contact group.

    notifyType string

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    name str

    The name of the contact or contact group.

    notify_object_id str

    The ID of the contact or contact group.

    notify_type str

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    name String

    The name of the contact or contact group.

    notifyObjectId String

    The ID of the contact or contact group.

    notifyType String

    The type of the alert contact. Valid values: ARMS_CONTACT: contact. ARMS_CONTACT_GROUP: contact group.

    Import

    Application Real-Time Monitoring Service (ARMS) Alert Contact can be imported using the id, e.g.

     $ pulumi import alicloud:arms/dispatchRule:DispatchRule example <id>
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.44.0 published on Thursday, Sep 28, 2023 by Pulumi