# 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 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

__all__ = [
    'GetXoaHostResult',
    'AwaitableGetXoaHostResult',
    'get_xoa_host',
    'get_xoa_host_output',
]

@pulumi.output_type
class GetXoaHostResult:
    """
    A collection of values returned by getXoaHost.
    """
    def __init__(__self__, cpus=None, id=None, memory=None, memory_usage=None, name_label=None, pool_id=None, tags=None):
        if cpus and not isinstance(cpus, dict):
            raise TypeError("Expected argument 'cpus' to be a dict")
        pulumi.set(__self__, "cpus", cpus)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if memory and not isinstance(memory, int):
            raise TypeError("Expected argument 'memory' to be a int")
        pulumi.set(__self__, "memory", memory)
        if memory_usage and not isinstance(memory_usage, int):
            raise TypeError("Expected argument 'memory_usage' to be a int")
        pulumi.set(__self__, "memory_usage", memory_usage)
        if name_label and not isinstance(name_label, str):
            raise TypeError("Expected argument 'name_label' to be a str")
        pulumi.set(__self__, "name_label", name_label)
        if pool_id and not isinstance(pool_id, str):
            raise TypeError("Expected argument 'pool_id' to be a str")
        pulumi.set(__self__, "pool_id", pool_id)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter
    def cpus(self) -> Mapping[str, int]:
        """
        CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
        """
        return pulumi.get(self, "cpus")

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

    @property
    @pulumi.getter
    def memory(self) -> int:
        """
        The memory size of the host.
        """
        return pulumi.get(self, "memory")

    @property
    @pulumi.getter(name="memoryUsage")
    def memory_usage(self) -> int:
        """
        The memory usage of the host.
        """
        return pulumi.get(self, "memory_usage")

    @property
    @pulumi.getter(name="nameLabel")
    def name_label(self) -> str:
        """
        The name label of the host.
        """
        return pulumi.get(self, "name_label")

    @property
    @pulumi.getter(name="poolId")
    def pool_id(self) -> str:
        """
        Id of the pool that the host belongs to.
        """
        return pulumi.get(self, "pool_id")

    @property
    @pulumi.getter
    def tags(self) -> Optional[Sequence[str]]:
        """
        The tags (labels) applied to the given entity.
        """
        return pulumi.get(self, "tags")


class AwaitableGetXoaHostResult(GetXoaHostResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetXoaHostResult(
            cpus=self.cpus,
            id=self.id,
            memory=self.memory,
            memory_usage=self.memory_usage,
            name_label=self.name_label,
            pool_id=self.pool_id,
            tags=self.tags)


def get_xoa_host(name_label: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetXoaHostResult:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    host1 = xenorchestra.get_xoa_host(name_label="Your host")
    node = xenorchestra.Vm("node", affinity_host=host1.id)
    ```


    :param str name_label: The name label of the host.
    :param Sequence[str] tags: The tags (labels) applied to the given entity.
    """
    __args__ = dict()
    __args__['nameLabel'] = name_label
    __args__['tags'] = tags
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('xenorchestra:index/getXoaHost:getXoaHost', __args__, opts=opts, typ=GetXoaHostResult).value

    return AwaitableGetXoaHostResult(
        cpus=pulumi.get(__ret__, 'cpus'),
        id=pulumi.get(__ret__, 'id'),
        memory=pulumi.get(__ret__, 'memory'),
        memory_usage=pulumi.get(__ret__, 'memory_usage'),
        name_label=pulumi.get(__ret__, 'name_label'),
        pool_id=pulumi.get(__ret__, 'pool_id'),
        tags=pulumi.get(__ret__, 'tags'))
def get_xoa_host_output(name_label: Optional[pulumi.Input[str]] = None,
                        tags: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetXoaHostResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    host1 = xenorchestra.get_xoa_host(name_label="Your host")
    node = xenorchestra.Vm("node", affinity_host=host1.id)
    ```


    :param str name_label: The name label of the host.
    :param Sequence[str] tags: The tags (labels) applied to the given entity.
    """
    __args__ = dict()
    __args__['nameLabel'] = name_label
    __args__['tags'] = tags
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('xenorchestra:index/getXoaHost:getXoaHost', __args__, opts=opts, typ=GetXoaHostResult)
    return __ret__.apply(lambda __response__: GetXoaHostResult(
        cpus=pulumi.get(__response__, 'cpus'),
        id=pulumi.get(__response__, 'id'),
        memory=pulumi.get(__response__, 'memory'),
        memory_usage=pulumi.get(__response__, 'memory_usage'),
        name_label=pulumi.get(__response__, 'name_label'),
        pool_id=pulumi.get(__response__, 'pool_id'),
        tags=pulumi.get(__response__, 'tags')))
