# 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__ = [
    'GetClusterResult',
    'AwaitableGetClusterResult',
    'get_cluster',
    'get_cluster_output',
]

@pulumi.output_type
class GetClusterResult:
    """
    A collection of values returned by getCluster.
    """
    def __init__(__self__, account_id=None, application_extras=None, application_names=None, applications=None, bootstrap_scripts=None, charge_pre_config=None, charge_type=None, cluster_domain_names=None, cluster_id=None, cluster_name=None, cluster_state=None, cluster_type=None, created_time=None, creator_id=None, creator_name=None, deploy_mode=None, ecs_image_id=None, expire_time=None, history_server_mode=None, id=None, node_attribute=None, node_group_attributes=None, project_name=None, ready_time=None, release_version=None, security_group_id=None, security_mode=None, state_change_reason=None, tags=None, terminate_time=None, vpc_id=None):
        if account_id and not isinstance(account_id, int):
            raise TypeError("Expected argument 'account_id' to be a int")
        pulumi.set(__self__, "account_id", account_id)
        if application_extras and not isinstance(application_extras, list):
            raise TypeError("Expected argument 'application_extras' to be a list")
        pulumi.set(__self__, "application_extras", application_extras)
        if application_names and not isinstance(application_names, list):
            raise TypeError("Expected argument 'application_names' to be a list")
        pulumi.set(__self__, "application_names", application_names)
        if applications and not isinstance(applications, list):
            raise TypeError("Expected argument 'applications' to be a list")
        pulumi.set(__self__, "applications", applications)
        if bootstrap_scripts and not isinstance(bootstrap_scripts, list):
            raise TypeError("Expected argument 'bootstrap_scripts' to be a list")
        pulumi.set(__self__, "bootstrap_scripts", bootstrap_scripts)
        if charge_pre_config and not isinstance(charge_pre_config, dict):
            raise TypeError("Expected argument 'charge_pre_config' to be a dict")
        pulumi.set(__self__, "charge_pre_config", charge_pre_config)
        if charge_type and not isinstance(charge_type, str):
            raise TypeError("Expected argument 'charge_type' to be a str")
        pulumi.set(__self__, "charge_type", charge_type)
        if cluster_domain_names and not isinstance(cluster_domain_names, list):
            raise TypeError("Expected argument 'cluster_domain_names' to be a list")
        pulumi.set(__self__, "cluster_domain_names", cluster_domain_names)
        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 cluster_name and not isinstance(cluster_name, str):
            raise TypeError("Expected argument 'cluster_name' to be a str")
        pulumi.set(__self__, "cluster_name", cluster_name)
        if cluster_state and not isinstance(cluster_state, str):
            raise TypeError("Expected argument 'cluster_state' to be a str")
        pulumi.set(__self__, "cluster_state", cluster_state)
        if cluster_type and not isinstance(cluster_type, str):
            raise TypeError("Expected argument 'cluster_type' to be a str")
        pulumi.set(__self__, "cluster_type", cluster_type)
        if created_time and not isinstance(created_time, int):
            raise TypeError("Expected argument 'created_time' to be a int")
        pulumi.set(__self__, "created_time", created_time)
        if creator_id and not isinstance(creator_id, int):
            raise TypeError("Expected argument 'creator_id' to be a int")
        pulumi.set(__self__, "creator_id", creator_id)
        if creator_name and not isinstance(creator_name, str):
            raise TypeError("Expected argument 'creator_name' to be a str")
        pulumi.set(__self__, "creator_name", creator_name)
        if deploy_mode and not isinstance(deploy_mode, str):
            raise TypeError("Expected argument 'deploy_mode' to be a str")
        pulumi.set(__self__, "deploy_mode", deploy_mode)
        if ecs_image_id and not isinstance(ecs_image_id, str):
            raise TypeError("Expected argument 'ecs_image_id' to be a str")
        pulumi.set(__self__, "ecs_image_id", ecs_image_id)
        if expire_time and not isinstance(expire_time, int):
            raise TypeError("Expected argument 'expire_time' to be a int")
        pulumi.set(__self__, "expire_time", expire_time)
        if history_server_mode and not isinstance(history_server_mode, str):
            raise TypeError("Expected argument 'history_server_mode' to be a str")
        pulumi.set(__self__, "history_server_mode", history_server_mode)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if node_attribute and not isinstance(node_attribute, dict):
            raise TypeError("Expected argument 'node_attribute' to be a dict")
        pulumi.set(__self__, "node_attribute", node_attribute)
        if node_group_attributes and not isinstance(node_group_attributes, list):
            raise TypeError("Expected argument 'node_group_attributes' to be a list")
        pulumi.set(__self__, "node_group_attributes", node_group_attributes)
        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 ready_time and not isinstance(ready_time, int):
            raise TypeError("Expected argument 'ready_time' to be a int")
        pulumi.set(__self__, "ready_time", ready_time)
        if release_version and not isinstance(release_version, str):
            raise TypeError("Expected argument 'release_version' to be a str")
        pulumi.set(__self__, "release_version", release_version)
        if security_group_id and not isinstance(security_group_id, str):
            raise TypeError("Expected argument 'security_group_id' to be a str")
        pulumi.set(__self__, "security_group_id", security_group_id)
        if security_mode and not isinstance(security_mode, str):
            raise TypeError("Expected argument 'security_mode' to be a str")
        pulumi.set(__self__, "security_mode", security_mode)
        if state_change_reason and not isinstance(state_change_reason, dict):
            raise TypeError("Expected argument 'state_change_reason' to be a dict")
        pulumi.set(__self__, "state_change_reason", state_change_reason)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if terminate_time and not isinstance(terminate_time, int):
            raise TypeError("Expected argument 'terminate_time' to be a int")
        pulumi.set(__self__, "terminate_time", terminate_time)
        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)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.int:
        """
        账号ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="applicationExtras")
    def application_extras(self) -> Sequence['outputs.GetClusterApplicationExtraResult']:
        """
        集群服务的扩展信息列表，包括服务的自定义配置项、服务组件的自定义部署拓扑设置，以及服务的元数据连接配置信息。
        """
        return pulumi.get(self, "application_extras")

    @property
    @pulumi.getter(name="applicationNames")
    def application_names(self) -> Sequence[builtins.str]:
        """
        集群安装的服务名称列表。创建字段。
        """
        return pulumi.get(self, "application_names")

    @property
    @pulumi.getter
    def applications(self) -> Sequence['outputs.GetClusterApplicationResult']:
        """
        集群安装的服务列表。只读字段。
        """
        return pulumi.get(self, "applications")

    @property
    @pulumi.getter(name="bootstrapScripts")
    def bootstrap_scripts(self) -> Sequence['outputs.GetClusterBootstrapScriptResult']:
        """
        集群的引导脚本列表。
        """
        return pulumi.get(self, "bootstrap_scripts")

    @property
    @pulumi.getter(name="chargePreConfig")
    def charge_pre_config(self) -> 'outputs.GetClusterChargePreConfigResult':
        """
        包月的配置参数，当chargeType=PRE时，必选。
        """
        return pulumi.get(self, "charge_pre_config")

    @property
    @pulumi.getter(name="chargeType")
    def charge_type(self) -> builtins.str:
        """
        付费类型，PRE表示包月，POST表示按量计费。
        """
        return pulumi.get(self, "charge_type")

    @property
    @pulumi.getter(name="clusterDomainNames")
    def cluster_domain_names(self) -> Sequence[builtins.str]:
        """
        集群dns域名后缀列表。
        """
        return pulumi.get(self, "cluster_domain_names")

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

    @property
    @pulumi.getter(name="clusterName")
    def cluster_name(self) -> builtins.str:
        """
        集群名称。
        """
        return pulumi.get(self, "cluster_name")

    @property
    @pulumi.getter(name="clusterState")
    def cluster_state(self) -> builtins.str:
        """
        集群状态。
        """
        return pulumi.get(self, "cluster_state")

    @property
    @pulumi.getter(name="clusterType")
    def cluster_type(self) -> builtins.str:
        """
        集群类型。
        """
        return pulumi.get(self, "cluster_type")

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

    @property
    @pulumi.getter(name="creatorId")
    def creator_id(self) -> builtins.int:
        """
        创建者ID。
        """
        return pulumi.get(self, "creator_id")

    @property
    @pulumi.getter(name="creatorName")
    def creator_name(self) -> builtins.str:
        """
        创建者名称。
        """
        return pulumi.get(self, "creator_name")

    @property
    @pulumi.getter(name="deployMode")
    def deploy_mode(self) -> builtins.str:
        """
        部署模式。SIMPLE表示简单模式，HIGH_AVAILABLE表示高可用模式。
        """
        return pulumi.get(self, "deploy_mode")

    @property
    @pulumi.getter(name="ecsImageId")
    def ecs_image_id(self) -> builtins.str:
        """
        ECS镜像ID。
        """
        return pulumi.get(self, "ecs_image_id")

    @property
    @pulumi.getter(name="expireTime")
    def expire_time(self) -> builtins.int:
        """
        集群过期时间。
        """
        return pulumi.get(self, "expire_time")

    @property
    @pulumi.getter(name="historyServerMode")
    def history_server_mode(self) -> builtins.str:
        """
        HistoryServer模式，LOCAL将活动数据存储于集群内，PHS将活动数据存储于集群外。
        """
        return pulumi.get(self, "history_server_mode")

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

    @property
    @pulumi.getter(name="nodeAttribute")
    def node_attribute(self) -> 'outputs.GetClusterNodeAttributeResult':
        """
        集群全局的节点信息。
        """
        return pulumi.get(self, "node_attribute")

    @property
    @pulumi.getter(name="nodeGroupAttributes")
    def node_group_attributes(self) -> Sequence['outputs.GetClusterNodeGroupAttributeResult']:
        """
        节点组属性列表。
        """
        return pulumi.get(self, "node_group_attributes")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        资源所属项目，默认为default。一个资源只能归属于一个项目。只能包含字母、数字、下划线“_”、点“.”和中划线“-”。长度限制在64个字符以内。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="readyTime")
    def ready_time(self) -> builtins.int:
        """
        集群创建完成时间。
        """
        return pulumi.get(self, "ready_time")

    @property
    @pulumi.getter(name="releaseVersion")
    def release_version(self) -> builtins.str:
        """
        集群版本。
        """
        return pulumi.get(self, "release_version")

    @property
    @pulumi.getter(name="securityGroupId")
    def security_group_id(self) -> builtins.str:
        """
        集群全局安全组ID，所有节点组下的ecs都会加入该安全组。
        """
        return pulumi.get(self, "security_group_id")

    @property
    @pulumi.getter(name="securityMode")
    def security_mode(self) -> builtins.str:
        """
        安全模式。
        """
        return pulumi.get(self, "security_mode")

    @property
    @pulumi.getter(name="stateChangeReason")
    def state_change_reason(self) -> 'outputs.GetClusterStateChangeReasonResult':
        """
        状态变更原因。
        """
        return pulumi.get(self, "state_change_reason")

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

    @property
    @pulumi.getter(name="terminateTime")
    def terminate_time(self) -> builtins.int:
        """
        集群终止时间。
        """
        return pulumi.get(self, "terminate_time")

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


class AwaitableGetClusterResult(GetClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterResult(
            account_id=self.account_id,
            application_extras=self.application_extras,
            application_names=self.application_names,
            applications=self.applications,
            bootstrap_scripts=self.bootstrap_scripts,
            charge_pre_config=self.charge_pre_config,
            charge_type=self.charge_type,
            cluster_domain_names=self.cluster_domain_names,
            cluster_id=self.cluster_id,
            cluster_name=self.cluster_name,
            cluster_state=self.cluster_state,
            cluster_type=self.cluster_type,
            created_time=self.created_time,
            creator_id=self.creator_id,
            creator_name=self.creator_name,
            deploy_mode=self.deploy_mode,
            ecs_image_id=self.ecs_image_id,
            expire_time=self.expire_time,
            history_server_mode=self.history_server_mode,
            id=self.id,
            node_attribute=self.node_attribute,
            node_group_attributes=self.node_group_attributes,
            project_name=self.project_name,
            ready_time=self.ready_time,
            release_version=self.release_version,
            security_group_id=self.security_group_id,
            security_mode=self.security_mode,
            state_change_reason=self.state_change_reason,
            tags=self.tags,
            terminate_time=self.terminate_time,
            vpc_id=self.vpc_id)


def get_cluster(id: Optional[builtins.str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetClusterResult:
    """
    Data Source schema for Byteplus::EMR::Cluster


    :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:emr/getCluster:getCluster', __args__, opts=opts, typ=GetClusterResult).value

    return AwaitableGetClusterResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        application_extras=pulumi.get(__ret__, 'application_extras'),
        application_names=pulumi.get(__ret__, 'application_names'),
        applications=pulumi.get(__ret__, 'applications'),
        bootstrap_scripts=pulumi.get(__ret__, 'bootstrap_scripts'),
        charge_pre_config=pulumi.get(__ret__, 'charge_pre_config'),
        charge_type=pulumi.get(__ret__, 'charge_type'),
        cluster_domain_names=pulumi.get(__ret__, 'cluster_domain_names'),
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        cluster_name=pulumi.get(__ret__, 'cluster_name'),
        cluster_state=pulumi.get(__ret__, 'cluster_state'),
        cluster_type=pulumi.get(__ret__, 'cluster_type'),
        created_time=pulumi.get(__ret__, 'created_time'),
        creator_id=pulumi.get(__ret__, 'creator_id'),
        creator_name=pulumi.get(__ret__, 'creator_name'),
        deploy_mode=pulumi.get(__ret__, 'deploy_mode'),
        ecs_image_id=pulumi.get(__ret__, 'ecs_image_id'),
        expire_time=pulumi.get(__ret__, 'expire_time'),
        history_server_mode=pulumi.get(__ret__, 'history_server_mode'),
        id=pulumi.get(__ret__, 'id'),
        node_attribute=pulumi.get(__ret__, 'node_attribute'),
        node_group_attributes=pulumi.get(__ret__, 'node_group_attributes'),
        project_name=pulumi.get(__ret__, 'project_name'),
        ready_time=pulumi.get(__ret__, 'ready_time'),
        release_version=pulumi.get(__ret__, 'release_version'),
        security_group_id=pulumi.get(__ret__, 'security_group_id'),
        security_mode=pulumi.get(__ret__, 'security_mode'),
        state_change_reason=pulumi.get(__ret__, 'state_change_reason'),
        tags=pulumi.get(__ret__, 'tags'),
        terminate_time=pulumi.get(__ret__, 'terminate_time'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'))
def get_cluster_output(id: Optional[pulumi.Input[builtins.str]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetClusterResult]:
    """
    Data Source schema for Byteplus::EMR::Cluster


    :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:emr/getCluster:getCluster', __args__, opts=opts, typ=GetClusterResult)
    return __ret__.apply(lambda __response__: GetClusterResult(
        account_id=pulumi.get(__response__, 'account_id'),
        application_extras=pulumi.get(__response__, 'application_extras'),
        application_names=pulumi.get(__response__, 'application_names'),
        applications=pulumi.get(__response__, 'applications'),
        bootstrap_scripts=pulumi.get(__response__, 'bootstrap_scripts'),
        charge_pre_config=pulumi.get(__response__, 'charge_pre_config'),
        charge_type=pulumi.get(__response__, 'charge_type'),
        cluster_domain_names=pulumi.get(__response__, 'cluster_domain_names'),
        cluster_id=pulumi.get(__response__, 'cluster_id'),
        cluster_name=pulumi.get(__response__, 'cluster_name'),
        cluster_state=pulumi.get(__response__, 'cluster_state'),
        cluster_type=pulumi.get(__response__, 'cluster_type'),
        created_time=pulumi.get(__response__, 'created_time'),
        creator_id=pulumi.get(__response__, 'creator_id'),
        creator_name=pulumi.get(__response__, 'creator_name'),
        deploy_mode=pulumi.get(__response__, 'deploy_mode'),
        ecs_image_id=pulumi.get(__response__, 'ecs_image_id'),
        expire_time=pulumi.get(__response__, 'expire_time'),
        history_server_mode=pulumi.get(__response__, 'history_server_mode'),
        id=pulumi.get(__response__, 'id'),
        node_attribute=pulumi.get(__response__, 'node_attribute'),
        node_group_attributes=pulumi.get(__response__, 'node_group_attributes'),
        project_name=pulumi.get(__response__, 'project_name'),
        ready_time=pulumi.get(__response__, 'ready_time'),
        release_version=pulumi.get(__response__, 'release_version'),
        security_group_id=pulumi.get(__response__, 'security_group_id'),
        security_mode=pulumi.get(__response__, 'security_mode'),
        state_change_reason=pulumi.get(__response__, 'state_change_reason'),
        tags=pulumi.get(__response__, 'tags'),
        terminate_time=pulumi.get(__response__, 'terminate_time'),
        vpc_id=pulumi.get(__response__, 'vpc_id')))
