# 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, apply_private_dns_to_public=None, arch_type=None, charge_detail=None, compute_spec=None, created_time=None, eip_id=None, endpoints=None, id=None, instance_description=None, instance_id=None, instance_name=None, instance_status=None, is_encrypted=None, project_name=None, storage_space=None, subnet_id=None, tags=None, used_storage_space=None, user_name=None, user_password=None, version=None, vpc_id=None, zone_description=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 apply_private_dns_to_public and not isinstance(apply_private_dns_to_public, bool):
            raise TypeError("Expected argument 'apply_private_dns_to_public' to be a bool")
        pulumi.set(__self__, "apply_private_dns_to_public", apply_private_dns_to_public)
        if arch_type and not isinstance(arch_type, str):
            raise TypeError("Expected argument 'arch_type' to be a str")
        pulumi.set(__self__, "arch_type", arch_type)
        if charge_detail and not isinstance(charge_detail, dict):
            raise TypeError("Expected argument 'charge_detail' to be a dict")
        pulumi.set(__self__, "charge_detail", charge_detail)
        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 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 endpoints and not isinstance(endpoints, list):
            raise TypeError("Expected argument 'endpoints' to be a list")
        pulumi.set(__self__, "endpoints", endpoints)
        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 is_encrypted and not isinstance(is_encrypted, bool):
            raise TypeError("Expected argument 'is_encrypted' to be a bool")
        pulumi.set(__self__, "is_encrypted", is_encrypted)
        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 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 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 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_description and not isinstance(zone_description, str):
            raise TypeError("Expected argument 'zone_description' to be a str")
        pulumi.set(__self__, "zone_description", zone_description)
        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="applyPrivateDnsToPublic")
    def apply_private_dns_to_public(self) -> builtins.bool:
        """
        是否已开启公网解析功能。true：已开启, false：已关闭
        """
        return pulumi.get(self, "apply_private_dns_to_public")

    @property
    @pulumi.getter(name="archType")
    def arch_type(self) -> builtins.str:
        """
        实例的类型，即集群版或单机版。
        """
        return pulumi.get(self, "arch_type")

    @property
    @pulumi.getter(name="chargeDetail")
    def charge_detail(self) -> 'outputs.GetInstanceChargeDetailResult':
        """
        实例的计费方式等计费信息。
        """
        return pulumi.get(self, "charge_detail")

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

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        实例的创建时间。
        """
        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 endpoints(self) -> Sequence['outputs.GetInstanceEndpointResult']:
        """
        实例的连接信息。
        """
        return pulumi.get(self, "endpoints")

    @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:
        """
        实例的简单描述。
        """
        return pulumi.get(self, "instance_description")

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

    @property
    @pulumi.getter(name="instanceName")
    def instance_name(self) -> builtins.str:
        """
        RabbitMQ 实例名称。
        """
        return pulumi.get(self, "instance_name")

    @property
    @pulumi.getter(name="instanceStatus")
    def instance_status(self) -> builtins.str:
        """
        实例状态。
        """
        return pulumi.get(self, "instance_status")

    @property
    @pulumi.getter(name="isEncrypted")
    def is_encrypted(self) -> builtins.bool:
        """
        是否开启了云盘加密。
        """
        return pulumi.get(self, "is_encrypted")

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

    @property
    @pulumi.getter(name="storageSpace")
    def storage_space(self) -> builtins.int:
        """
        实例总存储空间。单位为 GiB。
        """
        return pulumi.get(self, "storage_space")

    @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(name="usedStorageSpace")
    def used_storage_space(self) -> builtins.int:
        """
        实例已用存储空间。单位为 GiB。
        """
        return pulumi.get(self, "used_storage_space")

    @property
    @pulumi.getter(name="userName")
    def user_name(self) -> builtins.str:
        """
        RabbitMQ WebUI管理员账号名。
        """
        return pulumi.get(self, "user_name")

    @property
    @pulumi.getter(name="userPassword")
    def user_password(self) -> builtins.str:
        """
        RabbitMQ WebUI管理员密码。
        """
        return pulumi.get(self, "user_password")

    @property
    @pulumi.getter
    def version(self) -> builtins.str:
        """
        支持的 RabbitMQ 版本。当前支持的版本包括：3.8.18：RabbitMQ 3.8.18 版本。
        """
        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="zoneDescription")
    def zone_description(self) -> builtins.str:
        """
        可用区的描述信息。
        """
        return pulumi.get(self, "zone_description")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        实例所在的可用区 ID。对于跨 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,
            apply_private_dns_to_public=self.apply_private_dns_to_public,
            arch_type=self.arch_type,
            charge_detail=self.charge_detail,
            compute_spec=self.compute_spec,
            created_time=self.created_time,
            eip_id=self.eip_id,
            endpoints=self.endpoints,
            id=self.id,
            instance_description=self.instance_description,
            instance_id=self.instance_id,
            instance_name=self.instance_name,
            instance_status=self.instance_status,
            is_encrypted=self.is_encrypted,
            project_name=self.project_name,
            storage_space=self.storage_space,
            subnet_id=self.subnet_id,
            tags=self.tags,
            used_storage_space=self.used_storage_space,
            user_name=self.user_name,
            user_password=self.user_password,
            version=self.version,
            vpc_id=self.vpc_id,
            zone_description=self.zone_description,
            zone_id=self.zone_id)


def get_instance(id: Optional[builtins.str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceResult:
    """
    Data Source schema for Byteplus::RabbitMQ::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:rabbitmq/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult).value

    return AwaitableGetInstanceResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        apply_private_dns_to_public=pulumi.get(__ret__, 'apply_private_dns_to_public'),
        arch_type=pulumi.get(__ret__, 'arch_type'),
        charge_detail=pulumi.get(__ret__, 'charge_detail'),
        compute_spec=pulumi.get(__ret__, 'compute_spec'),
        created_time=pulumi.get(__ret__, 'created_time'),
        eip_id=pulumi.get(__ret__, 'eip_id'),
        endpoints=pulumi.get(__ret__, 'endpoints'),
        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'),
        is_encrypted=pulumi.get(__ret__, 'is_encrypted'),
        project_name=pulumi.get(__ret__, 'project_name'),
        storage_space=pulumi.get(__ret__, 'storage_space'),
        subnet_id=pulumi.get(__ret__, 'subnet_id'),
        tags=pulumi.get(__ret__, 'tags'),
        used_storage_space=pulumi.get(__ret__, 'used_storage_space'),
        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_description=pulumi.get(__ret__, 'zone_description'),
        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::RabbitMQ::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:rabbitmq/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult)
    return __ret__.apply(lambda __response__: GetInstanceResult(
        account_id=pulumi.get(__response__, 'account_id'),
        apply_private_dns_to_public=pulumi.get(__response__, 'apply_private_dns_to_public'),
        arch_type=pulumi.get(__response__, 'arch_type'),
        charge_detail=pulumi.get(__response__, 'charge_detail'),
        compute_spec=pulumi.get(__response__, 'compute_spec'),
        created_time=pulumi.get(__response__, 'created_time'),
        eip_id=pulumi.get(__response__, 'eip_id'),
        endpoints=pulumi.get(__response__, 'endpoints'),
        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'),
        is_encrypted=pulumi.get(__response__, 'is_encrypted'),
        project_name=pulumi.get(__response__, 'project_name'),
        storage_space=pulumi.get(__response__, 'storage_space'),
        subnet_id=pulumi.get(__response__, 'subnet_id'),
        tags=pulumi.get(__response__, 'tags'),
        used_storage_space=pulumi.get(__response__, 'used_storage_space'),
        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_description=pulumi.get(__response__, 'zone_description'),
        zone_id=pulumi.get(__response__, 'zone_id')))
