# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetNodesResult',
    'AwaitableGetNodesResult',
    'get_nodes',
    'get_nodes_output',
]

@pulumi.output_type
class GetNodesResult:
    """
    A collection of values returned by getNodes.
    """
    def __init__(__self__, cpu_counts=None, cpu_utilizations=None, id=None, memory_availables=None, memory_useds=None, names=None, onlines=None, ssl_fingerprints=None, support_levels=None, uptimes=None):
        if cpu_counts and not isinstance(cpu_counts, list):
            raise TypeError("Expected argument 'cpu_counts' to be a list")
        pulumi.set(__self__, "cpu_counts", cpu_counts)
        if cpu_utilizations and not isinstance(cpu_utilizations, list):
            raise TypeError("Expected argument 'cpu_utilizations' to be a list")
        pulumi.set(__self__, "cpu_utilizations", cpu_utilizations)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if memory_availables and not isinstance(memory_availables, list):
            raise TypeError("Expected argument 'memory_availables' to be a list")
        pulumi.set(__self__, "memory_availables", memory_availables)
        if memory_useds and not isinstance(memory_useds, list):
            raise TypeError("Expected argument 'memory_useds' to be a list")
        pulumi.set(__self__, "memory_useds", memory_useds)
        if names and not isinstance(names, list):
            raise TypeError("Expected argument 'names' to be a list")
        pulumi.set(__self__, "names", names)
        if onlines and not isinstance(onlines, list):
            raise TypeError("Expected argument 'onlines' to be a list")
        pulumi.set(__self__, "onlines", onlines)
        if ssl_fingerprints and not isinstance(ssl_fingerprints, list):
            raise TypeError("Expected argument 'ssl_fingerprints' to be a list")
        pulumi.set(__self__, "ssl_fingerprints", ssl_fingerprints)
        if support_levels and not isinstance(support_levels, list):
            raise TypeError("Expected argument 'support_levels' to be a list")
        pulumi.set(__self__, "support_levels", support_levels)
        if uptimes and not isinstance(uptimes, list):
            raise TypeError("Expected argument 'uptimes' to be a list")
        pulumi.set(__self__, "uptimes", uptimes)

    @property
    @pulumi.getter(name="cpuCounts")
    def cpu_counts(self) -> Sequence[int]:
        """
        The CPU count for each node.
        """
        return pulumi.get(self, "cpu_counts")

    @property
    @pulumi.getter(name="cpuUtilizations")
    def cpu_utilizations(self) -> Sequence[float]:
        """
        The CPU utilization on each node.
        """
        return pulumi.get(self, "cpu_utilizations")

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

    @property
    @pulumi.getter(name="memoryAvailables")
    def memory_availables(self) -> Sequence[int]:
        """
        The memory available on each node.
        """
        return pulumi.get(self, "memory_availables")

    @property
    @pulumi.getter(name="memoryUseds")
    def memory_useds(self) -> Sequence[int]:
        """
        The memory used on each node.
        """
        return pulumi.get(self, "memory_useds")

    @property
    @pulumi.getter
    def names(self) -> Sequence[str]:
        """
        The node names.
        """
        return pulumi.get(self, "names")

    @property
    @pulumi.getter
    def onlines(self) -> Sequence[bool]:
        """
        Whether a node is online.
        """
        return pulumi.get(self, "onlines")

    @property
    @pulumi.getter(name="sslFingerprints")
    def ssl_fingerprints(self) -> Sequence[str]:
        """
        The SSL fingerprint for each node.
        """
        return pulumi.get(self, "ssl_fingerprints")

    @property
    @pulumi.getter(name="supportLevels")
    def support_levels(self) -> Sequence[str]:
        """
        The support level for each node.
        """
        return pulumi.get(self, "support_levels")

    @property
    @pulumi.getter
    def uptimes(self) -> Sequence[int]:
        """
        The uptime in seconds for each node.
        """
        return pulumi.get(self, "uptimes")


class AwaitableGetNodesResult(GetNodesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNodesResult(
            cpu_counts=self.cpu_counts,
            cpu_utilizations=self.cpu_utilizations,
            id=self.id,
            memory_availables=self.memory_availables,
            memory_useds=self.memory_useds,
            names=self.names,
            onlines=self.onlines,
            ssl_fingerprints=self.ssl_fingerprints,
            support_levels=self.support_levels,
            uptimes=self.uptimes)


def get_nodes(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNodesResult:
    """
    Retrieves information about all available nodes.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    available_nodes = proxmoxve.Cluster.get_nodes()
    ```
    <!--End PulumiCodeChooser -->
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('proxmoxve:Cluster/getNodes:getNodes', __args__, opts=opts, typ=GetNodesResult).value

    return AwaitableGetNodesResult(
        cpu_counts=pulumi.get(__ret__, 'cpu_counts'),
        cpu_utilizations=pulumi.get(__ret__, 'cpu_utilizations'),
        id=pulumi.get(__ret__, 'id'),
        memory_availables=pulumi.get(__ret__, 'memory_availables'),
        memory_useds=pulumi.get(__ret__, 'memory_useds'),
        names=pulumi.get(__ret__, 'names'),
        onlines=pulumi.get(__ret__, 'onlines'),
        ssl_fingerprints=pulumi.get(__ret__, 'ssl_fingerprints'),
        support_levels=pulumi.get(__ret__, 'support_levels'),
        uptimes=pulumi.get(__ret__, 'uptimes'))


@_utilities.lift_output_func(get_nodes)
def get_nodes_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNodesResult]:
    """
    Retrieves information about all available nodes.

    ## Example Usage

    <!--Start PulumiCodeChooser -->
    ```python
    import pulumi
    import pulumi_proxmoxve as proxmoxve

    available_nodes = proxmoxve.Cluster.get_nodes()
    ```
    <!--End PulumiCodeChooser -->
    """
    ...
