# 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__ = [
    'GetAlertV2Result',
    'AwaitableGetAlertV2Result',
    'get_alert_v2',
    'get_alert_v2_output',
]

@pulumi.output_type
class GetAlertV2Result:
    """
    A collection of values returned by getAlertV2.
    """
    def __init__(__self__, create_time=None, custom_description=None, custom_summary=None, display_name=None, evaluation=None, id=None, lifecycle_state=None, owner_user_name=None, parent_path=None, query_text=None, run_as_user_name=None, schedule=None, update_time=None, warehouse_id=None):
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if custom_description and not isinstance(custom_description, str):
            raise TypeError("Expected argument 'custom_description' to be a str")
        pulumi.set(__self__, "custom_description", custom_description)
        if custom_summary and not isinstance(custom_summary, str):
            raise TypeError("Expected argument 'custom_summary' to be a str")
        pulumi.set(__self__, "custom_summary", custom_summary)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if evaluation and not isinstance(evaluation, dict):
            raise TypeError("Expected argument 'evaluation' to be a dict")
        pulumi.set(__self__, "evaluation", evaluation)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if lifecycle_state and not isinstance(lifecycle_state, str):
            raise TypeError("Expected argument 'lifecycle_state' to be a str")
        pulumi.set(__self__, "lifecycle_state", lifecycle_state)
        if owner_user_name and not isinstance(owner_user_name, str):
            raise TypeError("Expected argument 'owner_user_name' to be a str")
        pulumi.set(__self__, "owner_user_name", owner_user_name)
        if parent_path and not isinstance(parent_path, str):
            raise TypeError("Expected argument 'parent_path' to be a str")
        pulumi.set(__self__, "parent_path", parent_path)
        if query_text and not isinstance(query_text, str):
            raise TypeError("Expected argument 'query_text' to be a str")
        pulumi.set(__self__, "query_text", query_text)
        if run_as_user_name and not isinstance(run_as_user_name, str):
            raise TypeError("Expected argument 'run_as_user_name' to be a str")
        pulumi.set(__self__, "run_as_user_name", run_as_user_name)
        if schedule and not isinstance(schedule, dict):
            raise TypeError("Expected argument 'schedule' to be a dict")
        pulumi.set(__self__, "schedule", schedule)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)
        if warehouse_id and not isinstance(warehouse_id, str):
            raise TypeError("Expected argument 'warehouse_id' to be a str")
        pulumi.set(__self__, "warehouse_id", warehouse_id)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> builtins.str:
        return pulumi.get(self, "create_time")

    @property
    @pulumi.getter(name="customDescription")
    def custom_description(self) -> Optional[builtins.str]:
        return pulumi.get(self, "custom_description")

    @property
    @pulumi.getter(name="customSummary")
    def custom_summary(self) -> Optional[builtins.str]:
        return pulumi.get(self, "custom_summary")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[builtins.str]:
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def evaluation(self) -> Optional['outputs.GetAlertV2EvaluationResult']:
        return pulumi.get(self, "evaluation")

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

    @property
    @pulumi.getter(name="lifecycleState")
    def lifecycle_state(self) -> builtins.str:
        return pulumi.get(self, "lifecycle_state")

    @property
    @pulumi.getter(name="ownerUserName")
    def owner_user_name(self) -> builtins.str:
        return pulumi.get(self, "owner_user_name")

    @property
    @pulumi.getter(name="parentPath")
    def parent_path(self) -> Optional[builtins.str]:
        return pulumi.get(self, "parent_path")

    @property
    @pulumi.getter(name="queryText")
    def query_text(self) -> Optional[builtins.str]:
        return pulumi.get(self, "query_text")

    @property
    @pulumi.getter(name="runAsUserName")
    def run_as_user_name(self) -> builtins.str:
        return pulumi.get(self, "run_as_user_name")

    @property
    @pulumi.getter
    def schedule(self) -> Optional['outputs.GetAlertV2ScheduleResult']:
        return pulumi.get(self, "schedule")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> builtins.str:
        return pulumi.get(self, "update_time")

    @property
    @pulumi.getter(name="warehouseId")
    def warehouse_id(self) -> Optional[builtins.str]:
        return pulumi.get(self, "warehouse_id")


class AwaitableGetAlertV2Result(GetAlertV2Result):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAlertV2Result(
            create_time=self.create_time,
            custom_description=self.custom_description,
            custom_summary=self.custom_summary,
            display_name=self.display_name,
            evaluation=self.evaluation,
            id=self.id,
            lifecycle_state=self.lifecycle_state,
            owner_user_name=self.owner_user_name,
            parent_path=self.parent_path,
            query_text=self.query_text,
            run_as_user_name=self.run_as_user_name,
            schedule=self.schedule,
            update_time=self.update_time,
            warehouse_id=self.warehouse_id)


def get_alert_v2(custom_description: Optional[builtins.str] = None,
                 custom_summary: Optional[builtins.str] = None,
                 display_name: Optional[builtins.str] = None,
                 evaluation: Optional[Union['GetAlertV2EvaluationArgs', 'GetAlertV2EvaluationArgsDict']] = None,
                 parent_path: Optional[builtins.str] = None,
                 query_text: Optional[builtins.str] = None,
                 schedule: Optional[Union['GetAlertV2ScheduleArgs', 'GetAlertV2ScheduleArgsDict']] = None,
                 warehouse_id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertV2Result:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['customDescription'] = custom_description
    __args__['customSummary'] = custom_summary
    __args__['displayName'] = display_name
    __args__['evaluation'] = evaluation
    __args__['parentPath'] = parent_path
    __args__['queryText'] = query_text
    __args__['schedule'] = schedule
    __args__['warehouseId'] = warehouse_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getAlertV2:getAlertV2', __args__, opts=opts, typ=GetAlertV2Result).value

    return AwaitableGetAlertV2Result(
        create_time=pulumi.get(__ret__, 'create_time'),
        custom_description=pulumi.get(__ret__, 'custom_description'),
        custom_summary=pulumi.get(__ret__, 'custom_summary'),
        display_name=pulumi.get(__ret__, 'display_name'),
        evaluation=pulumi.get(__ret__, 'evaluation'),
        id=pulumi.get(__ret__, 'id'),
        lifecycle_state=pulumi.get(__ret__, 'lifecycle_state'),
        owner_user_name=pulumi.get(__ret__, 'owner_user_name'),
        parent_path=pulumi.get(__ret__, 'parent_path'),
        query_text=pulumi.get(__ret__, 'query_text'),
        run_as_user_name=pulumi.get(__ret__, 'run_as_user_name'),
        schedule=pulumi.get(__ret__, 'schedule'),
        update_time=pulumi.get(__ret__, 'update_time'),
        warehouse_id=pulumi.get(__ret__, 'warehouse_id'))
def get_alert_v2_output(custom_description: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        custom_summary: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        display_name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        evaluation: Optional[pulumi.Input[Optional[Union['GetAlertV2EvaluationArgs', 'GetAlertV2EvaluationArgsDict']]]] = None,
                        parent_path: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        query_text: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        schedule: Optional[pulumi.Input[Optional[Union['GetAlertV2ScheduleArgs', 'GetAlertV2ScheduleArgsDict']]]] = None,
                        warehouse_id: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertV2Result]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['customDescription'] = custom_description
    __args__['customSummary'] = custom_summary
    __args__['displayName'] = display_name
    __args__['evaluation'] = evaluation
    __args__['parentPath'] = parent_path
    __args__['queryText'] = query_text
    __args__['schedule'] = schedule
    __args__['warehouseId'] = warehouse_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getAlertV2:getAlertV2', __args__, opts=opts, typ=GetAlertV2Result)
    return __ret__.apply(lambda __response__: GetAlertV2Result(
        create_time=pulumi.get(__response__, 'create_time'),
        custom_description=pulumi.get(__response__, 'custom_description'),
        custom_summary=pulumi.get(__response__, 'custom_summary'),
        display_name=pulumi.get(__response__, 'display_name'),
        evaluation=pulumi.get(__response__, 'evaluation'),
        id=pulumi.get(__response__, 'id'),
        lifecycle_state=pulumi.get(__response__, 'lifecycle_state'),
        owner_user_name=pulumi.get(__response__, 'owner_user_name'),
        parent_path=pulumi.get(__response__, 'parent_path'),
        query_text=pulumi.get(__response__, 'query_text'),
        run_as_user_name=pulumi.get(__response__, 'run_as_user_name'),
        schedule=pulumi.get(__response__, 'schedule'),
        update_time=pulumi.get(__response__, 'update_time'),
        warehouse_id=pulumi.get(__response__, 'warehouse_id')))
