# 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__ = [
    'GetSubjectConfigResult',
    'AwaitableGetSubjectConfigResult',
    'get_subject_config',
    'get_subject_config_output',
]

@pulumi.output_type
class GetSubjectConfigResult:
    """
    A collection of values returned by getSubjectConfig.
    """
    def __init__(__self__, alias=None, compatibility_group=None, compatibility_level=None, credentials=None, id=None, normalize=None, rest_endpoint=None, schema_registry_cluster=None, subject_name=None):
        if alias and not isinstance(alias, str):
            raise TypeError("Expected argument 'alias' to be a str")
        pulumi.set(__self__, "alias", alias)
        if compatibility_group and not isinstance(compatibility_group, str):
            raise TypeError("Expected argument 'compatibility_group' to be a str")
        pulumi.set(__self__, "compatibility_group", compatibility_group)
        if compatibility_level and not isinstance(compatibility_level, str):
            raise TypeError("Expected argument 'compatibility_level' to be a str")
        pulumi.set(__self__, "compatibility_level", compatibility_level)
        if credentials and not isinstance(credentials, dict):
            raise TypeError("Expected argument 'credentials' to be a dict")
        pulumi.set(__self__, "credentials", credentials)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if normalize and not isinstance(normalize, bool):
            raise TypeError("Expected argument 'normalize' to be a bool")
        pulumi.set(__self__, "normalize", normalize)
        if rest_endpoint and not isinstance(rest_endpoint, str):
            raise TypeError("Expected argument 'rest_endpoint' to be a str")
        pulumi.set(__self__, "rest_endpoint", rest_endpoint)
        if schema_registry_cluster and not isinstance(schema_registry_cluster, dict):
            raise TypeError("Expected argument 'schema_registry_cluster' to be a dict")
        pulumi.set(__self__, "schema_registry_cluster", schema_registry_cluster)
        if subject_name and not isinstance(subject_name, str):
            raise TypeError("Expected argument 'subject_name' to be a str")
        pulumi.set(__self__, "subject_name", subject_name)

    @_builtins.property
    @pulumi.getter
    def alias(self) -> _builtins.str:
        """
        (Optional String) The subject name that this subject is an alias for.
        """
        return pulumi.get(self, "alias")

    @_builtins.property
    @pulumi.getter(name="compatibilityGroup")
    def compatibility_group(self) -> _builtins.str:
        """
        (Optional String) The Compatibility Group of the specified subject.
        """
        return pulumi.get(self, "compatibility_group")

    @_builtins.property
    @pulumi.getter(name="compatibilityLevel")
    def compatibility_level(self) -> _builtins.str:
        """
        (Optional String) The Compatibility Level of the specified subject. Accepted values are: `BACKWARD`, `BACKWARD_TRANSITIVE`, `FORWARD`, `FORWARD_TRANSITIVE`, `FULL`, `FULL_TRANSITIVE`, and `NONE`. See the [Compatibility Types](https://docs.confluent.io/platform/current/schema-registry/avro.html#compatibility-types) for more details.
        """
        return pulumi.get(self, "compatibility_level")

    @_builtins.property
    @pulumi.getter
    def credentials(self) -> Optional['outputs.GetSubjectConfigCredentialsResult']:
        return pulumi.get(self, "credentials")

    @_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
    def normalize(self) -> _builtins.bool:
        """
        (Optional Boolean) Whether schemas are automatically normalized when registered or passed during lookups.
        """
        return pulumi.get(self, "normalize")

    @_builtins.property
    @pulumi.getter(name="restEndpoint")
    def rest_endpoint(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "rest_endpoint")

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

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


class AwaitableGetSubjectConfigResult(GetSubjectConfigResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSubjectConfigResult(
            alias=self.alias,
            compatibility_group=self.compatibility_group,
            compatibility_level=self.compatibility_level,
            credentials=self.credentials,
            id=self.id,
            normalize=self.normalize,
            rest_endpoint=self.rest_endpoint,
            schema_registry_cluster=self.schema_registry_cluster,
            subject_name=self.subject_name)


def get_subject_config(credentials: Optional[Union['GetSubjectConfigCredentialsArgs', 'GetSubjectConfigCredentialsArgsDict']] = None,
                       rest_endpoint: Optional[_builtins.str] = None,
                       schema_registry_cluster: Optional[Union['GetSubjectConfigSchemaRegistryClusterArgs', 'GetSubjectConfigSchemaRegistryClusterArgsDict']] = None,
                       subject_name: Optional[_builtins.str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSubjectConfigResult:
    """
    [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    `confluent_subject_compatibility_level` describes a Subject Config data source.

    ## Example Usage

    ### Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack

    ```python
    import pulumi
    import pulumi_confluent as confluent

    example = confluent.index.subject_compatibility_level(schema_registry_cluster=[{
            "id": essentials["id"],
        }],
        rest_endpoint=essentials["restEndpoint"],
        subject_name="proto-purchase-value",
        credentials=[{
            "key": "<Schema Registry API Key for confluent_schema_registry_region.essentials>",
            "secret": "<Schema Registry API Secret for confluent_schema_registry_region.essentials>",
        }])
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    ```

    ### Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack

    ```python
    import pulumi
    import pulumi_confluent as confluent

    example = confluent.index.subject_compatibility_level(subject_name="proto-purchase-value")
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    ```


    :param _builtins.str rest_endpoint: The REST endpoint of the Schema Registry cluster, for example, `https://psrc-00000.us-central1.gcp.confluent.cloud:443`).
    :param _builtins.str subject_name: The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, `test-subject`.
    """
    __args__ = dict()
    __args__['credentials'] = credentials
    __args__['restEndpoint'] = rest_endpoint
    __args__['schemaRegistryCluster'] = schema_registry_cluster
    __args__['subjectName'] = subject_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('confluentcloud:index/getSubjectConfig:getSubjectConfig', __args__, opts=opts, typ=GetSubjectConfigResult).value

    return AwaitableGetSubjectConfigResult(
        alias=pulumi.get(__ret__, 'alias'),
        compatibility_group=pulumi.get(__ret__, 'compatibility_group'),
        compatibility_level=pulumi.get(__ret__, 'compatibility_level'),
        credentials=pulumi.get(__ret__, 'credentials'),
        id=pulumi.get(__ret__, 'id'),
        normalize=pulumi.get(__ret__, 'normalize'),
        rest_endpoint=pulumi.get(__ret__, 'rest_endpoint'),
        schema_registry_cluster=pulumi.get(__ret__, 'schema_registry_cluster'),
        subject_name=pulumi.get(__ret__, 'subject_name'))
def get_subject_config_output(credentials: Optional[pulumi.Input[Optional[Union['GetSubjectConfigCredentialsArgs', 'GetSubjectConfigCredentialsArgsDict']]]] = None,
                              rest_endpoint: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                              schema_registry_cluster: Optional[pulumi.Input[Optional[Union['GetSubjectConfigSchemaRegistryClusterArgs', 'GetSubjectConfigSchemaRegistryClusterArgsDict']]]] = None,
                              subject_name: Optional[pulumi.Input[_builtins.str]] = None,
                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSubjectConfigResult]:
    """
    [![General Availability](https://img.shields.io/badge/Lifecycle%20Stage-General%20Availability-%2345c6e8)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    `confluent_subject_compatibility_level` describes a Subject Config data source.

    ## Example Usage

    ### Option #1: Manage multiple Schema Registry clusters in the same Pulumi Stack

    ```python
    import pulumi
    import pulumi_confluent as confluent

    example = confluent.index.subject_compatibility_level(schema_registry_cluster=[{
            "id": essentials["id"],
        }],
        rest_endpoint=essentials["restEndpoint"],
        subject_name="proto-purchase-value",
        credentials=[{
            "key": "<Schema Registry API Key for confluent_schema_registry_region.essentials>",
            "secret": "<Schema Registry API Secret for confluent_schema_registry_region.essentials>",
        }])
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    ```

    ### Option #2: Manage a single Schema Registry cluster in the same Pulumi Stack

    ```python
    import pulumi
    import pulumi_confluent as confluent

    example = confluent.index.subject_compatibility_level(subject_name="proto-purchase-value")
    pulumi.export("compatibilityLevel", example["compatibilityLevel"])
    ```


    :param _builtins.str rest_endpoint: The REST endpoint of the Schema Registry cluster, for example, `https://psrc-00000.us-central1.gcp.confluent.cloud:443`).
    :param _builtins.str subject_name: The name of the subject (in other words, the namespace), representing the subject under which the schema will be registered, for example, `test-subject`.
    """
    __args__ = dict()
    __args__['credentials'] = credentials
    __args__['restEndpoint'] = rest_endpoint
    __args__['schemaRegistryCluster'] = schema_registry_cluster
    __args__['subjectName'] = subject_name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('confluentcloud:index/getSubjectConfig:getSubjectConfig', __args__, opts=opts, typ=GetSubjectConfigResult)
    return __ret__.apply(lambda __response__: GetSubjectConfigResult(
        alias=pulumi.get(__response__, 'alias'),
        compatibility_group=pulumi.get(__response__, 'compatibility_group'),
        compatibility_level=pulumi.get(__response__, 'compatibility_level'),
        credentials=pulumi.get(__response__, 'credentials'),
        id=pulumi.get(__response__, 'id'),
        normalize=pulumi.get(__response__, 'normalize'),
        rest_endpoint=pulumi.get(__response__, 'rest_endpoint'),
        schema_registry_cluster=pulumi.get(__response__, 'schema_registry_cluster'),
        subject_name=pulumi.get(__response__, 'subject_name')))
