# 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__ = [
    'GetConnectionResult',
    'AwaitableGetConnectionResult',
    'get_connection',
    'get_connection_output',
]

@pulumi.output_type
class GetConnectionResult:
    """
    A collection of values returned by getConnection.
    """
    def __init__(__self__, auth_scheme=None, base_url=None, id=None, profile=None, status=None):
        if auth_scheme and not isinstance(auth_scheme, str):
            raise TypeError("Expected argument 'auth_scheme' to be a str")
        pulumi.set(__self__, "auth_scheme", auth_scheme)
        if base_url and not isinstance(base_url, str):
            raise TypeError("Expected argument 'base_url' to be a str")
        pulumi.set(__self__, "base_url", base_url)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if profile and not isinstance(profile, dict):
            raise TypeError("Expected argument 'profile' to be a dict")
        pulumi.set(__self__, "profile", profile)
        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="authScheme")
    def auth_scheme(self) -> _builtins.str:
        """
        A token is used to authenticate with the app. This property is only returned for the TOKEN authentication scheme.
        """
        return pulumi.get(self, "auth_scheme")

    @_builtins.property
    @pulumi.getter(name="baseUrl")
    def base_url(self) -> _builtins.str:
        """
        The base URL for the provisioning connection.
        """
        return pulumi.get(self, "base_url")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The application ID for which to retrieve the provisioning connection information.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def profile(self) -> Optional['outputs.GetConnectionProfileResult']:
        """
        Profile information for the app connection.
        """
        return pulumi.get(self, "profile")

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


class AwaitableGetConnectionResult(GetConnectionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetConnectionResult(
            auth_scheme=self.auth_scheme,
            base_url=self.base_url,
            id=self.id,
            profile=self.profile,
            status=self.status)


def get_connection(auth_scheme: Optional[_builtins.str] = None,
                   base_url: Optional[_builtins.str] = None,
                   id: Optional[_builtins.str] = None,
                   profile: Optional[Union['GetConnectionProfileArgs', 'GetConnectionProfileArgsDict']] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetConnectionResult:
    """
    Retrieves the default provisioning connection for an app.

    ## Example Usage

    ### Basic Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_connection(id="0oa1234567890abcdef")
    pulumi.export("connectionStatus", example.status)
    ```


    :param _builtins.str auth_scheme: A token is used to authenticate with the app. This property is only returned for the TOKEN authentication scheme.
    :param _builtins.str base_url: The base URL for the provisioning connection.
    :param _builtins.str id: The application ID for which to retrieve the provisioning connection information.
    :param Union['GetConnectionProfileArgs', 'GetConnectionProfileArgsDict'] profile: Profile information for the app connection.
    """
    __args__ = dict()
    __args__['authScheme'] = auth_scheme
    __args__['baseUrl'] = base_url
    __args__['id'] = id
    __args__['profile'] = profile
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:app/getConnection:getConnection', __args__, opts=opts, typ=GetConnectionResult).value

    return AwaitableGetConnectionResult(
        auth_scheme=pulumi.get(__ret__, 'auth_scheme'),
        base_url=pulumi.get(__ret__, 'base_url'),
        id=pulumi.get(__ret__, 'id'),
        profile=pulumi.get(__ret__, 'profile'),
        status=pulumi.get(__ret__, 'status'))
def get_connection_output(auth_scheme: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          base_url: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                          id: Optional[pulumi.Input[_builtins.str]] = None,
                          profile: Optional[pulumi.Input[Optional[Union['GetConnectionProfileArgs', 'GetConnectionProfileArgsDict']]]] = None,
                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetConnectionResult]:
    """
    Retrieves the default provisioning connection for an app.

    ## Example Usage

    ### Basic Usage

    ```python
    import pulumi
    import pulumi_okta as okta

    example = okta.app.get_connection(id="0oa1234567890abcdef")
    pulumi.export("connectionStatus", example.status)
    ```


    :param _builtins.str auth_scheme: A token is used to authenticate with the app. This property is only returned for the TOKEN authentication scheme.
    :param _builtins.str base_url: The base URL for the provisioning connection.
    :param _builtins.str id: The application ID for which to retrieve the provisioning connection information.
    :param Union['GetConnectionProfileArgs', 'GetConnectionProfileArgsDict'] profile: Profile information for the app connection.
    """
    __args__ = dict()
    __args__['authScheme'] = auth_scheme
    __args__['baseUrl'] = base_url
    __args__['id'] = id
    __args__['profile'] = profile
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:app/getConnection:getConnection', __args__, opts=opts, typ=GetConnectionResult)
    return __ret__.apply(lambda __response__: GetConnectionResult(
        auth_scheme=pulumi.get(__response__, 'auth_scheme'),
        base_url=pulumi.get(__response__, 'base_url'),
        id=pulumi.get(__response__, 'id'),
        profile=pulumi.get(__response__, 'profile'),
        status=pulumi.get(__response__, 'status')))
