# 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 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

__all__ = [
    'GetSentryMetricAlertResult',
    'AwaitableGetSentryMetricAlertResult',
    'get_sentry_metric_alert',
    'get_sentry_metric_alert_output',
]

@pulumi.output_type
class GetSentryMetricAlertResult:
    """
    A collection of values returned by getSentryMetricAlert.
    """
    def __init__(__self__, aggregate=None, dataset=None, environment=None, event_types=None, id=None, internal_id=None, name=None, organization=None, owner=None, project=None, query=None, resolve_threshold=None, threshold_type=None, time_window=None, triggers=None):
        if aggregate and not isinstance(aggregate, str):
            raise TypeError("Expected argument 'aggregate' to be a str")
        pulumi.set(__self__, "aggregate", aggregate)
        if dataset and not isinstance(dataset, str):
            raise TypeError("Expected argument 'dataset' to be a str")
        pulumi.set(__self__, "dataset", dataset)
        if environment and not isinstance(environment, str):
            raise TypeError("Expected argument 'environment' to be a str")
        pulumi.set(__self__, "environment", environment)
        if event_types and not isinstance(event_types, list):
            raise TypeError("Expected argument 'event_types' to be a list")
        pulumi.set(__self__, "event_types", event_types)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if internal_id and not isinstance(internal_id, str):
            raise TypeError("Expected argument 'internal_id' to be a str")
        pulumi.set(__self__, "internal_id", internal_id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if organization and not isinstance(organization, str):
            raise TypeError("Expected argument 'organization' to be a str")
        pulumi.set(__self__, "organization", organization)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if query and not isinstance(query, str):
            raise TypeError("Expected argument 'query' to be a str")
        pulumi.set(__self__, "query", query)
        if resolve_threshold and not isinstance(resolve_threshold, float):
            raise TypeError("Expected argument 'resolve_threshold' to be a float")
        pulumi.set(__self__, "resolve_threshold", resolve_threshold)
        if threshold_type and not isinstance(threshold_type, int):
            raise TypeError("Expected argument 'threshold_type' to be a int")
        pulumi.set(__self__, "threshold_type", threshold_type)
        if time_window and not isinstance(time_window, float):
            raise TypeError("Expected argument 'time_window' to be a float")
        pulumi.set(__self__, "time_window", time_window)
        if triggers and not isinstance(triggers, list):
            raise TypeError("Expected argument 'triggers' to be a list")
        pulumi.set(__self__, "triggers", triggers)

    @property
    @pulumi.getter
    def aggregate(self) -> str:
        return pulumi.get(self, "aggregate")

    @property
    @pulumi.getter
    def dataset(self) -> str:
        return pulumi.get(self, "dataset")

    @property
    @pulumi.getter
    def environment(self) -> str:
        return pulumi.get(self, "environment")

    @property
    @pulumi.getter(name="eventTypes")
    def event_types(self) -> Sequence[str]:
        """
        The events type of dataset.
        """
        return pulumi.get(self, "event_types")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="internalId")
    def internal_id(self) -> str:
        """
        The internal ID for this metric alert.
        """
        return pulumi.get(self, "internal_id")

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

    @property
    @pulumi.getter
    def organization(self) -> str:
        """
        The slug of the organization the metric alert belongs to.
        """
        return pulumi.get(self, "organization")

    @property
    @pulumi.getter
    def owner(self) -> str:
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter
    def project(self) -> str:
        """
        The slug of the project the metric alert belongs to.
        """
        return pulumi.get(self, "project")

    @property
    @pulumi.getter
    def query(self) -> str:
        return pulumi.get(self, "query")

    @property
    @pulumi.getter(name="resolveThreshold")
    def resolve_threshold(self) -> float:
        return pulumi.get(self, "resolve_threshold")

    @property
    @pulumi.getter(name="thresholdType")
    def threshold_type(self) -> int:
        return pulumi.get(self, "threshold_type")

    @property
    @pulumi.getter(name="timeWindow")
    def time_window(self) -> float:
        return pulumi.get(self, "time_window")

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


class AwaitableGetSentryMetricAlertResult(GetSentryMetricAlertResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSentryMetricAlertResult(
            aggregate=self.aggregate,
            dataset=self.dataset,
            environment=self.environment,
            event_types=self.event_types,
            id=self.id,
            internal_id=self.internal_id,
            name=self.name,
            organization=self.organization,
            owner=self.owner,
            project=self.project,
            query=self.query,
            resolve_threshold=self.resolve_threshold,
            threshold_type=self.threshold_type,
            time_window=self.time_window,
            triggers=self.triggers)


def get_sentry_metric_alert(internal_id: Optional[str] = None,
                            organization: Optional[str] = None,
                            project: Optional[str] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSentryMetricAlertResult:
    """
    ## Example Usage


    :param str internal_id: The internal ID for this metric alert.
    :param str organization: The slug of the organization the metric alert belongs to.
    :param str project: The slug of the project the metric alert belongs to.
    """
    __args__ = dict()
    __args__['internalId'] = internal_id
    __args__['organization'] = organization
    __args__['project'] = project
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('sentry:index/getSentryMetricAlert:getSentryMetricAlert', __args__, opts=opts, typ=GetSentryMetricAlertResult).value

    return AwaitableGetSentryMetricAlertResult(
        aggregate=pulumi.get(__ret__, 'aggregate'),
        dataset=pulumi.get(__ret__, 'dataset'),
        environment=pulumi.get(__ret__, 'environment'),
        event_types=pulumi.get(__ret__, 'event_types'),
        id=pulumi.get(__ret__, 'id'),
        internal_id=pulumi.get(__ret__, 'internal_id'),
        name=pulumi.get(__ret__, 'name'),
        organization=pulumi.get(__ret__, 'organization'),
        owner=pulumi.get(__ret__, 'owner'),
        project=pulumi.get(__ret__, 'project'),
        query=pulumi.get(__ret__, 'query'),
        resolve_threshold=pulumi.get(__ret__, 'resolve_threshold'),
        threshold_type=pulumi.get(__ret__, 'threshold_type'),
        time_window=pulumi.get(__ret__, 'time_window'),
        triggers=pulumi.get(__ret__, 'triggers'))
def get_sentry_metric_alert_output(internal_id: Optional[pulumi.Input[str]] = None,
                                   organization: Optional[pulumi.Input[str]] = None,
                                   project: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSentryMetricAlertResult]:
    """
    ## Example Usage


    :param str internal_id: The internal ID for this metric alert.
    :param str organization: The slug of the organization the metric alert belongs to.
    :param str project: The slug of the project the metric alert belongs to.
    """
    __args__ = dict()
    __args__['internalId'] = internal_id
    __args__['organization'] = organization
    __args__['project'] = project
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('sentry:index/getSentryMetricAlert:getSentryMetricAlert', __args__, opts=opts, typ=GetSentryMetricAlertResult)
    return __ret__.apply(lambda __response__: GetSentryMetricAlertResult(
        aggregate=pulumi.get(__response__, 'aggregate'),
        dataset=pulumi.get(__response__, 'dataset'),
        environment=pulumi.get(__response__, 'environment'),
        event_types=pulumi.get(__response__, 'event_types'),
        id=pulumi.get(__response__, 'id'),
        internal_id=pulumi.get(__response__, 'internal_id'),
        name=pulumi.get(__response__, 'name'),
        organization=pulumi.get(__response__, 'organization'),
        owner=pulumi.get(__response__, 'owner'),
        project=pulumi.get(__response__, 'project'),
        query=pulumi.get(__response__, 'query'),
        resolve_threshold=pulumi.get(__response__, 'resolve_threshold'),
        threshold_type=pulumi.get(__response__, 'threshold_type'),
        time_window=pulumi.get(__response__, 'time_window'),
        triggers=pulumi.get(__response__, 'triggers')))
