# 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
from . import outputs
from ._inputs import *

__all__ = [
    'GetFeaturesResult',
    'AwaitableGetFeaturesResult',
    'get_features',
    'get_features_output',
]

@pulumi.output_type
class GetFeaturesResult:
    """
    A collection of values returned by getFeatures.
    """
    def __init__(__self__, app_id=None, capabilities=None, description=None, id=None, name=None, status=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 capabilities and not isinstance(capabilities, dict):
            raise TypeError("Expected argument 'capabilities' to be a dict")
        pulumi.set(__self__, "capabilities", capabilities)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        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)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

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

    @_builtins.property
    @pulumi.getter
    def capabilities(self) -> Optional['outputs.GetFeaturesCapabilitiesResult']:
        """
        A block containing the feature capabilities configuration. See Capabilities below.
        """
        return pulumi.get(self, "capabilities")

    @_builtins.property
    @pulumi.getter
    def description(self) -> _builtins.str:
        """
        Description of the feature.
        """
        return pulumi.get(self, "description")

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

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

    @_builtins.property
    @pulumi.getter
    def status(self) -> _builtins.str:
        """
        (String) Status of the import schedule. Valid values are `ENABLED` or `DISABLED`.
        """
        return pulumi.get(self, "status")


class AwaitableGetFeaturesResult(GetFeaturesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetFeaturesResult(
            app_id=self.app_id,
            capabilities=self.capabilities,
            description=self.description,
            id=self.id,
            name=self.name,
            status=self.status)


def get_features(app_id: Optional[_builtins.str] = None,
                 capabilities: Optional[Union['GetFeaturesCapabilitiesArgs', 'GetFeaturesCapabilitiesArgsDict']] = None,
                 name: Optional[_builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFeaturesResult:
    """
    Retrieves a Feature object for an app.

    ## Example Usage

    ### Basic Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_features(app_id="0oarblaf7hWdLawNg1d7",
        name="INBOUND_PROVISIONING")
    ```

    ### User Provisioning Feature

    ```python
    import pulumi
    import pulumi_okta as okta

    user_provisioning = okta.app.get_features(app_id=example["id"],
        name="USER_PROVISIONING")
    pulumi.export("provisioningStatus", user_provisioning.status)
    pulumi.export("passwordSyncEnabled", user_provisioning.capabilities.update.password.status)
    ```

    ### Inbound Provisioning Feature

    ```python
    import pulumi
    import pulumi_okta as okta

    inbound_provisioning = okta.app.get_features(app_id=example["id"],
        name="INBOUND_PROVISIONING")
    pulumi.export("importScheduleStatus", inbound_provisioning.capabilities.import_settings.schedule.status)
    pulumi.export("autoActivateUsers", inbound_provisioning.capabilities.import_rules.user_create_and_match.auto_activate_new_users)
    ```


    :param _builtins.str app_id: The ID of the application to retrieve features for.
    :param Union['GetFeaturesCapabilitiesArgs', 'GetFeaturesCapabilitiesArgsDict'] capabilities: A block containing the feature capabilities configuration. See Capabilities below.
    :param _builtins.str name: The name of the feature to retrieve. Valid values include:
           * `USER_PROVISIONING` - User profiles are pushed from Okta to the third-party app.
           * `INBOUND_PROVISIONING` - User profiles are imported from the third-party app into Okta.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['capabilities'] = capabilities
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:app/getFeatures:getFeatures', __args__, opts=opts, typ=GetFeaturesResult).value

    return AwaitableGetFeaturesResult(
        app_id=pulumi.get(__ret__, 'app_id'),
        capabilities=pulumi.get(__ret__, 'capabilities'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        status=pulumi.get(__ret__, 'status'))
def get_features_output(app_id: Optional[pulumi.Input[_builtins.str]] = None,
                        capabilities: Optional[pulumi.Input[Optional[Union['GetFeaturesCapabilitiesArgs', 'GetFeaturesCapabilitiesArgsDict']]]] = None,
                        name: Optional[pulumi.Input[_builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFeaturesResult]:
    """
    Retrieves a Feature object for an app.

    ## Example Usage

    ### Basic Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_features(app_id="0oarblaf7hWdLawNg1d7",
        name="INBOUND_PROVISIONING")
    ```

    ### User Provisioning Feature

    ```python
    import pulumi
    import pulumi_okta as okta

    user_provisioning = okta.app.get_features(app_id=example["id"],
        name="USER_PROVISIONING")
    pulumi.export("provisioningStatus", user_provisioning.status)
    pulumi.export("passwordSyncEnabled", user_provisioning.capabilities.update.password.status)
    ```

    ### Inbound Provisioning Feature

    ```python
    import pulumi
    import pulumi_okta as okta

    inbound_provisioning = okta.app.get_features(app_id=example["id"],
        name="INBOUND_PROVISIONING")
    pulumi.export("importScheduleStatus", inbound_provisioning.capabilities.import_settings.schedule.status)
    pulumi.export("autoActivateUsers", inbound_provisioning.capabilities.import_rules.user_create_and_match.auto_activate_new_users)
    ```


    :param _builtins.str app_id: The ID of the application to retrieve features for.
    :param Union['GetFeaturesCapabilitiesArgs', 'GetFeaturesCapabilitiesArgsDict'] capabilities: A block containing the feature capabilities configuration. See Capabilities below.
    :param _builtins.str name: The name of the feature to retrieve. Valid values include:
           * `USER_PROVISIONING` - User profiles are pushed from Okta to the third-party app.
           * `INBOUND_PROVISIONING` - User profiles are imported from the third-party app into Okta.
    """
    __args__ = dict()
    __args__['appId'] = app_id
    __args__['capabilities'] = capabilities
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:app/getFeatures:getFeatures', __args__, opts=opts, typ=GetFeaturesResult)
    return __ret__.apply(lambda __response__: GetFeaturesResult(
        app_id=pulumi.get(__response__, 'app_id'),
        capabilities=pulumi.get(__response__, 'capabilities'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        status=pulumi.get(__response__, 'status')))
