# 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__ = [
    'GetXoaTemplateResult',
    'AwaitableGetXoaTemplateResult',
    'get_xoa_template',
    'get_xoa_template_output',
]

@pulumi.output_type
class GetXoaTemplateResult:
    """
    A collection of values returned by getXoaTemplate.
    """
    def __init__(__self__, id=None, name_label=None, pool_id=None, uuid=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        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 uuid and not isinstance(uuid, str):
            raise TypeError("Expected argument 'uuid' to be a str")
        pulumi.set(__self__, "uuid", uuid)

    @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="nameLabel")
    def name_label(self) -> str:
        """
        The name of the template to look up.
        """
        return pulumi.get(self, "name_label")

    @property
    @pulumi.getter(name="poolId")
    def pool_id(self) -> Optional[str]:
        """
        The id of the pool that the template belongs to.
        """
        return pulumi.get(self, "pool_id")

    @property
    @pulumi.getter
    def uuid(self) -> str:
        """
        The uuid of the template.
        """
        return pulumi.get(self, "uuid")


class AwaitableGetXoaTemplateResult(GetXoaTemplateResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetXoaTemplateResult(
            id=self.id,
            name_label=self.name_label,
            pool_id=self.pool_id,
            uuid=self.uuid)


def get_xoa_template(name_label: Optional[str] = None,
                     pool_id: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetXoaTemplateResult:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    template = xenorchestra.get_xoa_template(name_label="Ubuntu Bionic Beaver 18.04")
    demo_vm = xenorchestra.Vm("demo-vm", template=template.id)
    ```


    :param str name_label: The name of the template to look up.
    :param str pool_id: The id of the pool that the template belongs to.
    """
    __args__ = dict()
    __args__['nameLabel'] = name_label
    __args__['poolId'] = pool_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('xenorchestra:index/getXoaTemplate:getXoaTemplate', __args__, opts=opts, typ=GetXoaTemplateResult).value

    return AwaitableGetXoaTemplateResult(
        id=pulumi.get(__ret__, 'id'),
        name_label=pulumi.get(__ret__, 'name_label'),
        pool_id=pulumi.get(__ret__, 'pool_id'),
        uuid=pulumi.get(__ret__, 'uuid'))
def get_xoa_template_output(name_label: Optional[pulumi.Input[str]] = None,
                            pool_id: Optional[pulumi.Input[Optional[str]]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetXoaTemplateResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    template = xenorchestra.get_xoa_template(name_label="Ubuntu Bionic Beaver 18.04")
    demo_vm = xenorchestra.Vm("demo-vm", template=template.id)
    ```


    :param str name_label: The name of the template to look up.
    :param str pool_id: The id of the pool that the template belongs to.
    """
    __args__ = dict()
    __args__['nameLabel'] = name_label
    __args__['poolId'] = pool_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('xenorchestra:index/getXoaTemplate:getXoaTemplate', __args__, opts=opts, typ=GetXoaTemplateResult)
    return __ret__.apply(lambda __response__: GetXoaTemplateResult(
        id=pulumi.get(__response__, 'id'),
        name_label=pulumi.get(__response__, 'name_label'),
        pool_id=pulumi.get(__response__, 'pool_id'),
        uuid=pulumi.get(__response__, 'uuid')))
