# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetClusterAlterRuleResult:
    """
    A collection of values returned by getClusterAlterRule.
    """
    def __init__(__self__, annotations=None, cluster_id=None, event_rule=None, group_id=None, group_interval_seconds=None, group_wait_seconds=None, id=None, inherited=None, labels=None, metric_rule=None, name=None, node_rule=None, repeat_interval_seconds=None, severity=None, system_service_rule=None):
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        __self__.annotations = annotations
        """
        (Computed) The cluster alert rule annotations (map)
        """
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        __self__.cluster_id = cluster_id
        if event_rule and not isinstance(event_rule, dict):
            raise TypeError("Expected argument 'event_rule' to be a dict")
        __self__.event_rule = event_rule
        """
        (Computed) The cluster alert rule event rule. ConflictsWith: `"metric_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
        """
        if group_id and not isinstance(group_id, str):
            raise TypeError("Expected argument 'group_id' to be a str")
        __self__.group_id = group_id
        """
        (Computed) The cluster alert rule alert group ID (string)
        """
        if group_interval_seconds and not isinstance(group_interval_seconds, float):
            raise TypeError("Expected argument 'group_interval_seconds' to be a float")
        __self__.group_interval_seconds = group_interval_seconds
        """
        (Computed) The cluster alert rule group interval seconds. Default: `180` (int)
        """
        if group_wait_seconds and not isinstance(group_wait_seconds, float):
            raise TypeError("Expected argument 'group_wait_seconds' to be a float")
        __self__.group_wait_seconds = group_wait_seconds
        """
        (Computed) The cluster alert rule group wait seconds. Default: `180` (int)
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if inherited and not isinstance(inherited, bool):
            raise TypeError("Expected argument 'inherited' to be a bool")
        __self__.inherited = inherited
        """
        (Computed) The cluster alert rule inherited. Default: `true` (bool)
        """
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        __self__.labels = labels
        """
        (Computed) The cluster alert rule labels (map)
        """
        if metric_rule and not isinstance(metric_rule, dict):
            raise TypeError("Expected argument 'metric_rule' to be a dict")
        __self__.metric_rule = metric_rule
        """
        (Computed) The cluster alert rule metric rule. ConflictsWith: `"event_rule", "node_rule", "system_service_rule"`` (list Maxitems:1)
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if node_rule and not isinstance(node_rule, dict):
            raise TypeError("Expected argument 'node_rule' to be a dict")
        __self__.node_rule = node_rule
        """
        (Computed) The cluster alert rule node rule. ConflictsWith: `"event_rule", "metric_rule", "system_service_rule"`` (list Maxitems:1)
        """
        if repeat_interval_seconds and not isinstance(repeat_interval_seconds, float):
            raise TypeError("Expected argument 'repeat_interval_seconds' to be a float")
        __self__.repeat_interval_seconds = repeat_interval_seconds
        """
        (Optional) The cluster alert rule wait seconds. Default: `3600` (int)
        """
        if severity and not isinstance(severity, str):
            raise TypeError("Expected argument 'severity' to be a str")
        __self__.severity = severity
        """
        (Computed) The cluster alert rule severity. Supported values : `"critical" | "info" | "warning"`. Default: `critical` (string)
        """
        if system_service_rule and not isinstance(system_service_rule, dict):
            raise TypeError("Expected argument 'system_service_rule' to be a dict")
        __self__.system_service_rule = system_service_rule
        """
        (Computed) The cluster alert rule system service rule. ConflictsWith: `"event_rule", "metric_rule", "node_rule"`` (list Maxitems:1)
        """
class AwaitableGetClusterAlterRuleResult(GetClusterAlterRuleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterAlterRuleResult(
            annotations=self.annotations,
            cluster_id=self.cluster_id,
            event_rule=self.event_rule,
            group_id=self.group_id,
            group_interval_seconds=self.group_interval_seconds,
            group_wait_seconds=self.group_wait_seconds,
            id=self.id,
            inherited=self.inherited,
            labels=self.labels,
            metric_rule=self.metric_rule,
            name=self.name,
            node_rule=self.node_rule,
            repeat_interval_seconds=self.repeat_interval_seconds,
            severity=self.severity,
            system_service_rule=self.system_service_rule)

def get_cluster_alter_rule(cluster_id=None,labels=None,name=None,opts=None):
    """
    Use this data source to retrieve information about a Rancher v2 cluster alert rule.




    :param str cluster_id: The cluster id where create cluster alert rule (string)
    :param dict labels: (Computed) The cluster alert rule labels (map)
    :param str name: The cluster alert rule name (string)
    """
    __args__ = dict()


    __args__['clusterId'] = cluster_id
    __args__['labels'] = labels
    __args__['name'] = name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('rancher2:index/getClusterAlterRule:getClusterAlterRule', __args__, opts=opts).value

    return AwaitableGetClusterAlterRuleResult(
        annotations=__ret__.get('annotations'),
        cluster_id=__ret__.get('clusterId'),
        event_rule=__ret__.get('eventRule'),
        group_id=__ret__.get('groupId'),
        group_interval_seconds=__ret__.get('groupIntervalSeconds'),
        group_wait_seconds=__ret__.get('groupWaitSeconds'),
        id=__ret__.get('id'),
        inherited=__ret__.get('inherited'),
        labels=__ret__.get('labels'),
        metric_rule=__ret__.get('metricRule'),
        name=__ret__.get('name'),
        node_rule=__ret__.get('nodeRule'),
        repeat_interval_seconds=__ret__.get('repeatIntervalSeconds'),
        severity=__ret__.get('severity'),
        system_service_rule=__ret__.get('systemServiceRule'))
