# 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__ = [
    'GetServerClientsResult',
    'AwaitableGetServerClientsResult',
    'get_server_clients',
    'get_server_clients_output',
]

@pulumi.output_type
class GetServerClientsResult:
    """
    A collection of values returned by getServerClients.
    """
    def __init__(__self__, auth_server_id=None, client_id=None, created=None, expires_at=None, id=None, issuer=None, last_updated=None, scopes=None, status=None, user_id=None):
        if auth_server_id and not isinstance(auth_server_id, str):
            raise TypeError("Expected argument 'auth_server_id' to be a str")
        pulumi.set(__self__, "auth_server_id", auth_server_id)
        if client_id and not isinstance(client_id, str):
            raise TypeError("Expected argument 'client_id' to be a str")
        pulumi.set(__self__, "client_id", client_id)
        if created and not isinstance(created, str):
            raise TypeError("Expected argument 'created' to be a str")
        pulumi.set(__self__, "created", created)
        if expires_at and not isinstance(expires_at, str):
            raise TypeError("Expected argument 'expires_at' to be a str")
        pulumi.set(__self__, "expires_at", expires_at)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if issuer and not isinstance(issuer, str):
            raise TypeError("Expected argument 'issuer' to be a str")
        pulumi.set(__self__, "issuer", issuer)
        if last_updated and not isinstance(last_updated, str):
            raise TypeError("Expected argument 'last_updated' to be a str")
        pulumi.set(__self__, "last_updated", last_updated)
        if scopes and not isinstance(scopes, list):
            raise TypeError("Expected argument 'scopes' to be a list")
        pulumi.set(__self__, "scopes", scopes)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if user_id and not isinstance(user_id, str):
            raise TypeError("Expected argument 'user_id' to be a str")
        pulumi.set(__self__, "user_id", user_id)

    @_builtins.property
    @pulumi.getter(name="authServerId")
    def auth_server_id(self) -> _builtins.str:
        """
        The ID of the authorization server.
        """
        return pulumi.get(self, "auth_server_id")

    @_builtins.property
    @pulumi.getter(name="clientId")
    def client_id(self) -> _builtins.str:
        """
        The client ID of the app.
        """
        return pulumi.get(self, "client_id")

    @_builtins.property
    @pulumi.getter
    def created(self) -> _builtins.str:
        """
        Timestamp when the object was created.
        """
        return pulumi.get(self, "created")

    @_builtins.property
    @pulumi.getter(name="expiresAt")
    def expires_at(self) -> _builtins.str:
        """
        Expiration time of the OAuth 2.0 Token.
        """
        return pulumi.get(self, "expires_at")

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

    @_builtins.property
    @pulumi.getter
    def issuer(self) -> _builtins.str:
        """
        The complete URL of the authorization server that issued the Token
        """
        return pulumi.get(self, "issuer")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> _builtins.str:
        """
        Timestamp when the object was last updated.
        """
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter
    def scopes(self) -> Sequence[_builtins.str]:
        """
        The scope names attached to the Token.
        """
        return pulumi.get(self, "scopes")

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.str:
        """
        The status URI of the OAuth 2.0 application.
        """
        return pulumi.get(self, "status")

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> _builtins.str:
        """
        The ID of the user associated with the Token.
        """
        return pulumi.get(self, "user_id")


class AwaitableGetServerClientsResult(GetServerClientsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetServerClientsResult(
            auth_server_id=self.auth_server_id,
            client_id=self.client_id,
            created=self.created,
            expires_at=self.expires_at,
            id=self.id,
            issuer=self.issuer,
            last_updated=self.last_updated,
            scopes=self.scopes,
            status=self.status,
            user_id=self.user_id)


def get_server_clients(auth_server_id: Optional[_builtins.str] = None,
                       client_id: Optional[_builtins.str] = None,
                       id: Optional[_builtins.str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServerClientsResult:
    """
    Get OAuth 2.0 refresh token information for an authorization server client from Okta.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.auth.get_server_clients(id="oar123456abcdefghijklm",
        auth_server_id="aus123456abcdefghijklm",
        client_id="0oa123456abcdefghijklm")
    ```


    :param _builtins.str auth_server_id: The ID of the authorization server.
    :param _builtins.str client_id: The client ID of the app.
    :param _builtins.str id: The ID of the token.
    """
    __args__ = dict()
    __args__['authServerId'] = auth_server_id
    __args__['clientId'] = client_id
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:auth/getServerClients:getServerClients', __args__, opts=opts, typ=GetServerClientsResult).value

    return AwaitableGetServerClientsResult(
        auth_server_id=pulumi.get(__ret__, 'auth_server_id'),
        client_id=pulumi.get(__ret__, 'client_id'),
        created=pulumi.get(__ret__, 'created'),
        expires_at=pulumi.get(__ret__, 'expires_at'),
        id=pulumi.get(__ret__, 'id'),
        issuer=pulumi.get(__ret__, 'issuer'),
        last_updated=pulumi.get(__ret__, 'last_updated'),
        scopes=pulumi.get(__ret__, 'scopes'),
        status=pulumi.get(__ret__, 'status'),
        user_id=pulumi.get(__ret__, 'user_id'))
def get_server_clients_output(auth_server_id: Optional[pulumi.Input[_builtins.str]] = None,
                              client_id: Optional[pulumi.Input[_builtins.str]] = None,
                              id: Optional[pulumi.Input[_builtins.str]] = None,
                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServerClientsResult]:
    """
    Get OAuth 2.0 refresh token information for an authorization server client from Okta.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.auth.get_server_clients(id="oar123456abcdefghijklm",
        auth_server_id="aus123456abcdefghijklm",
        client_id="0oa123456abcdefghijklm")
    ```


    :param _builtins.str auth_server_id: The ID of the authorization server.
    :param _builtins.str client_id: The client ID of the app.
    :param _builtins.str id: The ID of the token.
    """
    __args__ = dict()
    __args__['authServerId'] = auth_server_id
    __args__['clientId'] = client_id
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:auth/getServerClients:getServerClients', __args__, opts=opts, typ=GetServerClientsResult)
    return __ret__.apply(lambda __response__: GetServerClientsResult(
        auth_server_id=pulumi.get(__response__, 'auth_server_id'),
        client_id=pulumi.get(__response__, 'client_id'),
        created=pulumi.get(__response__, 'created'),
        expires_at=pulumi.get(__response__, 'expires_at'),
        id=pulumi.get(__response__, 'id'),
        issuer=pulumi.get(__response__, 'issuer'),
        last_updated=pulumi.get(__response__, 'last_updated'),
        scopes=pulumi.get(__response__, 'scopes'),
        status=pulumi.get(__response__, 'status'),
        user_id=pulumi.get(__response__, 'user_id')))
