# 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__ = [
    'GetXoaNetworkResult',
    'AwaitableGetXoaNetworkResult',
    'get_xoa_network',
    'get_xoa_network_output',
]

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

    @property
    @pulumi.getter
    def bridge(self) -> str:
        """
        The name of the bridge network interface.
        """
        return pulumi.get(self, "bridge")

    @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 network.
        """
        return pulumi.get(self, "name_label")

    @property
    @pulumi.getter(name="poolId")
    def pool_id(self) -> Optional[str]:
        """
        The pool the network is associated with.
        """
        return pulumi.get(self, "pool_id")


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


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

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    net = xenorchestra.get_xoa_network(name_label="Pool-wide network associated with eth0")
    demo_vm = xenorchestra.Vm("demo-vm", networks=[{
        "network_id": net.id,
    }])
    ```


    :param str bridge: The name of the bridge network interface.
    :param str name_label: The name of the network.
    :param str pool_id: The pool the network is associated with.
    """
    __args__ = dict()
    __args__['bridge'] = bridge
    __args__['nameLabel'] = name_label
    __args__['poolId'] = pool_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('xenorchestra:index/getXoaNetwork:getXoaNetwork', __args__, opts=opts, typ=GetXoaNetworkResult).value

    return AwaitableGetXoaNetworkResult(
        bridge=pulumi.get(__ret__, 'bridge'),
        id=pulumi.get(__ret__, 'id'),
        name_label=pulumi.get(__ret__, 'name_label'),
        pool_id=pulumi.get(__ret__, 'pool_id'))
def get_xoa_network_output(bridge: Optional[pulumi.Input[Optional[str]]] = None,
                           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[GetXoaNetworkResult]:
    """
    ## Example Usage

    ```python
    import pulumi
    import pulumi_xenorchestra as xenorchestra

    net = xenorchestra.get_xoa_network(name_label="Pool-wide network associated with eth0")
    demo_vm = xenorchestra.Vm("demo-vm", networks=[{
        "network_id": net.id,
    }])
    ```


    :param str bridge: The name of the bridge network interface.
    :param str name_label: The name of the network.
    :param str pool_id: The pool the network is associated with.
    """
    __args__ = dict()
    __args__['bridge'] = bridge
    __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/getXoaNetwork:getXoaNetwork', __args__, opts=opts, typ=GetXoaNetworkResult)
    return __ret__.apply(lambda __response__: GetXoaNetworkResult(
        bridge=pulumi.get(__response__, 'bridge'),
        id=pulumi.get(__response__, 'id'),
        name_label=pulumi.get(__response__, 'name_label'),
        pool_id=pulumi.get(__response__, 'pool_id')))
