# 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__ = [
    'GetHookKeyResult',
    'AwaitableGetHookKeyResult',
    'get_hook_key',
    'get_hook_key_output',
]

@pulumi.output_type
class GetHookKeyResult:
    """
    A collection of values returned by getHookKey.
    """
    def __init__(__self__, created=None, id=None, is_used=None, key_id=None, last_updated=None, name=None):
        if created and not isinstance(created, str):
            raise TypeError("Expected argument 'created' to be a str")
        pulumi.set(__self__, "created", created)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_used and not isinstance(is_used, bool):
            raise TypeError("Expected argument 'is_used' to be a bool")
        pulumi.set(__self__, "is_used", is_used)
        if key_id and not isinstance(key_id, str):
            raise TypeError("Expected argument 'key_id' to be a str")
        pulumi.set(__self__, "key_id", key_id)
        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 name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)

    @_builtins.property
    @pulumi.getter
    def created(self) -> _builtins.str:
        """
        The date and time the Hook Key was created.
        """
        return pulumi.get(self, "created")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier of the Hook Key.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="isUsed")
    def is_used(self) -> _builtins.bool:
        """
        Whether the Hook Key is currently being used.
        """
        return pulumi.get(self, "is_used")

    @_builtins.property
    @pulumi.getter(name="keyId")
    def key_id(self) -> _builtins.str:
        """
        The alias of the public key that can be used to retrieve the public key data.
        """
        return pulumi.get(self, "key_id")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> _builtins.str:
        """
        The date and time the Hook Key was last updated.
        """
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        return pulumi.get(self, "name")


class AwaitableGetHookKeyResult(GetHookKeyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetHookKeyResult(
            created=self.created,
            id=self.id,
            is_used=self.is_used,
            key_id=self.key_id,
            last_updated=self.last_updated,
            name=self.name)


def get_hook_key(id: Optional[_builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHookKeyResult:
    """
    Use Key Management to create and manage JSON Web Keys (JWKS) that support OAuth 2.0 client authentication. The key is composed of a public and private key pair. The private key signs the JSON Web Token (JWT) and the public key validates it on the client side.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    # Get hook key by ID
    example = okta.get_hook_key(id="abcdefghij0123456789")
    ```


    :param _builtins.str id: The unique identifier of the Hook Key.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:index/getHookKey:getHookKey', __args__, opts=opts, typ=GetHookKeyResult).value

    return AwaitableGetHookKeyResult(
        created=pulumi.get(__ret__, 'created'),
        id=pulumi.get(__ret__, 'id'),
        is_used=pulumi.get(__ret__, 'is_used'),
        key_id=pulumi.get(__ret__, 'key_id'),
        last_updated=pulumi.get(__ret__, 'last_updated'),
        name=pulumi.get(__ret__, 'name'))
def get_hook_key_output(id: Optional[pulumi.Input[_builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHookKeyResult]:
    """
    Use Key Management to create and manage JSON Web Keys (JWKS) that support OAuth 2.0 client authentication. The key is composed of a public and private key pair. The private key signs the JSON Web Token (JWT) and the public key validates it on the client side.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    # Get hook key by ID
    example = okta.get_hook_key(id="abcdefghij0123456789")
    ```


    :param _builtins.str id: The unique identifier of the Hook Key.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:index/getHookKey:getHookKey', __args__, opts=opts, typ=GetHookKeyResult)
    return __ret__.apply(lambda __response__: GetHookKeyResult(
        created=pulumi.get(__response__, 'created'),
        id=pulumi.get(__response__, 'id'),
        is_used=pulumi.get(__response__, 'is_used'),
        key_id=pulumi.get(__response__, 'key_id'),
        last_updated=pulumi.get(__response__, 'last_updated'),
        name=pulumi.get(__response__, 'name')))
