# 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__ = [
    'GetKubernetesNodePoolsResult',
    'AwaitableGetKubernetesNodePoolsResult',
    'get_kubernetes_node_pools',
    'get_kubernetes_node_pools_output',
]

@pulumi.output_type
class GetKubernetesNodePoolsResult:
    """
    A collection of values returned by getKubernetesNodePools.
    """
    def __init__(__self__, cluster_id=None, id=None, ids=None, node_pool_name=None, nodepools=None, output_file=None):
        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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ids and not isinstance(ids, list):
            raise TypeError("Expected argument 'ids' to be a list")
        pulumi.set(__self__, "ids", ids)
        if node_pool_name and not isinstance(node_pool_name, str):
            raise TypeError("Expected argument 'node_pool_name' to be a str")
        pulumi.set(__self__, "node_pool_name", node_pool_name)
        if nodepools and not isinstance(nodepools, list):
            raise TypeError("Expected argument 'nodepools' to be a list")
        pulumi.set(__self__, "nodepools", nodepools)
        if output_file and not isinstance(output_file, str):
            raise TypeError("Expected argument 'output_file' to be a str")
        pulumi.set(__self__, "output_file", output_file)

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

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def ids(self) -> Sequence[builtins.str]:
        """
        A list of Nodepool IDs.
        """
        return pulumi.get(self, "ids")

    @property
    @pulumi.getter(name="nodePoolName")
    def node_pool_name(self) -> Optional[builtins.str]:
        """
        The name of node pool.
        """
        return pulumi.get(self, "node_pool_name")

    @property
    @pulumi.getter
    def nodepools(self) -> Sequence['outputs.GetKubernetesNodePoolsNodepoolResult']:
        """
        A list of Nodepool Entries. Each element contains the following attributes:
        """
        return pulumi.get(self, "nodepools")

    @property
    @pulumi.getter(name="outputFile")
    def output_file(self) -> Optional[builtins.str]:
        return pulumi.get(self, "output_file")


class AwaitableGetKubernetesNodePoolsResult(GetKubernetesNodePoolsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKubernetesNodePoolsResult(
            cluster_id=self.cluster_id,
            id=self.id,
            ids=self.ids,
            node_pool_name=self.node_pool_name,
            nodepools=self.nodepools,
            output_file=self.output_file)


def get_kubernetes_node_pools(cluster_id: Optional[builtins.str] = None,
                              ids: Optional[Sequence[builtins.str]] = None,
                              node_pool_name: Optional[builtins.str] = None,
                              output_file: Optional[builtins.str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKubernetesNodePoolsResult:
    """
    This data source provides Ack Nodepool available to the user.[What is Nodepool](https://next.api.alibabacloud.com/document/CS/2015-12-15/CreateClusterNodePool)

    > **NOTE:** Available since v1.246.0.


    :param builtins.str cluster_id: The id of kubernetes cluster.
    :param Sequence[builtins.str] ids: A list of Nodepool IDs.
    :param builtins.str node_pool_name: The name of node pool.
    :param builtins.str output_file: File name where to save data source results (after running `pulumi preview`).
    """
    __args__ = dict()
    __args__['clusterId'] = cluster_id
    __args__['ids'] = ids
    __args__['nodePoolName'] = node_pool_name
    __args__['outputFile'] = output_file
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('alicloud:cs/getKubernetesNodePools:getKubernetesNodePools', __args__, opts=opts, typ=GetKubernetesNodePoolsResult).value

    return AwaitableGetKubernetesNodePoolsResult(
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        id=pulumi.get(__ret__, 'id'),
        ids=pulumi.get(__ret__, 'ids'),
        node_pool_name=pulumi.get(__ret__, 'node_pool_name'),
        nodepools=pulumi.get(__ret__, 'nodepools'),
        output_file=pulumi.get(__ret__, 'output_file'))
def get_kubernetes_node_pools_output(cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                                     ids: Optional[pulumi.Input[Optional[Sequence[builtins.str]]]] = None,
                                     node_pool_name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                     output_file: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKubernetesNodePoolsResult]:
    """
    This data source provides Ack Nodepool available to the user.[What is Nodepool](https://next.api.alibabacloud.com/document/CS/2015-12-15/CreateClusterNodePool)

    > **NOTE:** Available since v1.246.0.


    :param builtins.str cluster_id: The id of kubernetes cluster.
    :param Sequence[builtins.str] ids: A list of Nodepool IDs.
    :param builtins.str node_pool_name: The name of node pool.
    :param builtins.str output_file: File name where to save data source results (after running `pulumi preview`).
    """
    __args__ = dict()
    __args__['clusterId'] = cluster_id
    __args__['ids'] = ids
    __args__['nodePoolName'] = node_pool_name
    __args__['outputFile'] = output_file
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('alicloud:cs/getKubernetesNodePools:getKubernetesNodePools', __args__, opts=opts, typ=GetKubernetesNodePoolsResult)
    return __ret__.apply(lambda __response__: GetKubernetesNodePoolsResult(
        cluster_id=pulumi.get(__response__, 'cluster_id'),
        id=pulumi.get(__response__, 'id'),
        ids=pulumi.get(__response__, 'ids'),
        node_pool_name=pulumi.get(__response__, 'node_pool_name'),
        nodepools=pulumi.get(__response__, 'nodepools'),
        output_file=pulumi.get(__response__, 'output_file')))
