1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MonitorTmpAlertGroup
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.MonitorTmpAlertGroup

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a monitor tmp_alert_group

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const config = new pulumi.Config();
    const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
    const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
    const subnet = new tencentcloud.Subnet("subnet", {
        vpcId: vpc.vpcId,
        availabilityZone: availabilityZone,
        cidrBlock: "10.0.1.0/24",
    });
    const exampleMonitorTmpInstance = new tencentcloud.MonitorTmpInstance("exampleMonitorTmpInstance", {
        instanceName: "tf-tmp-instance",
        vpcId: vpc.vpcId,
        subnetId: subnet.subnetId,
        dataRetentionTime: 30,
        zone: availabilityZone,
        tags: {
            createdBy: "terraform",
        },
    });
    const exampleMonitorTmpAlertGroup = new tencentcloud.MonitorTmpAlertGroup("exampleMonitorTmpAlertGroup", {
        groupName: "tf-example",
        instanceId: exampleMonitorTmpInstance.monitorTmpInstanceId,
        repeatInterval: "5m",
        customReceiver: {
            type: "amp",
        },
        rules: [{
            duration: "1m",
            expr: "up{job=\"prometheus-agent\"} != 1",
            ruleName: "Agent health check",
            state: 2,
            annotations: {
                summary: "Agent health check",
                description: "Agent {{$labels.instance}} is deactivated, please pay attention!",
            },
            labels: {
                severity: "critical",
            },
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    config = pulumi.Config()
    availability_zone = config.get("availabilityZone")
    if availability_zone is None:
        availability_zone = "ap-guangzhou-4"
    vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
    subnet = tencentcloud.Subnet("subnet",
        vpc_id=vpc.vpc_id,
        availability_zone=availability_zone,
        cidr_block="10.0.1.0/24")
    example_monitor_tmp_instance = tencentcloud.MonitorTmpInstance("exampleMonitorTmpInstance",
        instance_name="tf-tmp-instance",
        vpc_id=vpc.vpc_id,
        subnet_id=subnet.subnet_id,
        data_retention_time=30,
        zone=availability_zone,
        tags={
            "createdBy": "terraform",
        })
    example_monitor_tmp_alert_group = tencentcloud.MonitorTmpAlertGroup("exampleMonitorTmpAlertGroup",
        group_name="tf-example",
        instance_id=example_monitor_tmp_instance.monitor_tmp_instance_id,
        repeat_interval="5m",
        custom_receiver={
            "type": "amp",
        },
        rules=[{
            "duration": "1m",
            "expr": "up{job=\"prometheus-agent\"} != 1",
            "rule_name": "Agent health check",
            "state": 2,
            "annotations": {
                "summary": "Agent health check",
                "description": "Agent {{$labels.instance}} is deactivated, please pay attention!",
            },
            "labels": {
                "severity": "critical",
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		availabilityZone := "ap-guangzhou-4"
    		if param := cfg.Get("availabilityZone"); param != "" {
    			availabilityZone = param
    		}
    		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
    			CidrBlock: pulumi.String("10.0.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
    			VpcId:            vpc.VpcId,
    			AvailabilityZone: pulumi.String(availabilityZone),
    			CidrBlock:        pulumi.String("10.0.1.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMonitorTmpInstance, err := tencentcloud.NewMonitorTmpInstance(ctx, "exampleMonitorTmpInstance", &tencentcloud.MonitorTmpInstanceArgs{
    			InstanceName:      pulumi.String("tf-tmp-instance"),
    			VpcId:             vpc.VpcId,
    			SubnetId:          subnet.SubnetId,
    			DataRetentionTime: pulumi.Float64(30),
    			Zone:              pulumi.String(availabilityZone),
    			Tags: pulumi.StringMap{
    				"createdBy": pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewMonitorTmpAlertGroup(ctx, "exampleMonitorTmpAlertGroup", &tencentcloud.MonitorTmpAlertGroupArgs{
    			GroupName:      pulumi.String("tf-example"),
    			InstanceId:     exampleMonitorTmpInstance.MonitorTmpInstanceId,
    			RepeatInterval: pulumi.String("5m"),
    			CustomReceiver: &tencentcloud.MonitorTmpAlertGroupCustomReceiverArgs{
    				Type: pulumi.String("amp"),
    			},
    			Rules: tencentcloud.MonitorTmpAlertGroupRuleArray{
    				&tencentcloud.MonitorTmpAlertGroupRuleArgs{
    					Duration: pulumi.String("1m"),
    					Expr:     pulumi.String("up{job=\"prometheus-agent\"} != 1"),
    					RuleName: pulumi.String("Agent health check"),
    					State:    pulumi.Float64(2),
    					Annotations: pulumi.StringMap{
    						"summary":     pulumi.String("Agent health check"),
    						"description": pulumi.String("Agent {{$labels.instance}} is deactivated, please pay attention!"),
    					},
    					Labels: pulumi.StringMap{
    						"severity": pulumi.String("critical"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
        var vpc = new Tencentcloud.Vpc("vpc", new()
        {
            CidrBlock = "10.0.0.0/16",
        });
    
        var subnet = new Tencentcloud.Subnet("subnet", new()
        {
            VpcId = vpc.VpcId,
            AvailabilityZone = availabilityZone,
            CidrBlock = "10.0.1.0/24",
        });
    
        var exampleMonitorTmpInstance = new Tencentcloud.MonitorTmpInstance("exampleMonitorTmpInstance", new()
        {
            InstanceName = "tf-tmp-instance",
            VpcId = vpc.VpcId,
            SubnetId = subnet.SubnetId,
            DataRetentionTime = 30,
            Zone = availabilityZone,
            Tags = 
            {
                { "createdBy", "terraform" },
            },
        });
    
        var exampleMonitorTmpAlertGroup = new Tencentcloud.MonitorTmpAlertGroup("exampleMonitorTmpAlertGroup", new()
        {
            GroupName = "tf-example",
            InstanceId = exampleMonitorTmpInstance.MonitorTmpInstanceId,
            RepeatInterval = "5m",
            CustomReceiver = new Tencentcloud.Inputs.MonitorTmpAlertGroupCustomReceiverArgs
            {
                Type = "amp",
            },
            Rules = new[]
            {
                new Tencentcloud.Inputs.MonitorTmpAlertGroupRuleArgs
                {
                    Duration = "1m",
                    Expr = "up{job=\"prometheus-agent\"} != 1",
                    RuleName = "Agent health check",
                    State = 2,
                    Annotations = 
                    {
                        { "summary", "Agent health check" },
                        { "description", "Agent {{$labels.instance}} is deactivated, please pay attention!" },
                    },
                    Labels = 
                    {
                        { "severity", "critical" },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Vpc;
    import com.pulumi.tencentcloud.VpcArgs;
    import com.pulumi.tencentcloud.Subnet;
    import com.pulumi.tencentcloud.SubnetArgs;
    import com.pulumi.tencentcloud.MonitorTmpInstance;
    import com.pulumi.tencentcloud.MonitorTmpInstanceArgs;
    import com.pulumi.tencentcloud.MonitorTmpAlertGroup;
    import com.pulumi.tencentcloud.MonitorTmpAlertGroupArgs;
    import com.pulumi.tencentcloud.inputs.MonitorTmpAlertGroupCustomReceiverArgs;
    import com.pulumi.tencentcloud.inputs.MonitorTmpAlertGroupRuleArgs;
    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) {
            final var config = ctx.config();
            final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
            var vpc = new Vpc("vpc", VpcArgs.builder()
                .cidrBlock("10.0.0.0/16")
                .build());
    
            var subnet = new Subnet("subnet", SubnetArgs.builder()
                .vpcId(vpc.vpcId())
                .availabilityZone(availabilityZone)
                .cidrBlock("10.0.1.0/24")
                .build());
    
            var exampleMonitorTmpInstance = new MonitorTmpInstance("exampleMonitorTmpInstance", MonitorTmpInstanceArgs.builder()
                .instanceName("tf-tmp-instance")
                .vpcId(vpc.vpcId())
                .subnetId(subnet.subnetId())
                .dataRetentionTime(30)
                .zone(availabilityZone)
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
            var exampleMonitorTmpAlertGroup = new MonitorTmpAlertGroup("exampleMonitorTmpAlertGroup", MonitorTmpAlertGroupArgs.builder()
                .groupName("tf-example")
                .instanceId(exampleMonitorTmpInstance.monitorTmpInstanceId())
                .repeatInterval("5m")
                .customReceiver(MonitorTmpAlertGroupCustomReceiverArgs.builder()
                    .type("amp")
                    .build())
                .rules(MonitorTmpAlertGroupRuleArgs.builder()
                    .duration("1m")
                    .expr("up{job=\"prometheus-agent\"} != 1")
                    .ruleName("Agent health check")
                    .state(2)
                    .annotations(Map.ofEntries(
                        Map.entry("summary", "Agent health check"),
                        Map.entry("description", "Agent {{$labels.instance}} is deactivated, please pay attention!")
                    ))
                    .labels(Map.of("severity", "critical"))
                    .build())
                .build());
    
        }
    }
    
    configuration:
      availabilityZone:
        type: string
        default: ap-guangzhou-4
    resources:
      vpc:
        type: tencentcloud:Vpc
        properties:
          cidrBlock: 10.0.0.0/16
      subnet:
        type: tencentcloud:Subnet
        properties:
          vpcId: ${vpc.vpcId}
          availabilityZone: ${availabilityZone}
          cidrBlock: 10.0.1.0/24
      exampleMonitorTmpInstance:
        type: tencentcloud:MonitorTmpInstance
        properties:
          instanceName: tf-tmp-instance
          vpcId: ${vpc.vpcId}
          subnetId: ${subnet.subnetId}
          dataRetentionTime: 30
          zone: ${availabilityZone}
          tags:
            createdBy: terraform
      exampleMonitorTmpAlertGroup:
        type: tencentcloud:MonitorTmpAlertGroup
        properties:
          groupName: tf-example
          instanceId: ${exampleMonitorTmpInstance.monitorTmpInstanceId}
          repeatInterval: 5m
          customReceiver:
            type: amp
          rules:
            - duration: 1m
              expr: up{job="prometheus-agent"} != 1
              ruleName: Agent health check
              state: 2
              annotations:
                summary: Agent health check
                description: Agent {{$labels.instance}} is deactivated, please pay attention!
              labels:
                severity: critical
    

    Create MonitorTmpAlertGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MonitorTmpAlertGroup(name: string, args?: MonitorTmpAlertGroupArgs, opts?: CustomResourceOptions);
    @overload
    def MonitorTmpAlertGroup(resource_name: str,
                             args: Optional[MonitorTmpAlertGroupArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def MonitorTmpAlertGroup(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             amp_receivers: Optional[Sequence[str]] = None,
                             custom_receiver: Optional[MonitorTmpAlertGroupCustomReceiverArgs] = None,
                             group_name: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             monitor_tmp_alert_group_id: Optional[str] = None,
                             repeat_interval: Optional[str] = None,
                             rules: Optional[Sequence[MonitorTmpAlertGroupRuleArgs]] = None)
    func NewMonitorTmpAlertGroup(ctx *Context, name string, args *MonitorTmpAlertGroupArgs, opts ...ResourceOption) (*MonitorTmpAlertGroup, error)
    public MonitorTmpAlertGroup(string name, MonitorTmpAlertGroupArgs? args = null, CustomResourceOptions? opts = null)
    public MonitorTmpAlertGroup(String name, MonitorTmpAlertGroupArgs args)
    public MonitorTmpAlertGroup(String name, MonitorTmpAlertGroupArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MonitorTmpAlertGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MonitorTmpAlertGroupArgs
    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 MonitorTmpAlertGroupArgs
    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 MonitorTmpAlertGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorTmpAlertGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorTmpAlertGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    MonitorTmpAlertGroup Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MonitorTmpAlertGroup resource accepts the following input properties:

    AmpReceivers List<string>
    Tencent cloud notification template id list.
    CustomReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    GroupName string
    Unique alert group name.
    InstanceId string
    Instance id.
    MonitorTmpAlertGroupId string
    ID of the resource.
    RepeatInterval string
    Alert message send interval, default 1 hour.
    Rules List<MonitorTmpAlertGroupRule>
    A list of alert rules.
    AmpReceivers []string
    Tencent cloud notification template id list.
    CustomReceiver MonitorTmpAlertGroupCustomReceiverArgs
    User custom notification template, such as webhook, alertmanager.
    GroupName string
    Unique alert group name.
    InstanceId string
    Instance id.
    MonitorTmpAlertGroupId string
    ID of the resource.
    RepeatInterval string
    Alert message send interval, default 1 hour.
    Rules []MonitorTmpAlertGroupRuleArgs
    A list of alert rules.
    ampReceivers List<String>
    Tencent cloud notification template id list.
    customReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    groupName String
    Unique alert group name.
    instanceId String
    Instance id.
    monitorTmpAlertGroupId String
    ID of the resource.
    repeatInterval String
    Alert message send interval, default 1 hour.
    rules List<MonitorTmpAlertGroupRule>
    A list of alert rules.
    ampReceivers string[]
    Tencent cloud notification template id list.
    customReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    groupName string
    Unique alert group name.
    instanceId string
    Instance id.
    monitorTmpAlertGroupId string
    ID of the resource.
    repeatInterval string
    Alert message send interval, default 1 hour.
    rules MonitorTmpAlertGroupRule[]
    A list of alert rules.
    amp_receivers Sequence[str]
    Tencent cloud notification template id list.
    custom_receiver MonitorTmpAlertGroupCustomReceiverArgs
    User custom notification template, such as webhook, alertmanager.
    group_name str
    Unique alert group name.
    instance_id str
    Instance id.
    monitor_tmp_alert_group_id str
    ID of the resource.
    repeat_interval str
    Alert message send interval, default 1 hour.
    rules Sequence[MonitorTmpAlertGroupRuleArgs]
    A list of alert rules.
    ampReceivers List<String>
    Tencent cloud notification template id list.
    customReceiver Property Map
    User custom notification template, such as webhook, alertmanager.
    groupName String
    Unique alert group name.
    instanceId String
    Instance id.
    monitorTmpAlertGroupId String
    ID of the resource.
    repeatInterval String
    Alert message send interval, default 1 hour.
    rules List<Property Map>
    A list of alert rules.

    Outputs

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

    GroupId string
    Alarm group id.
    Id string
    The provider-assigned unique ID for this managed resource.
    GroupId string
    Alarm group id.
    Id string
    The provider-assigned unique ID for this managed resource.
    groupId String
    Alarm group id.
    id String
    The provider-assigned unique ID for this managed resource.
    groupId string
    Alarm group id.
    id string
    The provider-assigned unique ID for this managed resource.
    group_id str
    Alarm group id.
    id str
    The provider-assigned unique ID for this managed resource.
    groupId String
    Alarm group id.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MonitorTmpAlertGroup Resource

    Get an existing MonitorTmpAlertGroup 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?: MonitorTmpAlertGroupState, opts?: CustomResourceOptions): MonitorTmpAlertGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            amp_receivers: Optional[Sequence[str]] = None,
            custom_receiver: Optional[MonitorTmpAlertGroupCustomReceiverArgs] = None,
            group_id: Optional[str] = None,
            group_name: Optional[str] = None,
            instance_id: Optional[str] = None,
            monitor_tmp_alert_group_id: Optional[str] = None,
            repeat_interval: Optional[str] = None,
            rules: Optional[Sequence[MonitorTmpAlertGroupRuleArgs]] = None) -> MonitorTmpAlertGroup
    func GetMonitorTmpAlertGroup(ctx *Context, name string, id IDInput, state *MonitorTmpAlertGroupState, opts ...ResourceOption) (*MonitorTmpAlertGroup, error)
    public static MonitorTmpAlertGroup Get(string name, Input<string> id, MonitorTmpAlertGroupState? state, CustomResourceOptions? opts = null)
    public static MonitorTmpAlertGroup get(String name, Output<String> id, MonitorTmpAlertGroupState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MonitorTmpAlertGroup    get:      id: ${id}
    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:
    AmpReceivers List<string>
    Tencent cloud notification template id list.
    CustomReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    GroupId string
    Alarm group id.
    GroupName string
    Unique alert group name.
    InstanceId string
    Instance id.
    MonitorTmpAlertGroupId string
    ID of the resource.
    RepeatInterval string
    Alert message send interval, default 1 hour.
    Rules List<MonitorTmpAlertGroupRule>
    A list of alert rules.
    AmpReceivers []string
    Tencent cloud notification template id list.
    CustomReceiver MonitorTmpAlertGroupCustomReceiverArgs
    User custom notification template, such as webhook, alertmanager.
    GroupId string
    Alarm group id.
    GroupName string
    Unique alert group name.
    InstanceId string
    Instance id.
    MonitorTmpAlertGroupId string
    ID of the resource.
    RepeatInterval string
    Alert message send interval, default 1 hour.
    Rules []MonitorTmpAlertGroupRuleArgs
    A list of alert rules.
    ampReceivers List<String>
    Tencent cloud notification template id list.
    customReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    groupId String
    Alarm group id.
    groupName String
    Unique alert group name.
    instanceId String
    Instance id.
    monitorTmpAlertGroupId String
    ID of the resource.
    repeatInterval String
    Alert message send interval, default 1 hour.
    rules List<MonitorTmpAlertGroupRule>
    A list of alert rules.
    ampReceivers string[]
    Tencent cloud notification template id list.
    customReceiver MonitorTmpAlertGroupCustomReceiver
    User custom notification template, such as webhook, alertmanager.
    groupId string
    Alarm group id.
    groupName string
    Unique alert group name.
    instanceId string
    Instance id.
    monitorTmpAlertGroupId string
    ID of the resource.
    repeatInterval string
    Alert message send interval, default 1 hour.
    rules MonitorTmpAlertGroupRule[]
    A list of alert rules.
    amp_receivers Sequence[str]
    Tencent cloud notification template id list.
    custom_receiver MonitorTmpAlertGroupCustomReceiverArgs
    User custom notification template, such as webhook, alertmanager.
    group_id str
    Alarm group id.
    group_name str
    Unique alert group name.
    instance_id str
    Instance id.
    monitor_tmp_alert_group_id str
    ID of the resource.
    repeat_interval str
    Alert message send interval, default 1 hour.
    rules Sequence[MonitorTmpAlertGroupRuleArgs]
    A list of alert rules.
    ampReceivers List<String>
    Tencent cloud notification template id list.
    customReceiver Property Map
    User custom notification template, such as webhook, alertmanager.
    groupId String
    Alarm group id.
    groupName String
    Unique alert group name.
    instanceId String
    Instance id.
    monitorTmpAlertGroupId String
    ID of the resource.
    repeatInterval String
    Alert message send interval, default 1 hour.
    rules List<Property Map>
    A list of alert rules.

    Supporting Types

    MonitorTmpAlertGroupCustomReceiver, MonitorTmpAlertGroupCustomReceiverArgs

    AllowedTimeRanges List<MonitorTmpAlertGroupCustomReceiverAllowedTimeRange>
    Time ranges which allow alert message send.
    ClusterId string
    Only effect when alertmanager in user cluster, this cluster id.
    ClusterType string
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    Type string
    Custom receiver type, webhook|alertmanager.
    Url string
    Custom receiver address, can be accessed by process in prometheus instance subnet.
    AllowedTimeRanges []MonitorTmpAlertGroupCustomReceiverAllowedTimeRange
    Time ranges which allow alert message send.
    ClusterId string
    Only effect when alertmanager in user cluster, this cluster id.
    ClusterType string
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    Type string
    Custom receiver type, webhook|alertmanager.
    Url string
    Custom receiver address, can be accessed by process in prometheus instance subnet.
    allowedTimeRanges List<MonitorTmpAlertGroupCustomReceiverAllowedTimeRange>
    Time ranges which allow alert message send.
    clusterId String
    Only effect when alertmanager in user cluster, this cluster id.
    clusterType String
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    type String
    Custom receiver type, webhook|alertmanager.
    url String
    Custom receiver address, can be accessed by process in prometheus instance subnet.
    allowedTimeRanges MonitorTmpAlertGroupCustomReceiverAllowedTimeRange[]
    Time ranges which allow alert message send.
    clusterId string
    Only effect when alertmanager in user cluster, this cluster id.
    clusterType string
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    type string
    Custom receiver type, webhook|alertmanager.
    url string
    Custom receiver address, can be accessed by process in prometheus instance subnet.
    allowed_time_ranges Sequence[MonitorTmpAlertGroupCustomReceiverAllowedTimeRange]
    Time ranges which allow alert message send.
    cluster_id str
    Only effect when alertmanager in user cluster, this cluster id.
    cluster_type str
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    type str
    Custom receiver type, webhook|alertmanager.
    url str
    Custom receiver address, can be accessed by process in prometheus instance subnet.
    allowedTimeRanges List<Property Map>
    Time ranges which allow alert message send.
    clusterId String
    Only effect when alertmanager in user cluster, this cluster id.
    clusterType String
    Only effect when alertmanager in user cluster, this cluster type (tke|eks|tdcc).
    type String
    Custom receiver type, webhook|alertmanager.
    url String
    Custom receiver address, can be accessed by process in prometheus instance subnet.

    MonitorTmpAlertGroupCustomReceiverAllowedTimeRange, MonitorTmpAlertGroupCustomReceiverAllowedTimeRangeArgs

    End string
    Time range end, seconds since 0 o'clock.
    Start string
    Time range start, seconds since 0 o'clock.
    End string
    Time range end, seconds since 0 o'clock.
    Start string
    Time range start, seconds since 0 o'clock.
    end String
    Time range end, seconds since 0 o'clock.
    start String
    Time range start, seconds since 0 o'clock.
    end string
    Time range end, seconds since 0 o'clock.
    start string
    Time range start, seconds since 0 o'clock.
    end str
    Time range end, seconds since 0 o'clock.
    start str
    Time range start, seconds since 0 o'clock.
    end String
    Time range end, seconds since 0 o'clock.
    start String
    Time range start, seconds since 0 o'clock.

    MonitorTmpAlertGroupRule, MonitorTmpAlertGroupRuleArgs

    Annotations Dictionary<string, string>
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    Duration string
    Rule alarm duration.
    Expr string
    Prometheus alert expression.
    Labels Dictionary<string, string>
    Labels of alert rule.
    RuleName string
    Alert rule name.
    State double
    Rule state. 2-enable, 3-disable, default 2.
    Annotations map[string]string
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    Duration string
    Rule alarm duration.
    Expr string
    Prometheus alert expression.
    Labels map[string]string
    Labels of alert rule.
    RuleName string
    Alert rule name.
    State float64
    Rule state. 2-enable, 3-disable, default 2.
    annotations Map<String,String>
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    duration String
    Rule alarm duration.
    expr String
    Prometheus alert expression.
    labels Map<String,String>
    Labels of alert rule.
    ruleName String
    Alert rule name.
    state Double
    Rule state. 2-enable, 3-disable, default 2.
    annotations {[key: string]: string}
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    duration string
    Rule alarm duration.
    expr string
    Prometheus alert expression.
    labels {[key: string]: string}
    Labels of alert rule.
    ruleName string
    Alert rule name.
    state number
    Rule state. 2-enable, 3-disable, default 2.
    annotations Mapping[str, str]
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    duration str
    Rule alarm duration.
    expr str
    Prometheus alert expression.
    labels Mapping[str, str]
    Labels of alert rule.
    rule_name str
    Alert rule name.
    state float
    Rule state. 2-enable, 3-disable, default 2.
    annotations Map<String>
    Annotation of alert rule. summary, description is special annotation in prometheus, mapping Alarm Object, Alarm Information in alarm message.
    duration String
    Rule alarm duration.
    expr String
    Prometheus alert expression.
    labels Map<String>
    Labels of alert rule.
    ruleName String
    Alert rule name.
    state Number
    Rule state. 2-enable, 3-disable, default 2.

    Import

    monitor tmp_alert_group can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/monitorTmpAlertGroup:MonitorTmpAlertGroup example prom-34qkzwvs#alert-rfkkr6cw
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack