volcengine.cloud_monitor.Rule
Explore with Pulumi AI
Provides a resource to manage cloud monitor rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.cloud_monitor.Rule("foo", {
    alertMethods: [
        "Email",
        "Webhook",
    ],
    conditionOperator: "||",
    conditions: [
        {
            comparisonOperator: ">",
            metricName: "DiskUsageAvail",
            metricUnit: "Megabytes",
            statistics: "avg",
            threshold: "100",
        },
        {
            comparisonOperator: ">",
            metricName: "DiskUsageUtilization",
            metricUnit: "Percent",
            statistics: "avg",
            threshold: "90",
        },
    ],
    contactGroupIds: ["174284616403161****"],
    description: "acc-test",
    effectEndAt: "22:55",
    effectStartAt: "00:15",
    enableState: "disable",
    evaluationCount: 5,
    level: "warning",
    multipleConditions: true,
    namespace: "VCM_ECS",
    originalDimensions: [
        {
            key: "ResourceID",
            values: ["*"],
        },
        {
            key: "DiskName",
            values: [
                "vda",
                "vda1",
            ],
        },
    ],
    recoveryNotify: {
        enable: true,
    },
    regions: "cn-beijing",
    ruleName: "acc-test-rule",
    silenceTime: 5,
    subNamespace: "Storage",
    webHook: "http://alert.volc.com/callback",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.cloud_monitor.Rule("foo",
    alert_methods=[
        "Email",
        "Webhook",
    ],
    condition_operator="||",
    conditions=[
        volcengine.cloud_monitor.RuleConditionArgs(
            comparison_operator=">",
            metric_name="DiskUsageAvail",
            metric_unit="Megabytes",
            statistics="avg",
            threshold="100",
        ),
        volcengine.cloud_monitor.RuleConditionArgs(
            comparison_operator=">",
            metric_name="DiskUsageUtilization",
            metric_unit="Percent",
            statistics="avg",
            threshold="90",
        ),
    ],
    contact_group_ids=["174284616403161****"],
    description="acc-test",
    effect_end_at="22:55",
    effect_start_at="00:15",
    enable_state="disable",
    evaluation_count=5,
    level="warning",
    multiple_conditions=True,
    namespace="VCM_ECS",
    original_dimensions=[
        volcengine.cloud_monitor.RuleOriginalDimensionArgs(
            key="ResourceID",
            values=["*"],
        ),
        volcengine.cloud_monitor.RuleOriginalDimensionArgs(
            key="DiskName",
            values=[
                "vda",
                "vda1",
            ],
        ),
    ],
    recovery_notify=volcengine.cloud_monitor.RuleRecoveryNotifyArgs(
        enable=True,
    ),
    regions="cn-beijing",
    rule_name="acc-test-rule",
    silence_time=5,
    sub_namespace="Storage",
    web_hook="http://alert.volc.com/callback")
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_monitor"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloud_monitor.NewRule(ctx, "foo", &cloud_monitor.RuleArgs{
			AlertMethods: pulumi.StringArray{
				pulumi.String("Email"),
				pulumi.String("Webhook"),
			},
			ConditionOperator: pulumi.String("||"),
			Conditions: cloud_monitor.RuleConditionArray{
				&cloud_monitor.RuleConditionArgs{
					ComparisonOperator: pulumi.String(">"),
					MetricName:         pulumi.String("DiskUsageAvail"),
					MetricUnit:         pulumi.String("Megabytes"),
					Statistics:         pulumi.String("avg"),
					Threshold:          pulumi.String("100"),
				},
				&cloud_monitor.RuleConditionArgs{
					ComparisonOperator: pulumi.String(">"),
					MetricName:         pulumi.String("DiskUsageUtilization"),
					MetricUnit:         pulumi.String("Percent"),
					Statistics:         pulumi.String("avg"),
					Threshold:          pulumi.String("90"),
				},
			},
			ContactGroupIds: pulumi.StringArray{
				pulumi.String("174284616403161****"),
			},
			Description:        pulumi.String("acc-test"),
			EffectEndAt:        pulumi.String("22:55"),
			EffectStartAt:      pulumi.String("00:15"),
			EnableState:        pulumi.String("disable"),
			EvaluationCount:    pulumi.Int(5),
			Level:              pulumi.String("warning"),
			MultipleConditions: pulumi.Bool(true),
			Namespace:          pulumi.String("VCM_ECS"),
			OriginalDimensions: cloud_monitor.RuleOriginalDimensionArray{
				&cloud_monitor.RuleOriginalDimensionArgs{
					Key: pulumi.String("ResourceID"),
					Values: pulumi.StringArray{
						pulumi.String("*"),
					},
				},
				&cloud_monitor.RuleOriginalDimensionArgs{
					Key: pulumi.String("DiskName"),
					Values: pulumi.StringArray{
						pulumi.String("vda"),
						pulumi.String("vda1"),
					},
				},
			},
			RecoveryNotify: &cloud_monitor.RuleRecoveryNotifyArgs{
				Enable: pulumi.Bool(true),
			},
			Regions:      pulumi.String("cn-beijing"),
			RuleName:     pulumi.String("acc-test-rule"),
			SilenceTime:  pulumi.Int(5),
			SubNamespace: pulumi.String("Storage"),
			WebHook:      pulumi.String("http://alert.volc.com/callback"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Cloud_monitor.Rule("foo", new()
    {
        AlertMethods = new[]
        {
            "Email",
            "Webhook",
        },
        ConditionOperator = "||",
        Conditions = new[]
        {
            new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
            {
                ComparisonOperator = ">",
                MetricName = "DiskUsageAvail",
                MetricUnit = "Megabytes",
                Statistics = "avg",
                Threshold = "100",
            },
            new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
            {
                ComparisonOperator = ">",
                MetricName = "DiskUsageUtilization",
                MetricUnit = "Percent",
                Statistics = "avg",
                Threshold = "90",
            },
        },
        ContactGroupIds = new[]
        {
            "174284616403161****",
        },
        Description = "acc-test",
        EffectEndAt = "22:55",
        EffectStartAt = "00:15",
        EnableState = "disable",
        EvaluationCount = 5,
        Level = "warning",
        MultipleConditions = true,
        Namespace = "VCM_ECS",
        OriginalDimensions = new[]
        {
            new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
            {
                Key = "ResourceID",
                Values = new[]
                {
                    "*",
                },
            },
            new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
            {
                Key = "DiskName",
                Values = new[]
                {
                    "vda",
                    "vda1",
                },
            },
        },
        RecoveryNotify = new Volcengine.Cloud_monitor.Inputs.RuleRecoveryNotifyArgs
        {
            Enable = true,
        },
        Regions = "cn-beijing",
        RuleName = "acc-test-rule",
        SilenceTime = 5,
        SubNamespace = "Storage",
        WebHook = "http://alert.volc.com/callback",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_monitor.Rule;
import com.pulumi.volcengine.cloud_monitor.RuleArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleConditionArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleOriginalDimensionArgs;
import com.pulumi.volcengine.cloud_monitor.inputs.RuleRecoveryNotifyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var foo = new Rule("foo", RuleArgs.builder()        
            .alertMethods(            
                "Email",
                "Webhook")
            .conditionOperator("||")
            .conditions(            
                RuleConditionArgs.builder()
                    .comparisonOperator(">")
                    .metricName("DiskUsageAvail")
                    .metricUnit("Megabytes")
                    .statistics("avg")
                    .threshold("100")
                    .build(),
                RuleConditionArgs.builder()
                    .comparisonOperator(">")
                    .metricName("DiskUsageUtilization")
                    .metricUnit("Percent")
                    .statistics("avg")
                    .threshold("90")
                    .build())
            .contactGroupIds("174284616403161****")
            .description("acc-test")
            .effectEndAt("22:55")
            .effectStartAt("00:15")
            .enableState("disable")
            .evaluationCount(5)
            .level("warning")
            .multipleConditions(true)
            .namespace("VCM_ECS")
            .originalDimensions(            
                RuleOriginalDimensionArgs.builder()
                    .key("ResourceID")
                    .values("*")
                    .build(),
                RuleOriginalDimensionArgs.builder()
                    .key("DiskName")
                    .values(                    
                        "vda",
                        "vda1")
                    .build())
            .recoveryNotify(RuleRecoveryNotifyArgs.builder()
                .enable(true)
                .build())
            .regions("cn-beijing")
            .ruleName("acc-test-rule")
            .silenceTime(5)
            .subNamespace("Storage")
            .webHook("http://alert.volc.com/callback")
            .build());
    }
}
resources:
  foo:
    type: volcengine:cloud_monitor:Rule
    properties:
      alertMethods:
        - Email
        - Webhook
      conditionOperator: '||'
      conditions:
        - comparisonOperator: '>'
          metricName: DiskUsageAvail
          metricUnit: Megabytes
          statistics: avg
          threshold: '100'
        - comparisonOperator: '>'
          metricName: DiskUsageUtilization
          metricUnit: Percent
          statistics: avg
          threshold: '90'
      contactGroupIds:
        - 174284616403161****
      description: acc-test
      effectEndAt: 22:55
      effectStartAt: 00:15
      enableState: disable
      evaluationCount: 5
      level: warning
      multipleConditions: true
      namespace: VCM_ECS
      originalDimensions:
        - key: ResourceID
          values:
            - '*'
        - key: DiskName
          values:
            - vda
            - vda1
      recoveryNotify:
        enable: true
      regions: cn-beijing
      ruleName: acc-test-rule
      silenceTime: 5
      subNamespace: Storage
      webHook: http://alert.volc.com/callback
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
         args: RuleArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         original_dimensions: Optional[Sequence[RuleOriginalDimensionArgs]] = None,
         regions: Optional[str] = None,
         evaluation_count: Optional[int] = None,
         level: Optional[str] = None,
         sub_namespace: Optional[str] = None,
         effect_end_at: Optional[str] = None,
         effect_start_at: Optional[str] = None,
         enable_state: Optional[str] = None,
         conditions: Optional[Sequence[RuleConditionArgs]] = None,
         silence_time: Optional[int] = None,
         namespace: Optional[str] = None,
         rule_name: Optional[str] = None,
         alert_methods: Optional[Sequence[str]] = None,
         web_hook: Optional[str] = None,
         recovery_notify: Optional[RuleRecoveryNotifyArgs] = None,
         multiple_conditions: Optional[bool] = None,
         condition_operator: Optional[str] = None,
         description: Optional[str] = None,
         contact_group_ids: Optional[Sequence[str]] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: volcengine:cloud_monitor:Rule
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 RuleArgs
- 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 RuleArgs
- 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 RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- 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 exampleruleResourceResourceFromCloud_monitorrule = new Volcengine.Cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule", new()
{
    OriginalDimensions = new[]
    {
        new Volcengine.Cloud_monitor.Inputs.RuleOriginalDimensionArgs
        {
            Key = "string",
            Values = new[]
            {
                "string",
            },
        },
    },
    Regions = "string",
    EvaluationCount = 0,
    Level = "string",
    SubNamespace = "string",
    EffectEndAt = "string",
    EffectStartAt = "string",
    EnableState = "string",
    Conditions = new[]
    {
        new Volcengine.Cloud_monitor.Inputs.RuleConditionArgs
        {
            ComparisonOperator = "string",
            MetricName = "string",
            MetricUnit = "string",
            Statistics = "string",
            Threshold = "string",
            Period = "string",
        },
    },
    SilenceTime = 0,
    Namespace = "string",
    RuleName = "string",
    AlertMethods = new[]
    {
        "string",
    },
    WebHook = "string",
    RecoveryNotify = new Volcengine.Cloud_monitor.Inputs.RuleRecoveryNotifyArgs
    {
        Enable = false,
    },
    MultipleConditions = false,
    ConditionOperator = "string",
    Description = "string",
    ContactGroupIds = new[]
    {
        "string",
    },
});
example, err := cloud_monitor.NewRule(ctx, "exampleruleResourceResourceFromCloud_monitorrule", &cloud_monitor.RuleArgs{
	OriginalDimensions: cloud_monitor.RuleOriginalDimensionArray{
		&cloud_monitor.RuleOriginalDimensionArgs{
			Key: pulumi.String("string"),
			Values: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	Regions:         pulumi.String("string"),
	EvaluationCount: pulumi.Int(0),
	Level:           pulumi.String("string"),
	SubNamespace:    pulumi.String("string"),
	EffectEndAt:     pulumi.String("string"),
	EffectStartAt:   pulumi.String("string"),
	EnableState:     pulumi.String("string"),
	Conditions: cloud_monitor.RuleConditionArray{
		&cloud_monitor.RuleConditionArgs{
			ComparisonOperator: pulumi.String("string"),
			MetricName:         pulumi.String("string"),
			MetricUnit:         pulumi.String("string"),
			Statistics:         pulumi.String("string"),
			Threshold:          pulumi.String("string"),
			Period:             pulumi.String("string"),
		},
	},
	SilenceTime: pulumi.Int(0),
	Namespace:   pulumi.String("string"),
	RuleName:    pulumi.String("string"),
	AlertMethods: pulumi.StringArray{
		pulumi.String("string"),
	},
	WebHook: pulumi.String("string"),
	RecoveryNotify: &cloud_monitor.RuleRecoveryNotifyArgs{
		Enable: pulumi.Bool(false),
	},
	MultipleConditions: pulumi.Bool(false),
	ConditionOperator:  pulumi.String("string"),
	Description:        pulumi.String("string"),
	ContactGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
})
var exampleruleResourceResourceFromCloud_monitorrule = new Rule("exampleruleResourceResourceFromCloud_monitorrule", RuleArgs.builder()
    .originalDimensions(RuleOriginalDimensionArgs.builder()
        .key("string")
        .values("string")
        .build())
    .regions("string")
    .evaluationCount(0)
    .level("string")
    .subNamespace("string")
    .effectEndAt("string")
    .effectStartAt("string")
    .enableState("string")
    .conditions(RuleConditionArgs.builder()
        .comparisonOperator("string")
        .metricName("string")
        .metricUnit("string")
        .statistics("string")
        .threshold("string")
        .period("string")
        .build())
    .silenceTime(0)
    .namespace("string")
    .ruleName("string")
    .alertMethods("string")
    .webHook("string")
    .recoveryNotify(RuleRecoveryNotifyArgs.builder()
        .enable(false)
        .build())
    .multipleConditions(false)
    .conditionOperator("string")
    .description("string")
    .contactGroupIds("string")
    .build());
examplerule_resource_resource_from_cloud_monitorrule = volcengine.cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule",
    original_dimensions=[{
        "key": "string",
        "values": ["string"],
    }],
    regions="string",
    evaluation_count=0,
    level="string",
    sub_namespace="string",
    effect_end_at="string",
    effect_start_at="string",
    enable_state="string",
    conditions=[{
        "comparison_operator": "string",
        "metric_name": "string",
        "metric_unit": "string",
        "statistics": "string",
        "threshold": "string",
        "period": "string",
    }],
    silence_time=0,
    namespace="string",
    rule_name="string",
    alert_methods=["string"],
    web_hook="string",
    recovery_notify={
        "enable": False,
    },
    multiple_conditions=False,
    condition_operator="string",
    description="string",
    contact_group_ids=["string"])
const exampleruleResourceResourceFromCloud_monitorrule = new volcengine.cloud_monitor.Rule("exampleruleResourceResourceFromCloud_monitorrule", {
    originalDimensions: [{
        key: "string",
        values: ["string"],
    }],
    regions: "string",
    evaluationCount: 0,
    level: "string",
    subNamespace: "string",
    effectEndAt: "string",
    effectStartAt: "string",
    enableState: "string",
    conditions: [{
        comparisonOperator: "string",
        metricName: "string",
        metricUnit: "string",
        statistics: "string",
        threshold: "string",
        period: "string",
    }],
    silenceTime: 0,
    namespace: "string",
    ruleName: "string",
    alertMethods: ["string"],
    webHook: "string",
    recoveryNotify: {
        enable: false,
    },
    multipleConditions: false,
    conditionOperator: "string",
    description: "string",
    contactGroupIds: ["string"],
});
type: volcengine:cloud_monitor:Rule
properties:
    alertMethods:
        - string
    conditionOperator: string
    conditions:
        - comparisonOperator: string
          metricName: string
          metricUnit: string
          period: string
          statistics: string
          threshold: string
    contactGroupIds:
        - string
    description: string
    effectEndAt: string
    effectStartAt: string
    enableState: string
    evaluationCount: 0
    level: string
    multipleConditions: false
    namespace: string
    originalDimensions:
        - key: string
          values:
            - string
    recoveryNotify:
        enable: false
    regions: string
    ruleName: string
    silenceTime: 0
    subNamespace: string
    webHook: string
Rule 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 Rule resource accepts the following input properties:
- AlertMethods List<string>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- Conditions
List<RuleCondition> 
- The conditions of the cloud monitor rule.
- EffectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- EffectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- EnableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- EvaluationCount int
- The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- Namespace string
- The namespace of the cloud monitor rule.
- OriginalDimensions List<RuleOriginal Dimension> 
- The original dimensions of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- RuleName string
- The name of the cloud monitor rule.
- SilenceTime int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- SubNamespace string
- The sub namespace of the cloud monitor rule.
- ConditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- ContactGroup List<string>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- Description string
- The description of the cloud monitor rule.
- MultipleConditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- RecoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- WebHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- AlertMethods []string
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- Conditions
[]RuleCondition Args 
- The conditions of the cloud monitor rule.
- EffectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- EffectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- EnableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- EvaluationCount int
- The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- Namespace string
- The namespace of the cloud monitor rule.
- OriginalDimensions []RuleOriginal Dimension Args 
- The original dimensions of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- RuleName string
- The name of the cloud monitor rule.
- SilenceTime int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- SubNamespace string
- The sub namespace of the cloud monitor rule.
- ConditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- ContactGroup []stringIds 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- Description string
- The description of the cloud monitor rule.
- MultipleConditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- RecoveryNotify RuleRecovery Notify Args 
- The recovery notify of the cloud monitor rule.
- WebHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods List<String>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- conditions
List<RuleCondition> 
- The conditions of the cloud monitor rule.
- effectEnd StringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart StringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState String
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount Integer
- The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- namespace String
- The namespace of the cloud monitor rule.
- originalDimensions List<RuleOriginal Dimension> 
- The original dimensions of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName String
- The name of the cloud monitor rule.
- silenceTime Integer
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace String
- The sub namespace of the cloud monitor rule.
- conditionOperator String
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- contactGroup List<String>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- description String
- The description of the cloud monitor rule.
- multipleConditions Boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- recoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- webHook String
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods string[]
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- conditions
RuleCondition[] 
- The conditions of the cloud monitor rule.
- effectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount number
- The evaluation count of the cloud monitor rule.
- level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- namespace string
- The namespace of the cloud monitor rule.
- originalDimensions RuleOriginal Dimension[] 
- The original dimensions of the cloud monitor rule.
- regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName string
- The name of the cloud monitor rule.
- silenceTime number
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace string
- The sub namespace of the cloud monitor rule.
- conditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- contactGroup string[]Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- description string
- The description of the cloud monitor rule.
- multipleConditions boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- recoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- webHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alert_methods Sequence[str]
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- conditions
Sequence[RuleCondition Args] 
- The conditions of the cloud monitor rule.
- effect_end_ strat 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effect_start_ strat 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enable_state str
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluation_count int
- The evaluation count of the cloud monitor rule.
- level str
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- namespace str
- The namespace of the cloud monitor rule.
- original_dimensions Sequence[RuleOriginal Dimension Args] 
- The original dimensions of the cloud monitor rule.
- regions str
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule_name str
- The name of the cloud monitor rule.
- silence_time int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub_namespace str
- The sub namespace of the cloud monitor rule.
- condition_operator str
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- contact_group_ Sequence[str]ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- description str
- The description of the cloud monitor rule.
- multiple_conditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- recovery_notify RuleRecovery Notify Args 
- The recovery notify of the cloud monitor rule.
- web_hook str
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods List<String>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- conditions List<Property Map>
- The conditions of the cloud monitor rule.
- effectEnd StringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart StringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState String
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount Number
- The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- namespace String
- The namespace of the cloud monitor rule.
- originalDimensions List<Property Map>
- The original dimensions of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName String
- The name of the cloud monitor rule.
- silenceTime Number
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace String
- The sub namespace of the cloud monitor rule.
- conditionOperator String
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- contactGroup List<String>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- description String
- The description of the cloud monitor rule.
- multipleConditions Boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- recoveryNotify Property Map
- The recovery notify of the cloud monitor rule.
- webHook String
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
- AlertState string
- The alert state of the cloud monitor rule.
- CreatedAt string
- The created time of the cloud monitor rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- UpdatedAt string
- The updated time of the cloud monitor rule.
- AlertState string
- The alert state of the cloud monitor rule.
- CreatedAt string
- The created time of the cloud monitor rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- UpdatedAt string
- The updated time of the cloud monitor rule.
- alertState String
- The alert state of the cloud monitor rule.
- createdAt String
- The created time of the cloud monitor rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updatedAt String
- The updated time of the cloud monitor rule.
- alertState string
- The alert state of the cloud monitor rule.
- createdAt string
- The created time of the cloud monitor rule.
- id string
- The provider-assigned unique ID for this managed resource.
- updatedAt string
- The updated time of the cloud monitor rule.
- alert_state str
- The alert state of the cloud monitor rule.
- created_at str
- The created time of the cloud monitor rule.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_at str
- The updated time of the cloud monitor rule.
- alertState String
- The alert state of the cloud monitor rule.
- createdAt String
- The created time of the cloud monitor rule.
- id String
- The provider-assigned unique ID for this managed resource.
- updatedAt String
- The updated time of the cloud monitor rule.
Look up Existing Rule Resource
Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alert_methods: Optional[Sequence[str]] = None,
        alert_state: Optional[str] = None,
        condition_operator: Optional[str] = None,
        conditions: Optional[Sequence[RuleConditionArgs]] = None,
        contact_group_ids: Optional[Sequence[str]] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        effect_end_at: Optional[str] = None,
        effect_start_at: Optional[str] = None,
        enable_state: Optional[str] = None,
        evaluation_count: Optional[int] = None,
        level: Optional[str] = None,
        multiple_conditions: Optional[bool] = None,
        namespace: Optional[str] = None,
        original_dimensions: Optional[Sequence[RuleOriginalDimensionArgs]] = None,
        recovery_notify: Optional[RuleRecoveryNotifyArgs] = None,
        regions: Optional[str] = None,
        rule_name: Optional[str] = None,
        silence_time: Optional[int] = None,
        sub_namespace: Optional[str] = None,
        updated_at: Optional[str] = None,
        web_hook: Optional[str] = None) -> Rulefunc GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)resources:  _:    type: volcengine:cloud_monitor:Rule    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.
- AlertMethods List<string>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- AlertState string
- The alert state of the cloud monitor rule.
- ConditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- Conditions
List<RuleCondition> 
- The conditions of the cloud monitor rule.
- ContactGroup List<string>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- CreatedAt string
- The created time of the cloud monitor rule.
- Description string
- The description of the cloud monitor rule.
- EffectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- EffectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- EnableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- EvaluationCount int
- The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- MultipleConditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- Namespace string
- The namespace of the cloud monitor rule.
- OriginalDimensions List<RuleOriginal Dimension> 
- The original dimensions of the cloud monitor rule.
- RecoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- RuleName string
- The name of the cloud monitor rule.
- SilenceTime int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- SubNamespace string
- The sub namespace of the cloud monitor rule.
- UpdatedAt string
- The updated time of the cloud monitor rule.
- WebHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- AlertMethods []string
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- AlertState string
- The alert state of the cloud monitor rule.
- ConditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- Conditions
[]RuleCondition Args 
- The conditions of the cloud monitor rule.
- ContactGroup []stringIds 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- CreatedAt string
- The created time of the cloud monitor rule.
- Description string
- The description of the cloud monitor rule.
- EffectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- EffectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- EnableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- EvaluationCount int
- The evaluation count of the cloud monitor rule.
- Level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- MultipleConditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- Namespace string
- The namespace of the cloud monitor rule.
- OriginalDimensions []RuleOriginal Dimension Args 
- The original dimensions of the cloud monitor rule.
- RecoveryNotify RuleRecovery Notify Args 
- The recovery notify of the cloud monitor rule.
- Regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- RuleName string
- The name of the cloud monitor rule.
- SilenceTime int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- SubNamespace string
- The sub namespace of the cloud monitor rule.
- UpdatedAt string
- The updated time of the cloud monitor rule.
- WebHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods List<String>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- alertState String
- The alert state of the cloud monitor rule.
- conditionOperator String
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- conditions
List<RuleCondition> 
- The conditions of the cloud monitor rule.
- contactGroup List<String>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- createdAt String
- The created time of the cloud monitor rule.
- description String
- The description of the cloud monitor rule.
- effectEnd StringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart StringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState String
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount Integer
- The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- multipleConditions Boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace String
- The namespace of the cloud monitor rule.
- originalDimensions List<RuleOriginal Dimension> 
- The original dimensions of the cloud monitor rule.
- recoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName String
- The name of the cloud monitor rule.
- silenceTime Integer
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace String
- The sub namespace of the cloud monitor rule.
- updatedAt String
- The updated time of the cloud monitor rule.
- webHook String
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods string[]
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- alertState string
- The alert state of the cloud monitor rule.
- conditionOperator string
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- conditions
RuleCondition[] 
- The conditions of the cloud monitor rule.
- contactGroup string[]Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- createdAt string
- The created time of the cloud monitor rule.
- description string
- The description of the cloud monitor rule.
- effectEnd stringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart stringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState string
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount number
- The evaluation count of the cloud monitor rule.
- level string
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- multipleConditions boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace string
- The namespace of the cloud monitor rule.
- originalDimensions RuleOriginal Dimension[] 
- The original dimensions of the cloud monitor rule.
- recoveryNotify RuleRecovery Notify 
- The recovery notify of the cloud monitor rule.
- regions string
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName string
- The name of the cloud monitor rule.
- silenceTime number
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace string
- The sub namespace of the cloud monitor rule.
- updatedAt string
- The updated time of the cloud monitor rule.
- webHook string
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alert_methods Sequence[str]
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- alert_state str
- The alert state of the cloud monitor rule.
- condition_operator str
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- conditions
Sequence[RuleCondition Args] 
- The conditions of the cloud monitor rule.
- contact_group_ Sequence[str]ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- created_at str
- The created time of the cloud monitor rule.
- description str
- The description of the cloud monitor rule.
- effect_end_ strat 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effect_start_ strat 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enable_state str
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluation_count int
- The evaluation count of the cloud monitor rule.
- level str
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- multiple_conditions bool
- Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace str
- The namespace of the cloud monitor rule.
- original_dimensions Sequence[RuleOriginal Dimension Args] 
- The original dimensions of the cloud monitor rule.
- recovery_notify RuleRecovery Notify Args 
- The recovery notify of the cloud monitor rule.
- regions str
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- rule_name str
- The name of the cloud monitor rule.
- silence_time int
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- sub_namespace str
- The sub namespace of the cloud monitor rule.
- updated_at str
- The updated time of the cloud monitor rule.
- web_hook str
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
- alertMethods List<String>
- The alert methods of the cloud monitor rule. Valid values: Email,Phone,SMS,Webhook.
- alertState String
- The alert state of the cloud monitor rule.
- conditionOperator String
- The condition operator of the cloud monitor rule. Valid values: &&,||.
- conditions List<Property Map>
- The conditions of the cloud monitor rule.
- contactGroup List<String>Ids 
- The contact group ids of the cloud monitor rule. When the alert method is Email,SMS, orPhone, This field must be specified.
- createdAt String
- The created time of the cloud monitor rule.
- description String
- The description of the cloud monitor rule.
- effectEnd StringAt 
- The effect end time of the cloud monitor rule. The expression is HH:MM.
- effectStart StringAt 
- The effect start time of the cloud monitor rule. The expression is HH:MM.
- enableState String
- The enable state of the cloud monitor rule. Valid values: enable,disable.
- evaluationCount Number
- The evaluation count of the cloud monitor rule.
- level String
- The level of the cloud monitor rule. Valid values: critical,warning,notice.
- multipleConditions Boolean
- Whether to enable the multiple conditions function of the cloud monitor rule.
- namespace String
- The namespace of the cloud monitor rule.
- originalDimensions List<Property Map>
- The original dimensions of the cloud monitor rule.
- recoveryNotify Property Map
- The recovery notify of the cloud monitor rule.
- regions String
- The region ids of the cloud monitor rule. Only one region id can be specified currently.
- ruleName String
- The name of the cloud monitor rule.
- silenceTime Number
- The silence time of the cloud monitor rule. Unit in minutes. Valid values: 5, 30, 60, 180, 360, 720, 1440.
- subNamespace String
- The sub namespace of the cloud monitor rule.
- updatedAt String
- The updated time of the cloud monitor rule.
- webHook String
- The web hook of the cloud monitor rule. When the alert method is Webhook, This field must be specified.
Supporting Types
RuleCondition, RuleConditionArgs    
- ComparisonOperator string
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- MetricName string
- The metric name of the cloud monitor rule.
- MetricUnit string
- The metric unit of the cloud monitor rule.
- Statistics string
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- Threshold string
- The threshold of the cloud monitor rule.
- Period string
- The period of the cloud monitor rule.
- ComparisonOperator string
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- MetricName string
- The metric name of the cloud monitor rule.
- MetricUnit string
- The metric unit of the cloud monitor rule.
- Statistics string
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- Threshold string
- The threshold of the cloud monitor rule.
- Period string
- The period of the cloud monitor rule.
- comparisonOperator String
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- metricName String
- The metric name of the cloud monitor rule.
- metricUnit String
- The metric unit of the cloud monitor rule.
- statistics String
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- threshold String
- The threshold of the cloud monitor rule.
- period String
- The period of the cloud monitor rule.
- comparisonOperator string
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- metricName string
- The metric name of the cloud monitor rule.
- metricUnit string
- The metric unit of the cloud monitor rule.
- statistics string
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- threshold string
- The threshold of the cloud monitor rule.
- period string
- The period of the cloud monitor rule.
- comparison_operator str
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- metric_name str
- The metric name of the cloud monitor rule.
- metric_unit str
- The metric unit of the cloud monitor rule.
- statistics str
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- threshold str
- The threshold of the cloud monitor rule.
- period str
- The period of the cloud monitor rule.
- comparisonOperator String
- The comparison operation of the cloud monitor rule. Valid values: >,>=,<,<=,!=,=.
- metricName String
- The metric name of the cloud monitor rule.
- metricUnit String
- The metric unit of the cloud monitor rule.
- statistics String
- The statistics of the cloud monitor rule. Valid values: avg,max,min.
- threshold String
- The threshold of the cloud monitor rule.
- period String
- The period of the cloud monitor rule.
RuleOriginalDimension, RuleOriginalDimensionArgs      
RuleRecoveryNotify, RuleRecoveryNotifyArgs      
- Enable bool
- Whether to enable the recovery notify function.
- Enable bool
- Whether to enable the recovery notify function.
- enable Boolean
- Whether to enable the recovery notify function.
- enable boolean
- Whether to enable the recovery notify function.
- enable bool
- Whether to enable the recovery notify function.
- enable Boolean
- Whether to enable the recovery notify function.
Import
CloudMonitorRule can be imported using the id, e.g.
$ pulumi import volcengine:cloud_monitor/rule:Rule default 174284623567451****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.