# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetKsqlClusterResult',
    'AwaitableGetKsqlClusterResult',
    'get_ksql_cluster',
    'get_ksql_cluster_output',
]

@pulumi.output_type
class GetKsqlClusterResult:
    """
    A collection of values returned by getKsqlCluster.
    """
    def __init__(__self__, api_version=None, credential_identities=None, csu=None, display_name=None, environment=None, id=None, kafka_clusters=None, kind=None, rest_endpoint=None, storage=None, topic_prefix=None, use_detailed_processing_log=None):
        if api_version and not isinstance(api_version, str):
            raise TypeError("Expected argument 'api_version' to be a str")
        pulumi.set(__self__, "api_version", api_version)
        if credential_identities and not isinstance(credential_identities, list):
            raise TypeError("Expected argument 'credential_identities' to be a list")
        pulumi.set(__self__, "credential_identities", credential_identities)
        if csu and not isinstance(csu, int):
            raise TypeError("Expected argument 'csu' to be a int")
        pulumi.set(__self__, "csu", csu)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if environment and not isinstance(environment, dict):
            raise TypeError("Expected argument 'environment' to be a dict")
        pulumi.set(__self__, "environment", environment)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if kafka_clusters and not isinstance(kafka_clusters, list):
            raise TypeError("Expected argument 'kafka_clusters' to be a list")
        pulumi.set(__self__, "kafka_clusters", kafka_clusters)
        if kind and not isinstance(kind, str):
            raise TypeError("Expected argument 'kind' to be a str")
        pulumi.set(__self__, "kind", kind)
        if rest_endpoint and not isinstance(rest_endpoint, str):
            raise TypeError("Expected argument 'rest_endpoint' to be a str")
        if rest_endpoint is not None:
            warnings.warn("""use rest_endpoint instead""", DeprecationWarning)
            pulumi.log.warn("""rest_endpoint is deprecated: use rest_endpoint instead""")

        pulumi.set(__self__, "rest_endpoint", rest_endpoint)
        if storage and not isinstance(storage, int):
            raise TypeError("Expected argument 'storage' to be a int")
        pulumi.set(__self__, "storage", storage)
        if topic_prefix and not isinstance(topic_prefix, str):
            raise TypeError("Expected argument 'topic_prefix' to be a str")
        pulumi.set(__self__, "topic_prefix", topic_prefix)
        if use_detailed_processing_log and not isinstance(use_detailed_processing_log, bool):
            raise TypeError("Expected argument 'use_detailed_processing_log' to be a bool")
        pulumi.set(__self__, "use_detailed_processing_log", use_detailed_processing_log)

    @property
    @pulumi.getter(name="apiVersion")
    def api_version(self) -> str:
        """
        (Required String) An API Version of the schema version of the ksqlDB cluster, for example, `ksqldbcm/v2`.
        """
        return pulumi.get(self, "api_version")

    @property
    @pulumi.getter(name="credentialIdentities")
    def credential_identities(self) -> Sequence['outputs.GetKsqlClusterCredentialIdentityResult']:
        return pulumi.get(self, "credential_identities")

    @property
    @pulumi.getter
    def csu(self) -> int:
        """
        (Required Number) The number of CSUs (Confluent Streaming Units) in the ksqlDB cluster.
        - `use_detailed_processing_log` (Optional Boolean) Controls whether the row data should be included in the processing log topic.
        """
        return pulumi.get(self, "csu")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def environment(self) -> 'outputs.GetKsqlClusterEnvironmentResult':
        return pulumi.get(self, "environment")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        (Required String) The ID of the service or user account that the ksqlDB cluster belongs to, for example, `sa-abc123`.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="kafkaClusters")
    def kafka_clusters(self) -> Sequence['outputs.GetKsqlClusterKafkaClusterResult']:
        return pulumi.get(self, "kafka_clusters")

    @property
    @pulumi.getter
    def kind(self) -> str:
        """
        (Required String) A kind of the ksqlDB cluster, for example, `Cluster`.
        """
        return pulumi.get(self, "kind")

    @property
    @pulumi.getter(name="restEndpoint")
    def rest_endpoint(self) -> str:
        """
        (Required String) The API endpoint of the ksqlDB cluster, for example, `https://pksqlc-00000.us-central1.gcp.glb.confluent.cloud`.
        - `kafka_cluster` (Optional Configuration Block) supports the following:
        """
        return pulumi.get(self, "rest_endpoint")

    @property
    @pulumi.getter
    def storage(self) -> int:
        """
        (Required Integer) The amount of storage (in GB) provisioned to this cluster.
        """
        return pulumi.get(self, "storage")

    @property
    @pulumi.getter(name="topicPrefix")
    def topic_prefix(self) -> str:
        """
        (Required String) Topic name prefix used by this ksqlDB cluster. Used to assign ACLs for this ksqlDB cluster to use, for example, `pksqlc-00000`.
        """
        return pulumi.get(self, "topic_prefix")

    @property
    @pulumi.getter(name="useDetailedProcessingLog")
    def use_detailed_processing_log(self) -> bool:
        return pulumi.get(self, "use_detailed_processing_log")


class AwaitableGetKsqlClusterResult(GetKsqlClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKsqlClusterResult(
            api_version=self.api_version,
            credential_identities=self.credential_identities,
            csu=self.csu,
            display_name=self.display_name,
            environment=self.environment,
            id=self.id,
            kafka_clusters=self.kafka_clusters,
            kind=self.kind,
            rest_endpoint=self.rest_endpoint,
            storage=self.storage,
            topic_prefix=self.topic_prefix,
            use_detailed_processing_log=self.use_detailed_processing_log)


def get_ksql_cluster(display_name: Optional[str] = None,
                     environment: Optional[pulumi.InputType['GetKsqlClusterEnvironmentArgs']] = None,
                     id: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKsqlClusterResult:
    """
    ## # KsqlCluster Data Source

    [![Open Preview](https://img.shields.io/badge/Lifecycle%20Stage-Open%20Preview-%2300afba)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    > **Note:** `KsqlCluster` data source is available in **Open Preview** for early adopters. Open Preview features are introduced to gather customer feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on editions.\\
    **Open Preview** features are intended for evaluation use in development and testing environments only, and not for production use. The warranty, SLA, and Support Services provisions of your agreement with Confluent do not apply to Open Preview features. Open Preview features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Open Preview features at any time in Confluent’s sole discretion.

    `KsqlCluster` describes a ksqlDB cluster data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    example_using_id_ksql_cluster = confluentcloud.get_ksql_cluster(id="lksqlc-abc123",
        environment=confluentcloud.GetKsqlClusterEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingId", example_using_id_ksql_cluster)
    example_using_name_ksql_cluster = confluentcloud.get_ksql_cluster(display_name="ksqldb_cluster",
        environment=confluentcloud.GetKsqlClusterEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingName", example_using_name_ksql_cluster)
    ```


    :param str display_name: The name of the ksqlDB cluster.
    :param str id: The ID of the Environment that the ksqlDB cluster belongs to, for example, `env-xyz456`.
    """
    __args__ = dict()
    __args__['displayName'] = display_name
    __args__['environment'] = environment
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('confluentcloud:index/getKsqlCluster:getKsqlCluster', __args__, opts=opts, typ=GetKsqlClusterResult).value

    return AwaitableGetKsqlClusterResult(
        api_version=__ret__.api_version,
        credential_identities=__ret__.credential_identities,
        csu=__ret__.csu,
        display_name=__ret__.display_name,
        environment=__ret__.environment,
        id=__ret__.id,
        kafka_clusters=__ret__.kafka_clusters,
        kind=__ret__.kind,
        rest_endpoint=__ret__.rest_endpoint,
        storage=__ret__.storage,
        topic_prefix=__ret__.topic_prefix,
        use_detailed_processing_log=__ret__.use_detailed_processing_log)


@_utilities.lift_output_func(get_ksql_cluster)
def get_ksql_cluster_output(display_name: Optional[pulumi.Input[Optional[str]]] = None,
                            environment: Optional[pulumi.Input[pulumi.InputType['GetKsqlClusterEnvironmentArgs']]] = None,
                            id: Optional[pulumi.Input[Optional[str]]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetKsqlClusterResult]:
    """
    ## # KsqlCluster Data Source

    [![Open Preview](https://img.shields.io/badge/Lifecycle%20Stage-Open%20Preview-%2300afba)](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy)

    > **Note:** `KsqlCluster` data source is available in **Open Preview** for early adopters. Open Preview features are introduced to gather customer feedback. This feature should be used only for evaluation and non-production testing purposes or to provide feedback to Confluent, particularly as it becomes more widely available in follow-on editions.\\
    **Open Preview** features are intended for evaluation use in development and testing environments only, and not for production use. The warranty, SLA, and Support Services provisions of your agreement with Confluent do not apply to Open Preview features. Open Preview features are considered to be a Proof of Concept as defined in the Confluent Cloud Terms of Service. Confluent may discontinue providing preview releases of the Open Preview features at any time in Confluent’s sole discretion.

    `KsqlCluster` describes a ksqlDB cluster data source.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_confluentcloud as confluentcloud

    example_using_id_ksql_cluster = confluentcloud.get_ksql_cluster(id="lksqlc-abc123",
        environment=confluentcloud.GetKsqlClusterEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingId", example_using_id_ksql_cluster)
    example_using_name_ksql_cluster = confluentcloud.get_ksql_cluster(display_name="ksqldb_cluster",
        environment=confluentcloud.GetKsqlClusterEnvironmentArgs(
            id="env-xyz456",
        ))
    pulumi.export("exampleUsingName", example_using_name_ksql_cluster)
    ```


    :param str display_name: The name of the ksqlDB cluster.
    :param str id: The ID of the Environment that the ksqlDB cluster belongs to, for example, `env-xyz456`.
    """
    ...
