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

__all__ = [
    'GetOnCallSlackChannelResult',
    'AwaitableGetOnCallSlackChannelResult',
    'get_on_call_slack_channel',
    'get_on_call_slack_channel_output',
]

warnings.warn("""grafana.index/getoncallslackchannel.getOnCallSlackChannel has been deprecated in favor of grafana.oncall/getslackchannel.getSlackChannel""", DeprecationWarning)

@pulumi.output_type
class GetOnCallSlackChannelResult:
    """
    A collection of values returned by getOnCallSlackChannel.
    """
    def __init__(__self__, id=None, name=None, slack_id=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if slack_id and not isinstance(slack_id, str):
            raise TypeError("Expected argument 'slack_id' to be a str")
        pulumi.set(__self__, "slack_id", slack_id)

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

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        The Slack channel name.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="slackId")
    def slack_id(self) -> builtins.str:
        """
        The Slack ID of the channel.
        """
        return pulumi.get(self, "slack_id")


class AwaitableGetOnCallSlackChannelResult(GetOnCallSlackChannelResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOnCallSlackChannelResult(
            id=self.id,
            name=self.name,
            slack_id=self.slack_id)


def get_on_call_slack_channel(name: Optional[builtins.str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOnCallSlackChannelResult:
    """
    * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/)

    ## Example Usage

    ```python
    import pulumi
    import pulumi_grafana as grafana

    example_slack_channel = grafana.onCall.get_slack_channel(name="example_slack_channel")
    ```


    :param builtins.str name: The Slack channel name.
    """
    pulumi.log.warn("""get_on_call_slack_channel is deprecated: grafana.index/getoncallslackchannel.getOnCallSlackChannel has been deprecated in favor of grafana.oncall/getslackchannel.getSlackChannel""")
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('grafana:index/getOnCallSlackChannel:getOnCallSlackChannel', __args__, opts=opts, typ=GetOnCallSlackChannelResult).value

    return AwaitableGetOnCallSlackChannelResult(
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        slack_id=pulumi.get(__ret__, 'slack_id'))
def get_on_call_slack_channel_output(name: Optional[pulumi.Input[builtins.str]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOnCallSlackChannelResult]:
    """
    * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/slack_channels/)

    ## Example Usage

    ```python
    import pulumi
    import pulumi_grafana as grafana

    example_slack_channel = grafana.onCall.get_slack_channel(name="example_slack_channel")
    ```


    :param builtins.str name: The Slack channel name.
    """
    pulumi.log.warn("""get_on_call_slack_channel is deprecated: grafana.index/getoncallslackchannel.getOnCallSlackChannel has been deprecated in favor of grafana.oncall/getslackchannel.getSlackChannel""")
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('grafana:index/getOnCallSlackChannel:getOnCallSlackChannel', __args__, opts=opts, typ=GetOnCallSlackChannelResult)
    return __ret__.apply(lambda __response__: GetOnCallSlackChannelResult(
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        slack_id=pulumi.get(__response__, 'slack_id')))
