# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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

__all__ = [
    'ServiceGroupMonitoringAgentProcessAlertConfig',
    'ServiceGroupMonitoringAgentProcessAlertConfigTargetList',
    'ServiceGroupMonitoringAgentProcessMatchExpress',
    'GetServiceHybridDoubleWritesHybridDoubleWriteResult',
    'GetServiceMetricAlarmRulesRuleResult',
    'GetServiceMetricAlarmRulesRuleCompositeExpressionResult',
    'GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionListResult',
    'GetServiceMetricAlarmRulesRuleEscalationsResult',
    'GetServiceMetricAlarmRulesRuleEscalationsCriticalResult',
    'GetServiceMetricAlarmRulesRuleEscalationsInfoResult',
    'GetServiceMetricAlarmRulesRuleEscalationsWarnResult',
    'GetServiceMetricAlarmRulesRuleLabelResult',
    'GetServiceMetricAlarmRulesRulePrometheusResult',
    'GetServiceMetricAlarmRulesRulePrometheusAnnotationResult',
]

@pulumi.output_type
class ServiceGroupMonitoringAgentProcessAlertConfig(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "comparisonOperator":
            suggest = "comparison_operator"
        elif key == "escalationsLevel":
            suggest = "escalations_level"
        elif key == "effectiveInterval":
            suggest = "effective_interval"
        elif key == "silenceTime":
            suggest = "silence_time"
        elif key == "targetLists":
            suggest = "target_lists"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ServiceGroupMonitoringAgentProcessAlertConfig. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ServiceGroupMonitoringAgentProcessAlertConfig.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ServiceGroupMonitoringAgentProcessAlertConfig.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 comparison_operator: _builtins.str,
                 escalations_level: _builtins.str,
                 statistics: _builtins.str,
                 threshold: _builtins.str,
                 times: _builtins.str,
                 effective_interval: Optional[_builtins.str] = None,
                 silence_time: Optional[_builtins.int] = None,
                 target_lists: Optional[Sequence['outputs.ServiceGroupMonitoringAgentProcessAlertConfigTargetList']] = None,
                 webhook: Optional[_builtins.str] = None):
        """
        :param _builtins.str comparison_operator: The operator that is used to compare the metric value with the threshold. Valid values: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanOrEqualToThreshold`, `LessThanThreshold`, `NotEqualToThreshold`, `GreaterThanYesterday`, `LessThanYesterday`, `GreaterThanLastWeek`, `LessThanLastWeek`, `GreaterThanLastPeriod`, `LessThanLastPeriod`.
        :param _builtins.str escalations_level: The alert level. Valid values: `critical`, `warn`, `info`.
        :param _builtins.str statistics: The statistical method for alerts. Valid values: `Average`.
        :param _builtins.str threshold: The alert threshold.
        :param _builtins.str times: The number of times for which the threshold can be consecutively exceeded.
        :param _builtins.str effective_interval: The time period during which the alert rule is effective.
        :param _builtins.int silence_time: The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds.
        :param Sequence['ServiceGroupMonitoringAgentProcessAlertConfigTargetListArgs'] target_lists: The alert triggers. See `target_list` below.
        :param _builtins.str webhook: The callback URL.
        """
        pulumi.set(__self__, "comparison_operator", comparison_operator)
        pulumi.set(__self__, "escalations_level", escalations_level)
        pulumi.set(__self__, "statistics", statistics)
        pulumi.set(__self__, "threshold", threshold)
        pulumi.set(__self__, "times", times)
        if effective_interval is not None:
            pulumi.set(__self__, "effective_interval", effective_interval)
        if silence_time is not None:
            pulumi.set(__self__, "silence_time", silence_time)
        if target_lists is not None:
            pulumi.set(__self__, "target_lists", target_lists)
        if webhook is not None:
            pulumi.set(__self__, "webhook", webhook)

    @_builtins.property
    @pulumi.getter(name="comparisonOperator")
    def comparison_operator(self) -> _builtins.str:
        """
        The operator that is used to compare the metric value with the threshold. Valid values: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanOrEqualToThreshold`, `LessThanThreshold`, `NotEqualToThreshold`, `GreaterThanYesterday`, `LessThanYesterday`, `GreaterThanLastWeek`, `LessThanLastWeek`, `GreaterThanLastPeriod`, `LessThanLastPeriod`.
        """
        return pulumi.get(self, "comparison_operator")

    @_builtins.property
    @pulumi.getter(name="escalationsLevel")
    def escalations_level(self) -> _builtins.str:
        """
        The alert level. Valid values: `critical`, `warn`, `info`.
        """
        return pulumi.get(self, "escalations_level")

    @_builtins.property
    @pulumi.getter
    def statistics(self) -> _builtins.str:
        """
        The statistical method for alerts. Valid values: `Average`.
        """
        return pulumi.get(self, "statistics")

    @_builtins.property
    @pulumi.getter
    def threshold(self) -> _builtins.str:
        """
        The alert threshold.
        """
        return pulumi.get(self, "threshold")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.str:
        """
        The number of times for which the threshold can be consecutively exceeded.
        """
        return pulumi.get(self, "times")

    @_builtins.property
    @pulumi.getter(name="effectiveInterval")
    def effective_interval(self) -> Optional[_builtins.str]:
        """
        The time period during which the alert rule is effective.
        """
        return pulumi.get(self, "effective_interval")

    @_builtins.property
    @pulumi.getter(name="silenceTime")
    def silence_time(self) -> Optional[_builtins.int]:
        """
        The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds.
        """
        return pulumi.get(self, "silence_time")

    @_builtins.property
    @pulumi.getter(name="targetLists")
    def target_lists(self) -> Optional[Sequence['outputs.ServiceGroupMonitoringAgentProcessAlertConfigTargetList']]:
        """
        The alert triggers. See `target_list` below.
        """
        return pulumi.get(self, "target_lists")

    @_builtins.property
    @pulumi.getter
    def webhook(self) -> Optional[_builtins.str]:
        """
        The callback URL.
        """
        return pulumi.get(self, "webhook")


@pulumi.output_type
class ServiceGroupMonitoringAgentProcessAlertConfigTargetList(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "jsonParams":
            suggest = "json_params"
        elif key == "targetListId":
            suggest = "target_list_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ServiceGroupMonitoringAgentProcessAlertConfigTargetList. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ServiceGroupMonitoringAgentProcessAlertConfigTargetList.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ServiceGroupMonitoringAgentProcessAlertConfigTargetList.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 arn: Optional[_builtins.str] = None,
                 json_params: Optional[_builtins.str] = None,
                 level: Optional[_builtins.str] = None,
                 target_list_id: Optional[_builtins.str] = None):
        """
        :param _builtins.str arn: The Alibaba Cloud Resource Name (ARN) of the resource.
        :param _builtins.str json_params: The parameters of the alert callback. Specify the parameters in the JSON format.
        :param _builtins.str level: The alert level. Valid values: `CRITICAL`, `WARN`, `INFO`.
        :param _builtins.str target_list_id: The ID of the resource for which alerts are triggered.
        """
        if arn is not None:
            pulumi.set(__self__, "arn", arn)
        if json_params is not None:
            pulumi.set(__self__, "json_params", json_params)
        if level is not None:
            pulumi.set(__self__, "level", level)
        if target_list_id is not None:
            pulumi.set(__self__, "target_list_id", target_list_id)

    @_builtins.property
    @pulumi.getter
    def arn(self) -> Optional[_builtins.str]:
        """
        The Alibaba Cloud Resource Name (ARN) of the resource.
        """
        return pulumi.get(self, "arn")

    @_builtins.property
    @pulumi.getter(name="jsonParams")
    def json_params(self) -> Optional[_builtins.str]:
        """
        The parameters of the alert callback. Specify the parameters in the JSON format.
        """
        return pulumi.get(self, "json_params")

    @_builtins.property
    @pulumi.getter
    def level(self) -> Optional[_builtins.str]:
        """
        The alert level. Valid values: `CRITICAL`, `WARN`, `INFO`.
        """
        return pulumi.get(self, "level")

    @_builtins.property
    @pulumi.getter(name="targetListId")
    def target_list_id(self) -> Optional[_builtins.str]:
        """
        The ID of the resource for which alerts are triggered.
        """
        return pulumi.get(self, "target_list_id")


@pulumi.output_type
class ServiceGroupMonitoringAgentProcessMatchExpress(dict):
    def __init__(__self__, *,
                 function: Optional[_builtins.str] = None,
                 name: Optional[_builtins.str] = None,
                 value: Optional[_builtins.str] = None):
        """
        :param _builtins.str function: The matching condition. Valid values: `all`, `startWith`, `endWith`, `contains`, `notContains`, `equals`.
        :param _builtins.str name: The criteria based on which the instances are matched.
        :param _builtins.str value: The keyword used to match the instance name.
        """
        if function is not None:
            pulumi.set(__self__, "function", function)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if value is not None:
            pulumi.set(__self__, "value", value)

    @_builtins.property
    @pulumi.getter
    def function(self) -> Optional[_builtins.str]:
        """
        The matching condition. Valid values: `all`, `startWith`, `endWith`, `contains`, `notContains`, `equals`.
        """
        return pulumi.get(self, "function")

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[_builtins.str]:
        """
        The criteria based on which the instances are matched.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def value(self) -> Optional[_builtins.str]:
        """
        The keyword used to match the instance name.
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class GetServiceHybridDoubleWritesHybridDoubleWriteResult(dict):
    def __init__(__self__, *,
                 id: _builtins.str,
                 namespace: _builtins.str,
                 source_namespace: _builtins.str,
                 source_user_id: _builtins.str,
                 user_id: _builtins.str):
        """
        :param _builtins.str id: The ID of the Hybrid Double Write. It formats as `<source_namespace>:<source_user_id>`.
        :param _builtins.str namespace: Target Namespace.
        :param _builtins.str source_namespace: Source Namespace.
        :param _builtins.str source_user_id: Source UserId.
        :param _builtins.str user_id: Target UserId.
        """
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "namespace", namespace)
        pulumi.set(__self__, "source_namespace", source_namespace)
        pulumi.set(__self__, "source_user_id", source_user_id)
        pulumi.set(__self__, "user_id", user_id)

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The ID of the Hybrid Double Write. It formats as `<source_namespace>:<source_user_id>`.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def namespace(self) -> _builtins.str:
        """
        Target Namespace.
        """
        return pulumi.get(self, "namespace")

    @_builtins.property
    @pulumi.getter(name="sourceNamespace")
    def source_namespace(self) -> _builtins.str:
        """
        Source Namespace.
        """
        return pulumi.get(self, "source_namespace")

    @_builtins.property
    @pulumi.getter(name="sourceUserId")
    def source_user_id(self) -> _builtins.str:
        """
        Source UserId.
        """
        return pulumi.get(self, "source_user_id")

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> _builtins.str:
        """
        Target UserId.
        """
        return pulumi.get(self, "user_id")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleResult(dict):
    def __init__(__self__, *,
                 composite_expression: 'outputs.GetServiceMetricAlarmRulesRuleCompositeExpressionResult',
                 contact_groups: _builtins.str,
                 dimensions: _builtins.str,
                 effective_interval: _builtins.str,
                 email_subject: _builtins.str,
                 escalations: 'outputs.GetServiceMetricAlarmRulesRuleEscalationsResult',
                 id: _builtins.str,
                 labels: Sequence['outputs.GetServiceMetricAlarmRulesRuleLabelResult'],
                 metric_name: _builtins.str,
                 namespace: _builtins.str,
                 no_data_policy: _builtins.str,
                 no_effective_interval: _builtins.str,
                 period: _builtins.str,
                 prometheus: 'outputs.GetServiceMetricAlarmRulesRulePrometheusResult',
                 resources: _builtins.str,
                 rule_name: _builtins.str,
                 silence_time: _builtins.str,
                 source_type: _builtins.str,
                 status: _builtins.bool,
                 webhook: _builtins.str):
        """
        :param 'GetServiceMetricAlarmRulesRuleCompositeExpressionArgs' composite_expression: The trigger conditions for multiple metrics.
        :param _builtins.str contact_groups: The alert contact group.
        :param _builtins.str dimensions: The monitoring dimensions of the specified resource.
        :param _builtins.str effective_interval: The time period during which the alert rule is effective.
        :param _builtins.str email_subject: The subject of the alert notification email.
        :param 'GetServiceMetricAlarmRulesRuleEscalationsArgs' escalations: The conditions for triggering different levels of alerts.
        :param _builtins.str id: The ID of the alert rule.
        :param Sequence['GetServiceMetricAlarmRulesRuleLabelArgs'] labels: The tags of the alert rule.
        :param _builtins.str metric_name: The name of the metric.
        :param _builtins.str namespace: The namespace of the cloud service.
        :param _builtins.str no_data_policy: The method that is used to handle alerts when no monitoring data is found.
        :param _builtins.str no_effective_interval: The time period during which the alert rule is ineffective.
        :param _builtins.str period: The aggregation period of the metric.
        :param 'GetServiceMetricAlarmRulesRulePrometheusArgs' prometheus: The Prometheus alerts.
        :param _builtins.str resources: The resources that are associated with the alert rule.
        :param _builtins.str rule_name: The name of the alert rule.
        :param _builtins.str silence_time: The mute period during which new alert notifications are not sent even if the trigger conditions are met.
        :param _builtins.str source_type: The type of the alert rule.
        :param _builtins.bool status: Specifies whether to query enabled or disabled alert rules. Valid values: `true`, `false`.
        :param _builtins.str webhook: The callback URL.
        """
        pulumi.set(__self__, "composite_expression", composite_expression)
        pulumi.set(__self__, "contact_groups", contact_groups)
        pulumi.set(__self__, "dimensions", dimensions)
        pulumi.set(__self__, "effective_interval", effective_interval)
        pulumi.set(__self__, "email_subject", email_subject)
        pulumi.set(__self__, "escalations", escalations)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "labels", labels)
        pulumi.set(__self__, "metric_name", metric_name)
        pulumi.set(__self__, "namespace", namespace)
        pulumi.set(__self__, "no_data_policy", no_data_policy)
        pulumi.set(__self__, "no_effective_interval", no_effective_interval)
        pulumi.set(__self__, "period", period)
        pulumi.set(__self__, "prometheus", prometheus)
        pulumi.set(__self__, "resources", resources)
        pulumi.set(__self__, "rule_name", rule_name)
        pulumi.set(__self__, "silence_time", silence_time)
        pulumi.set(__self__, "source_type", source_type)
        pulumi.set(__self__, "status", status)
        pulumi.set(__self__, "webhook", webhook)

    @_builtins.property
    @pulumi.getter(name="compositeExpression")
    def composite_expression(self) -> 'outputs.GetServiceMetricAlarmRulesRuleCompositeExpressionResult':
        """
        The trigger conditions for multiple metrics.
        """
        return pulumi.get(self, "composite_expression")

    @_builtins.property
    @pulumi.getter(name="contactGroups")
    def contact_groups(self) -> _builtins.str:
        """
        The alert contact group.
        """
        return pulumi.get(self, "contact_groups")

    @_builtins.property
    @pulumi.getter
    def dimensions(self) -> _builtins.str:
        """
        The monitoring dimensions of the specified resource.
        """
        return pulumi.get(self, "dimensions")

    @_builtins.property
    @pulumi.getter(name="effectiveInterval")
    def effective_interval(self) -> _builtins.str:
        """
        The time period during which the alert rule is effective.
        """
        return pulumi.get(self, "effective_interval")

    @_builtins.property
    @pulumi.getter(name="emailSubject")
    def email_subject(self) -> _builtins.str:
        """
        The subject of the alert notification email.
        """
        return pulumi.get(self, "email_subject")

    @_builtins.property
    @pulumi.getter
    def escalations(self) -> 'outputs.GetServiceMetricAlarmRulesRuleEscalationsResult':
        """
        The conditions for triggering different levels of alerts.
        """
        return pulumi.get(self, "escalations")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The ID of the alert rule.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def labels(self) -> Sequence['outputs.GetServiceMetricAlarmRulesRuleLabelResult']:
        """
        The tags of the alert rule.
        """
        return pulumi.get(self, "labels")

    @_builtins.property
    @pulumi.getter(name="metricName")
    def metric_name(self) -> _builtins.str:
        """
        The name of the metric.
        """
        return pulumi.get(self, "metric_name")

    @_builtins.property
    @pulumi.getter
    def namespace(self) -> _builtins.str:
        """
        The namespace of the cloud service.
        """
        return pulumi.get(self, "namespace")

    @_builtins.property
    @pulumi.getter(name="noDataPolicy")
    def no_data_policy(self) -> _builtins.str:
        """
        The method that is used to handle alerts when no monitoring data is found.
        """
        return pulumi.get(self, "no_data_policy")

    @_builtins.property
    @pulumi.getter(name="noEffectiveInterval")
    def no_effective_interval(self) -> _builtins.str:
        """
        The time period during which the alert rule is ineffective.
        """
        return pulumi.get(self, "no_effective_interval")

    @_builtins.property
    @pulumi.getter
    def period(self) -> _builtins.str:
        """
        The aggregation period of the metric.
        """
        return pulumi.get(self, "period")

    @_builtins.property
    @pulumi.getter
    def prometheus(self) -> 'outputs.GetServiceMetricAlarmRulesRulePrometheusResult':
        """
        The Prometheus alerts.
        """
        return pulumi.get(self, "prometheus")

    @_builtins.property
    @pulumi.getter
    def resources(self) -> _builtins.str:
        """
        The resources that are associated with the alert rule.
        """
        return pulumi.get(self, "resources")

    @_builtins.property
    @pulumi.getter(name="ruleName")
    def rule_name(self) -> _builtins.str:
        """
        The name of the alert rule.
        """
        return pulumi.get(self, "rule_name")

    @_builtins.property
    @pulumi.getter(name="silenceTime")
    def silence_time(self) -> _builtins.str:
        """
        The mute period during which new alert notifications are not sent even if the trigger conditions are met.
        """
        return pulumi.get(self, "silence_time")

    @_builtins.property
    @pulumi.getter(name="sourceType")
    def source_type(self) -> _builtins.str:
        """
        The type of the alert rule.
        """
        return pulumi.get(self, "source_type")

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.bool:
        """
        Specifies whether to query enabled or disabled alert rules. Valid values: `true`, `false`.
        """
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter
    def webhook(self) -> _builtins.str:
        """
        The callback URL.
        """
        return pulumi.get(self, "webhook")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleCompositeExpressionResult(dict):
    def __init__(__self__, *,
                 expression_list_join: _builtins.str,
                 expression_lists: Sequence['outputs.GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionListResult'],
                 expression_raw: _builtins.str,
                 level: _builtins.str,
                 times: _builtins.int):
        """
        :param _builtins.str expression_list_join: The relationship between the trigger conditions for multiple metrics.
        :param Sequence['GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionListArgs'] expression_lists: The trigger conditions that are created in standard mode.
        :param _builtins.str expression_raw: The trigger conditions that are created by using expressions.
        :param _builtins.str level: The alert level.
        :param _builtins.int times: The number of consecutive triggers.
        """
        pulumi.set(__self__, "expression_list_join", expression_list_join)
        pulumi.set(__self__, "expression_lists", expression_lists)
        pulumi.set(__self__, "expression_raw", expression_raw)
        pulumi.set(__self__, "level", level)
        pulumi.set(__self__, "times", times)

    @_builtins.property
    @pulumi.getter(name="expressionListJoin")
    def expression_list_join(self) -> _builtins.str:
        """
        The relationship between the trigger conditions for multiple metrics.
        """
        return pulumi.get(self, "expression_list_join")

    @_builtins.property
    @pulumi.getter(name="expressionLists")
    def expression_lists(self) -> Sequence['outputs.GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionListResult']:
        """
        The trigger conditions that are created in standard mode.
        """
        return pulumi.get(self, "expression_lists")

    @_builtins.property
    @pulumi.getter(name="expressionRaw")
    def expression_raw(self) -> _builtins.str:
        """
        The trigger conditions that are created by using expressions.
        """
        return pulumi.get(self, "expression_raw")

    @_builtins.property
    @pulumi.getter
    def level(self) -> _builtins.str:
        """
        The alert level.
        """
        return pulumi.get(self, "level")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.int:
        """
        The number of consecutive triggers.
        """
        return pulumi.get(self, "times")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionListResult(dict):
    def __init__(__self__, *,
                 comparison_operator: _builtins.str,
                 metric_name: _builtins.str,
                 period: _builtins.int,
                 statistics: _builtins.str,
                 threshold: _builtins.str):
        """
        :param _builtins.str comparison_operator: The comparison operator that is used to compare the metric value with the threshold.
        :param _builtins.str metric_name: The name of the metric.
        :param _builtins.int period: The aggregation period of the metric.
        :param _builtins.str statistics: The statistical methods for Warn-level alerts.
        :param _builtins.str threshold: The threshold for Warn-level alerts.
        """
        pulumi.set(__self__, "comparison_operator", comparison_operator)
        pulumi.set(__self__, "metric_name", metric_name)
        pulumi.set(__self__, "period", period)
        pulumi.set(__self__, "statistics", statistics)
        pulumi.set(__self__, "threshold", threshold)

    @_builtins.property
    @pulumi.getter(name="comparisonOperator")
    def comparison_operator(self) -> _builtins.str:
        """
        The comparison operator that is used to compare the metric value with the threshold.
        """
        return pulumi.get(self, "comparison_operator")

    @_builtins.property
    @pulumi.getter(name="metricName")
    def metric_name(self) -> _builtins.str:
        """
        The name of the metric.
        """
        return pulumi.get(self, "metric_name")

    @_builtins.property
    @pulumi.getter
    def period(self) -> _builtins.int:
        """
        The aggregation period of the metric.
        """
        return pulumi.get(self, "period")

    @_builtins.property
    @pulumi.getter
    def statistics(self) -> _builtins.str:
        """
        The statistical methods for Warn-level alerts.
        """
        return pulumi.get(self, "statistics")

    @_builtins.property
    @pulumi.getter
    def threshold(self) -> _builtins.str:
        """
        The threshold for Warn-level alerts.
        """
        return pulumi.get(self, "threshold")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleEscalationsResult(dict):
    def __init__(__self__, *,
                 critical: 'outputs.GetServiceMetricAlarmRulesRuleEscalationsCriticalResult',
                 info: 'outputs.GetServiceMetricAlarmRulesRuleEscalationsInfoResult',
                 warn: 'outputs.GetServiceMetricAlarmRulesRuleEscalationsWarnResult'):
        """
        :param 'GetServiceMetricAlarmRulesRuleEscalationsCriticalArgs' critical: The conditions for triggering Critical-level alerts.
        :param 'GetServiceMetricAlarmRulesRuleEscalationsInfoArgs' info: The conditions for triggering Info-level alerts.
        :param 'GetServiceMetricAlarmRulesRuleEscalationsWarnArgs' warn: The conditions for triggering Warn-level alerts.
        """
        pulumi.set(__self__, "critical", critical)
        pulumi.set(__self__, "info", info)
        pulumi.set(__self__, "warn", warn)

    @_builtins.property
    @pulumi.getter
    def critical(self) -> 'outputs.GetServiceMetricAlarmRulesRuleEscalationsCriticalResult':
        """
        The conditions for triggering Critical-level alerts.
        """
        return pulumi.get(self, "critical")

    @_builtins.property
    @pulumi.getter
    def info(self) -> 'outputs.GetServiceMetricAlarmRulesRuleEscalationsInfoResult':
        """
        The conditions for triggering Info-level alerts.
        """
        return pulumi.get(self, "info")

    @_builtins.property
    @pulumi.getter
    def warn(self) -> 'outputs.GetServiceMetricAlarmRulesRuleEscalationsWarnResult':
        """
        The conditions for triggering Warn-level alerts.
        """
        return pulumi.get(self, "warn")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleEscalationsCriticalResult(dict):
    def __init__(__self__, *,
                 comparison_operator: _builtins.str,
                 pre_condition: _builtins.str,
                 statistics: _builtins.str,
                 threshold: _builtins.str,
                 times: _builtins.int):
        """
        :param _builtins.str comparison_operator: The comparison operator that is used to compare the metric value with the threshold.
        :param _builtins.str pre_condition: The additional conditions for triggering Warn-level alerts.
        :param _builtins.str statistics: The statistical methods for Warn-level alerts.
        :param _builtins.str threshold: The threshold for Warn-level alerts.
        :param _builtins.int times: The number of consecutive triggers.
        """
        pulumi.set(__self__, "comparison_operator", comparison_operator)
        pulumi.set(__self__, "pre_condition", pre_condition)
        pulumi.set(__self__, "statistics", statistics)
        pulumi.set(__self__, "threshold", threshold)
        pulumi.set(__self__, "times", times)

    @_builtins.property
    @pulumi.getter(name="comparisonOperator")
    def comparison_operator(self) -> _builtins.str:
        """
        The comparison operator that is used to compare the metric value with the threshold.
        """
        return pulumi.get(self, "comparison_operator")

    @_builtins.property
    @pulumi.getter(name="preCondition")
    def pre_condition(self) -> _builtins.str:
        """
        The additional conditions for triggering Warn-level alerts.
        """
        return pulumi.get(self, "pre_condition")

    @_builtins.property
    @pulumi.getter
    def statistics(self) -> _builtins.str:
        """
        The statistical methods for Warn-level alerts.
        """
        return pulumi.get(self, "statistics")

    @_builtins.property
    @pulumi.getter
    def threshold(self) -> _builtins.str:
        """
        The threshold for Warn-level alerts.
        """
        return pulumi.get(self, "threshold")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.int:
        """
        The number of consecutive triggers.
        """
        return pulumi.get(self, "times")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleEscalationsInfoResult(dict):
    def __init__(__self__, *,
                 comparison_operator: _builtins.str,
                 pre_condition: _builtins.str,
                 statistics: _builtins.str,
                 threshold: _builtins.str,
                 times: _builtins.int):
        """
        :param _builtins.str comparison_operator: The comparison operator that is used to compare the metric value with the threshold.
        :param _builtins.str pre_condition: The additional conditions for triggering Warn-level alerts.
        :param _builtins.str statistics: The statistical methods for Warn-level alerts.
        :param _builtins.str threshold: The threshold for Warn-level alerts.
        :param _builtins.int times: The number of consecutive triggers.
        """
        pulumi.set(__self__, "comparison_operator", comparison_operator)
        pulumi.set(__self__, "pre_condition", pre_condition)
        pulumi.set(__self__, "statistics", statistics)
        pulumi.set(__self__, "threshold", threshold)
        pulumi.set(__self__, "times", times)

    @_builtins.property
    @pulumi.getter(name="comparisonOperator")
    def comparison_operator(self) -> _builtins.str:
        """
        The comparison operator that is used to compare the metric value with the threshold.
        """
        return pulumi.get(self, "comparison_operator")

    @_builtins.property
    @pulumi.getter(name="preCondition")
    def pre_condition(self) -> _builtins.str:
        """
        The additional conditions for triggering Warn-level alerts.
        """
        return pulumi.get(self, "pre_condition")

    @_builtins.property
    @pulumi.getter
    def statistics(self) -> _builtins.str:
        """
        The statistical methods for Warn-level alerts.
        """
        return pulumi.get(self, "statistics")

    @_builtins.property
    @pulumi.getter
    def threshold(self) -> _builtins.str:
        """
        The threshold for Warn-level alerts.
        """
        return pulumi.get(self, "threshold")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.int:
        """
        The number of consecutive triggers.
        """
        return pulumi.get(self, "times")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleEscalationsWarnResult(dict):
    def __init__(__self__, *,
                 comparison_operator: _builtins.str,
                 pre_condition: _builtins.str,
                 statistics: _builtins.str,
                 threshold: _builtins.str,
                 times: _builtins.int):
        """
        :param _builtins.str comparison_operator: The comparison operator that is used to compare the metric value with the threshold.
        :param _builtins.str pre_condition: The additional conditions for triggering Warn-level alerts.
        :param _builtins.str statistics: The statistical methods for Warn-level alerts.
        :param _builtins.str threshold: The threshold for Warn-level alerts.
        :param _builtins.int times: The number of consecutive triggers.
        """
        pulumi.set(__self__, "comparison_operator", comparison_operator)
        pulumi.set(__self__, "pre_condition", pre_condition)
        pulumi.set(__self__, "statistics", statistics)
        pulumi.set(__self__, "threshold", threshold)
        pulumi.set(__self__, "times", times)

    @_builtins.property
    @pulumi.getter(name="comparisonOperator")
    def comparison_operator(self) -> _builtins.str:
        """
        The comparison operator that is used to compare the metric value with the threshold.
        """
        return pulumi.get(self, "comparison_operator")

    @_builtins.property
    @pulumi.getter(name="preCondition")
    def pre_condition(self) -> _builtins.str:
        """
        The additional conditions for triggering Warn-level alerts.
        """
        return pulumi.get(self, "pre_condition")

    @_builtins.property
    @pulumi.getter
    def statistics(self) -> _builtins.str:
        """
        The statistical methods for Warn-level alerts.
        """
        return pulumi.get(self, "statistics")

    @_builtins.property
    @pulumi.getter
    def threshold(self) -> _builtins.str:
        """
        The threshold for Warn-level alerts.
        """
        return pulumi.get(self, "threshold")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.int:
        """
        The number of consecutive triggers.
        """
        return pulumi.get(self, "times")


@pulumi.output_type
class GetServiceMetricAlarmRulesRuleLabelResult(dict):
    def __init__(__self__, *,
                 key: _builtins.str,
                 value: _builtins.str):
        """
        :param _builtins.str key: The subject of the alert notificaThe key of the annotation.
        :param _builtins.str value: The value of the annotation.
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @_builtins.property
    @pulumi.getter
    def key(self) -> _builtins.str:
        """
        The subject of the alert notificaThe key of the annotation.
        """
        return pulumi.get(self, "key")

    @_builtins.property
    @pulumi.getter
    def value(self) -> _builtins.str:
        """
        The value of the annotation.
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class GetServiceMetricAlarmRulesRulePrometheusResult(dict):
    def __init__(__self__, *,
                 annotations: Sequence['outputs.GetServiceMetricAlarmRulesRulePrometheusAnnotationResult'],
                 level: _builtins.str,
                 prom_ql: _builtins.str,
                 times: _builtins.int):
        """
        :param Sequence['GetServiceMetricAlarmRulesRulePrometheusAnnotationArgs'] annotations: The annotations of the Prometheus alert rule.
        :param _builtins.str level: The alert level.
        :param _builtins.str prom_ql: The PromQL query statement.
        :param _builtins.int times: The number of consecutive triggers.
        """
        pulumi.set(__self__, "annotations", annotations)
        pulumi.set(__self__, "level", level)
        pulumi.set(__self__, "prom_ql", prom_ql)
        pulumi.set(__self__, "times", times)

    @_builtins.property
    @pulumi.getter
    def annotations(self) -> Sequence['outputs.GetServiceMetricAlarmRulesRulePrometheusAnnotationResult']:
        """
        The annotations of the Prometheus alert rule.
        """
        return pulumi.get(self, "annotations")

    @_builtins.property
    @pulumi.getter
    def level(self) -> _builtins.str:
        """
        The alert level.
        """
        return pulumi.get(self, "level")

    @_builtins.property
    @pulumi.getter(name="promQl")
    def prom_ql(self) -> _builtins.str:
        """
        The PromQL query statement.
        """
        return pulumi.get(self, "prom_ql")

    @_builtins.property
    @pulumi.getter
    def times(self) -> _builtins.int:
        """
        The number of consecutive triggers.
        """
        return pulumi.get(self, "times")


@pulumi.output_type
class GetServiceMetricAlarmRulesRulePrometheusAnnotationResult(dict):
    def __init__(__self__, *,
                 key: _builtins.str,
                 value: _builtins.str):
        """
        :param _builtins.str key: The subject of the alert notificaThe key of the annotation.
        :param _builtins.str value: The value of the annotation.
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @_builtins.property
    @pulumi.getter
    def key(self) -> _builtins.str:
        """
        The subject of the alert notificaThe key of the annotation.
        """
        return pulumi.get(self, "key")

    @_builtins.property
    @pulumi.getter
    def value(self) -> _builtins.str:
        """
        The value of the annotation.
        """
        return pulumi.get(self, "value")


