# 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__ = [
    'GetFederatedClaimResult',
    'AwaitableGetFederatedClaimResult',
    'get_federated_claim',
    'get_federated_claim_output',
]

@pulumi.output_type
class GetFederatedClaimResult:
    """
    A collection of values returned by getFederatedClaim.
    """
    def __init__(__self__, app_id=None, expression=None, id=None, name=None):
        if app_id and not isinstance(app_id, str):
            raise TypeError("Expected argument 'app_id' to be a str")
        pulumi.set(__self__, "app_id", app_id)
        if expression and not isinstance(expression, str):
            raise TypeError("Expected argument 'expression' to be a str")
        pulumi.set(__self__, "expression", expression)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        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(name="appId")
    def app_id(self) -> _builtins.str:
        """
        The ID of the application that the federated claim belongs to.
        """
        return pulumi.get(self, "app_id")

    @_builtins.property
    @pulumi.getter
    def expression(self) -> _builtins.str:
        """
        The Okta Expression Language expression to be evaluated at runtime.
        """
        return pulumi.get(self, "expression")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier for the federated claim.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        The name of the claim to be used in the produced token.
        """
        return pulumi.get(self, "name")


class AwaitableGetFederatedClaimResult(GetFederatedClaimResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetFederatedClaimResult(
            app_id=self.app_id,
            expression=self.expression,
            id=self.id,
            name=self.name)


def get_federated_claim(app_id: Optional[_builtins.str] = None,
                        id: Optional[_builtins.str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFederatedClaimResult:
    """
    Get a federated claim for an Okta application.

    Use this data source to retrieve information about a federated claim that has been configured for an application. Federated claims add custom claims to tokens produced for an application using Okta Expression Language.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_federated_claim(app_id="0oa1234567890abcdef",
        id="ofcu234567890abcdef")
    pulumi.export("claimExpression", example.expression)
    ```

    ### Using with a Resource

    ```python
    import pulumi
    import pulumi_okta as okta

    test_app = okta.app.Saml("test_app",
        label="example",
        sso_url="https://example.com",
        recipient="https://example.com",
        destination="https://example.com",
        audience="https://example.com/audience",
        subject_name_id_template="${user.userName}",
        subject_name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
        response_signed=True,
        signature_algorithm="RSA_SHA256",
        digest_algorithm="SHA256")
    example_federated_claim = okta.app.FederatedClaim("example",
        app_id=test_app.id,
        name="role_last_name",
        expression="user.profile.lastName")
    example = okta.app.get_federated_claim_output(app_id=test_app.id,
        id=example_federated_claim.id)
    pulumi.export("claimName", example.name)
    pulumi.export("claimExpression", example.expression)
    ```


    :param _builtins.str app_id: The ID of the application that the federated claim belongs to.
    :param _builtins.str id: The unique identifier for the federated claim.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:app/getFederatedClaim:getFederatedClaim', __args__, opts=opts, typ=GetFederatedClaimResult).value

    return AwaitableGetFederatedClaimResult(
        app_id=pulumi.get(__ret__, 'app_id'),
        expression=pulumi.get(__ret__, 'expression'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'))
def get_federated_claim_output(app_id: Optional[pulumi.Input[_builtins.str]] = None,
                               id: Optional[pulumi.Input[_builtins.str]] = None,
                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFederatedClaimResult]:
    """
    Get a federated claim for an Okta application.

    Use this data source to retrieve information about a federated claim that has been configured for an application. Federated claims add custom claims to tokens produced for an application using Okta Expression Language.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_federated_claim(app_id="0oa1234567890abcdef",
        id="ofcu234567890abcdef")
    pulumi.export("claimExpression", example.expression)
    ```

    ### Using with a Resource

    ```python
    import pulumi
    import pulumi_okta as okta

    test_app = okta.app.Saml("test_app",
        label="example",
        sso_url="https://example.com",
        recipient="https://example.com",
        destination="https://example.com",
        audience="https://example.com/audience",
        subject_name_id_template="${user.userName}",
        subject_name_id_format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
        response_signed=True,
        signature_algorithm="RSA_SHA256",
        digest_algorithm="SHA256")
    example_federated_claim = okta.app.FederatedClaim("example",
        app_id=test_app.id,
        name="role_last_name",
        expression="user.profile.lastName")
    example = okta.app.get_federated_claim_output(app_id=test_app.id,
        id=example_federated_claim.id)
    pulumi.export("claimName", example.name)
    pulumi.export("claimExpression", example.expression)
    ```


    :param _builtins.str app_id: The ID of the application that the federated claim belongs to.
    :param _builtins.str id: The unique identifier for the federated claim.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:app/getFederatedClaim:getFederatedClaim', __args__, opts=opts, typ=GetFederatedClaimResult)
    return __ret__.apply(lambda __response__: GetFederatedClaimResult(
        app_id=pulumi.get(__response__, 'app_id'),
        expression=pulumi.get(__response__, 'expression'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name')))
