# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['RuleArgs', 'Rule']

@pulumi.input_type
class RuleArgs:
    def __init__(__self__, *,
                 effect_end_at: pulumi.Input[builtins.str],
                 effect_start_at: pulumi.Input[builtins.str],
                 enable_state: pulumi.Input[builtins.str],
                 evaluation_count: pulumi.Input[builtins.int],
                 level: pulumi.Input[builtins.str],
                 namespace: pulumi.Input[builtins.str],
                 rule_name: pulumi.Input[builtins.str],
                 rule_type: pulumi.Input[builtins.str],
                 silence_time: pulumi.Input[builtins.int],
                 sub_namespace: pulumi.Input[builtins.str],
                 alert_methods: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 condition_operator: Optional[pulumi.Input[builtins.str]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]] = None,
                 contact_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 dimension_conditions: Optional[pulumi.Input['RuleDimensionConditionsArgs']] = None,
                 level_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]] = None,
                 multiple_conditions: Optional[pulumi.Input[builtins.bool]] = None,
                 no_data: Optional[pulumi.Input['RuleNoDataArgs']] = None,
                 notification_id: Optional[pulumi.Input[builtins.str]] = None,
                 notify_templates: Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]] = None,
                 original_dimensions: Optional[pulumi.Input['RuleOriginalDimensionsArgs']] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 recovery_notify: Optional[pulumi.Input['RuleRecoveryNotifyArgs']] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]] = None,
                 webhook: Optional[pulumi.Input[builtins.str]] = None,
                 webhook_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
        """
        The set of arguments for constructing a Rule resource.
        :param pulumi.Input[builtins.str] effect_end_at: 策略生效的截止时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] effect_start_at: 告警策略生效的开始时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] enable_state: 告警策略的开启状态。,enable：开启,disable：禁用
        :param pulumi.Input[builtins.int] evaluation_count: 触发告警需要持续的周期。单位为分钟。
        :param pulumi.Input[builtins.str] level: 告警级别。critical：严重,warning：警告,notice：通知
        :param pulumi.Input[builtins.str] namespace: 监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        :param pulumi.Input[builtins.str] rule_name: 告警策略名称。
        :param pulumi.Input[builtins.str] rule_type: 告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        :param pulumi.Input[builtins.int] silence_time: 告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        :param pulumi.Input[builtins.str] sub_namespace: 此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] alert_methods: 告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        :param pulumi.Input[builtins.str] condition_operator: 多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] contact_group_ids: 告警策略绑定的告警通知组 ID。
        :param pulumi.Input[builtins.str] description: 告警策略描述信息。
        :param pulumi.Input['RuleDimensionConditionsArgs'] dimension_conditions: Dimension 配置。
        :param pulumi.Input[builtins.bool] multiple_conditions: 告警策略是否用多指标。true：多指标,false：单指标（默认）。
        :param pulumi.Input['RuleNoDataArgs'] no_data: 无数据告警。
        :param pulumi.Input[builtins.str] notification_id: 通知策略 ID。
        :param pulumi.Input['RuleOriginalDimensionsArgs'] original_dimensions: 告警策略检测的资源 ID。
        :param pulumi.Input[builtins.str] project_name: 告警策略所属项目。
        :param pulumi.Input['RuleRecoveryNotifyArgs'] recovery_notify: 告警恢复通知。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] regions: 云产品所属可用区 ID。
        :param pulumi.Input[builtins.str] webhook: 告警策略绑定的告警回调 URL 地址。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] webhook_ids: 告警发生时告警回调 ID 列表。
        """
        pulumi.set(__self__, "effect_end_at", effect_end_at)
        pulumi.set(__self__, "effect_start_at", effect_start_at)
        pulumi.set(__self__, "enable_state", enable_state)
        pulumi.set(__self__, "evaluation_count", evaluation_count)
        pulumi.set(__self__, "level", level)
        pulumi.set(__self__, "namespace", namespace)
        pulumi.set(__self__, "rule_name", rule_name)
        pulumi.set(__self__, "rule_type", rule_type)
        pulumi.set(__self__, "silence_time", silence_time)
        pulumi.set(__self__, "sub_namespace", sub_namespace)
        if alert_methods is not None:
            pulumi.set(__self__, "alert_methods", alert_methods)
        if condition_operator is not None:
            pulumi.set(__self__, "condition_operator", condition_operator)
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if contact_group_ids is not None:
            pulumi.set(__self__, "contact_group_ids", contact_group_ids)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if dimension_conditions is not None:
            pulumi.set(__self__, "dimension_conditions", dimension_conditions)
        if level_conditions is not None:
            pulumi.set(__self__, "level_conditions", level_conditions)
        if multiple_conditions is not None:
            pulumi.set(__self__, "multiple_conditions", multiple_conditions)
        if no_data is not None:
            pulumi.set(__self__, "no_data", no_data)
        if notification_id is not None:
            pulumi.set(__self__, "notification_id", notification_id)
        if notify_templates is not None:
            pulumi.set(__self__, "notify_templates", notify_templates)
        if original_dimensions is not None:
            pulumi.set(__self__, "original_dimensions", original_dimensions)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if recovery_notify is not None:
            pulumi.set(__self__, "recovery_notify", recovery_notify)
        if regions is not None:
            pulumi.set(__self__, "regions", regions)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if webhook is not None:
            pulumi.set(__self__, "webhook", webhook)
        if webhook_ids is not None:
            pulumi.set(__self__, "webhook_ids", webhook_ids)

    @property
    @pulumi.getter(name="effectEndAt")
    def effect_end_at(self) -> pulumi.Input[builtins.str]:
        """
        策略生效的截止时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_end_at")

    @effect_end_at.setter
    def effect_end_at(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "effect_end_at", value)

    @property
    @pulumi.getter(name="effectStartAt")
    def effect_start_at(self) -> pulumi.Input[builtins.str]:
        """
        告警策略生效的开始时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_start_at")

    @effect_start_at.setter
    def effect_start_at(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "effect_start_at", value)

    @property
    @pulumi.getter(name="enableState")
    def enable_state(self) -> pulumi.Input[builtins.str]:
        """
        告警策略的开启状态。,enable：开启,disable：禁用
        """
        return pulumi.get(self, "enable_state")

    @enable_state.setter
    def enable_state(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "enable_state", value)

    @property
    @pulumi.getter(name="evaluationCount")
    def evaluation_count(self) -> pulumi.Input[builtins.int]:
        """
        触发告警需要持续的周期。单位为分钟。
        """
        return pulumi.get(self, "evaluation_count")

    @evaluation_count.setter
    def evaluation_count(self, value: pulumi.Input[builtins.int]):
        pulumi.set(self, "evaluation_count", value)

    @property
    @pulumi.getter
    def level(self) -> pulumi.Input[builtins.str]:
        """
        告警级别。critical：严重,warning：警告,notice：通知
        """
        return pulumi.get(self, "level")

    @level.setter
    def level(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "level", value)

    @property
    @pulumi.getter
    def namespace(self) -> pulumi.Input[builtins.str]:
        """
        监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        """
        return pulumi.get(self, "namespace")

    @namespace.setter
    def namespace(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "namespace", value)

    @property
    @pulumi.getter(name="ruleName")
    def rule_name(self) -> pulumi.Input[builtins.str]:
        """
        告警策略名称。
        """
        return pulumi.get(self, "rule_name")

    @rule_name.setter
    def rule_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "rule_name", value)

    @property
    @pulumi.getter(name="ruleType")
    def rule_type(self) -> pulumi.Input[builtins.str]:
        """
        告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        """
        return pulumi.get(self, "rule_type")

    @rule_type.setter
    def rule_type(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "rule_type", value)

    @property
    @pulumi.getter(name="silenceTime")
    def silence_time(self) -> pulumi.Input[builtins.int]:
        """
        告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        """
        return pulumi.get(self, "silence_time")

    @silence_time.setter
    def silence_time(self, value: pulumi.Input[builtins.int]):
        pulumi.set(self, "silence_time", value)

    @property
    @pulumi.getter(name="subNamespace")
    def sub_namespace(self) -> pulumi.Input[builtins.str]:
        """
        此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        """
        return pulumi.get(self, "sub_namespace")

    @sub_namespace.setter
    def sub_namespace(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "sub_namespace", value)

    @property
    @pulumi.getter(name="alertMethods")
    def alert_methods(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        """
        return pulumi.get(self, "alert_methods")

    @alert_methods.setter
    def alert_methods(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "alert_methods", value)

    @property
    @pulumi.getter(name="conditionOperator")
    def condition_operator(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        """
        return pulumi.get(self, "condition_operator")

    @condition_operator.setter
    def condition_operator(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "condition_operator", value)

    @property
    @pulumi.getter
    def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]]:
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="contactGroupIds")
    def contact_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警策略绑定的告警通知组 ID。
        """
        return pulumi.get(self, "contact_group_ids")

    @contact_group_ids.setter
    def contact_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "contact_group_ids", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="dimensionConditions")
    def dimension_conditions(self) -> Optional[pulumi.Input['RuleDimensionConditionsArgs']]:
        """
        Dimension 配置。
        """
        return pulumi.get(self, "dimension_conditions")

    @dimension_conditions.setter
    def dimension_conditions(self, value: Optional[pulumi.Input['RuleDimensionConditionsArgs']]):
        pulumi.set(self, "dimension_conditions", value)

    @property
    @pulumi.getter(name="levelConditions")
    def level_conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]]:
        return pulumi.get(self, "level_conditions")

    @level_conditions.setter
    def level_conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]]):
        pulumi.set(self, "level_conditions", value)

    @property
    @pulumi.getter(name="multipleConditions")
    def multiple_conditions(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        告警策略是否用多指标。true：多指标,false：单指标（默认）。
        """
        return pulumi.get(self, "multiple_conditions")

    @multiple_conditions.setter
    def multiple_conditions(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "multiple_conditions", value)

    @property
    @pulumi.getter(name="noData")
    def no_data(self) -> Optional[pulumi.Input['RuleNoDataArgs']]:
        """
        无数据告警。
        """
        return pulumi.get(self, "no_data")

    @no_data.setter
    def no_data(self, value: Optional[pulumi.Input['RuleNoDataArgs']]):
        pulumi.set(self, "no_data", value)

    @property
    @pulumi.getter(name="notificationId")
    def notification_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        通知策略 ID。
        """
        return pulumi.get(self, "notification_id")

    @notification_id.setter
    def notification_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "notification_id", value)

    @property
    @pulumi.getter(name="notifyTemplates")
    def notify_templates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]]:
        return pulumi.get(self, "notify_templates")

    @notify_templates.setter
    def notify_templates(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]]):
        pulumi.set(self, "notify_templates", value)

    @property
    @pulumi.getter(name="originalDimensions")
    def original_dimensions(self) -> Optional[pulumi.Input['RuleOriginalDimensionsArgs']]:
        """
        告警策略检测的资源 ID。
        """
        return pulumi.get(self, "original_dimensions")

    @original_dimensions.setter
    def original_dimensions(self, value: Optional[pulumi.Input['RuleOriginalDimensionsArgs']]):
        pulumi.set(self, "original_dimensions", value)

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略所属项目。
        """
        return pulumi.get(self, "project_name")

    @project_name.setter
    def project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "project_name", value)

    @property
    @pulumi.getter(name="recoveryNotify")
    def recovery_notify(self) -> Optional[pulumi.Input['RuleRecoveryNotifyArgs']]:
        """
        告警恢复通知。
        """
        return pulumi.get(self, "recovery_notify")

    @recovery_notify.setter
    def recovery_notify(self, value: Optional[pulumi.Input['RuleRecoveryNotifyArgs']]):
        pulumi.set(self, "recovery_notify", value)

    @property
    @pulumi.getter
    def regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        云产品所属可用区 ID。
        """
        return pulumi.get(self, "regions")

    @regions.setter
    def regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "regions", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter
    def webhook(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略绑定的告警回调 URL 地址。
        """
        return pulumi.get(self, "webhook")

    @webhook.setter
    def webhook(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "webhook", value)

    @property
    @pulumi.getter(name="webhookIds")
    def webhook_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警发生时告警回调 ID 列表。
        """
        return pulumi.get(self, "webhook_ids")

    @webhook_ids.setter
    def webhook_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "webhook_ids", value)


@pulumi.input_type
class _RuleState:
    def __init__(__self__, *,
                 alert_methods: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 alert_state: Optional[pulumi.Input[builtins.str]] = None,
                 condition_operator: Optional[pulumi.Input[builtins.str]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]] = None,
                 contact_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 created_at: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 dimension_conditions: Optional[pulumi.Input['RuleDimensionConditionsArgs']] = None,
                 effect_end_at: Optional[pulumi.Input[builtins.str]] = None,
                 effect_start_at: Optional[pulumi.Input[builtins.str]] = None,
                 enable_state: Optional[pulumi.Input[builtins.str]] = None,
                 evaluation_count: Optional[pulumi.Input[builtins.int]] = None,
                 level: Optional[pulumi.Input[builtins.str]] = None,
                 level_conditions: Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]] = None,
                 multiple_conditions: Optional[pulumi.Input[builtins.bool]] = None,
                 namespace: Optional[pulumi.Input[builtins.str]] = None,
                 no_data: Optional[pulumi.Input['RuleNoDataArgs']] = None,
                 notification_id: Optional[pulumi.Input[builtins.str]] = None,
                 notify_templates: Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]] = None,
                 original_dimensions: Optional[pulumi.Input['RuleOriginalDimensionsArgs']] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 recovery_notify: Optional[pulumi.Input['RuleRecoveryNotifyArgs']] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 resource_type: Optional[pulumi.Input[builtins.str]] = None,
                 rule_id: Optional[pulumi.Input[builtins.str]] = None,
                 rule_name: Optional[pulumi.Input[builtins.str]] = None,
                 rule_type: Optional[pulumi.Input[builtins.str]] = None,
                 silence_time: Optional[pulumi.Input[builtins.int]] = None,
                 sub_namespace: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]] = None,
                 updated_at: Optional[pulumi.Input[builtins.str]] = None,
                 webhook: Optional[pulumi.Input[builtins.str]] = None,
                 webhook_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
        """
        Input properties used for looking up and filtering Rule resources.
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] alert_methods: 告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        :param pulumi.Input[builtins.str] alert_state: 告警状态。 alerting：告警中 normal：正常。
        :param pulumi.Input[builtins.str] condition_operator: 多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] contact_group_ids: 告警策略绑定的告警通知组 ID。
        :param pulumi.Input[builtins.str] created_at: 告警策略创建时间，时间戳格式。
        :param pulumi.Input[builtins.str] description: 告警策略描述信息。
        :param pulumi.Input['RuleDimensionConditionsArgs'] dimension_conditions: Dimension 配置。
        :param pulumi.Input[builtins.str] effect_end_at: 策略生效的截止时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] effect_start_at: 告警策略生效的开始时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] enable_state: 告警策略的开启状态。,enable：开启,disable：禁用
        :param pulumi.Input[builtins.int] evaluation_count: 触发告警需要持续的周期。单位为分钟。
        :param pulumi.Input[builtins.str] level: 告警级别。critical：严重,warning：警告,notice：通知
        :param pulumi.Input[builtins.bool] multiple_conditions: 告警策略是否用多指标。true：多指标,false：单指标（默认）。
        :param pulumi.Input[builtins.str] namespace: 监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        :param pulumi.Input['RuleNoDataArgs'] no_data: 无数据告警。
        :param pulumi.Input[builtins.str] notification_id: 通知策略 ID。
        :param pulumi.Input['RuleOriginalDimensionsArgs'] original_dimensions: 告警策略检测的资源 ID。
        :param pulumi.Input[builtins.str] project_name: 告警策略所属项目。
        :param pulumi.Input['RuleRecoveryNotifyArgs'] recovery_notify: 告警恢复通知。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] regions: 云产品所属可用区 ID。
        :param pulumi.Input[builtins.str] resource_type: 告警策略检测的资源类型。
        :param pulumi.Input[builtins.str] rule_id: 告警策略 ID。
        :param pulumi.Input[builtins.str] rule_name: 告警策略名称。
        :param pulumi.Input[builtins.str] rule_type: 告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        :param pulumi.Input[builtins.int] silence_time: 告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        :param pulumi.Input[builtins.str] sub_namespace: 此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        :param pulumi.Input[builtins.str] updated_at: 告警策略更新时间，时间戳格式。
        :param pulumi.Input[builtins.str] webhook: 告警策略绑定的告警回调 URL 地址。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] webhook_ids: 告警发生时告警回调 ID 列表。
        """
        if alert_methods is not None:
            pulumi.set(__self__, "alert_methods", alert_methods)
        if alert_state is not None:
            pulumi.set(__self__, "alert_state", alert_state)
        if condition_operator is not None:
            pulumi.set(__self__, "condition_operator", condition_operator)
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if contact_group_ids is not None:
            pulumi.set(__self__, "contact_group_ids", contact_group_ids)
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if dimension_conditions is not None:
            pulumi.set(__self__, "dimension_conditions", dimension_conditions)
        if effect_end_at is not None:
            pulumi.set(__self__, "effect_end_at", effect_end_at)
        if effect_start_at is not None:
            pulumi.set(__self__, "effect_start_at", effect_start_at)
        if enable_state is not None:
            pulumi.set(__self__, "enable_state", enable_state)
        if evaluation_count is not None:
            pulumi.set(__self__, "evaluation_count", evaluation_count)
        if level is not None:
            pulumi.set(__self__, "level", level)
        if level_conditions is not None:
            pulumi.set(__self__, "level_conditions", level_conditions)
        if multiple_conditions is not None:
            pulumi.set(__self__, "multiple_conditions", multiple_conditions)
        if namespace is not None:
            pulumi.set(__self__, "namespace", namespace)
        if no_data is not None:
            pulumi.set(__self__, "no_data", no_data)
        if notification_id is not None:
            pulumi.set(__self__, "notification_id", notification_id)
        if notify_templates is not None:
            pulumi.set(__self__, "notify_templates", notify_templates)
        if original_dimensions is not None:
            pulumi.set(__self__, "original_dimensions", original_dimensions)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if recovery_notify is not None:
            pulumi.set(__self__, "recovery_notify", recovery_notify)
        if regions is not None:
            pulumi.set(__self__, "regions", regions)
        if resource_type is not None:
            pulumi.set(__self__, "resource_type", resource_type)
        if rule_id is not None:
            pulumi.set(__self__, "rule_id", rule_id)
        if rule_name is not None:
            pulumi.set(__self__, "rule_name", rule_name)
        if rule_type is not None:
            pulumi.set(__self__, "rule_type", rule_type)
        if silence_time is not None:
            pulumi.set(__self__, "silence_time", silence_time)
        if sub_namespace is not None:
            pulumi.set(__self__, "sub_namespace", sub_namespace)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if updated_at is not None:
            pulumi.set(__self__, "updated_at", updated_at)
        if webhook is not None:
            pulumi.set(__self__, "webhook", webhook)
        if webhook_ids is not None:
            pulumi.set(__self__, "webhook_ids", webhook_ids)

    @property
    @pulumi.getter(name="alertMethods")
    def alert_methods(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        """
        return pulumi.get(self, "alert_methods")

    @alert_methods.setter
    def alert_methods(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "alert_methods", value)

    @property
    @pulumi.getter(name="alertState")
    def alert_state(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警状态。 alerting：告警中 normal：正常。
        """
        return pulumi.get(self, "alert_state")

    @alert_state.setter
    def alert_state(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "alert_state", value)

    @property
    @pulumi.getter(name="conditionOperator")
    def condition_operator(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        """
        return pulumi.get(self, "condition_operator")

    @condition_operator.setter
    def condition_operator(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "condition_operator", value)

    @property
    @pulumi.getter
    def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]]:
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleConditionArgs']]]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="contactGroupIds")
    def contact_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警策略绑定的告警通知组 ID。
        """
        return pulumi.get(self, "contact_group_ids")

    @contact_group_ids.setter
    def contact_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "contact_group_ids", value)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略创建时间，时间戳格式。
        """
        return pulumi.get(self, "created_at")

    @created_at.setter
    def created_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_at", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="dimensionConditions")
    def dimension_conditions(self) -> Optional[pulumi.Input['RuleDimensionConditionsArgs']]:
        """
        Dimension 配置。
        """
        return pulumi.get(self, "dimension_conditions")

    @dimension_conditions.setter
    def dimension_conditions(self, value: Optional[pulumi.Input['RuleDimensionConditionsArgs']]):
        pulumi.set(self, "dimension_conditions", value)

    @property
    @pulumi.getter(name="effectEndAt")
    def effect_end_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        策略生效的截止时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_end_at")

    @effect_end_at.setter
    def effect_end_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "effect_end_at", value)

    @property
    @pulumi.getter(name="effectStartAt")
    def effect_start_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略生效的开始时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_start_at")

    @effect_start_at.setter
    def effect_start_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "effect_start_at", value)

    @property
    @pulumi.getter(name="enableState")
    def enable_state(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略的开启状态。,enable：开启,disable：禁用
        """
        return pulumi.get(self, "enable_state")

    @enable_state.setter
    def enable_state(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "enable_state", value)

    @property
    @pulumi.getter(name="evaluationCount")
    def evaluation_count(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        触发告警需要持续的周期。单位为分钟。
        """
        return pulumi.get(self, "evaluation_count")

    @evaluation_count.setter
    def evaluation_count(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "evaluation_count", value)

    @property
    @pulumi.getter
    def level(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警级别。critical：严重,warning：警告,notice：通知
        """
        return pulumi.get(self, "level")

    @level.setter
    def level(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "level", value)

    @property
    @pulumi.getter(name="levelConditions")
    def level_conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]]:
        return pulumi.get(self, "level_conditions")

    @level_conditions.setter
    def level_conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleLevelConditionArgs']]]]):
        pulumi.set(self, "level_conditions", value)

    @property
    @pulumi.getter(name="multipleConditions")
    def multiple_conditions(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        告警策略是否用多指标。true：多指标,false：单指标（默认）。
        """
        return pulumi.get(self, "multiple_conditions")

    @multiple_conditions.setter
    def multiple_conditions(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "multiple_conditions", value)

    @property
    @pulumi.getter
    def namespace(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        """
        return pulumi.get(self, "namespace")

    @namespace.setter
    def namespace(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "namespace", value)

    @property
    @pulumi.getter(name="noData")
    def no_data(self) -> Optional[pulumi.Input['RuleNoDataArgs']]:
        """
        无数据告警。
        """
        return pulumi.get(self, "no_data")

    @no_data.setter
    def no_data(self, value: Optional[pulumi.Input['RuleNoDataArgs']]):
        pulumi.set(self, "no_data", value)

    @property
    @pulumi.getter(name="notificationId")
    def notification_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        通知策略 ID。
        """
        return pulumi.get(self, "notification_id")

    @notification_id.setter
    def notification_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "notification_id", value)

    @property
    @pulumi.getter(name="notifyTemplates")
    def notify_templates(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]]:
        return pulumi.get(self, "notify_templates")

    @notify_templates.setter
    def notify_templates(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleNotifyTemplateArgs']]]]):
        pulumi.set(self, "notify_templates", value)

    @property
    @pulumi.getter(name="originalDimensions")
    def original_dimensions(self) -> Optional[pulumi.Input['RuleOriginalDimensionsArgs']]:
        """
        告警策略检测的资源 ID。
        """
        return pulumi.get(self, "original_dimensions")

    @original_dimensions.setter
    def original_dimensions(self, value: Optional[pulumi.Input['RuleOriginalDimensionsArgs']]):
        pulumi.set(self, "original_dimensions", value)

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略所属项目。
        """
        return pulumi.get(self, "project_name")

    @project_name.setter
    def project_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "project_name", value)

    @property
    @pulumi.getter(name="recoveryNotify")
    def recovery_notify(self) -> Optional[pulumi.Input['RuleRecoveryNotifyArgs']]:
        """
        告警恢复通知。
        """
        return pulumi.get(self, "recovery_notify")

    @recovery_notify.setter
    def recovery_notify(self, value: Optional[pulumi.Input['RuleRecoveryNotifyArgs']]):
        pulumi.set(self, "recovery_notify", value)

    @property
    @pulumi.getter
    def regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        云产品所属可用区 ID。
        """
        return pulumi.get(self, "regions")

    @regions.setter
    def regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "regions", value)

    @property
    @pulumi.getter(name="resourceType")
    def resource_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略检测的资源类型。
        """
        return pulumi.get(self, "resource_type")

    @resource_type.setter
    def resource_type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "resource_type", value)

    @property
    @pulumi.getter(name="ruleId")
    def rule_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略 ID。
        """
        return pulumi.get(self, "rule_id")

    @rule_id.setter
    def rule_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "rule_id", value)

    @property
    @pulumi.getter(name="ruleName")
    def rule_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略名称。
        """
        return pulumi.get(self, "rule_name")

    @rule_name.setter
    def rule_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "rule_name", value)

    @property
    @pulumi.getter(name="ruleType")
    def rule_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        """
        return pulumi.get(self, "rule_type")

    @rule_type.setter
    def rule_type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "rule_type", value)

    @property
    @pulumi.getter(name="silenceTime")
    def silence_time(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        """
        return pulumi.get(self, "silence_time")

    @silence_time.setter
    def silence_time(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "silence_time", value)

    @property
    @pulumi.getter(name="subNamespace")
    def sub_namespace(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        """
        return pulumi.get(self, "sub_namespace")

    @sub_namespace.setter
    def sub_namespace(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "sub_namespace", value)

    @property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]]:
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RuleTagArgs']]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略更新时间，时间戳格式。
        """
        return pulumi.get(self, "updated_at")

    @updated_at.setter
    def updated_at(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "updated_at", value)

    @property
    @pulumi.getter
    def webhook(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        告警策略绑定的告警回调 URL 地址。
        """
        return pulumi.get(self, "webhook")

    @webhook.setter
    def webhook(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "webhook", value)

    @property
    @pulumi.getter(name="webhookIds")
    def webhook_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        告警发生时告警回调 ID 列表。
        """
        return pulumi.get(self, "webhook_ids")

    @webhook_ids.setter
    def webhook_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "webhook_ids", value)


@pulumi.type_token("bytepluscc:cloudmonitor/rule:Rule")
class Rule(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 alert_methods: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 condition_operator: Optional[pulumi.Input[builtins.str]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleConditionArgs', 'RuleConditionArgsDict']]]]] = None,
                 contact_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 dimension_conditions: Optional[pulumi.Input[Union['RuleDimensionConditionsArgs', 'RuleDimensionConditionsArgsDict']]] = None,
                 effect_end_at: Optional[pulumi.Input[builtins.str]] = None,
                 effect_start_at: Optional[pulumi.Input[builtins.str]] = None,
                 enable_state: Optional[pulumi.Input[builtins.str]] = None,
                 evaluation_count: Optional[pulumi.Input[builtins.int]] = None,
                 level: Optional[pulumi.Input[builtins.str]] = None,
                 level_conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleLevelConditionArgs', 'RuleLevelConditionArgsDict']]]]] = None,
                 multiple_conditions: Optional[pulumi.Input[builtins.bool]] = None,
                 namespace: Optional[pulumi.Input[builtins.str]] = None,
                 no_data: Optional[pulumi.Input[Union['RuleNoDataArgs', 'RuleNoDataArgsDict']]] = None,
                 notification_id: Optional[pulumi.Input[builtins.str]] = None,
                 notify_templates: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleNotifyTemplateArgs', 'RuleNotifyTemplateArgsDict']]]]] = None,
                 original_dimensions: Optional[pulumi.Input[Union['RuleOriginalDimensionsArgs', 'RuleOriginalDimensionsArgsDict']]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 recovery_notify: Optional[pulumi.Input[Union['RuleRecoveryNotifyArgs', 'RuleRecoveryNotifyArgsDict']]] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 rule_name: Optional[pulumi.Input[builtins.str]] = None,
                 rule_type: Optional[pulumi.Input[builtins.str]] = None,
                 silence_time: Optional[pulumi.Input[builtins.int]] = None,
                 sub_namespace: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleTagArgs', 'RuleTagArgsDict']]]]] = None,
                 webhook: Optional[pulumi.Input[builtins.str]] = None,
                 webhook_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 __props__=None):
        """
        如果您需要监控某一云产品资源的数据状态，则可以创建云监控告警策略。当被监控的云产品资源数据达到告警的触发条件时，系统会通过您指定的方式推送告警通知，便于您及时发现存在异常数据的资源。

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudmonitor/rule:Rule example "rule_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] alert_methods: 告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        :param pulumi.Input[builtins.str] condition_operator: 多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] contact_group_ids: 告警策略绑定的告警通知组 ID。
        :param pulumi.Input[builtins.str] description: 告警策略描述信息。
        :param pulumi.Input[Union['RuleDimensionConditionsArgs', 'RuleDimensionConditionsArgsDict']] dimension_conditions: Dimension 配置。
        :param pulumi.Input[builtins.str] effect_end_at: 策略生效的截止时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] effect_start_at: 告警策略生效的开始时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] enable_state: 告警策略的开启状态。,enable：开启,disable：禁用
        :param pulumi.Input[builtins.int] evaluation_count: 触发告警需要持续的周期。单位为分钟。
        :param pulumi.Input[builtins.str] level: 告警级别。critical：严重,warning：警告,notice：通知
        :param pulumi.Input[builtins.bool] multiple_conditions: 告警策略是否用多指标。true：多指标,false：单指标（默认）。
        :param pulumi.Input[builtins.str] namespace: 监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        :param pulumi.Input[Union['RuleNoDataArgs', 'RuleNoDataArgsDict']] no_data: 无数据告警。
        :param pulumi.Input[builtins.str] notification_id: 通知策略 ID。
        :param pulumi.Input[Union['RuleOriginalDimensionsArgs', 'RuleOriginalDimensionsArgsDict']] original_dimensions: 告警策略检测的资源 ID。
        :param pulumi.Input[builtins.str] project_name: 告警策略所属项目。
        :param pulumi.Input[Union['RuleRecoveryNotifyArgs', 'RuleRecoveryNotifyArgsDict']] recovery_notify: 告警恢复通知。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] regions: 云产品所属可用区 ID。
        :param pulumi.Input[builtins.str] rule_name: 告警策略名称。
        :param pulumi.Input[builtins.str] rule_type: 告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        :param pulumi.Input[builtins.int] silence_time: 告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        :param pulumi.Input[builtins.str] sub_namespace: 此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        :param pulumi.Input[builtins.str] webhook: 告警策略绑定的告警回调 URL 地址。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] webhook_ids: 告警发生时告警回调 ID 列表。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RuleArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        如果您需要监控某一云产品资源的数据状态，则可以创建云监控告警策略。当被监控的云产品资源数据达到告警的触发条件时，系统会通过您指定的方式推送告警通知，便于您及时发现存在异常数据的资源。

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudmonitor/rule:Rule example "rule_id"
        ```

        :param str resource_name: The name of the resource.
        :param RuleArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(RuleArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 alert_methods: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 condition_operator: Optional[pulumi.Input[builtins.str]] = None,
                 conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleConditionArgs', 'RuleConditionArgsDict']]]]] = None,
                 contact_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 dimension_conditions: Optional[pulumi.Input[Union['RuleDimensionConditionsArgs', 'RuleDimensionConditionsArgsDict']]] = None,
                 effect_end_at: Optional[pulumi.Input[builtins.str]] = None,
                 effect_start_at: Optional[pulumi.Input[builtins.str]] = None,
                 enable_state: Optional[pulumi.Input[builtins.str]] = None,
                 evaluation_count: Optional[pulumi.Input[builtins.int]] = None,
                 level: Optional[pulumi.Input[builtins.str]] = None,
                 level_conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleLevelConditionArgs', 'RuleLevelConditionArgsDict']]]]] = None,
                 multiple_conditions: Optional[pulumi.Input[builtins.bool]] = None,
                 namespace: Optional[pulumi.Input[builtins.str]] = None,
                 no_data: Optional[pulumi.Input[Union['RuleNoDataArgs', 'RuleNoDataArgsDict']]] = None,
                 notification_id: Optional[pulumi.Input[builtins.str]] = None,
                 notify_templates: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleNotifyTemplateArgs', 'RuleNotifyTemplateArgsDict']]]]] = None,
                 original_dimensions: Optional[pulumi.Input[Union['RuleOriginalDimensionsArgs', 'RuleOriginalDimensionsArgsDict']]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 recovery_notify: Optional[pulumi.Input[Union['RuleRecoveryNotifyArgs', 'RuleRecoveryNotifyArgsDict']]] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 rule_name: Optional[pulumi.Input[builtins.str]] = None,
                 rule_type: Optional[pulumi.Input[builtins.str]] = None,
                 silence_time: Optional[pulumi.Input[builtins.int]] = None,
                 sub_namespace: Optional[pulumi.Input[builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleTagArgs', 'RuleTagArgsDict']]]]] = None,
                 webhook: Optional[pulumi.Input[builtins.str]] = None,
                 webhook_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = RuleArgs.__new__(RuleArgs)

            __props__.__dict__["alert_methods"] = alert_methods
            __props__.__dict__["condition_operator"] = condition_operator
            __props__.__dict__["conditions"] = conditions
            __props__.__dict__["contact_group_ids"] = contact_group_ids
            __props__.__dict__["description"] = description
            __props__.__dict__["dimension_conditions"] = dimension_conditions
            if effect_end_at is None and not opts.urn:
                raise TypeError("Missing required property 'effect_end_at'")
            __props__.__dict__["effect_end_at"] = effect_end_at
            if effect_start_at is None and not opts.urn:
                raise TypeError("Missing required property 'effect_start_at'")
            __props__.__dict__["effect_start_at"] = effect_start_at
            if enable_state is None and not opts.urn:
                raise TypeError("Missing required property 'enable_state'")
            __props__.__dict__["enable_state"] = enable_state
            if evaluation_count is None and not opts.urn:
                raise TypeError("Missing required property 'evaluation_count'")
            __props__.__dict__["evaluation_count"] = evaluation_count
            if level is None and not opts.urn:
                raise TypeError("Missing required property 'level'")
            __props__.__dict__["level"] = level
            __props__.__dict__["level_conditions"] = level_conditions
            __props__.__dict__["multiple_conditions"] = multiple_conditions
            if namespace is None and not opts.urn:
                raise TypeError("Missing required property 'namespace'")
            __props__.__dict__["namespace"] = namespace
            __props__.__dict__["no_data"] = no_data
            __props__.__dict__["notification_id"] = notification_id
            __props__.__dict__["notify_templates"] = notify_templates
            __props__.__dict__["original_dimensions"] = original_dimensions
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["recovery_notify"] = recovery_notify
            __props__.__dict__["regions"] = regions
            if rule_name is None and not opts.urn:
                raise TypeError("Missing required property 'rule_name'")
            __props__.__dict__["rule_name"] = rule_name
            if rule_type is None and not opts.urn:
                raise TypeError("Missing required property 'rule_type'")
            __props__.__dict__["rule_type"] = rule_type
            if silence_time is None and not opts.urn:
                raise TypeError("Missing required property 'silence_time'")
            __props__.__dict__["silence_time"] = silence_time
            if sub_namespace is None and not opts.urn:
                raise TypeError("Missing required property 'sub_namespace'")
            __props__.__dict__["sub_namespace"] = sub_namespace
            __props__.__dict__["tags"] = tags
            __props__.__dict__["webhook"] = webhook
            __props__.__dict__["webhook_ids"] = webhook_ids
            __props__.__dict__["alert_state"] = None
            __props__.__dict__["created_at"] = None
            __props__.__dict__["resource_type"] = None
            __props__.__dict__["rule_id"] = None
            __props__.__dict__["updated_at"] = None
        super(Rule, __self__).__init__(
            'bytepluscc:cloudmonitor/rule:Rule',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            alert_methods: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            alert_state: Optional[pulumi.Input[builtins.str]] = None,
            condition_operator: Optional[pulumi.Input[builtins.str]] = None,
            conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleConditionArgs', 'RuleConditionArgsDict']]]]] = None,
            contact_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            created_at: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            dimension_conditions: Optional[pulumi.Input[Union['RuleDimensionConditionsArgs', 'RuleDimensionConditionsArgsDict']]] = None,
            effect_end_at: Optional[pulumi.Input[builtins.str]] = None,
            effect_start_at: Optional[pulumi.Input[builtins.str]] = None,
            enable_state: Optional[pulumi.Input[builtins.str]] = None,
            evaluation_count: Optional[pulumi.Input[builtins.int]] = None,
            level: Optional[pulumi.Input[builtins.str]] = None,
            level_conditions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleLevelConditionArgs', 'RuleLevelConditionArgsDict']]]]] = None,
            multiple_conditions: Optional[pulumi.Input[builtins.bool]] = None,
            namespace: Optional[pulumi.Input[builtins.str]] = None,
            no_data: Optional[pulumi.Input[Union['RuleNoDataArgs', 'RuleNoDataArgsDict']]] = None,
            notification_id: Optional[pulumi.Input[builtins.str]] = None,
            notify_templates: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleNotifyTemplateArgs', 'RuleNotifyTemplateArgsDict']]]]] = None,
            original_dimensions: Optional[pulumi.Input[Union['RuleOriginalDimensionsArgs', 'RuleOriginalDimensionsArgsDict']]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            recovery_notify: Optional[pulumi.Input[Union['RuleRecoveryNotifyArgs', 'RuleRecoveryNotifyArgsDict']]] = None,
            regions: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            resource_type: Optional[pulumi.Input[builtins.str]] = None,
            rule_id: Optional[pulumi.Input[builtins.str]] = None,
            rule_name: Optional[pulumi.Input[builtins.str]] = None,
            rule_type: Optional[pulumi.Input[builtins.str]] = None,
            silence_time: Optional[pulumi.Input[builtins.int]] = None,
            sub_namespace: Optional[pulumi.Input[builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RuleTagArgs', 'RuleTagArgsDict']]]]] = None,
            updated_at: Optional[pulumi.Input[builtins.str]] = None,
            webhook: Optional[pulumi.Input[builtins.str]] = None,
            webhook_ids: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None) -> 'Rule':
        """
        Get an existing Rule resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] alert_methods: 告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        :param pulumi.Input[builtins.str] alert_state: 告警状态。 alerting：告警中 normal：正常。
        :param pulumi.Input[builtins.str] condition_operator: 多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] contact_group_ids: 告警策略绑定的告警通知组 ID。
        :param pulumi.Input[builtins.str] created_at: 告警策略创建时间，时间戳格式。
        :param pulumi.Input[builtins.str] description: 告警策略描述信息。
        :param pulumi.Input[Union['RuleDimensionConditionsArgs', 'RuleDimensionConditionsArgsDict']] dimension_conditions: Dimension 配置。
        :param pulumi.Input[builtins.str] effect_end_at: 策略生效的截止时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] effect_start_at: 告警策略生效的开始时间，格式为HH:MM。
        :param pulumi.Input[builtins.str] enable_state: 告警策略的开启状态。,enable：开启,disable：禁用
        :param pulumi.Input[builtins.int] evaluation_count: 触发告警需要持续的周期。单位为分钟。
        :param pulumi.Input[builtins.str] level: 告警级别。critical：严重,warning：警告,notice：通知
        :param pulumi.Input[builtins.bool] multiple_conditions: 告警策略是否用多指标。true：多指标,false：单指标（默认）。
        :param pulumi.Input[builtins.str] namespace: 监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        :param pulumi.Input[Union['RuleNoDataArgs', 'RuleNoDataArgsDict']] no_data: 无数据告警。
        :param pulumi.Input[builtins.str] notification_id: 通知策略 ID。
        :param pulumi.Input[Union['RuleOriginalDimensionsArgs', 'RuleOriginalDimensionsArgsDict']] original_dimensions: 告警策略检测的资源 ID。
        :param pulumi.Input[builtins.str] project_name: 告警策略所属项目。
        :param pulumi.Input[Union['RuleRecoveryNotifyArgs', 'RuleRecoveryNotifyArgsDict']] recovery_notify: 告警恢复通知。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] regions: 云产品所属可用区 ID。
        :param pulumi.Input[builtins.str] resource_type: 告警策略检测的资源类型。
        :param pulumi.Input[builtins.str] rule_id: 告警策略 ID。
        :param pulumi.Input[builtins.str] rule_name: 告警策略名称。
        :param pulumi.Input[builtins.str] rule_type: 告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        :param pulumi.Input[builtins.int] silence_time: 告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        :param pulumi.Input[builtins.str] sub_namespace: 此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        :param pulumi.Input[builtins.str] updated_at: 告警策略更新时间，时间戳格式。
        :param pulumi.Input[builtins.str] webhook: 告警策略绑定的告警回调 URL 地址。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] webhook_ids: 告警发生时告警回调 ID 列表。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RuleState.__new__(_RuleState)

        __props__.__dict__["alert_methods"] = alert_methods
        __props__.__dict__["alert_state"] = alert_state
        __props__.__dict__["condition_operator"] = condition_operator
        __props__.__dict__["conditions"] = conditions
        __props__.__dict__["contact_group_ids"] = contact_group_ids
        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["description"] = description
        __props__.__dict__["dimension_conditions"] = dimension_conditions
        __props__.__dict__["effect_end_at"] = effect_end_at
        __props__.__dict__["effect_start_at"] = effect_start_at
        __props__.__dict__["enable_state"] = enable_state
        __props__.__dict__["evaluation_count"] = evaluation_count
        __props__.__dict__["level"] = level
        __props__.__dict__["level_conditions"] = level_conditions
        __props__.__dict__["multiple_conditions"] = multiple_conditions
        __props__.__dict__["namespace"] = namespace
        __props__.__dict__["no_data"] = no_data
        __props__.__dict__["notification_id"] = notification_id
        __props__.__dict__["notify_templates"] = notify_templates
        __props__.__dict__["original_dimensions"] = original_dimensions
        __props__.__dict__["project_name"] = project_name
        __props__.__dict__["recovery_notify"] = recovery_notify
        __props__.__dict__["regions"] = regions
        __props__.__dict__["resource_type"] = resource_type
        __props__.__dict__["rule_id"] = rule_id
        __props__.__dict__["rule_name"] = rule_name
        __props__.__dict__["rule_type"] = rule_type
        __props__.__dict__["silence_time"] = silence_time
        __props__.__dict__["sub_namespace"] = sub_namespace
        __props__.__dict__["tags"] = tags
        __props__.__dict__["updated_at"] = updated_at
        __props__.__dict__["webhook"] = webhook
        __props__.__dict__["webhook_ids"] = webhook_ids
        return Rule(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="alertMethods")
    def alert_methods(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        告警通知的方式。Email：邮件 Phone：电话 SMS：短信 Webhook：告警回调。
        """
        return pulumi.get(self, "alert_methods")

    @property
    @pulumi.getter(name="alertState")
    def alert_state(self) -> pulumi.Output[builtins.str]:
        """
        告警状态。 alerting：告警中 normal：正常。
        """
        return pulumi.get(self, "alert_state")

    @property
    @pulumi.getter(name="conditionOperator")
    def condition_operator(self) -> pulumi.Output[builtins.str]:
        """
        多指标判定条件。&&：多个指标同时成立才判定为触发告警,||：任意指标满足条件触发判定为告警。
        """
        return pulumi.get(self, "condition_operator")

    @property
    @pulumi.getter
    def conditions(self) -> pulumi.Output[Sequence['outputs.RuleCondition']]:
        return pulumi.get(self, "conditions")

    @property
    @pulumi.getter(name="contactGroupIds")
    def contact_group_ids(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        告警策略绑定的告警通知组 ID。
        """
        return pulumi.get(self, "contact_group_ids")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[builtins.str]:
        """
        告警策略创建时间，时间戳格式。
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        告警策略描述信息。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dimensionConditions")
    def dimension_conditions(self) -> pulumi.Output['outputs.RuleDimensionConditions']:
        """
        Dimension 配置。
        """
        return pulumi.get(self, "dimension_conditions")

    @property
    @pulumi.getter(name="effectEndAt")
    def effect_end_at(self) -> pulumi.Output[builtins.str]:
        """
        策略生效的截止时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_end_at")

    @property
    @pulumi.getter(name="effectStartAt")
    def effect_start_at(self) -> pulumi.Output[builtins.str]:
        """
        告警策略生效的开始时间，格式为HH:MM。
        """
        return pulumi.get(self, "effect_start_at")

    @property
    @pulumi.getter(name="enableState")
    def enable_state(self) -> pulumi.Output[builtins.str]:
        """
        告警策略的开启状态。,enable：开启,disable：禁用
        """
        return pulumi.get(self, "enable_state")

    @property
    @pulumi.getter(name="evaluationCount")
    def evaluation_count(self) -> pulumi.Output[builtins.int]:
        """
        触发告警需要持续的周期。单位为分钟。
        """
        return pulumi.get(self, "evaluation_count")

    @property
    @pulumi.getter
    def level(self) -> pulumi.Output[builtins.str]:
        """
        告警级别。critical：严重,warning：警告,notice：通知
        """
        return pulumi.get(self, "level")

    @property
    @pulumi.getter(name="levelConditions")
    def level_conditions(self) -> pulumi.Output[Sequence['outputs.RuleLevelCondition']]:
        return pulumi.get(self, "level_conditions")

    @property
    @pulumi.getter(name="multipleConditions")
    def multiple_conditions(self) -> pulumi.Output[builtins.bool]:
        """
        告警策略是否用多指标。true：多指标,false：单指标（默认）。
        """
        return pulumi.get(self, "multiple_conditions")

    @property
    @pulumi.getter
    def namespace(self) -> pulumi.Output[builtins.str]:
        """
        监控指标所属的云产品。详情请参见 云产品监控指标 下各产品的 Namespace。
        """
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter(name="noData")
    def no_data(self) -> pulumi.Output['outputs.RuleNoData']:
        """
        无数据告警。
        """
        return pulumi.get(self, "no_data")

    @property
    @pulumi.getter(name="notificationId")
    def notification_id(self) -> pulumi.Output[builtins.str]:
        """
        通知策略 ID。
        """
        return pulumi.get(self, "notification_id")

    @property
    @pulumi.getter(name="notifyTemplates")
    def notify_templates(self) -> pulumi.Output[Sequence['outputs.RuleNotifyTemplate']]:
        return pulumi.get(self, "notify_templates")

    @property
    @pulumi.getter(name="originalDimensions")
    def original_dimensions(self) -> pulumi.Output['outputs.RuleOriginalDimensions']:
        """
        告警策略检测的资源 ID。
        """
        return pulumi.get(self, "original_dimensions")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> pulumi.Output[builtins.str]:
        """
        告警策略所属项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="recoveryNotify")
    def recovery_notify(self) -> pulumi.Output['outputs.RuleRecoveryNotify']:
        """
        告警恢复通知。
        """
        return pulumi.get(self, "recovery_notify")

    @property
    @pulumi.getter
    def regions(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        云产品所属可用区 ID。
        """
        return pulumi.get(self, "regions")

    @property
    @pulumi.getter(name="resourceType")
    def resource_type(self) -> pulumi.Output[builtins.str]:
        """
        告警策略检测的资源类型。
        """
        return pulumi.get(self, "resource_type")

    @property
    @pulumi.getter(name="ruleId")
    def rule_id(self) -> pulumi.Output[builtins.str]:
        """
        告警策略 ID。
        """
        return pulumi.get(self, "rule_id")

    @property
    @pulumi.getter(name="ruleName")
    def rule_name(self) -> pulumi.Output[builtins.str]:
        """
        告警策略名称。
        """
        return pulumi.get(self, "rule_name")

    @property
    @pulumi.getter(name="ruleType")
    def rule_type(self) -> pulumi.Output[builtins.str]:
        """
        告警策略的类型。static：手动选择。dynamic：通过资源名称、项目和标签选择。
        """
        return pulumi.get(self, "rule_type")

    @property
    @pulumi.getter(name="silenceTime")
    def silence_time(self) -> pulumi.Output[builtins.int]:
        """
        告警发送周期。单位为分钟。支持配置为 5、10、15、30、60、180、360、720、1440。
        """
        return pulumi.get(self, "silence_time")

    @property
    @pulumi.getter(name="subNamespace")
    def sub_namespace(self) -> pulumi.Output[builtins.str]:
        """
        此策略引用的指标所属的维度。详情请参见 云产品监控指标 下各产品的 SubNamespace。
        """
        return pulumi.get(self, "sub_namespace")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Sequence['outputs.RuleTag']]:
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> pulumi.Output[builtins.str]:
        """
        告警策略更新时间，时间戳格式。
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter
    def webhook(self) -> pulumi.Output[builtins.str]:
        """
        告警策略绑定的告警回调 URL 地址。
        """
        return pulumi.get(self, "webhook")

    @property
    @pulumi.getter(name="webhookIds")
    def webhook_ids(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        告警发生时告警回调 ID 列表。
        """
        return pulumi.get(self, "webhook_ids")

