tencentcloud.MonitorTmpAlertRule
Explore with Pulumi AI
Provides a resource to create a monitor tmpAlertRule
NOTE: This resource will be deprecated in a future version, please use
tencentcloud.MonitorTmpAlertGroup.
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 fooMonitorTmpInstance = new tencentcloud.MonitorTmpInstance("fooMonitorTmpInstance", {
    instanceName: "tf-tmp-instance",
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    dataRetentionTime: 30,
    zone: availabilityZone,
    tags: {
        createdBy: "terraform",
    },
});
const fooMonitorTmpCvmAgent = new tencentcloud.MonitorTmpCvmAgent("fooMonitorTmpCvmAgent", {instanceId: fooMonitorTmpInstance.monitorTmpInstanceId});
const fooMonitorTmpAlertRule = new tencentcloud.MonitorTmpAlertRule("fooMonitorTmpAlertRule", {
    duration: "2m",
    expr: "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8",
    instanceId: fooMonitorTmpInstance.monitorTmpInstanceId,
    receivers: ["notice-f2svbu3w"],
    ruleName: "MySQL 连接数过多",
    ruleState: 2,
    type: "MySQL/MySQL 连接数过多",
    annotations: [
        {
            key: "description",
            value: "MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。",
        },
        {
            key: "summary",
            value: "MySQL 连接数过多(>80%)",
        },
    ],
    labels: [{
        key: "severity",
        value: "warning",
    }],
});
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")
foo_monitor_tmp_instance = tencentcloud.MonitorTmpInstance("fooMonitorTmpInstance",
    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",
    })
foo_monitor_tmp_cvm_agent = tencentcloud.MonitorTmpCvmAgent("fooMonitorTmpCvmAgent", instance_id=foo_monitor_tmp_instance.monitor_tmp_instance_id)
foo_monitor_tmp_alert_rule = tencentcloud.MonitorTmpAlertRule("fooMonitorTmpAlertRule",
    duration="2m",
    expr="avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8",
    instance_id=foo_monitor_tmp_instance.monitor_tmp_instance_id,
    receivers=["notice-f2svbu3w"],
    rule_name="MySQL 连接数过多",
    rule_state=2,
    type="MySQL/MySQL 连接数过多",
    annotations=[
        {
            "key": "description",
            "value": "MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。",
        },
        {
            "key": "summary",
            "value": "MySQL 连接数过多(>80%)",
        },
    ],
    labels=[{
        "key": "severity",
        "value": "warning",
    }])
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
		}
		fooMonitorTmpInstance, err := tencentcloud.NewMonitorTmpInstance(ctx, "fooMonitorTmpInstance", &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.NewMonitorTmpCvmAgent(ctx, "fooMonitorTmpCvmAgent", &tencentcloud.MonitorTmpCvmAgentArgs{
			InstanceId: fooMonitorTmpInstance.MonitorTmpInstanceId,
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewMonitorTmpAlertRule(ctx, "fooMonitorTmpAlertRule", &tencentcloud.MonitorTmpAlertRuleArgs{
			Duration:   pulumi.String("2m"),
			Expr:       pulumi.String("avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8"),
			InstanceId: fooMonitorTmpInstance.MonitorTmpInstanceId,
			Receivers: pulumi.StringArray{
				pulumi.String("notice-f2svbu3w"),
			},
			RuleName:  pulumi.String("MySQL 连接数过多"),
			RuleState: pulumi.Float64(2),
			Type:      pulumi.String("MySQL/MySQL 连接数过多"),
			Annotations: tencentcloud.MonitorTmpAlertRuleAnnotationArray{
				&tencentcloud.MonitorTmpAlertRuleAnnotationArgs{
					Key:   pulumi.String("description"),
					Value: pulumi.String("MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。"),
				},
				&tencentcloud.MonitorTmpAlertRuleAnnotationArgs{
					Key:   pulumi.String("summary"),
					Value: pulumi.String("MySQL 连接数过多(>80%)"),
				},
			},
			Labels: tencentcloud.MonitorTmpAlertRuleLabelArray{
				&tencentcloud.MonitorTmpAlertRuleLabelArgs{
					Key:   pulumi.String("severity"),
					Value: pulumi.String("warning"),
				},
			},
		})
		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 fooMonitorTmpInstance = new Tencentcloud.MonitorTmpInstance("fooMonitorTmpInstance", new()
    {
        InstanceName = "tf-tmp-instance",
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        DataRetentionTime = 30,
        Zone = availabilityZone,
        Tags = 
        {
            { "createdBy", "terraform" },
        },
    });
    var fooMonitorTmpCvmAgent = new Tencentcloud.MonitorTmpCvmAgent("fooMonitorTmpCvmAgent", new()
    {
        InstanceId = fooMonitorTmpInstance.MonitorTmpInstanceId,
    });
    var fooMonitorTmpAlertRule = new Tencentcloud.MonitorTmpAlertRule("fooMonitorTmpAlertRule", new()
    {
        Duration = "2m",
        Expr = "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8",
        InstanceId = fooMonitorTmpInstance.MonitorTmpInstanceId,
        Receivers = new[]
        {
            "notice-f2svbu3w",
        },
        RuleName = "MySQL 连接数过多",
        RuleState = 2,
        Type = "MySQL/MySQL 连接数过多",
        Annotations = new[]
        {
            new Tencentcloud.Inputs.MonitorTmpAlertRuleAnnotationArgs
            {
                Key = "description",
                Value = "MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。",
            },
            new Tencentcloud.Inputs.MonitorTmpAlertRuleAnnotationArgs
            {
                Key = "summary",
                Value = "MySQL 连接数过多(>80%)",
            },
        },
        Labels = new[]
        {
            new Tencentcloud.Inputs.MonitorTmpAlertRuleLabelArgs
            {
                Key = "severity",
                Value = "warning",
            },
        },
    });
});
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.MonitorTmpCvmAgent;
import com.pulumi.tencentcloud.MonitorTmpCvmAgentArgs;
import com.pulumi.tencentcloud.MonitorTmpAlertRule;
import com.pulumi.tencentcloud.MonitorTmpAlertRuleArgs;
import com.pulumi.tencentcloud.inputs.MonitorTmpAlertRuleAnnotationArgs;
import com.pulumi.tencentcloud.inputs.MonitorTmpAlertRuleLabelArgs;
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 fooMonitorTmpInstance = new MonitorTmpInstance("fooMonitorTmpInstance", MonitorTmpInstanceArgs.builder()
            .instanceName("tf-tmp-instance")
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .dataRetentionTime(30)
            .zone(availabilityZone)
            .tags(Map.of("createdBy", "terraform"))
            .build());
        var fooMonitorTmpCvmAgent = new MonitorTmpCvmAgent("fooMonitorTmpCvmAgent", MonitorTmpCvmAgentArgs.builder()
            .instanceId(fooMonitorTmpInstance.monitorTmpInstanceId())
            .build());
        var fooMonitorTmpAlertRule = new MonitorTmpAlertRule("fooMonitorTmpAlertRule", MonitorTmpAlertRuleArgs.builder()
            .duration("2m")
            .expr("avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8")
            .instanceId(fooMonitorTmpInstance.monitorTmpInstanceId())
            .receivers("notice-f2svbu3w")
            .ruleName("MySQL 连接数过多")
            .ruleState(2)
            .type("MySQL/MySQL 连接数过多")
            .annotations(            
                MonitorTmpAlertRuleAnnotationArgs.builder()
                    .key("description")
                    .value("MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。")
                    .build(),
                MonitorTmpAlertRuleAnnotationArgs.builder()
                    .key("summary")
                    .value("MySQL 连接数过多(>80%)")
                    .build())
            .labels(MonitorTmpAlertRuleLabelArgs.builder()
                .key("severity")
                .value("warning")
                .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
  fooMonitorTmpInstance:
    type: tencentcloud:MonitorTmpInstance
    properties:
      instanceName: tf-tmp-instance
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      dataRetentionTime: 30
      zone: ${availabilityZone}
      tags:
        createdBy: terraform
  fooMonitorTmpCvmAgent:
    type: tencentcloud:MonitorTmpCvmAgent
    properties:
      instanceId: ${fooMonitorTmpInstance.monitorTmpInstanceId}
  fooMonitorTmpAlertRule:
    type: tencentcloud:MonitorTmpAlertRule
    properties:
      duration: 2m
      expr: avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections)  > 0.8
      instanceId: ${fooMonitorTmpInstance.monitorTmpInstanceId}
      receivers:
        - notice-f2svbu3w
      ruleName: MySQL 连接数过多
      ruleState: 2
      type: MySQL/MySQL 连接数过多
      annotations:
        - key: description
          value: 'MySQL 连接数过多, 实例: {{$labels.instance}},当前值: {{ $value | humanizePercentage }}。'
        - key: summary
          value: MySQL 连接数过多(>80%)
      labels:
        - key: severity
          value: warning
Create MonitorTmpAlertRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MonitorTmpAlertRule(name: string, args: MonitorTmpAlertRuleArgs, opts?: CustomResourceOptions);@overload
def MonitorTmpAlertRule(resource_name: str,
                        args: MonitorTmpAlertRuleArgs,
                        opts: Optional[ResourceOptions] = None)
@overload
def MonitorTmpAlertRule(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        expr: Optional[str] = None,
                        instance_id: Optional[str] = None,
                        receivers: Optional[Sequence[str]] = None,
                        rule_name: Optional[str] = None,
                        annotations: Optional[Sequence[MonitorTmpAlertRuleAnnotationArgs]] = None,
                        duration: Optional[str] = None,
                        labels: Optional[Sequence[MonitorTmpAlertRuleLabelArgs]] = None,
                        monitor_tmp_alert_rule_id: Optional[str] = None,
                        rule_state: Optional[float] = None,
                        type: Optional[str] = None)func NewMonitorTmpAlertRule(ctx *Context, name string, args MonitorTmpAlertRuleArgs, opts ...ResourceOption) (*MonitorTmpAlertRule, error)public MonitorTmpAlertRule(string name, MonitorTmpAlertRuleArgs args, CustomResourceOptions? opts = null)
public MonitorTmpAlertRule(String name, MonitorTmpAlertRuleArgs args)
public MonitorTmpAlertRule(String name, MonitorTmpAlertRuleArgs args, CustomResourceOptions options)
type: tencentcloud:MonitorTmpAlertRule
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 MonitorTmpAlertRuleArgs
- 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 MonitorTmpAlertRuleArgs
- 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 MonitorTmpAlertRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorTmpAlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorTmpAlertRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MonitorTmpAlertRule 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 MonitorTmpAlertRule resource accepts the following input properties:
- Expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- InstanceId string
- Instance id.
- Receivers List<string>
- Alarm notification template id list.
- RuleName string
- Rule name.
- Annotations
List<MonitorTmp Alert Rule Annotation> 
- Rule alarm duration.
- Duration string
- Rule alarm duration.
- Labels
List<MonitorTmp Alert Rule Label> 
- Rule alarm duration.
- MonitorTmp stringAlert Rule Id 
- ID of the resource.
- RuleState double
- Rule state code.
- Type string
- Alarm Policy Template Classification.
- Expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- InstanceId string
- Instance id.
- Receivers []string
- Alarm notification template id list.
- RuleName string
- Rule name.
- Annotations
[]MonitorTmp Alert Rule Annotation Args 
- Rule alarm duration.
- Duration string
- Rule alarm duration.
- Labels
[]MonitorTmp Alert Rule Label Args 
- Rule alarm duration.
- MonitorTmp stringAlert Rule Id 
- ID of the resource.
- RuleState float64
- Rule state code.
- Type string
- Alarm Policy Template Classification.
- expr String
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId String
- Instance id.
- receivers List<String>
- Alarm notification template id list.
- ruleName String
- Rule name.
- annotations
List<MonitorTmp Alert Rule Annotation> 
- Rule alarm duration.
- duration String
- Rule alarm duration.
- labels
List<MonitorTmp Alert Rule Label> 
- Rule alarm duration.
- monitorTmp StringAlert Rule Id 
- ID of the resource.
- ruleState Double
- Rule state code.
- type String
- Alarm Policy Template Classification.
- expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId string
- Instance id.
- receivers string[]
- Alarm notification template id list.
- ruleName string
- Rule name.
- annotations
MonitorTmp Alert Rule Annotation[] 
- Rule alarm duration.
- duration string
- Rule alarm duration.
- labels
MonitorTmp Alert Rule Label[] 
- Rule alarm duration.
- monitorTmp stringAlert Rule Id 
- ID of the resource.
- ruleState number
- Rule state code.
- type string
- Alarm Policy Template Classification.
- expr str
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instance_id str
- Instance id.
- receivers Sequence[str]
- Alarm notification template id list.
- rule_name str
- Rule name.
- annotations
Sequence[MonitorTmp Alert Rule Annotation Args] 
- Rule alarm duration.
- duration str
- Rule alarm duration.
- labels
Sequence[MonitorTmp Alert Rule Label Args] 
- Rule alarm duration.
- monitor_tmp_ stralert_ rule_ id 
- ID of the resource.
- rule_state float
- Rule state code.
- type str
- Alarm Policy Template Classification.
- expr String
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId String
- Instance id.
- receivers List<String>
- Alarm notification template id list.
- ruleName String
- Rule name.
- annotations List<Property Map>
- Rule alarm duration.
- duration String
- Rule alarm duration.
- labels List<Property Map>
- Rule alarm duration.
- monitorTmp StringAlert Rule Id 
- ID of the resource.
- ruleState Number
- Rule state code.
- type String
- Alarm Policy Template Classification.
Outputs
All input properties are implicitly available as output properties. Additionally, the MonitorTmpAlertRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MonitorTmpAlertRule Resource
Get an existing MonitorTmpAlertRule 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?: MonitorTmpAlertRuleState, opts?: CustomResourceOptions): MonitorTmpAlertRule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        annotations: Optional[Sequence[MonitorTmpAlertRuleAnnotationArgs]] = None,
        duration: Optional[str] = None,
        expr: Optional[str] = None,
        instance_id: Optional[str] = None,
        labels: Optional[Sequence[MonitorTmpAlertRuleLabelArgs]] = None,
        monitor_tmp_alert_rule_id: Optional[str] = None,
        receivers: Optional[Sequence[str]] = None,
        rule_name: Optional[str] = None,
        rule_state: Optional[float] = None,
        type: Optional[str] = None) -> MonitorTmpAlertRulefunc GetMonitorTmpAlertRule(ctx *Context, name string, id IDInput, state *MonitorTmpAlertRuleState, opts ...ResourceOption) (*MonitorTmpAlertRule, error)public static MonitorTmpAlertRule Get(string name, Input<string> id, MonitorTmpAlertRuleState? state, CustomResourceOptions? opts = null)public static MonitorTmpAlertRule get(String name, Output<String> id, MonitorTmpAlertRuleState state, CustomResourceOptions options)resources:  _:    type: tencentcloud:MonitorTmpAlertRule    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.
- Annotations
List<MonitorTmp Alert Rule Annotation> 
- Rule alarm duration.
- Duration string
- Rule alarm duration.
- Expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- InstanceId string
- Instance id.
- Labels
List<MonitorTmp Alert Rule Label> 
- Rule alarm duration.
- MonitorTmp stringAlert Rule Id 
- ID of the resource.
- Receivers List<string>
- Alarm notification template id list.
- RuleName string
- Rule name.
- RuleState double
- Rule state code.
- Type string
- Alarm Policy Template Classification.
- Annotations
[]MonitorTmp Alert Rule Annotation Args 
- Rule alarm duration.
- Duration string
- Rule alarm duration.
- Expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- InstanceId string
- Instance id.
- Labels
[]MonitorTmp Alert Rule Label Args 
- Rule alarm duration.
- MonitorTmp stringAlert Rule Id 
- ID of the resource.
- Receivers []string
- Alarm notification template id list.
- RuleName string
- Rule name.
- RuleState float64
- Rule state code.
- Type string
- Alarm Policy Template Classification.
- annotations
List<MonitorTmp Alert Rule Annotation> 
- Rule alarm duration.
- duration String
- Rule alarm duration.
- expr String
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId String
- Instance id.
- labels
List<MonitorTmp Alert Rule Label> 
- Rule alarm duration.
- monitorTmp StringAlert Rule Id 
- ID of the resource.
- receivers List<String>
- Alarm notification template id list.
- ruleName String
- Rule name.
- ruleState Double
- Rule state code.
- type String
- Alarm Policy Template Classification.
- annotations
MonitorTmp Alert Rule Annotation[] 
- Rule alarm duration.
- duration string
- Rule alarm duration.
- expr string
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId string
- Instance id.
- labels
MonitorTmp Alert Rule Label[] 
- Rule alarm duration.
- monitorTmp stringAlert Rule Id 
- ID of the resource.
- receivers string[]
- Alarm notification template id list.
- ruleName string
- Rule name.
- ruleState number
- Rule state code.
- type string
- Alarm Policy Template Classification.
- annotations
Sequence[MonitorTmp Alert Rule Annotation Args] 
- Rule alarm duration.
- duration str
- Rule alarm duration.
- expr str
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instance_id str
- Instance id.
- labels
Sequence[MonitorTmp Alert Rule Label Args] 
- Rule alarm duration.
- monitor_tmp_ stralert_ rule_ id 
- ID of the resource.
- receivers Sequence[str]
- Alarm notification template id list.
- rule_name str
- Rule name.
- rule_state float
- Rule state code.
- type str
- Alarm Policy Template Classification.
- annotations List<Property Map>
- Rule alarm duration.
- duration String
- Rule alarm duration.
- expr String
- Rule expression, reference documentation: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/.
- instanceId String
- Instance id.
- labels List<Property Map>
- Rule alarm duration.
- monitorTmp StringAlert Rule Id 
- ID of the resource.
- receivers List<String>
- Alarm notification template id list.
- ruleName String
- Rule name.
- ruleState Number
- Rule state code.
- type String
- Alarm Policy Template Classification.
Supporting Types
MonitorTmpAlertRuleAnnotation, MonitorTmpAlertRuleAnnotationArgs          
MonitorTmpAlertRuleLabel, MonitorTmpAlertRuleLabelArgs          
Import
monitor tmpAlertRule can be imported using the id, e.g.
$ pulumi import tencentcloud:index/monitorTmpAlertRule:MonitorTmpAlertRule tmpAlertRule instanceId#Rule_id
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 tencentcloudTerraform Provider.