# 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__ = ['PushProviderArgs', 'PushProvider']

@pulumi.input_type
class PushProviderArgs:
    def __init__(__self__, *,
                 provider_type: pulumi.Input[_builtins.str],
                 configuration: Optional[pulumi.Input['PushProviderConfigurationArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a PushProvider resource.
        :param pulumi.Input[_builtins.str] provider_type: The type of push provider. Valid values are `APNS` (Apple Push Notification Service) or `FCM` (Firebase Cloud Messaging).
        :param pulumi.Input['PushProviderConfigurationArgs'] configuration: Configuration block for the push provider. The configuration structure depends on the provider type.
        :param pulumi.Input[_builtins.str] name: The display name of the push provider.
        """
        pulumi.set(__self__, "provider_type", provider_type)
        if configuration is not None:
            pulumi.set(__self__, "configuration", configuration)
        if name is not None:
            pulumi.set(__self__, "name", name)

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

    @provider_type.setter
    def provider_type(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "provider_type", value)

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

    @configuration.setter
    def configuration(self, value: Optional[pulumi.Input['PushProviderConfigurationArgs']]):
        pulumi.set(self, "configuration", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)


@pulumi.input_type
class _PushProviderState:
    def __init__(__self__, *,
                 configuration: Optional[pulumi.Input['PushProviderConfigurationArgs']] = None,
                 last_updated_date: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering PushProvider resources.
        :param pulumi.Input['PushProviderConfigurationArgs'] configuration: Configuration block for the push provider. The configuration structure depends on the provider type.
        :param pulumi.Input[_builtins.str] last_updated_date: Timestamp when the push provider was last modified. (Computed)
        :param pulumi.Input[_builtins.str] name: The display name of the push provider.
        :param pulumi.Input[_builtins.str] provider_type: The type of push provider. Valid values are `APNS` (Apple Push Notification Service) or `FCM` (Firebase Cloud Messaging).
        """
        if configuration is not None:
            pulumi.set(__self__, "configuration", configuration)
        if last_updated_date is not None:
            pulumi.set(__self__, "last_updated_date", last_updated_date)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if provider_type is not None:
            pulumi.set(__self__, "provider_type", provider_type)

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

    @configuration.setter
    def configuration(self, value: Optional[pulumi.Input['PushProviderConfigurationArgs']]):
        pulumi.set(self, "configuration", value)

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

    @last_updated_date.setter
    def last_updated_date(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "last_updated_date", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

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

    @provider_type.setter
    def provider_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "provider_type", value)


@pulumi.type_token("okta:index/pushProvider:PushProvider")
class PushProvider(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 configuration: Optional[pulumi.Input[Union['PushProviderConfigurationArgs', 'PushProviderConfigurationArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages Okta Push Providers that provide a centralized integration platform to fetch and manage push provider configurations. Okta administrators can use these APIs to provide their push provider credentials, for example from APNs and FCM, so that Okta can send push notifications to their own custom app authenticator applications.

        ## Example Usage

        ### FCM Push Provider

        ```python
        import pulumi
        import pulumi_okta as okta

        fcm_example = okta.PushProvider("fcm_example",
            name="FCM Push Provider",
            provider_type="FCM",
            configuration={
                "fcm_configuration": {
                    "service_account_json": {
                        "type": "service_account",
                        "project_id": "my-firebase-project",
                        "private_key_id": "abc123def456",
                        "private_key": \"\"\"-----BEGIN PRIVATE KEY-----
        MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC...
        -----END PRIVATE KEY-----
        \"\"\",
                        "client_email": "firebase-adminsdk-abc123@my-firebase-project.iam.gserviceaccount.com",
                        "client_id": "123456789012345678901",
                        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
                        "token_uri": "https://oauth2.googleapis.com/token",
                        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
                        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-abc123%40my-firebase-project.iam.gserviceaccount.com",
                        "file_name": "service-account-key.json",
                    },
                },
            })
        ```

        ### APNS (Apple Push Notification Service) Push Provider

        ```python
        import pulumi
        import pulumi_okta as okta

        apns_example = okta.PushProvider("apns_example",
            name="APNS Push Provider",
            provider_type="APNS",
            configuration={
                "apns_configuration": {
                    "key_id": "ABC123DEFG",
                    "team_id": "DEF123GHIJ",
                    "token_signing_key": \"\"\"-----BEGIN PRIVATE KEY-----
        MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg...
        -----END PRIVATE KEY-----
        \"\"\",
                    "file_name": "AuthKey_ABC123DEFG.p8",
                },
            })
        ```

        ## Import

        Push providers can be imported using their ID:

        ```sh
        $ pulumi import okta:index/pushProvider:PushProvider example <push_provider_id>
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['PushProviderConfigurationArgs', 'PushProviderConfigurationArgsDict']] configuration: Configuration block for the push provider. The configuration structure depends on the provider type.
        :param pulumi.Input[_builtins.str] name: The display name of the push provider.
        :param pulumi.Input[_builtins.str] provider_type: The type of push provider. Valid values are `APNS` (Apple Push Notification Service) or `FCM` (Firebase Cloud Messaging).
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: PushProviderArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages Okta Push Providers that provide a centralized integration platform to fetch and manage push provider configurations. Okta administrators can use these APIs to provide their push provider credentials, for example from APNs and FCM, so that Okta can send push notifications to their own custom app authenticator applications.

        ## Example Usage

        ### FCM Push Provider

        ```python
        import pulumi
        import pulumi_okta as okta

        fcm_example = okta.PushProvider("fcm_example",
            name="FCM Push Provider",
            provider_type="FCM",
            configuration={
                "fcm_configuration": {
                    "service_account_json": {
                        "type": "service_account",
                        "project_id": "my-firebase-project",
                        "private_key_id": "abc123def456",
                        "private_key": \"\"\"-----BEGIN PRIVATE KEY-----
        MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC...
        -----END PRIVATE KEY-----
        \"\"\",
                        "client_email": "firebase-adminsdk-abc123@my-firebase-project.iam.gserviceaccount.com",
                        "client_id": "123456789012345678901",
                        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
                        "token_uri": "https://oauth2.googleapis.com/token",
                        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
                        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-abc123%40my-firebase-project.iam.gserviceaccount.com",
                        "file_name": "service-account-key.json",
                    },
                },
            })
        ```

        ### APNS (Apple Push Notification Service) Push Provider

        ```python
        import pulumi
        import pulumi_okta as okta

        apns_example = okta.PushProvider("apns_example",
            name="APNS Push Provider",
            provider_type="APNS",
            configuration={
                "apns_configuration": {
                    "key_id": "ABC123DEFG",
                    "team_id": "DEF123GHIJ",
                    "token_signing_key": \"\"\"-----BEGIN PRIVATE KEY-----
        MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg...
        -----END PRIVATE KEY-----
        \"\"\",
                    "file_name": "AuthKey_ABC123DEFG.p8",
                },
            })
        ```

        ## Import

        Push providers can be imported using their ID:

        ```sh
        $ pulumi import okta:index/pushProvider:PushProvider example <push_provider_id>
        ```

        :param str resource_name: The name of the resource.
        :param PushProviderArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(PushProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 configuration: Optional[pulumi.Input[Union['PushProviderConfigurationArgs', 'PushProviderConfigurationArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_type: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = PushProviderArgs.__new__(PushProviderArgs)

            __props__.__dict__["configuration"] = configuration
            __props__.__dict__["name"] = name
            if provider_type is None and not opts.urn:
                raise TypeError("Missing required property 'provider_type'")
            __props__.__dict__["provider_type"] = provider_type
            __props__.__dict__["last_updated_date"] = None
        super(PushProvider, __self__).__init__(
            'okta:index/pushProvider:PushProvider',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            configuration: Optional[pulumi.Input[Union['PushProviderConfigurationArgs', 'PushProviderConfigurationArgsDict']]] = None,
            last_updated_date: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            provider_type: Optional[pulumi.Input[_builtins.str]] = None) -> 'PushProvider':
        """
        Get an existing PushProvider resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['PushProviderConfigurationArgs', 'PushProviderConfigurationArgsDict']] configuration: Configuration block for the push provider. The configuration structure depends on the provider type.
        :param pulumi.Input[_builtins.str] last_updated_date: Timestamp when the push provider was last modified. (Computed)
        :param pulumi.Input[_builtins.str] name: The display name of the push provider.
        :param pulumi.Input[_builtins.str] provider_type: The type of push provider. Valid values are `APNS` (Apple Push Notification Service) or `FCM` (Firebase Cloud Messaging).
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PushProviderState.__new__(_PushProviderState)

        __props__.__dict__["configuration"] = configuration
        __props__.__dict__["last_updated_date"] = last_updated_date
        __props__.__dict__["name"] = name
        __props__.__dict__["provider_type"] = provider_type
        return PushProvider(resource_name, opts=opts, __props__=__props__)

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

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

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

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

