# 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__ = [
    'GetPushProviderResult',
    'AwaitableGetPushProviderResult',
    'get_push_provider',
    'get_push_provider_output',
]

@pulumi.output_type
class GetPushProviderResult:
    """
    A collection of values returned by getPushProvider.
    """
    def __init__(__self__, configuration=None, id=None, last_updated_date=None, name=None, provider_type=None):
        if configuration and not isinstance(configuration, dict):
            raise TypeError("Expected argument 'configuration' to be a dict")
        pulumi.set(__self__, "configuration", configuration)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_updated_date and not isinstance(last_updated_date, str):
            raise TypeError("Expected argument 'last_updated_date' to be a str")
        pulumi.set(__self__, "last_updated_date", last_updated_date)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if provider_type and not isinstance(provider_type, str):
            raise TypeError("Expected argument 'provider_type' to be a str")
        pulumi.set(__self__, "provider_type", provider_type)

    @_builtins.property
    @pulumi.getter
    def configuration(self) -> Optional['outputs.GetPushProviderConfigurationResult']:
        """
        Configuration details for the push provider. The structure depends on the provider type.
        """
        return pulumi.get(self, "configuration")

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

    @_builtins.property
    @pulumi.getter(name="lastUpdatedDate")
    def last_updated_date(self) -> _builtins.str:
        """
        Timestamp when the push provider was last modified.
        """
        return pulumi.get(self, "last_updated_date")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        The display name of the push provider.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="providerType")
    def provider_type(self) -> _builtins.str:
        """
        The type of push provider. Values are `APNS` (Apple Push Notification Service) or `FCM` (Firebase Cloud Messaging).
        """
        return pulumi.get(self, "provider_type")


class AwaitableGetPushProviderResult(GetPushProviderResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPushProviderResult(
            configuration=self.configuration,
            id=self.id,
            last_updated_date=self.last_updated_date,
            name=self.name,
            provider_type=self.provider_type)


def get_push_provider(configuration: Optional[Union['GetPushProviderConfigurationArgs', 'GetPushProviderConfigurationArgsDict']] = None,
                      id: Optional[_builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPushProviderResult:
    """
    Retrieves information about an Okta Push Provider configuration. This data source allows you to fetch details about existing push providers for Apple Push Notification Service (APNS) and Firebase Cloud Messaging (FCM).

    ## Example Usage

    ### Retrieve an APNS Push Provider

    ```python
    import pulumi
    import pulumi_okta as okta

    apns_example = okta.get_push_provider(id="ppc1234567890abcdef")
    pulumi.export("apnsProviderName", apns_example.name)
    pulumi.export("apnsKeyId", apns_example.configuration.apns_configuration.key_id)
    ```

    ### Retrieve an FCM Push Provider

    ```python
    import pulumi
    import pulumi_okta as okta

    fcm_example = okta.get_push_provider(id="ppc0987654321fedcba")
    pulumi.export("fcmProviderName", fcm_example.name)
    pulumi.export("fcmProjectId", fcm_example.configuration.fcm_configuration.service_account_json.project_id)
    ```


    :param Union['GetPushProviderConfigurationArgs', 'GetPushProviderConfigurationArgsDict'] configuration: Configuration details for the push provider. The structure depends on the provider type.
    :param _builtins.str id: The unique identifier of the push provider to retrieve.
    """
    __args__ = dict()
    __args__['configuration'] = configuration
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('okta:index/getPushProvider:getPushProvider', __args__, opts=opts, typ=GetPushProviderResult).value

    return AwaitableGetPushProviderResult(
        configuration=pulumi.get(__ret__, 'configuration'),
        id=pulumi.get(__ret__, 'id'),
        last_updated_date=pulumi.get(__ret__, 'last_updated_date'),
        name=pulumi.get(__ret__, 'name'),
        provider_type=pulumi.get(__ret__, 'provider_type'))
def get_push_provider_output(configuration: Optional[pulumi.Input[Optional[Union['GetPushProviderConfigurationArgs', 'GetPushProviderConfigurationArgsDict']]]] = None,
                             id: Optional[pulumi.Input[_builtins.str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPushProviderResult]:
    """
    Retrieves information about an Okta Push Provider configuration. This data source allows you to fetch details about existing push providers for Apple Push Notification Service (APNS) and Firebase Cloud Messaging (FCM).

    ## Example Usage

    ### Retrieve an APNS Push Provider

    ```python
    import pulumi
    import pulumi_okta as okta

    apns_example = okta.get_push_provider(id="ppc1234567890abcdef")
    pulumi.export("apnsProviderName", apns_example.name)
    pulumi.export("apnsKeyId", apns_example.configuration.apns_configuration.key_id)
    ```

    ### Retrieve an FCM Push Provider

    ```python
    import pulumi
    import pulumi_okta as okta

    fcm_example = okta.get_push_provider(id="ppc0987654321fedcba")
    pulumi.export("fcmProviderName", fcm_example.name)
    pulumi.export("fcmProjectId", fcm_example.configuration.fcm_configuration.service_account_json.project_id)
    ```


    :param Union['GetPushProviderConfigurationArgs', 'GetPushProviderConfigurationArgsDict'] configuration: Configuration details for the push provider. The structure depends on the provider type.
    :param _builtins.str id: The unique identifier of the push provider to retrieve.
    """
    __args__ = dict()
    __args__['configuration'] = configuration
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('okta:index/getPushProvider:getPushProvider', __args__, opts=opts, typ=GetPushProviderResult)
    return __ret__.apply(lambda __response__: GetPushProviderResult(
        configuration=pulumi.get(__response__, 'configuration'),
        id=pulumi.get(__response__, 'id'),
        last_updated_date=pulumi.get(__response__, 'last_updated_date'),
        name=pulumi.get(__response__, 'name'),
        provider_type=pulumi.get(__response__, 'provider_type')))
