# 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

__all__ = [
    'GetSentryOrganizationResult',
    'AwaitableGetSentryOrganizationResult',
    'get_sentry_organization',
    'get_sentry_organization_output',
]

@pulumi.output_type
class GetSentryOrganizationResult:
    """
    A collection of values returned by getSentryOrganization.
    """
    def __init__(__self__, id=None, internal_id=None, name=None, slug=None):
        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 slug and not isinstance(slug, str):
            raise TypeError("Expected argument 'slug' to be a str")
        pulumi.set(__self__, "slug", slug)

    @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 organization.
        """
        return pulumi.get(self, "internal_id")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The human readable name for this organization.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def slug(self) -> str:
        """
        The unique URL slug for this organization.
        """
        return pulumi.get(self, "slug")


class AwaitableGetSentryOrganizationResult(GetSentryOrganizationResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSentryOrganizationResult(
            id=self.id,
            internal_id=self.internal_id,
            name=self.name,
            slug=self.slug)


def get_sentry_organization(slug: Optional[str] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSentryOrganizationResult:
    """
    Sentry Organization data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_sentry as sentry

    # Retrieve an organization
    org = sentry.get_sentry_organization(slug="my-organization")
    ```


    :param str slug: The unique URL slug for this organization.
    """
    __args__ = dict()
    __args__['slug'] = slug
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('sentry:index/getSentryOrganization:getSentryOrganization', __args__, opts=opts, typ=GetSentryOrganizationResult).value

    return AwaitableGetSentryOrganizationResult(
        id=pulumi.get(__ret__, 'id'),
        internal_id=pulumi.get(__ret__, 'internal_id'),
        name=pulumi.get(__ret__, 'name'),
        slug=pulumi.get(__ret__, 'slug'))
def get_sentry_organization_output(slug: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSentryOrganizationResult]:
    """
    Sentry Organization data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_sentry as sentry

    # Retrieve an organization
    org = sentry.get_sentry_organization(slug="my-organization")
    ```


    :param str slug: The unique URL slug for this organization.
    """
    __args__ = dict()
    __args__['slug'] = slug
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('sentry:index/getSentryOrganization:getSentryOrganization', __args__, opts=opts, typ=GetSentryOrganizationResult)
    return __ret__.apply(lambda __response__: GetSentryOrganizationResult(
        id=pulumi.get(__response__, 'id'),
        internal_id=pulumi.get(__response__, 'internal_id'),
        name=pulumi.get(__response__, 'name'),
        slug=pulumi.get(__response__, 'slug')))
