# 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__ = [
    'GetAppsResult',
    'AwaitableGetAppsResult',
    'get_apps',
    'get_apps_output',
]

@pulumi.output_type
class GetAppsResult:
    """
    A collection of values returned by getApps.
    """
    def __init__(__self__, apps=None, id=None, provider_config=None):
        if apps and not isinstance(apps, list):
            raise TypeError("Expected argument 'apps' to be a list")
        pulumi.set(__self__, "apps", apps)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter
    def apps(self) -> Sequence['outputs.GetAppsAppResult']:
        return pulumi.get(self, "apps")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional['outputs.GetAppsProviderConfigResult']:
        return pulumi.get(self, "provider_config")


class AwaitableGetAppsResult(GetAppsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAppsResult(
            apps=self.apps,
            id=self.id,
            provider_config=self.provider_config)


def get_apps(provider_config: Optional[Union['GetAppsProviderConfigArgs', 'GetAppsProviderConfigArgsDict']] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAppsResult:
    """
    > This data source can only be used with a workspace-level provider!

    [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.

    This data source allows you to fetch information about all Databricks Apps within a workspace.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all_apps = databricks.get_apps()
    ```

    ## Related Resources

    The following resources are used in the same context:

    * App to manage [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html).
    * SqlEndpoint to manage Databricks SQL [Endpoints](https://docs.databricks.com/sql/admin/sql-endpoints.html).
    * ModelServing to serve this model on a Databricks serving endpoint.
    * Secret to manage [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace.
    * Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code.
    """
    __args__ = dict()
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getApps:getApps', __args__, opts=opts, typ=GetAppsResult).value

    return AwaitableGetAppsResult(
        apps=pulumi.get(__ret__, 'apps'),
        id=pulumi.get(__ret__, 'id'),
        provider_config=pulumi.get(__ret__, 'provider_config'))
def get_apps_output(provider_config: Optional[pulumi.Input[Optional[Union['GetAppsProviderConfigArgs', 'GetAppsProviderConfigArgsDict']]]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAppsResult]:
    """
    > This data source can only be used with a workspace-level provider!

    [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.

    This data source allows you to fetch information about all Databricks Apps within a workspace.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all_apps = databricks.get_apps()
    ```

    ## Related Resources

    The following resources are used in the same context:

    * App to manage [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html).
    * SqlEndpoint to manage Databricks SQL [Endpoints](https://docs.databricks.com/sql/admin/sql-endpoints.html).
    * ModelServing to serve this model on a Databricks serving endpoint.
    * Secret to manage [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace.
    * Job to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code.
    """
    __args__ = dict()
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getApps:getApps', __args__, opts=opts, typ=GetAppsResult)
    return __ret__.apply(lambda __response__: GetAppsResult(
        apps=pulumi.get(__response__, 'apps'),
        id=pulumi.get(__response__, 'id'),
        provider_config=pulumi.get(__response__, 'provider_config')))
