# 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__ = [
    'GetNodeResult',
    'AwaitableGetNodeResult',
    'get_node',
    'get_node_output',
]

@pulumi.output_type
class GetNodeResult:
    """
    A collection of values returned by getNode.
    """
    def __init__(__self__, additional_container_storage_enabled=None, cluster_id=None, container_storage_path=None, created_time=None, id=None, image_id=None, initialize_script=None, instance_id=None, is_virtual=None, keep_instance_name=None, kubernetes_config=None, name=None, node_id=None, node_pool_id=None, roles=None, status=None, updated_time=None, zone_id=None):
        if additional_container_storage_enabled and not isinstance(additional_container_storage_enabled, bool):
            raise TypeError("Expected argument 'additional_container_storage_enabled' to be a bool")
        pulumi.set(__self__, "additional_container_storage_enabled", additional_container_storage_enabled)
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        pulumi.set(__self__, "cluster_id", cluster_id)
        if container_storage_path and not isinstance(container_storage_path, str):
            raise TypeError("Expected argument 'container_storage_path' to be a str")
        pulumi.set(__self__, "container_storage_path", container_storage_path)
        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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_id and not isinstance(image_id, str):
            raise TypeError("Expected argument 'image_id' to be a str")
        pulumi.set(__self__, "image_id", image_id)
        if initialize_script and not isinstance(initialize_script, str):
            raise TypeError("Expected argument 'initialize_script' to be a str")
        pulumi.set(__self__, "initialize_script", initialize_script)
        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 is_virtual and not isinstance(is_virtual, bool):
            raise TypeError("Expected argument 'is_virtual' to be a bool")
        pulumi.set(__self__, "is_virtual", is_virtual)
        if keep_instance_name and not isinstance(keep_instance_name, bool):
            raise TypeError("Expected argument 'keep_instance_name' to be a bool")
        pulumi.set(__self__, "keep_instance_name", keep_instance_name)
        if kubernetes_config and not isinstance(kubernetes_config, dict):
            raise TypeError("Expected argument 'kubernetes_config' to be a dict")
        pulumi.set(__self__, "kubernetes_config", kubernetes_config)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if node_id and not isinstance(node_id, str):
            raise TypeError("Expected argument 'node_id' to be a str")
        pulumi.set(__self__, "node_id", node_id)
        if node_pool_id and not isinstance(node_pool_id, str):
            raise TypeError("Expected argument 'node_pool_id' to be a str")
        pulumi.set(__self__, "node_pool_id", node_pool_id)
        if roles and not isinstance(roles, list):
            raise TypeError("Expected argument 'roles' to be a list")
        pulumi.set(__self__, "roles", roles)
        if status and not isinstance(status, dict):
            raise TypeError("Expected argument 'status' to be a dict")
        pulumi.set(__self__, "status", status)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        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="additionalContainerStorageEnabled")
    def additional_container_storage_enabled(self) -> builtins.bool:
        """
        选择配置节点的数据盘并格式化挂载作为容器镜像和日志的存储目录，取值：false：（默认值）关闭。默认节点池：表示不挂载数据盘。自定义节点池：使用节点池的数据盘配置进行挂载，被添加到节点池的 ECS 实例数据盘必须包含目标节点池指定了挂载的数据盘（含本地盘），且盘类型和大小完全一致。true: 开启。此时必须同时配置 ContainerStoragePath 参数。节点通过 ContainerStoragePath参数中的配置进行挂载，而忽略节点池的数据盘配置，对被添加到节点池的 ECS 实例数据盘无特殊要求。
        """
        return pulumi.get(self, "additional_container_storage_enabled")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> builtins.str:
        """
        集群的 ID。
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter(name="containerStoragePath")
    def container_storage_path(self) -> builtins.str:
        """
        使用该数据盘设备挂载容器和镜像存储目录/var/lib/containerd。
        仅当AdditionalContainerStorageEnabled=true时有效，且不能为空。须满足以下条件，否则将初始化失败：仅支持已挂载数据盘的 ECS 实例。指定数据盘设备名时，请确保该数据盘设备存在，否则会初始化失败。指定数据盘分区或逻辑卷名时，请确保该分区或逻辑卷存在，且为 ext4 文件系统。
        """
        return pulumi.get(self, "container_storage_path")

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

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

    @property
    @pulumi.getter(name="imageId")
    def image_id(self) -> builtins.str:
        """
        节点对应的 ECS 实例使用的镜像 ID。
        """
        return pulumi.get(self, "image_id")

    @property
    @pulumi.getter(name="initializeScript")
    def initialize_script(self) -> builtins.str:
        """
        创建 ECS 节点并完成 Kubernetes 组件部署后执行的脚本。支持 Shell 格式，Base64 编码后长度不超过 1 KB。为空时，节点继承使用默认节点池配置的初始化脚本NodeConfig.InitializeScript。自定义填写脚本内容后，使用自定义的脚本，忽略默认节点池配置的初始化脚本。
        """
        return pulumi.get(self, "initialize_script")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> builtins.str:
        """
        节点对应的云服务器实例 ID。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="isVirtual")
    def is_virtual(self) -> builtins.bool:
        """
        是否为虚拟节点，参数值说明：false：否 true：是。
        """
        return pulumi.get(self, "is_virtual")

    @property
    @pulumi.getter(name="keepInstanceName")
    def keep_instance_name(self) -> builtins.bool:
        """
        是否保留原 ECS 实例名称，取值：false：（默认值）不保留原 ECS 实例名称，由容器服务自动为其命名。true：保留原 ECS 实例名称。
        """
        return pulumi.get(self, "keep_instance_name")

    @property
    @pulumi.getter(name="kubernetesConfig")
    def kubernetes_config(self) -> 'outputs.GetNodeKubernetesConfigResult':
        """
        节点 Kubernetes 相关配置。为空时，节点继承使用默认节点池的 Kubernetes 配置KubernetesConfig.Labels/Taints/Cordon。自定义填写配置后，使用自定义配置内容，忽略默认节点池的 Kubernetes 配置。
        """
        return pulumi.get(self, "kubernetes_config")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        节点名称。
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="nodePoolId")
    def node_pool_id(self) -> builtins.str:
        """
        节点池 ID。不传入参数值：表示将已有 ECS 实例添加到默认节点池。传入参数值：表示将已有 ECS 实例添加到自定义节点池。
        """
        return pulumi.get(self, "node_pool_id")

    @property
    @pulumi.getter
    def roles(self) -> Sequence[builtins.str]:
        """
        节点角色，参数值说明：Worker：Worker节点。
        """
        return pulumi.get(self, "roles")

    @property
    @pulumi.getter
    def status(self) -> 'outputs.GetNodeStatusResult':
        """
        节点状态。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

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


class AwaitableGetNodeResult(GetNodeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNodeResult(
            additional_container_storage_enabled=self.additional_container_storage_enabled,
            cluster_id=self.cluster_id,
            container_storage_path=self.container_storage_path,
            created_time=self.created_time,
            id=self.id,
            image_id=self.image_id,
            initialize_script=self.initialize_script,
            instance_id=self.instance_id,
            is_virtual=self.is_virtual,
            keep_instance_name=self.keep_instance_name,
            kubernetes_config=self.kubernetes_config,
            name=self.name,
            node_id=self.node_id,
            node_pool_id=self.node_pool_id,
            roles=self.roles,
            status=self.status,
            updated_time=self.updated_time,
            zone_id=self.zone_id)


def get_node(id: Optional[builtins.str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodeResult:
    """
    Data Source schema for Byteplus::VKE::Node


    :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:vke/getNode:getNode', __args__, opts=opts, typ=GetNodeResult).value

    return AwaitableGetNodeResult(
        additional_container_storage_enabled=pulumi.get(__ret__, 'additional_container_storage_enabled'),
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        container_storage_path=pulumi.get(__ret__, 'container_storage_path'),
        created_time=pulumi.get(__ret__, 'created_time'),
        id=pulumi.get(__ret__, 'id'),
        image_id=pulumi.get(__ret__, 'image_id'),
        initialize_script=pulumi.get(__ret__, 'initialize_script'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        is_virtual=pulumi.get(__ret__, 'is_virtual'),
        keep_instance_name=pulumi.get(__ret__, 'keep_instance_name'),
        kubernetes_config=pulumi.get(__ret__, 'kubernetes_config'),
        name=pulumi.get(__ret__, 'name'),
        node_id=pulumi.get(__ret__, 'node_id'),
        node_pool_id=pulumi.get(__ret__, 'node_pool_id'),
        roles=pulumi.get(__ret__, 'roles'),
        status=pulumi.get(__ret__, 'status'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_node_output(id: Optional[pulumi.Input[builtins.str]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNodeResult]:
    """
    Data Source schema for Byteplus::VKE::Node


    :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:vke/getNode:getNode', __args__, opts=opts, typ=GetNodeResult)
    return __ret__.apply(lambda __response__: GetNodeResult(
        additional_container_storage_enabled=pulumi.get(__response__, 'additional_container_storage_enabled'),
        cluster_id=pulumi.get(__response__, 'cluster_id'),
        container_storage_path=pulumi.get(__response__, 'container_storage_path'),
        created_time=pulumi.get(__response__, 'created_time'),
        id=pulumi.get(__response__, 'id'),
        image_id=pulumi.get(__response__, 'image_id'),
        initialize_script=pulumi.get(__response__, 'initialize_script'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        is_virtual=pulumi.get(__response__, 'is_virtual'),
        keep_instance_name=pulumi.get(__response__, 'keep_instance_name'),
        kubernetes_config=pulumi.get(__response__, 'kubernetes_config'),
        name=pulumi.get(__response__, 'name'),
        node_id=pulumi.get(__response__, 'node_id'),
        node_pool_id=pulumi.get(__response__, 'node_pool_id'),
        roles=pulumi.get(__response__, 'roles'),
        status=pulumi.get(__response__, 'status'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        zone_id=pulumi.get(__response__, 'zone_id')))
