# 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 builtins
import copy
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

__all__ = [
    'GetInstanceResult',
    'AwaitableGetInstanceResult',
    'get_instance',
    'get_instance_output',
]

@pulumi.output_type
class GetInstanceResult:
    """
    A collection of values returned by getInstance.
    """
    def __init__(__self__, account_id=None, charge_info=None, compute_spec=None, connection_infos=None, created_time=None, eip_id=None, id=None, instance_description=None, instance_id=None, instance_name=None, instance_status=None, ip_white_lists=None, need_rebalance=None, parameters=None, partition_number=None, private_domain_on_public=None, project_name=None, storage_space=None, storage_type=None, subnet_id=None, tags=None, topics=None, usable_group_number=None, usable_partition_number=None, used_group_number=None, used_partition_number=None, used_storage_space=None, used_topic_number=None, user_name=None, user_password=None, version=None, vpc_id=None, zone_id=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if charge_info and not isinstance(charge_info, dict):
            raise TypeError("Expected argument 'charge_info' to be a dict")
        pulumi.set(__self__, "charge_info", charge_info)
        if compute_spec and not isinstance(compute_spec, str):
            raise TypeError("Expected argument 'compute_spec' to be a str")
        pulumi.set(__self__, "compute_spec", compute_spec)
        if connection_infos and not isinstance(connection_infos, list):
            raise TypeError("Expected argument 'connection_infos' to be a list")
        pulumi.set(__self__, "connection_infos", connection_infos)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if eip_id and not isinstance(eip_id, str):
            raise TypeError("Expected argument 'eip_id' to be a str")
        pulumi.set(__self__, "eip_id", eip_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_description and not isinstance(instance_description, str):
            raise TypeError("Expected argument 'instance_description' to be a str")
        pulumi.set(__self__, "instance_description", instance_description)
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if instance_name and not isinstance(instance_name, str):
            raise TypeError("Expected argument 'instance_name' to be a str")
        pulumi.set(__self__, "instance_name", instance_name)
        if instance_status and not isinstance(instance_status, str):
            raise TypeError("Expected argument 'instance_status' to be a str")
        pulumi.set(__self__, "instance_status", instance_status)
        if ip_white_lists and not isinstance(ip_white_lists, list):
            raise TypeError("Expected argument 'ip_white_lists' to be a list")
        pulumi.set(__self__, "ip_white_lists", ip_white_lists)
        if need_rebalance and not isinstance(need_rebalance, bool):
            raise TypeError("Expected argument 'need_rebalance' to be a bool")
        pulumi.set(__self__, "need_rebalance", need_rebalance)
        if parameters and not isinstance(parameters, str):
            raise TypeError("Expected argument 'parameters' to be a str")
        pulumi.set(__self__, "parameters", parameters)
        if partition_number and not isinstance(partition_number, int):
            raise TypeError("Expected argument 'partition_number' to be a int")
        pulumi.set(__self__, "partition_number", partition_number)
        if private_domain_on_public and not isinstance(private_domain_on_public, bool):
            raise TypeError("Expected argument 'private_domain_on_public' to be a bool")
        pulumi.set(__self__, "private_domain_on_public", private_domain_on_public)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if storage_space and not isinstance(storage_space, int):
            raise TypeError("Expected argument 'storage_space' to be a int")
        pulumi.set(__self__, "storage_space", storage_space)
        if storage_type and not isinstance(storage_type, str):
            raise TypeError("Expected argument 'storage_type' to be a str")
        pulumi.set(__self__, "storage_type", storage_type)
        if subnet_id and not isinstance(subnet_id, str):
            raise TypeError("Expected argument 'subnet_id' to be a str")
        pulumi.set(__self__, "subnet_id", subnet_id)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if topics and not isinstance(topics, list):
            raise TypeError("Expected argument 'topics' to be a list")
        pulumi.set(__self__, "topics", topics)
        if usable_group_number and not isinstance(usable_group_number, int):
            raise TypeError("Expected argument 'usable_group_number' to be a int")
        pulumi.set(__self__, "usable_group_number", usable_group_number)
        if usable_partition_number and not isinstance(usable_partition_number, int):
            raise TypeError("Expected argument 'usable_partition_number' to be a int")
        pulumi.set(__self__, "usable_partition_number", usable_partition_number)
        if used_group_number and not isinstance(used_group_number, int):
            raise TypeError("Expected argument 'used_group_number' to be a int")
        pulumi.set(__self__, "used_group_number", used_group_number)
        if used_partition_number and not isinstance(used_partition_number, int):
            raise TypeError("Expected argument 'used_partition_number' to be a int")
        pulumi.set(__self__, "used_partition_number", used_partition_number)
        if used_storage_space and not isinstance(used_storage_space, int):
            raise TypeError("Expected argument 'used_storage_space' to be a int")
        pulumi.set(__self__, "used_storage_space", used_storage_space)
        if used_topic_number and not isinstance(used_topic_number, int):
            raise TypeError("Expected argument 'used_topic_number' to be a int")
        pulumi.set(__self__, "used_topic_number", used_topic_number)
        if user_name and not isinstance(user_name, str):
            raise TypeError("Expected argument 'user_name' to be a str")
        pulumi.set(__self__, "user_name", user_name)
        if user_password and not isinstance(user_password, str):
            raise TypeError("Expected argument 'user_password' to be a str")
        pulumi.set(__self__, "user_password", user_password)
        if version and not isinstance(version, str):
            raise TypeError("Expected argument 'version' to be a str")
        pulumi.set(__self__, "version", version)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)
        if zone_id and not isinstance(zone_id, str):
            raise TypeError("Expected argument 'zone_id' to be a str")
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        创建实例的主账号 ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="chargeInfo")
    def charge_info(self) -> 'outputs.GetInstanceChargeInfoResult':
        """
        Kafka 实例的计费类型等计费信息。
        """
        return pulumi.get(self, "charge_info")

    @property
    @pulumi.getter(name="computeSpec")
    def compute_spec(self) -> builtins.str:
        """
        实例的计算规格。
        """
        return pulumi.get(self, "compute_spec")

    @property
    @pulumi.getter(name="connectionInfos")
    def connection_infos(self) -> Sequence['outputs.GetInstanceConnectionInfoResult']:
        """
        Kafka 实例的连接信息。
        """
        return pulumi.get(self, "connection_infos")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        实例的创建时间，时间显示格式为 YYYY-MM-DD'T'HH:MM:SS'Z'。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter(name="eipId")
    def eip_id(self) -> builtins.str:
        """
        EIP 的 ID。
        """
        return pulumi.get(self, "eip_id")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="instanceDescription")
    def instance_description(self) -> builtins.str:
        """
        Kafka 实例的简单描述。长度范围为 1~128 个字符。
        """
        return pulumi.get(self, "instance_description")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> builtins.str:
        """
        Kafka 实例的 ID。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="instanceName")
    def instance_name(self) -> builtins.str:
        """
        Kafka 实例的名称。只能包含中文、字母、数字、下划线（_）和连字符（-）。不能以数字和连字符（-）开头。长度范围为 1~128 个字符。
        """
        return pulumi.get(self, "instance_name")

    @property
    @pulumi.getter(name="instanceStatus")
    def instance_status(self) -> builtins.str:
        """
        Kafka 实例的状态。Error：错误, Deleting：删除中, Creating：部署中, Upgrading：升级中, Updating：变更中, Running：运行中, Scaling：更配中, Rebuilding：重建中, Destroying：销毁中, Restarting：重启中, Migrating：迁移中, Restoring：恢复中, Importing：导入中, NetCreating：申请公网中, NetReleasing：释放公网中, Rollingback：回滚中, CreateFailed：创建失败, UpgradeFailed：升级失败, ScaleFailed：更配失败, RestartFailed：重启失败
        """
        return pulumi.get(self, "instance_status")

    @property
    @pulumi.getter(name="ipWhiteLists")
    def ip_white_lists(self) -> Sequence[builtins.str]:
        """
        实例绑定的白名单 ID 列表。绑定白名单后，仅配置在白名单中的 IP 地址与地址段才能访问此实例。若未设置此参数，新 Kafka 实例将绑定白名单 default，对应 IP 地址为 0.0.0.0，表示允许所有地址访问该 Kafka 实例。
        """
        return pulumi.get(self, "ip_white_lists")

    @property
    @pulumi.getter(name="needRebalance")
    def need_rebalance(self) -> builtins.bool:
        """
        是否开启再均衡。
        """
        return pulumi.get(self, "need_rebalance")

    @property
    @pulumi.getter
    def parameters(self) -> builtins.str:
        """
        Kafka 实例的初始参数配置,格式为json,参数列表: 最大消息大小(MessageMaxByte)1-12MB 默认10, 消息保留时间(LogRetentionHours)0-2160Hour 默认72, 消费位点保留时长(OffsetRetentionMinutes)1-10080Min 默认4320 消息时间类型(MessageTimestampType)LogAppendTime/CreateTime 消息写入到服务端时间、producer创建消息时间。
        """
        return pulumi.get(self, "parameters")

    @property
    @pulumi.getter(name="partitionNumber")
    def partition_number(self) -> builtins.int:
        """
        分区数量。
        """
        return pulumi.get(self, "partition_number")

    @property
    @pulumi.getter(name="privateDomainOnPublic")
    def private_domain_on_public(self) -> builtins.bool:
        """
        是否开启公网解析。
        """
        return pulumi.get(self, "private_domain_on_public")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        当前创建的 Kafka 实例所属的 IAM 项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="storageSpace")
    def storage_space(self) -> builtins.int:
        """
        实例的存储空间，单位为 GiB, 必须指定为 100 的倍数。
        """
        return pulumi.get(self, "storage_space")

    @property
    @pulumi.getter(name="storageType")
    def storage_type(self) -> builtins.str:
        """
        Kafka 实例数据存储的云盘类型。可设置为 ESSD*FlexPL 或 ESSD*PL0，默认为 ESSD_FlexPL。
        """
        return pulumi.get(self, "storage_type")

    @property
    @pulumi.getter(name="subnetId")
    def subnet_id(self) -> builtins.str:
        """
        实例所在的 VPC 子网 ID。
        """
        return pulumi.get(self, "subnet_id")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetInstanceTagResult']:
        """
        云资源标签。可以将实例通过标签进行归类，便于实例的搜索和资源聚合。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def topics(self) -> Sequence[builtins.str]:
        """
        一个 Kafka 实例下的 Topic 列表
        """
        return pulumi.get(self, "topics")

    @property
    @pulumi.getter(name="usableGroupNumber")
    def usable_group_number(self) -> builtins.int:
        """
        当前实例剩余可用消费组个数。
        """
        return pulumi.get(self, "usable_group_number")

    @property
    @pulumi.getter(name="usablePartitionNumber")
    def usable_partition_number(self) -> builtins.int:
        """
        当前实例剩余可用分区数。
        """
        return pulumi.get(self, "usable_partition_number")

    @property
    @pulumi.getter(name="usedGroupNumber")
    def used_group_number(self) -> builtins.int:
        """
        当前实例已经创建的消费组(Group)个数。
        """
        return pulumi.get(self, "used_group_number")

    @property
    @pulumi.getter(name="usedPartitionNumber")
    def used_partition_number(self) -> builtins.int:
        """
        当前实例已经使用的分区个数。
        """
        return pulumi.get(self, "used_partition_number")

    @property
    @pulumi.getter(name="usedStorageSpace")
    def used_storage_space(self) -> builtins.int:
        """
        实例已用储空间，单位为 GiB。
        """
        return pulumi.get(self, "used_storage_space")

    @property
    @pulumi.getter(name="usedTopicNumber")
    def used_topic_number(self) -> builtins.int:
        """
        当前实例已创建的 Topic 个数。
        """
        return pulumi.get(self, "used_topic_number")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        SASL/PLAIN 用户名称，需要满足以下要求: 1.由小写字母、数字、连字符（-）或下划线组成。2.长度为 3~64 个字符。3.用户名不支持设置为 admin 或 monitor,且实例内用户名称唯一。
        """
        return pulumi.get(self, "user_name")

    @property
    @pulumi.getter(name="userPassword")
    def user_password(self) -> builtins.str:
        """
        SASL/PLAIN 用户的密码，需要满足以下要求: 1.长度在8到32个字符 2.由大写字母、小写字母、数字、特殊字符中的任意三种组成 3.支持的特殊字符包括 !@#$%^&*()_+-=。
        """
        return pulumi.get(self, "user_password")

    @property
    @pulumi.getter
    def version(self) -> builtins.str:
        """
        支持的 Kafka 版本，当前支持的版本包括 2.2.2, 2.8.2。
        """
        return pulumi.get(self, "version")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        实例所在的私有网络 (VPC) ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        实例所在的可用区 ID。消息队列 Kafka版实例支持跨 AZ 部署, 多个可用区ID之间以逗号间隔。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetInstanceResult(GetInstanceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInstanceResult(
            account_id=self.account_id,
            charge_info=self.charge_info,
            compute_spec=self.compute_spec,
            connection_infos=self.connection_infos,
            created_time=self.created_time,
            eip_id=self.eip_id,
            id=self.id,
            instance_description=self.instance_description,
            instance_id=self.instance_id,
            instance_name=self.instance_name,
            instance_status=self.instance_status,
            ip_white_lists=self.ip_white_lists,
            need_rebalance=self.need_rebalance,
            parameters=self.parameters,
            partition_number=self.partition_number,
            private_domain_on_public=self.private_domain_on_public,
            project_name=self.project_name,
            storage_space=self.storage_space,
            storage_type=self.storage_type,
            subnet_id=self.subnet_id,
            tags=self.tags,
            topics=self.topics,
            usable_group_number=self.usable_group_number,
            usable_partition_number=self.usable_partition_number,
            used_group_number=self.used_group_number,
            used_partition_number=self.used_partition_number,
            used_storage_space=self.used_storage_space,
            used_topic_number=self.used_topic_number,
            user_name=self.user_name,
            user_password=self.user_password,
            version=self.version,
            vpc_id=self.vpc_id,
            zone_id=self.zone_id)


def get_instance(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceResult:
    """
    Data Source schema for Byteplus::Kafka::Instance


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:kafka/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult).value

    return AwaitableGetInstanceResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        charge_info=pulumi.get(__ret__, 'charge_info'),
        compute_spec=pulumi.get(__ret__, 'compute_spec'),
        connection_infos=pulumi.get(__ret__, 'connection_infos'),
        created_time=pulumi.get(__ret__, 'created_time'),
        eip_id=pulumi.get(__ret__, 'eip_id'),
        id=pulumi.get(__ret__, 'id'),
        instance_description=pulumi.get(__ret__, 'instance_description'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        instance_name=pulumi.get(__ret__, 'instance_name'),
        instance_status=pulumi.get(__ret__, 'instance_status'),
        ip_white_lists=pulumi.get(__ret__, 'ip_white_lists'),
        need_rebalance=pulumi.get(__ret__, 'need_rebalance'),
        parameters=pulumi.get(__ret__, 'parameters'),
        partition_number=pulumi.get(__ret__, 'partition_number'),
        private_domain_on_public=pulumi.get(__ret__, 'private_domain_on_public'),
        project_name=pulumi.get(__ret__, 'project_name'),
        storage_space=pulumi.get(__ret__, 'storage_space'),
        storage_type=pulumi.get(__ret__, 'storage_type'),
        subnet_id=pulumi.get(__ret__, 'subnet_id'),
        tags=pulumi.get(__ret__, 'tags'),
        topics=pulumi.get(__ret__, 'topics'),
        usable_group_number=pulumi.get(__ret__, 'usable_group_number'),
        usable_partition_number=pulumi.get(__ret__, 'usable_partition_number'),
        used_group_number=pulumi.get(__ret__, 'used_group_number'),
        used_partition_number=pulumi.get(__ret__, 'used_partition_number'),
        used_storage_space=pulumi.get(__ret__, 'used_storage_space'),
        used_topic_number=pulumi.get(__ret__, 'used_topic_number'),
        user_name=pulumi.get(__ret__, 'user_name'),
        user_password=pulumi.get(__ret__, 'user_password'),
        version=pulumi.get(__ret__, 'version'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_instance_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetInstanceResult]:
    """
    Data Source schema for Byteplus::Kafka::Instance


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:kafka/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult)
    return __ret__.apply(lambda __response__: GetInstanceResult(
        account_id=pulumi.get(__response__, 'account_id'),
        charge_info=pulumi.get(__response__, 'charge_info'),
        compute_spec=pulumi.get(__response__, 'compute_spec'),
        connection_infos=pulumi.get(__response__, 'connection_infos'),
        created_time=pulumi.get(__response__, 'created_time'),
        eip_id=pulumi.get(__response__, 'eip_id'),
        id=pulumi.get(__response__, 'id'),
        instance_description=pulumi.get(__response__, 'instance_description'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        instance_name=pulumi.get(__response__, 'instance_name'),
        instance_status=pulumi.get(__response__, 'instance_status'),
        ip_white_lists=pulumi.get(__response__, 'ip_white_lists'),
        need_rebalance=pulumi.get(__response__, 'need_rebalance'),
        parameters=pulumi.get(__response__, 'parameters'),
        partition_number=pulumi.get(__response__, 'partition_number'),
        private_domain_on_public=pulumi.get(__response__, 'private_domain_on_public'),
        project_name=pulumi.get(__response__, 'project_name'),
        storage_space=pulumi.get(__response__, 'storage_space'),
        storage_type=pulumi.get(__response__, 'storage_type'),
        subnet_id=pulumi.get(__response__, 'subnet_id'),
        tags=pulumi.get(__response__, 'tags'),
        topics=pulumi.get(__response__, 'topics'),
        usable_group_number=pulumi.get(__response__, 'usable_group_number'),
        usable_partition_number=pulumi.get(__response__, 'usable_partition_number'),
        used_group_number=pulumi.get(__response__, 'used_group_number'),
        used_partition_number=pulumi.get(__response__, 'used_partition_number'),
        used_storage_space=pulumi.get(__response__, 'used_storage_space'),
        used_topic_number=pulumi.get(__response__, 'used_topic_number'),
        user_name=pulumi.get(__response__, 'user_name'),
        user_password=pulumi.get(__response__, 'user_password'),
        version=pulumi.get(__response__, 'version'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        zone_id=pulumi.get(__response__, 'zone_id')))
