# 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__, auto_renew=None, billing_period=None, billing_type=None, created_time=None, description=None, eip_id=None, endpoints=None, expiration_time=None, group_limit=None, id=None, instance_id=None, message_retention=None, name=None, partition_limit=None, project_name=None, resource_tags=None, resources=None, security_group_id_lists=None, specification=None, status=None, subnet_id_lists=None, tags=None, times=None, topic_limit=None, vpc_id=None, zone_id_lists=None):
        if auto_renew and not isinstance(auto_renew, str):
            raise TypeError("Expected argument 'auto_renew' to be a str")
        pulumi.set(__self__, "auto_renew", auto_renew)
        if billing_period and not isinstance(billing_period, str):
            raise TypeError("Expected argument 'billing_period' to be a str")
        pulumi.set(__self__, "billing_period", billing_period)
        if billing_type and not isinstance(billing_type, str):
            raise TypeError("Expected argument 'billing_type' to be a str")
        pulumi.set(__self__, "billing_type", billing_type)
        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 description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        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, dict):
            raise TypeError("Expected argument 'endpoints' to be a dict")
        pulumi.set(__self__, "endpoints", endpoints)
        if expiration_time and not isinstance(expiration_time, str):
            raise TypeError("Expected argument 'expiration_time' to be a str")
        pulumi.set(__self__, "expiration_time", expiration_time)
        if group_limit and not isinstance(group_limit, int):
            raise TypeError("Expected argument 'group_limit' to be a int")
        pulumi.set(__self__, "group_limit", group_limit)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        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 message_retention and not isinstance(message_retention, int):
            raise TypeError("Expected argument 'message_retention' to be a int")
        pulumi.set(__self__, "message_retention", message_retention)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if partition_limit and not isinstance(partition_limit, int):
            raise TypeError("Expected argument 'partition_limit' to be a int")
        pulumi.set(__self__, "partition_limit", partition_limit)
        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 resource_tags and not isinstance(resource_tags, list):
            raise TypeError("Expected argument 'resource_tags' to be a list")
        pulumi.set(__self__, "resource_tags", resource_tags)
        if resources and not isinstance(resources, dict):
            raise TypeError("Expected argument 'resources' to be a dict")
        pulumi.set(__self__, "resources", resources)
        if security_group_id_lists and not isinstance(security_group_id_lists, list):
            raise TypeError("Expected argument 'security_group_id_lists' to be a list")
        pulumi.set(__self__, "security_group_id_lists", security_group_id_lists)
        if specification and not isinstance(specification, str):
            raise TypeError("Expected argument 'specification' to be a str")
        pulumi.set(__self__, "specification", specification)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if subnet_id_lists and not isinstance(subnet_id_lists, list):
            raise TypeError("Expected argument 'subnet_id_lists' to be a list")
        pulumi.set(__self__, "subnet_id_lists", subnet_id_lists)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if times and not isinstance(times, int):
            raise TypeError("Expected argument 'times' to be a int")
        pulumi.set(__self__, "times", times)
        if topic_limit and not isinstance(topic_limit, int):
            raise TypeError("Expected argument 'topic_limit' to be a int")
        pulumi.set(__self__, "topic_limit", topic_limit)
        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_lists and not isinstance(zone_id_lists, list):
            raise TypeError("Expected argument 'zone_id_lists' to be a list")
        pulumi.set(__self__, "zone_id_lists", zone_id_lists)

    @property
    @pulumi.getter(name="autoRenew")
    def auto_renew(self) -> builtins.str:
        """
        是否开启自动续费，取值如下：true：开启自动续费。false：关闭自动续费。
        """
        return pulumi.get(self, "auto_renew")

    @property
    @pulumi.getter(name="billingPeriod")
    def billing_period(self) -> builtins.str:
        """
        购买时长的单位，取值如下：MONTHLY：按月购买。YEARLY：按年购买。
        """
        return pulumi.get(self, "billing_period")

    @property
    @pulumi.getter(name="billingType")
    def billing_type(self) -> builtins.str:
        """
        实例的计费方式，取值如下：POST：按量计费。MIX：包年包月。
        """
        return pulumi.get(self, "billing_type")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        实例的创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        实例的描述语句。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="eipId")
    def eip_id(self) -> builtins.str:
        """
        实例是否开启公网访问。如果需要开启公网访问，请配置相同地域的公网 IP 的 ID。
        """
        return pulumi.get(self, "eip_id")

    @property
    @pulumi.getter
    def endpoints(self) -> 'outputs.GetInstanceEndpointsResult':
        """
        实例所有接入点响应数据。
        """
        return pulumi.get(self, "endpoints")

    @property
    @pulumi.getter(name="expirationTime")
    def expiration_time(self) -> builtins.str:
        """
        实例过期时间。
        """
        return pulumi.get(self, "expiration_time")

    @property
    @pulumi.getter(name="groupLimit")
    def group_limit(self) -> builtins.int:
        """
        实例消费组数量上限。
        """
        return pulumi.get(self, "group_limit")

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

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

    @property
    @pulumi.getter(name="messageRetention")
    def message_retention(self) -> builtins.int:
        """
        实例下所有 Topic 的消息保留时长，单位为小时。
        """
        return pulumi.get(self, "message_retention")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        自定设置 BMQ 实例的名称，约束限制如下：由小写字母、数字和中划线（-）组成。长度为 1~64 字符。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="partitionLimit")
    def partition_limit(self) -> builtins.int:
        """
        实例分区数量上限。
        """
        return pulumi.get(self, "partition_limit")

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

    @property
    @pulumi.getter(name="resourceTags")
    def resource_tags(self) -> Sequence['outputs.GetInstanceResourceTagResult']:
        """
        实例资源标签列表。
        """
        return pulumi.get(self, "resource_tags")

    @property
    @pulumi.getter
    def resources(self) -> 'outputs.GetInstanceResourcesResult':
        """
        实例资源统计响应数据。
        """
        return pulumi.get(self, "resources")

    @property
    @pulumi.getter(name="securityGroupIdLists")
    def security_group_id_lists(self) -> Sequence[builtins.str]:
        """
        实例使用安全组列表。
        """
        return pulumi.get(self, "security_group_id_lists")

    @property
    @pulumi.getter
    def specification(self) -> builtins.str:
        """
        实例规格。
        """
        return pulumi.get(self, "specification")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        实例的状态。取值如下：INITIALIZING：初始化中，INITIALIZATION*FAILED：初始化失败，RUNNING：运行中，MODIFYING：更新中，MODIFY*FAILED：更新失败，RELEASING：释放中，STOPPING：停止中，STOPPED：停止，RECOVERING：恢复中，EXCEPTION：异常，CAPACITY*EXPAXION*FAILED：扩容失败，EXPANDING*CAPACITY：扩容中，CANCEL*EXPANDING_CAPACITY：扩容取消中，RESTARTING：重启中，UNPAID：未支付
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="subnetIdLists")
    def subnet_id_lists(self) -> Sequence[builtins.str]:
        """
        实例使用的子网列表。
        """
        return pulumi.get(self, "subnet_id_lists")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetInstanceTagResult']:
        """
        实例资源标签列表。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def times(self) -> builtins.int:
        """
        包年包月类型实例的购买时长，单位为月。
        """
        return pulumi.get(self, "times")

    @property
    @pulumi.getter(name="topicLimit")
    def topic_limit(self) -> builtins.int:
        """
        实例Topic数量上限。
        """
        return pulumi.get(self, "topic_limit")

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

    @property
    @pulumi.getter(name="zoneIdLists")
    def zone_id_lists(self) -> Sequence[builtins.str]:
        """
        实例所在可用区列表。
        """
        return pulumi.get(self, "zone_id_lists")


class AwaitableGetInstanceResult(GetInstanceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInstanceResult(
            auto_renew=self.auto_renew,
            billing_period=self.billing_period,
            billing_type=self.billing_type,
            created_time=self.created_time,
            description=self.description,
            eip_id=self.eip_id,
            endpoints=self.endpoints,
            expiration_time=self.expiration_time,
            group_limit=self.group_limit,
            id=self.id,
            instance_id=self.instance_id,
            message_retention=self.message_retention,
            name=self.name,
            partition_limit=self.partition_limit,
            project_name=self.project_name,
            resource_tags=self.resource_tags,
            resources=self.resources,
            security_group_id_lists=self.security_group_id_lists,
            specification=self.specification,
            status=self.status,
            subnet_id_lists=self.subnet_id_lists,
            tags=self.tags,
            times=self.times,
            topic_limit=self.topic_limit,
            vpc_id=self.vpc_id,
            zone_id_lists=self.zone_id_lists)


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

    return AwaitableGetInstanceResult(
        auto_renew=pulumi.get(__ret__, 'auto_renew'),
        billing_period=pulumi.get(__ret__, 'billing_period'),
        billing_type=pulumi.get(__ret__, 'billing_type'),
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        eip_id=pulumi.get(__ret__, 'eip_id'),
        endpoints=pulumi.get(__ret__, 'endpoints'),
        expiration_time=pulumi.get(__ret__, 'expiration_time'),
        group_limit=pulumi.get(__ret__, 'group_limit'),
        id=pulumi.get(__ret__, 'id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        message_retention=pulumi.get(__ret__, 'message_retention'),
        name=pulumi.get(__ret__, 'name'),
        partition_limit=pulumi.get(__ret__, 'partition_limit'),
        project_name=pulumi.get(__ret__, 'project_name'),
        resource_tags=pulumi.get(__ret__, 'resource_tags'),
        resources=pulumi.get(__ret__, 'resources'),
        security_group_id_lists=pulumi.get(__ret__, 'security_group_id_lists'),
        specification=pulumi.get(__ret__, 'specification'),
        status=pulumi.get(__ret__, 'status'),
        subnet_id_lists=pulumi.get(__ret__, 'subnet_id_lists'),
        tags=pulumi.get(__ret__, 'tags'),
        times=pulumi.get(__ret__, 'times'),
        topic_limit=pulumi.get(__ret__, 'topic_limit'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        zone_id_lists=pulumi.get(__ret__, 'zone_id_lists'))
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::BMQ::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:bmq/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult)
    return __ret__.apply(lambda __response__: GetInstanceResult(
        auto_renew=pulumi.get(__response__, 'auto_renew'),
        billing_period=pulumi.get(__response__, 'billing_period'),
        billing_type=pulumi.get(__response__, 'billing_type'),
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        eip_id=pulumi.get(__response__, 'eip_id'),
        endpoints=pulumi.get(__response__, 'endpoints'),
        expiration_time=pulumi.get(__response__, 'expiration_time'),
        group_limit=pulumi.get(__response__, 'group_limit'),
        id=pulumi.get(__response__, 'id'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        message_retention=pulumi.get(__response__, 'message_retention'),
        name=pulumi.get(__response__, 'name'),
        partition_limit=pulumi.get(__response__, 'partition_limit'),
        project_name=pulumi.get(__response__, 'project_name'),
        resource_tags=pulumi.get(__response__, 'resource_tags'),
        resources=pulumi.get(__response__, 'resources'),
        security_group_id_lists=pulumi.get(__response__, 'security_group_id_lists'),
        specification=pulumi.get(__response__, 'specification'),
        status=pulumi.get(__response__, 'status'),
        subnet_id_lists=pulumi.get(__response__, 'subnet_id_lists'),
        tags=pulumi.get(__response__, 'tags'),
        times=pulumi.get(__response__, 'times'),
        topic_limit=pulumi.get(__response__, 'topic_limit'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        zone_id_lists=pulumi.get(__response__, 'zone_id_lists')))
