1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. MetricRuleTemplate
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.cms.MetricRuleTemplate

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Cloud Monitor Service Metric Rule Template resource.

    For information about Cloud Monitor Service Metric Rule Template and how to use it, see What is Metric Rule Template.

    NOTE: Available since v1.134.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const example = new alicloud.cms.MetricRuleTemplate("example", {
        metricRuleTemplateName: name,
        alertTemplates: [{
            category: "ecs",
            metricName: "cpu_total",
            namespace: "acs_ecs_dashboard",
            ruleName: "tf_example",
            escalations: {
                critical: {
                    comparisonOperator: "GreaterThanThreshold",
                    statistics: "Average",
                    threshold: "90",
                    times: "3",
                },
            },
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    example = alicloud.cms.MetricRuleTemplate("example",
        metric_rule_template_name=name,
        alert_templates=[{
            "category": "ecs",
            "metric_name": "cpu_total",
            "namespace": "acs_ecs_dashboard",
            "rule_name": "tf_example",
            "escalations": {
                "critical": {
                    "comparison_operator": "GreaterThanThreshold",
                    "statistics": "Average",
                    "threshold": "90",
                    "times": "3",
                },
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"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, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := cms.NewMetricRuleTemplate(ctx, "example", &cms.MetricRuleTemplateArgs{
    			MetricRuleTemplateName: pulumi.String(name),
    			AlertTemplates: cms.MetricRuleTemplateAlertTemplateArray{
    				&cms.MetricRuleTemplateAlertTemplateArgs{
    					Category:   pulumi.String("ecs"),
    					MetricName: pulumi.String("cpu_total"),
    					Namespace:  pulumi.String("acs_ecs_dashboard"),
    					RuleName:   pulumi.String("tf_example"),
    					Escalations: &cms.MetricRuleTemplateAlertTemplateEscalationsArgs{
    						Critical: &cms.MetricRuleTemplateAlertTemplateEscalationsCriticalArgs{
    							ComparisonOperator: pulumi.String("GreaterThanThreshold"),
    							Statistics:         pulumi.String("Average"),
    							Threshold:          pulumi.String("90"),
    							Times:              pulumi.String("3"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var example = new AliCloud.Cms.MetricRuleTemplate("example", new()
        {
            MetricRuleTemplateName = name,
            AlertTemplates = new[]
            {
                new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateArgs
                {
                    Category = "ecs",
                    MetricName = "cpu_total",
                    Namespace = "acs_ecs_dashboard",
                    RuleName = "tf_example",
                    Escalations = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsArgs
                    {
                        Critical = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsCriticalArgs
                        {
                            ComparisonOperator = "GreaterThanThreshold",
                            Statistics = "Average",
                            Threshold = "90",
                            Times = "3",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cms.MetricRuleTemplate;
    import com.pulumi.alicloud.cms.MetricRuleTemplateArgs;
    import com.pulumi.alicloud.cms.inputs.MetricRuleTemplateAlertTemplateArgs;
    import com.pulumi.alicloud.cms.inputs.MetricRuleTemplateAlertTemplateEscalationsArgs;
    import com.pulumi.alicloud.cms.inputs.MetricRuleTemplateAlertTemplateEscalationsCriticalArgs;
    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 name = config.get("name").orElse("tf-example");
            var example = new MetricRuleTemplate("example", MetricRuleTemplateArgs.builder()
                .metricRuleTemplateName(name)
                .alertTemplates(MetricRuleTemplateAlertTemplateArgs.builder()
                    .category("ecs")
                    .metricName("cpu_total")
                    .namespace("acs_ecs_dashboard")
                    .ruleName("tf_example")
                    .escalations(MetricRuleTemplateAlertTemplateEscalationsArgs.builder()
                        .critical(MetricRuleTemplateAlertTemplateEscalationsCriticalArgs.builder()
                            .comparisonOperator("GreaterThanThreshold")
                            .statistics("Average")
                            .threshold("90")
                            .times("3")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      example:
        type: alicloud:cms:MetricRuleTemplate
        properties:
          metricRuleTemplateName: ${name}
          alertTemplates:
            - category: ecs
              metricName: cpu_total
              namespace: acs_ecs_dashboard
              ruleName: tf_example
              escalations:
                critical:
                  comparisonOperator: GreaterThanThreshold
                  statistics: Average
                  threshold: '90'
                  times: '3'
    

    Create MetricRuleTemplate Resource

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

    Constructor syntax

    new MetricRuleTemplate(name: string, args: MetricRuleTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def MetricRuleTemplate(resource_name: str,
                           args: MetricRuleTemplateArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricRuleTemplate(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           metric_rule_template_name: Optional[str] = None,
                           alert_templates: Optional[Sequence[MetricRuleTemplateAlertTemplateArgs]] = None,
                           apply_mode: Optional[str] = None,
                           description: Optional[str] = None,
                           enable_end_time: Optional[str] = None,
                           enable_start_time: Optional[str] = None,
                           group_id: Optional[str] = None,
                           notify_level: Optional[str] = None,
                           silence_time: Optional[int] = None,
                           webhook: Optional[str] = None)
    func NewMetricRuleTemplate(ctx *Context, name string, args MetricRuleTemplateArgs, opts ...ResourceOption) (*MetricRuleTemplate, error)
    public MetricRuleTemplate(string name, MetricRuleTemplateArgs args, CustomResourceOptions? opts = null)
    public MetricRuleTemplate(String name, MetricRuleTemplateArgs args)
    public MetricRuleTemplate(String name, MetricRuleTemplateArgs args, CustomResourceOptions options)
    
    type: alicloud:cms:MetricRuleTemplate
    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 MetricRuleTemplateArgs
    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 MetricRuleTemplateArgs
    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 MetricRuleTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricRuleTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricRuleTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var metricRuleTemplateResource = new AliCloud.Cms.MetricRuleTemplate("metricRuleTemplateResource", new()
    {
        MetricRuleTemplateName = "string",
        AlertTemplates = new[]
        {
            new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateArgs
            {
                Category = "string",
                MetricName = "string",
                Namespace = "string",
                RuleName = "string",
                Escalations = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsArgs
                {
                    Critical = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsCriticalArgs
                    {
                        ComparisonOperator = "string",
                        Statistics = "string",
                        Threshold = "string",
                        Times = "string",
                    },
                    Info = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsInfoArgs
                    {
                        ComparisonOperator = "string",
                        Statistics = "string",
                        Threshold = "string",
                        Times = "string",
                    },
                    Warn = new AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsWarnArgs
                    {
                        ComparisonOperator = "string",
                        Statistics = "string",
                        Threshold = "string",
                        Times = "string",
                    },
                },
                Webhook = "string",
            },
        },
        ApplyMode = "string",
        Description = "string",
        EnableEndTime = "string",
        EnableStartTime = "string",
        GroupId = "string",
        NotifyLevel = "string",
        SilenceTime = 0,
        Webhook = "string",
    });
    
    example, err := cms.NewMetricRuleTemplate(ctx, "metricRuleTemplateResource", &cms.MetricRuleTemplateArgs{
    	MetricRuleTemplateName: pulumi.String("string"),
    	AlertTemplates: cms.MetricRuleTemplateAlertTemplateArray{
    		&cms.MetricRuleTemplateAlertTemplateArgs{
    			Category:   pulumi.String("string"),
    			MetricName: pulumi.String("string"),
    			Namespace:  pulumi.String("string"),
    			RuleName:   pulumi.String("string"),
    			Escalations: &cms.MetricRuleTemplateAlertTemplateEscalationsArgs{
    				Critical: &cms.MetricRuleTemplateAlertTemplateEscalationsCriticalArgs{
    					ComparisonOperator: pulumi.String("string"),
    					Statistics:         pulumi.String("string"),
    					Threshold:          pulumi.String("string"),
    					Times:              pulumi.String("string"),
    				},
    				Info: &cms.MetricRuleTemplateAlertTemplateEscalationsInfoArgs{
    					ComparisonOperator: pulumi.String("string"),
    					Statistics:         pulumi.String("string"),
    					Threshold:          pulumi.String("string"),
    					Times:              pulumi.String("string"),
    				},
    				Warn: &cms.MetricRuleTemplateAlertTemplateEscalationsWarnArgs{
    					ComparisonOperator: pulumi.String("string"),
    					Statistics:         pulumi.String("string"),
    					Threshold:          pulumi.String("string"),
    					Times:              pulumi.String("string"),
    				},
    			},
    			Webhook: pulumi.String("string"),
    		},
    	},
    	ApplyMode:       pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	EnableEndTime:   pulumi.String("string"),
    	EnableStartTime: pulumi.String("string"),
    	GroupId:         pulumi.String("string"),
    	NotifyLevel:     pulumi.String("string"),
    	SilenceTime:     pulumi.Int(0),
    	Webhook:         pulumi.String("string"),
    })
    
    var metricRuleTemplateResource = new MetricRuleTemplate("metricRuleTemplateResource", MetricRuleTemplateArgs.builder()
        .metricRuleTemplateName("string")
        .alertTemplates(MetricRuleTemplateAlertTemplateArgs.builder()
            .category("string")
            .metricName("string")
            .namespace("string")
            .ruleName("string")
            .escalations(MetricRuleTemplateAlertTemplateEscalationsArgs.builder()
                .critical(MetricRuleTemplateAlertTemplateEscalationsCriticalArgs.builder()
                    .comparisonOperator("string")
                    .statistics("string")
                    .threshold("string")
                    .times("string")
                    .build())
                .info(MetricRuleTemplateAlertTemplateEscalationsInfoArgs.builder()
                    .comparisonOperator("string")
                    .statistics("string")
                    .threshold("string")
                    .times("string")
                    .build())
                .warn(MetricRuleTemplateAlertTemplateEscalationsWarnArgs.builder()
                    .comparisonOperator("string")
                    .statistics("string")
                    .threshold("string")
                    .times("string")
                    .build())
                .build())
            .webhook("string")
            .build())
        .applyMode("string")
        .description("string")
        .enableEndTime("string")
        .enableStartTime("string")
        .groupId("string")
        .notifyLevel("string")
        .silenceTime(0)
        .webhook("string")
        .build());
    
    metric_rule_template_resource = alicloud.cms.MetricRuleTemplate("metricRuleTemplateResource",
        metric_rule_template_name="string",
        alert_templates=[{
            "category": "string",
            "metric_name": "string",
            "namespace": "string",
            "rule_name": "string",
            "escalations": {
                "critical": {
                    "comparison_operator": "string",
                    "statistics": "string",
                    "threshold": "string",
                    "times": "string",
                },
                "info": {
                    "comparison_operator": "string",
                    "statistics": "string",
                    "threshold": "string",
                    "times": "string",
                },
                "warn": {
                    "comparison_operator": "string",
                    "statistics": "string",
                    "threshold": "string",
                    "times": "string",
                },
            },
            "webhook": "string",
        }],
        apply_mode="string",
        description="string",
        enable_end_time="string",
        enable_start_time="string",
        group_id="string",
        notify_level="string",
        silence_time=0,
        webhook="string")
    
    const metricRuleTemplateResource = new alicloud.cms.MetricRuleTemplate("metricRuleTemplateResource", {
        metricRuleTemplateName: "string",
        alertTemplates: [{
            category: "string",
            metricName: "string",
            namespace: "string",
            ruleName: "string",
            escalations: {
                critical: {
                    comparisonOperator: "string",
                    statistics: "string",
                    threshold: "string",
                    times: "string",
                },
                info: {
                    comparisonOperator: "string",
                    statistics: "string",
                    threshold: "string",
                    times: "string",
                },
                warn: {
                    comparisonOperator: "string",
                    statistics: "string",
                    threshold: "string",
                    times: "string",
                },
            },
            webhook: "string",
        }],
        applyMode: "string",
        description: "string",
        enableEndTime: "string",
        enableStartTime: "string",
        groupId: "string",
        notifyLevel: "string",
        silenceTime: 0,
        webhook: "string",
    });
    
    type: alicloud:cms:MetricRuleTemplate
    properties:
        alertTemplates:
            - category: string
              escalations:
                critical:
                    comparisonOperator: string
                    statistics: string
                    threshold: string
                    times: string
                info:
                    comparisonOperator: string
                    statistics: string
                    threshold: string
                    times: string
                warn:
                    comparisonOperator: string
                    statistics: string
                    threshold: string
                    times: string
              metricName: string
              namespace: string
              ruleName: string
              webhook: string
        applyMode: string
        description: string
        enableEndTime: string
        enableStartTime: string
        groupId: string
        metricRuleTemplateName: string
        notifyLevel: string
        silenceTime: 0
        webhook: string
    

    MetricRuleTemplate 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 MetricRuleTemplate resource accepts the following input properties:

    MetricRuleTemplateName string
    The name of the alert template.
    AlertTemplates List<Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplate>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    ApplyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    Description string
    The description of the alert template.
    EnableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    EnableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    GroupId string
    The ID of the application group.
    NotifyLevel string
    The alert notification method. Valid values:
    SilenceTime int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    MetricRuleTemplateName string
    The name of the alert template.
    AlertTemplates []MetricRuleTemplateAlertTemplateArgs
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    ApplyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    Description string
    The description of the alert template.
    EnableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    EnableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    GroupId string
    The ID of the application group.
    NotifyLevel string
    The alert notification method. Valid values:
    SilenceTime int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    metricRuleTemplateName String
    The name of the alert template.
    alertTemplates List<MetricRuleTemplateAlertTemplate>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode String
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description String
    The description of the alert template.
    enableEndTime String
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime String
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId String
    The ID of the application group.
    notifyLevel String
    The alert notification method. Valid values:
    silenceTime Integer
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    metricRuleTemplateName string
    The name of the alert template.
    alertTemplates MetricRuleTemplateAlertTemplate[]
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description string
    The description of the alert template.
    enableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId string
    The ID of the application group.
    notifyLevel string
    The alert notification method. Valid values:
    silenceTime number
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    metric_rule_template_name str
    The name of the alert template.
    alert_templates Sequence[MetricRuleTemplateAlertTemplateArgs]
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    apply_mode str
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description str
    The description of the alert template.
    enable_end_time str
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enable_start_time str
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    group_id str
    The ID of the application group.
    notify_level str
    The alert notification method. Valid values:
    silence_time int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook str
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    metricRuleTemplateName String
    The name of the alert template.
    alertTemplates List<Property Map>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode String
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description String
    The description of the alert template.
    enableEndTime String
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime String
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId String
    The ID of the application group.
    notifyLevel String
    The alert notification method. Valid values:
    silenceTime Number
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RestVersion string
    The version of the alert template.
    Id string
    The provider-assigned unique ID for this managed resource.
    RestVersion string
    The version of the alert template.
    id String
    The provider-assigned unique ID for this managed resource.
    restVersion String
    The version of the alert template.
    id string
    The provider-assigned unique ID for this managed resource.
    restVersion string
    The version of the alert template.
    id str
    The provider-assigned unique ID for this managed resource.
    rest_version str
    The version of the alert template.
    id String
    The provider-assigned unique ID for this managed resource.
    restVersion String
    The version of the alert template.

    Look up Existing MetricRuleTemplate Resource

    Get an existing MetricRuleTemplate 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?: MetricRuleTemplateState, opts?: CustomResourceOptions): MetricRuleTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_templates: Optional[Sequence[MetricRuleTemplateAlertTemplateArgs]] = None,
            apply_mode: Optional[str] = None,
            description: Optional[str] = None,
            enable_end_time: Optional[str] = None,
            enable_start_time: Optional[str] = None,
            group_id: Optional[str] = None,
            metric_rule_template_name: Optional[str] = None,
            notify_level: Optional[str] = None,
            rest_version: Optional[str] = None,
            silence_time: Optional[int] = None,
            webhook: Optional[str] = None) -> MetricRuleTemplate
    func GetMetricRuleTemplate(ctx *Context, name string, id IDInput, state *MetricRuleTemplateState, opts ...ResourceOption) (*MetricRuleTemplate, error)
    public static MetricRuleTemplate Get(string name, Input<string> id, MetricRuleTemplateState? state, CustomResourceOptions? opts = null)
    public static MetricRuleTemplate get(String name, Output<String> id, MetricRuleTemplateState 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:
    AlertTemplates List<Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplate>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    ApplyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    Description string
    The description of the alert template.
    EnableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    EnableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    GroupId string
    The ID of the application group.
    MetricRuleTemplateName string
    The name of the alert template.
    NotifyLevel string
    The alert notification method. Valid values:
    RestVersion string
    The version of the alert template.
    SilenceTime int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    AlertTemplates []MetricRuleTemplateAlertTemplateArgs
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    ApplyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    Description string
    The description of the alert template.
    EnableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    EnableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    GroupId string
    The ID of the application group.
    MetricRuleTemplateName string
    The name of the alert template.
    NotifyLevel string
    The alert notification method. Valid values:
    RestVersion string
    The version of the alert template.
    SilenceTime int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    alertTemplates List<MetricRuleTemplateAlertTemplate>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode String
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description String
    The description of the alert template.
    enableEndTime String
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime String
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId String
    The ID of the application group.
    metricRuleTemplateName String
    The name of the alert template.
    notifyLevel String
    The alert notification method. Valid values:
    restVersion String
    The version of the alert template.
    silenceTime Integer
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    alertTemplates MetricRuleTemplateAlertTemplate[]
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode string
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description string
    The description of the alert template.
    enableEndTime string
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime string
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId string
    The ID of the application group.
    metricRuleTemplateName string
    The name of the alert template.
    notifyLevel string
    The alert notification method. Valid values:
    restVersion string
    The version of the alert template.
    silenceTime number
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    alert_templates Sequence[MetricRuleTemplateAlertTemplateArgs]
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    apply_mode str
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description str
    The description of the alert template.
    enable_end_time str
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enable_start_time str
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    group_id str
    The ID of the application group.
    metric_rule_template_name str
    The name of the alert template.
    notify_level str
    The alert notification method. Valid values:
    rest_version str
    The version of the alert template.
    silence_time int
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook str
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    alertTemplates List<Property Map>
    The details of alert rules that are generated based on the alert template. See alert_templates below.
    applyMode String
    The mode in which the alert template is applied. Valid values:

    • GROUP_INSTANCE_FIRST: The metrics in the application group take precedence.
    • ALARM_TEMPLATE_FIRST : The metrics specified in the alert template take precedence.
    description String
    The description of the alert template.
    enableEndTime String
    The end of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:59 and the value 23 indicates 23:59.
    enableStartTime String
    The beginning of the time period during which the alert rule is effective. Valid values: 00 to 23. The value 00 indicates 00:00 and the value 23 indicates 23:00.
    groupId String
    The ID of the application group.
    metricRuleTemplateName String
    The name of the alert template.
    notifyLevel String
    The alert notification method. Valid values:
    restVersion String
    The version of the alert template.
    silenceTime Number
    The mute period during which notifications are not repeatedly sent for an alert. Unit: seconds. Default value: 86400. Valid values: 0 to 86400.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.

    Supporting Types

    MetricRuleTemplateAlertTemplate, MetricRuleTemplateAlertTemplateArgs

    Category string

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    MetricName string

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    Namespace string

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    RuleName string
    The name of the alert rule.
    Escalations Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalations
    The information about the trigger condition based on the alert level. See escalations below.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    Category string

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    MetricName string

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    Namespace string

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    RuleName string
    The name of the alert rule.
    Escalations MetricRuleTemplateAlertTemplateEscalations
    The information about the trigger condition based on the alert level. See escalations below.
    Webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    category String

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    metricName String

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    namespace String

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    ruleName String
    The name of the alert rule.
    escalations MetricRuleTemplateAlertTemplateEscalations
    The information about the trigger condition based on the alert level. See escalations below.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    category string

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    metricName string

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    namespace string

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    ruleName string
    The name of the alert rule.
    escalations MetricRuleTemplateAlertTemplateEscalations
    The information about the trigger condition based on the alert level. See escalations below.
    webhook string
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    category str

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    metric_name str

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    namespace str

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    rule_name str
    The name of the alert rule.
    escalations MetricRuleTemplateAlertTemplateEscalations
    The information about the trigger condition based on the alert level. See escalations below.
    webhook str
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.
    category String

    The abbreviation of the Alibaba Cloud service name.

    NOTE: To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

    metricName String

    The name of the metric.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    namespace String

    The namespace of the cloud service.

    NOTE: For more information, see DescribeMetricMetaList or Appendix 1: Metrics.

    ruleName String
    The name of the alert rule.
    escalations Property Map
    The information about the trigger condition based on the alert level. See escalations below.
    webhook String
    The callback URL to which a POST request is sent when an alert is triggered based on the alert rule.

    MetricRuleTemplateAlertTemplateEscalations, MetricRuleTemplateAlertTemplateEscalationsArgs

    Critical Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsCritical
    The condition for triggering critical-level alerts. See critical below.
    Info Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsInfo
    The condition for triggering info-level alerts. See info below.
    Warn Pulumi.AliCloud.Cms.Inputs.MetricRuleTemplateAlertTemplateEscalationsWarn
    The condition for triggering warn-level alerts. See warn below.
    Critical MetricRuleTemplateAlertTemplateEscalationsCritical
    The condition for triggering critical-level alerts. See critical below.
    Info MetricRuleTemplateAlertTemplateEscalationsInfo
    The condition for triggering info-level alerts. See info below.
    Warn MetricRuleTemplateAlertTemplateEscalationsWarn
    The condition for triggering warn-level alerts. See warn below.
    critical MetricRuleTemplateAlertTemplateEscalationsCritical
    The condition for triggering critical-level alerts. See critical below.
    info MetricRuleTemplateAlertTemplateEscalationsInfo
    The condition for triggering info-level alerts. See info below.
    warn MetricRuleTemplateAlertTemplateEscalationsWarn
    The condition for triggering warn-level alerts. See warn below.
    critical MetricRuleTemplateAlertTemplateEscalationsCritical
    The condition for triggering critical-level alerts. See critical below.
    info MetricRuleTemplateAlertTemplateEscalationsInfo
    The condition for triggering info-level alerts. See info below.
    warn MetricRuleTemplateAlertTemplateEscalationsWarn
    The condition for triggering warn-level alerts. See warn below.
    critical MetricRuleTemplateAlertTemplateEscalationsCritical
    The condition for triggering critical-level alerts. See critical below.
    info MetricRuleTemplateAlertTemplateEscalationsInfo
    The condition for triggering info-level alerts. See info below.
    warn MetricRuleTemplateAlertTemplateEscalationsWarn
    The condition for triggering warn-level alerts. See warn below.
    critical Property Map
    The condition for triggering critical-level alerts. See critical below.
    info Property Map
    The condition for triggering info-level alerts. See info below.
    warn Property Map
    The condition for triggering warn-level alerts. See warn below.

    MetricRuleTemplateAlertTemplateEscalationsCritical, MetricRuleTemplateAlertTemplateEscalationsCriticalArgs

    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics string
    The statistical aggregation method for warn-level alerts.
    threshold string
    The threshold for warn-level alerts.
    times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparison_operator str
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics str
    The statistical aggregation method for warn-level alerts.
    threshold str
    The threshold for warn-level alerts.
    times str
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.

    MetricRuleTemplateAlertTemplateEscalationsInfo, MetricRuleTemplateAlertTemplateEscalationsInfoArgs

    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics string
    The statistical aggregation method for warn-level alerts.
    threshold string
    The threshold for warn-level alerts.
    times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparison_operator str
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics str
    The statistical aggregation method for warn-level alerts.
    threshold str
    The threshold for warn-level alerts.
    times str
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.

    MetricRuleTemplateAlertTemplateEscalationsWarn, MetricRuleTemplateAlertTemplateEscalationsWarnArgs

    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    ComparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    Statistics string
    The statistical aggregation method for warn-level alerts.
    Threshold string
    The threshold for warn-level alerts.
    Times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator string
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics string
    The statistical aggregation method for warn-level alerts.
    threshold string
    The threshold for warn-level alerts.
    times string
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparison_operator str
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics str
    The statistical aggregation method for warn-level alerts.
    threshold str
    The threshold for warn-level alerts.
    times str
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.
    comparisonOperator String
    The comparison operator of the threshold for warn-level alerts. Valid values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanOrEqualToThreshold, LessThanThreshold, NotEqualToThreshold, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod.
    statistics String
    The statistical aggregation method for warn-level alerts.
    threshold String
    The threshold for warn-level alerts.
    times String
    The consecutive number of times for which the metric value is measured before a warn-level alert is triggered.

    Import

    Cloud Monitor Service Metric Rule Template can be imported using the id, e.g.

    $ pulumi import alicloud:cms/metricRuleTemplate:MetricRuleTemplate example <id>
    

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

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi