# 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__ = [
    'GetVdiResult',
    'AwaitableGetVdiResult',
    'get_vdi',
    'get_vdi_output',
]

warnings.warn("""xenorchestra.index/getvdi.getVdi has been deprecated in favor of xenorchestra.index/getxoavdi.getXoaVdi""", DeprecationWarning)

@pulumi.output_type
class GetVdiResult:
    """
    A collection of values returned by getVdi.
    """
    def __init__(__self__, id=None, name_label=None, parent=None, pool_id=None, tags=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 parent and not isinstance(parent, str):
            raise TypeError("Expected argument 'parent' to be a str")
        pulumi.set(__self__, "parent", parent)
        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 id(self) -> str:
        """
        The ID of the VDI.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="nameLabel")
    def name_label(self) -> Optional[str]:
        """
        The name of the VDI to look up.
        """
        return pulumi.get(self, "name_label")

    @property
    @pulumi.getter
    def parent(self) -> str:
        """
        The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
        """
        return pulumi.get(self, "parent")

    @property
    @pulumi.getter(name="poolId")
    def pool_id(self) -> Optional[str]:
        """
        The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
        """
        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 AwaitableGetVdiResult(GetVdiResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVdiResult(
            id=self.id,
            name_label=self.name_label,
            parent=self.parent,
            pool_id=self.pool_id,
            tags=self.tags)


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


    :param str id: The ID of the VDI.
    :param str name_label: The name of the VDI to look up.
    :param str pool_id: The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    :param Sequence[str] tags: The tags (labels) applied to the given entity.
    """
    pulumi.log.warn("""get_vdi is deprecated: xenorchestra.index/getvdi.getVdi has been deprecated in favor of xenorchestra.index/getxoavdi.getXoaVdi""")
    __args__ = dict()
    __args__['id'] = id
    __args__['nameLabel'] = name_label
    __args__['poolId'] = pool_id
    __args__['tags'] = tags
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('xenorchestra:index/getVdi:getVdi', __args__, opts=opts, typ=GetVdiResult).value

    return AwaitableGetVdiResult(
        id=pulumi.get(__ret__, 'id'),
        name_label=pulumi.get(__ret__, 'name_label'),
        parent=pulumi.get(__ret__, 'parent'),
        pool_id=pulumi.get(__ret__, 'pool_id'),
        tags=pulumi.get(__ret__, 'tags'))
def get_vdi_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                   name_label: Optional[pulumi.Input[Optional[str]]] = None,
                   pool_id: Optional[pulumi.Input[Optional[str]]] = None,
                   tags: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVdiResult]:
    """
    ## Example Usage


    :param str id: The ID of the VDI.
    :param str name_label: The name of the VDI to look up.
    :param str pool_id: The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    :param Sequence[str] tags: The tags (labels) applied to the given entity.
    """
    pulumi.log.warn("""get_vdi is deprecated: xenorchestra.index/getvdi.getVdi has been deprecated in favor of xenorchestra.index/getxoavdi.getXoaVdi""")
    __args__ = dict()
    __args__['id'] = id
    __args__['nameLabel'] = name_label
    __args__['poolId'] = pool_id
    __args__['tags'] = tags
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('xenorchestra:index/getVdi:getVdi', __args__, opts=opts, typ=GetVdiResult)
    return __ret__.apply(lambda __response__: GetVdiResult(
        id=pulumi.get(__response__, 'id'),
        name_label=pulumi.get(__response__, 'name_label'),
        parent=pulumi.get(__response__, 'parent'),
        pool_id=pulumi.get(__response__, 'pool_id'),
        tags=pulumi.get(__response__, 'tags')))
