# 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 as _builtins
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__ = [
    'GetRealmResult',
    'AwaitableGetRealmResult',
    'get_realm',
    'get_realm_output',
]

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The id of the Okta Realm.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="isDefault")
    def is_default(self) -> _builtins.bool:
        """
        Indicates whether the realm is the default realm.
        """
        return pulumi.get(self, "is_default")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        The name of the Okta Realm.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="realmType")
    def realm_type(self) -> Optional[_builtins.str]:
        """
        The realm type. Valid values: `PARTNER` and `DEFAULT`
        """
        return pulumi.get(self, "realm_type")


class AwaitableGetRealmResult(GetRealmResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetRealmResult(
            id=self.id,
            is_default=self.is_default,
            name=self.name,
            realm_type=self.realm_type)


def get_realm(id: Optional[_builtins.str] = None,
              name: Optional[_builtins.str] = None,
              realm_type: Optional[_builtins.str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRealmResult:
    """
    Get a realm from Okta.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example_name = okta.get_realm(name="Example Realm")
    example_id = okta.get_realm(id="<realm_id>")
    ```


    :param _builtins.str id: The id of the Okta Realm.
    :param _builtins.str name: The name of the Okta Realm.
    :param _builtins.str realm_type: The realm type. Valid values: `PARTNER` and `DEFAULT`
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['realmType'] = realm_type
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:index/getRealm:getRealm', __args__, opts=opts, typ=GetRealmResult).value

    return AwaitableGetRealmResult(
        id=pulumi.get(__ret__, 'id'),
        is_default=pulumi.get(__ret__, 'is_default'),
        name=pulumi.get(__ret__, 'name'),
        realm_type=pulumi.get(__ret__, 'realm_type'))
def get_realm_output(id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     realm_type: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRealmResult]:
    """
    Get a realm from Okta.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example_name = okta.get_realm(name="Example Realm")
    example_id = okta.get_realm(id="<realm_id>")
    ```


    :param _builtins.str id: The id of the Okta Realm.
    :param _builtins.str name: The name of the Okta Realm.
    :param _builtins.str realm_type: The realm type. Valid values: `PARTNER` and `DEFAULT`
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['realmType'] = realm_type
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:index/getRealm:getRealm', __args__, opts=opts, typ=GetRealmResult)
    return __ret__.apply(lambda __response__: GetRealmResult(
        id=pulumi.get(__response__, 'id'),
        is_default=pulumi.get(__response__, 'is_default'),
        name=pulumi.get(__response__, 'name'),
        realm_type=pulumi.get(__response__, 'realm_type')))
