# 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__ = [
    'InstanceCapacity',
    'InstanceConfigureNode',
    'InstanceInstanceShard',
    'InstanceInstanceShardServerNode',
    'InstanceTag',
    'InstanceVisitAddr',
    'GetInstanceCapacityResult',
    'GetInstanceConfigureNodeResult',
    'GetInstanceInstanceShardResult',
    'GetInstanceInstanceShardServerNodeResult',
    'GetInstanceTagResult',
    'GetInstanceVisitAddrResult',
]

@pulumi.output_type
class InstanceCapacity(dict):
    def __init__(__self__, *,
                 total: Optional[builtins.int] = None,
                 used: Optional[builtins.int] = None):
        """
        :param builtins.int total: 当前实例的内存总容量。单位：MiB。
        :param builtins.int used: 当前实例已用容量。单位：MiB。
        """
        if total is not None:
            pulumi.set(__self__, "total", total)
        if used is not None:
            pulumi.set(__self__, "used", used)

    @property
    @pulumi.getter
    def total(self) -> Optional[builtins.int]:
        """
        当前实例的内存总容量。单位：MiB。
        """
        return pulumi.get(self, "total")

    @property
    @pulumi.getter
    def used(self) -> Optional[builtins.int]:
        """
        当前实例已用容量。单位：MiB。
        """
        return pulumi.get(self, "used")


@pulumi.output_type
class InstanceConfigureNode(dict):
    def __init__(__self__, *,
                 az: Optional[builtins.str] = None):
        """
        :param builtins.str az: 每个节点所属的可用区。
        """
        if az is not None:
            pulumi.set(__self__, "az", az)

    @property
    @pulumi.getter
    def az(self) -> Optional[builtins.str]:
        """
        每个节点所属的可用区。
        """
        return pulumi.get(self, "az")


@pulumi.output_type
class InstanceInstanceShard(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "nodeNumber":
            suggest = "node_number"
        elif key == "serverNodes":
            suggest = "server_nodes"
        elif key == "shardId":
            suggest = "shard_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in InstanceInstanceShard. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        InstanceInstanceShard.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        InstanceInstanceShard.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 node_number: Optional[builtins.int] = None,
                 server_nodes: Optional[Sequence['outputs.InstanceInstanceShardServerNode']] = None,
                 shard_id: Optional[builtins.str] = None):
        """
        :param builtins.int node_number: 分片中的节点数量
        :param builtins.str shard_id: 分片 ID。
        """
        if node_number is not None:
            pulumi.set(__self__, "node_number", node_number)
        if server_nodes is not None:
            pulumi.set(__self__, "server_nodes", server_nodes)
        if shard_id is not None:
            pulumi.set(__self__, "shard_id", shard_id)

    @property
    @pulumi.getter(name="nodeNumber")
    def node_number(self) -> Optional[builtins.int]:
        """
        分片中的节点数量
        """
        return pulumi.get(self, "node_number")

    @property
    @pulumi.getter(name="serverNodes")
    def server_nodes(self) -> Optional[Sequence['outputs.InstanceInstanceShardServerNode']]:
        return pulumi.get(self, "server_nodes")

    @property
    @pulumi.getter(name="shardId")
    def shard_id(self) -> Optional[builtins.str]:
        """
        分片 ID。
        """
        return pulumi.get(self, "shard_id")


@pulumi.output_type
class InstanceInstanceShardServerNode(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "currentRole":
            suggest = "current_role"
        elif key == "nodeId":
            suggest = "node_id"
        elif key == "zoneId":
            suggest = "zone_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in InstanceInstanceShardServerNode. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        InstanceInstanceShardServerNode.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        InstanceInstanceShardServerNode.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 current_role: Optional[builtins.str] = None,
                 node_id: Optional[builtins.str] = None,
                 status: Optional[builtins.str] = None,
                 zone_id: Optional[builtins.str] = None):
        """
        :param builtins.str current_role: 节点当前的角色。取值范围如下：PrimaryNode：主节点。SecondaryNode：从节点。
        :param builtins.str node_id: 节点 ID。
        :param builtins.str status: 节点状态。取值范围如下：deploy：启动中。running：运行中。loading：数据加载中。error：错误。
        :param builtins.str zone_id: 节点所在的可用区。
        """
        if current_role is not None:
            pulumi.set(__self__, "current_role", current_role)
        if node_id is not None:
            pulumi.set(__self__, "node_id", node_id)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if zone_id is not None:
            pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="currentRole")
    def current_role(self) -> Optional[builtins.str]:
        """
        节点当前的角色。取值范围如下：PrimaryNode：主节点。SecondaryNode：从节点。
        """
        return pulumi.get(self, "current_role")

    @property
    @pulumi.getter(name="nodeId")
    def node_id(self) -> Optional[builtins.str]:
        """
        节点 ID。
        """
        return pulumi.get(self, "node_id")

    @property
    @pulumi.getter
    def status(self) -> Optional[builtins.str]:
        """
        节点状态。取值范围如下：deploy：启动中。running：运行中。loading：数据加载中。error：错误。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> Optional[builtins.str]:
        """
        节点所在的可用区。
        """
        return pulumi.get(self, "zone_id")


@pulumi.output_type
class InstanceTag(dict):
    def __init__(__self__, *,
                 key: Optional[builtins.str] = None,
                 value: Optional[builtins.str] = None):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        if key is not None:
            pulumi.set(__self__, "key", key)
        if value is not None:
            pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> Optional[builtins.str]:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> Optional[builtins.str]:
        """
        标签值。
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class InstanceVisitAddr(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "addrType":
            suggest = "addr_type"
        elif key == "eipId":
            suggest = "eip_id"
        elif key == "viPv6":
            suggest = "vi_pv6"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in InstanceVisitAddr. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        InstanceVisitAddr.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        InstanceVisitAddr.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 addr_type: Optional[builtins.str] = None,
                 address: Optional[builtins.str] = None,
                 eip_id: Optional[builtins.str] = None,
                 port: Optional[builtins.str] = None,
                 vi_pv6: Optional[builtins.str] = None,
                 vip: Optional[builtins.str] = None):
        """
        :param builtins.str addr_type: 连接地址类型，取值范围如下：Private：私网连接地址；Public：公网连接地址；DirectLink：直连地址。
        :param builtins.str address: IP 地址或者域名。
        :param builtins.str eip_id: 实例公网地址所绑定的EIP ID。仅当连接地址类型（即AddrType）为Public公网连接地址时，返回该参数。
        :param builtins.str port: 端口号。
        :param builtins.str vi_pv6: 连接地址所对应的 IPv6 地址。
        :param builtins.str vip: 连接地址所对应的 IPv4 地址。
        """
        if addr_type is not None:
            pulumi.set(__self__, "addr_type", addr_type)
        if address is not None:
            pulumi.set(__self__, "address", address)
        if eip_id is not None:
            pulumi.set(__self__, "eip_id", eip_id)
        if port is not None:
            pulumi.set(__self__, "port", port)
        if vi_pv6 is not None:
            pulumi.set(__self__, "vi_pv6", vi_pv6)
        if vip is not None:
            pulumi.set(__self__, "vip", vip)

    @property
    @pulumi.getter(name="addrType")
    def addr_type(self) -> Optional[builtins.str]:
        """
        连接地址类型，取值范围如下：Private：私网连接地址；Public：公网连接地址；DirectLink：直连地址。
        """
        return pulumi.get(self, "addr_type")

    @property
    @pulumi.getter
    def address(self) -> Optional[builtins.str]:
        """
        IP 地址或者域名。
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter(name="eipId")
    def eip_id(self) -> Optional[builtins.str]:
        """
        实例公网地址所绑定的EIP ID。仅当连接地址类型（即AddrType）为Public公网连接地址时，返回该参数。
        """
        return pulumi.get(self, "eip_id")

    @property
    @pulumi.getter
    def port(self) -> Optional[builtins.str]:
        """
        端口号。
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter(name="viPv6")
    def vi_pv6(self) -> Optional[builtins.str]:
        """
        连接地址所对应的 IPv6 地址。
        """
        return pulumi.get(self, "vi_pv6")

    @property
    @pulumi.getter
    def vip(self) -> Optional[builtins.str]:
        """
        连接地址所对应的 IPv4 地址。
        """
        return pulumi.get(self, "vip")


@pulumi.output_type
class GetInstanceCapacityResult(dict):
    def __init__(__self__, *,
                 total: builtins.int,
                 used: builtins.int):
        """
        :param builtins.int total: 当前实例的内存总容量。单位：MiB。
        :param builtins.int used: 当前实例已用容量。单位：MiB。
        """
        pulumi.set(__self__, "total", total)
        pulumi.set(__self__, "used", used)

    @property
    @pulumi.getter
    def total(self) -> builtins.int:
        """
        当前实例的内存总容量。单位：MiB。
        """
        return pulumi.get(self, "total")

    @property
    @pulumi.getter
    def used(self) -> builtins.int:
        """
        当前实例已用容量。单位：MiB。
        """
        return pulumi.get(self, "used")


@pulumi.output_type
class GetInstanceConfigureNodeResult(dict):
    def __init__(__self__, *,
                 az: builtins.str):
        """
        :param builtins.str az: 每个节点所属的可用区。
        """
        pulumi.set(__self__, "az", az)

    @property
    @pulumi.getter
    def az(self) -> builtins.str:
        """
        每个节点所属的可用区。
        """
        return pulumi.get(self, "az")


@pulumi.output_type
class GetInstanceInstanceShardResult(dict):
    def __init__(__self__, *,
                 node_number: builtins.int,
                 server_nodes: Sequence['outputs.GetInstanceInstanceShardServerNodeResult'],
                 shard_id: builtins.str):
        """
        :param builtins.int node_number: 分片中的节点数量
        :param Sequence['GetInstanceInstanceShardServerNodeArgs'] server_nodes: 分片中所有 Server 节点的详情列表。
        :param builtins.str shard_id: 分片 ID。
        """
        pulumi.set(__self__, "node_number", node_number)
        pulumi.set(__self__, "server_nodes", server_nodes)
        pulumi.set(__self__, "shard_id", shard_id)

    @property
    @pulumi.getter(name="nodeNumber")
    def node_number(self) -> builtins.int:
        """
        分片中的节点数量
        """
        return pulumi.get(self, "node_number")

    @property
    @pulumi.getter(name="serverNodes")
    def server_nodes(self) -> Sequence['outputs.GetInstanceInstanceShardServerNodeResult']:
        """
        分片中所有 Server 节点的详情列表。
        """
        return pulumi.get(self, "server_nodes")

    @property
    @pulumi.getter(name="shardId")
    def shard_id(self) -> builtins.str:
        """
        分片 ID。
        """
        return pulumi.get(self, "shard_id")


@pulumi.output_type
class GetInstanceInstanceShardServerNodeResult(dict):
    def __init__(__self__, *,
                 current_role: builtins.str,
                 node_id: builtins.str,
                 status: builtins.str,
                 zone_id: builtins.str):
        """
        :param builtins.str current_role: 节点当前的角色。取值范围如下：PrimaryNode：主节点。SecondaryNode：从节点。
        :param builtins.str node_id: 节点 ID。
        :param builtins.str status: 节点状态。取值范围如下：deploy：启动中。running：运行中。loading：数据加载中。error：错误。
        :param builtins.str zone_id: 节点所在的可用区。
        """
        pulumi.set(__self__, "current_role", current_role)
        pulumi.set(__self__, "node_id", node_id)
        pulumi.set(__self__, "status", status)
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="currentRole")
    def current_role(self) -> builtins.str:
        """
        节点当前的角色。取值范围如下：PrimaryNode：主节点。SecondaryNode：从节点。
        """
        return pulumi.get(self, "current_role")

    @property
    @pulumi.getter(name="nodeId")
    def node_id(self) -> builtins.str:
        """
        节点 ID。
        """
        return pulumi.get(self, "node_id")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        节点状态。取值范围如下：deploy：启动中。running：运行中。loading：数据加载中。error：错误。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        节点所在的可用区。
        """
        return pulumi.get(self, "zone_id")


@pulumi.output_type
class GetInstanceTagResult(dict):
    def __init__(__self__, *,
                 key: builtins.str,
                 value: builtins.str):
        """
        :param builtins.str key: 标签键。
        :param builtins.str value: 标签值。
        """
        pulumi.set(__self__, "key", key)
        pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def key(self) -> builtins.str:
        """
        标签键。
        """
        return pulumi.get(self, "key")

    @property
    @pulumi.getter
    def value(self) -> builtins.str:
        """
        标签值。
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class GetInstanceVisitAddrResult(dict):
    def __init__(__self__, *,
                 addr_type: builtins.str,
                 address: builtins.str,
                 eip_id: builtins.str,
                 port: builtins.str,
                 vi_pv6: builtins.str,
                 vip: builtins.str):
        """
        :param builtins.str addr_type: 连接地址类型，取值范围如下：Private：私网连接地址；Public：公网连接地址；DirectLink：直连地址。
        :param builtins.str address: IP 地址或者域名。
        :param builtins.str eip_id: 实例公网地址所绑定的EIP ID。仅当连接地址类型（即AddrType）为Public公网连接地址时，返回该参数。
        :param builtins.str port: 端口号。
        :param builtins.str vi_pv6: 连接地址所对应的 IPv6 地址。
        :param builtins.str vip: 连接地址所对应的 IPv4 地址。
        """
        pulumi.set(__self__, "addr_type", addr_type)
        pulumi.set(__self__, "address", address)
        pulumi.set(__self__, "eip_id", eip_id)
        pulumi.set(__self__, "port", port)
        pulumi.set(__self__, "vi_pv6", vi_pv6)
        pulumi.set(__self__, "vip", vip)

    @property
    @pulumi.getter(name="addrType")
    def addr_type(self) -> builtins.str:
        """
        连接地址类型，取值范围如下：Private：私网连接地址；Public：公网连接地址；DirectLink：直连地址。
        """
        return pulumi.get(self, "addr_type")

    @property
    @pulumi.getter
    def address(self) -> builtins.str:
        """
        IP 地址或者域名。
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter(name="eipId")
    def eip_id(self) -> builtins.str:
        """
        实例公网地址所绑定的EIP ID。仅当连接地址类型（即AddrType）为Public公网连接地址时，返回该参数。
        """
        return pulumi.get(self, "eip_id")

    @property
    @pulumi.getter
    def port(self) -> builtins.str:
        """
        端口号。
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter(name="viPv6")
    def vi_pv6(self) -> builtins.str:
        """
        连接地址所对应的 IPv6 地址。
        """
        return pulumi.get(self, "vi_pv6")

    @property
    @pulumi.getter
    def vip(self) -> builtins.str:
        """
        连接地址所对应的 IPv4 地址。
        """
        return pulumi.get(self, "vip")


