# 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__ = [
    'GetEmailSmtpServerResult',
    'AwaitableGetEmailSmtpServerResult',
    'get_email_smtp_server',
    'get_email_smtp_server_output',
]

@pulumi.output_type
class GetEmailSmtpServerResult:
    """
    A collection of values returned by getEmailSmtpServer.
    """
    def __init__(__self__, alias=None, enabled=None, host=None, id=None, port=None, username=None):
        if alias and not isinstance(alias, str):
            raise TypeError("Expected argument 'alias' to be a str")
        pulumi.set(__self__, "alias", alias)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if host and not isinstance(host, str):
            raise TypeError("Expected argument 'host' to be a str")
        pulumi.set(__self__, "host", host)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if port and not isinstance(port, int):
            raise TypeError("Expected argument 'port' to be a int")
        pulumi.set(__self__, "port", port)
        if username and not isinstance(username, str):
            raise TypeError("Expected argument 'username' to be a str")
        pulumi.set(__self__, "username", username)

    @_builtins.property
    @pulumi.getter
    def alias(self) -> _builtins.str:
        """
        Human-readable name for SMTP server
        """
        return pulumi.get(self, "alias")

    @_builtins.property
    @pulumi.getter
    def enabled(self) -> _builtins.bool:
        """
        If true, routes all email traffic through the SMTP server.
        """
        return pulumi.get(self, "enabled")

    @_builtins.property
    @pulumi.getter
    def host(self) -> _builtins.str:
        """
        Hostname or IP address of the SMTP server
        """
        return pulumi.get(self, "host")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        ID of your SMTP server
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def port(self) -> _builtins.int:
        """
        The port number of the SMTP server
        """
        return pulumi.get(self, "port")

    @_builtins.property
    @pulumi.getter
    def username(self) -> _builtins.str:
        """
        Username used to access the SMTP server
        """
        return pulumi.get(self, "username")


class AwaitableGetEmailSmtpServerResult(GetEmailSmtpServerResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEmailSmtpServerResult(
            alias=self.alias,
            enabled=self.enabled,
            host=self.host,
            id=self.id,
            port=self.port,
            username=self.username)


def get_email_smtp_server(id: Optional[_builtins.str] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEmailSmtpServerResult:
    """
    Get existing SMTP email server configuration.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    smtp_server = okta.EmailSmtpServer("smtp_server",
        alias="CustomServer",
        host="192.168.160.1",
        port=8086,
        username="aUser",
        password="abcd")
    server_config = okta.get_email_smtp_server(id="id-of-your-smtp-server")
    ```


    :param _builtins.str id: ID of your SMTP server
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:index/getEmailSmtpServer:getEmailSmtpServer', __args__, opts=opts, typ=GetEmailSmtpServerResult).value

    return AwaitableGetEmailSmtpServerResult(
        alias=pulumi.get(__ret__, 'alias'),
        enabled=pulumi.get(__ret__, 'enabled'),
        host=pulumi.get(__ret__, 'host'),
        id=pulumi.get(__ret__, 'id'),
        port=pulumi.get(__ret__, 'port'),
        username=pulumi.get(__ret__, 'username'))
def get_email_smtp_server_output(id: Optional[pulumi.Input[_builtins.str]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEmailSmtpServerResult]:
    """
    Get existing SMTP email server configuration.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    smtp_server = okta.EmailSmtpServer("smtp_server",
        alias="CustomServer",
        host="192.168.160.1",
        port=8086,
        username="aUser",
        password="abcd")
    server_config = okta.get_email_smtp_server(id="id-of-your-smtp-server")
    ```


    :param _builtins.str id: ID of your SMTP server
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:index/getEmailSmtpServer:getEmailSmtpServer', __args__, opts=opts, typ=GetEmailSmtpServerResult)
    return __ret__.apply(lambda __response__: GetEmailSmtpServerResult(
        alias=pulumi.get(__response__, 'alias'),
        enabled=pulumi.get(__response__, 'enabled'),
        host=pulumi.get(__response__, 'host'),
        id=pulumi.get(__response__, 'id'),
        port=pulumi.get(__response__, 'port'),
        username=pulumi.get(__response__, 'username')))
