# 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 builtins
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__ = [
    'GetVrackNetworksResult',
    'AwaitableGetVrackNetworksResult',
    'get_vrack_networks',
    'get_vrack_networks_output',
]

@pulumi.output_type
class GetVrackNetworksResult:
    """
    A collection of values returned by getVrackNetworks.
    """
    def __init__(__self__, id=None, results=None, service_name=None, subnet=None, vlan_id=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if results and not isinstance(results, list):
            raise TypeError("Expected argument 'results' to be a list")
        pulumi.set(__self__, "results", results)
        if service_name and not isinstance(service_name, str):
            raise TypeError("Expected argument 'service_name' to be a str")
        pulumi.set(__self__, "service_name", service_name)
        if subnet and not isinstance(subnet, str):
            raise TypeError("Expected argument 'subnet' to be a str")
        pulumi.set(__self__, "subnet", subnet)
        if vlan_id and not isinstance(vlan_id, int):
            raise TypeError("Expected argument 'vlan_id' to be a int")
        pulumi.set(__self__, "vlan_id", vlan_id)

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

    @property
    @pulumi.getter
    def results(self) -> Sequence[builtins.int]:
        """
        The list of vrack network ids.
        """
        return pulumi.get(self, "results")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> builtins.str:
        return pulumi.get(self, "service_name")

    @property
    @pulumi.getter
    def subnet(self) -> Optional[builtins.str]:
        return pulumi.get(self, "subnet")

    @property
    @pulumi.getter(name="vlanId")
    def vlan_id(self) -> Optional[builtins.int]:
        return pulumi.get(self, "vlan_id")


class AwaitableGetVrackNetworksResult(GetVrackNetworksResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVrackNetworksResult(
            id=self.id,
            results=self.results,
            service_name=self.service_name,
            subnet=self.subnet,
            vlan_id=self.vlan_id)


def get_vrack_networks(service_name: Optional[builtins.str] = None,
                       subnet: Optional[builtins.str] = None,
                       vlan_id: Optional[builtins.int] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVrackNetworksResult:
    """
    Use this data source to get the list of Vrack network ids available for your IPLoadbalancer associated with your OVHcloud account.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    lb_networks = ovh.get_vrack_networks(service_name="XXXXXX",
        subnet="10.0.0.0/24")
    ```


    :param builtins.str service_name: The internal name of your IP load balancing
    :param builtins.str subnet: Filters networks on the subnet.
    :param builtins.int vlan_id: Filters networks on the vlan id.
    """
    __args__ = dict()
    __args__['serviceName'] = service_name
    __args__['subnet'] = subnet
    __args__['vlanId'] = vlan_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('ovh:index/getVrackNetworks:getVrackNetworks', __args__, opts=opts, typ=GetVrackNetworksResult).value

    return AwaitableGetVrackNetworksResult(
        id=pulumi.get(__ret__, 'id'),
        results=pulumi.get(__ret__, 'results'),
        service_name=pulumi.get(__ret__, 'service_name'),
        subnet=pulumi.get(__ret__, 'subnet'),
        vlan_id=pulumi.get(__ret__, 'vlan_id'))
def get_vrack_networks_output(service_name: Optional[pulumi.Input[builtins.str]] = None,
                              subnet: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                              vlan_id: Optional[pulumi.Input[Optional[builtins.int]]] = None,
                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVrackNetworksResult]:
    """
    Use this data source to get the list of Vrack network ids available for your IPLoadbalancer associated with your OVHcloud account.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    lb_networks = ovh.get_vrack_networks(service_name="XXXXXX",
        subnet="10.0.0.0/24")
    ```


    :param builtins.str service_name: The internal name of your IP load balancing
    :param builtins.str subnet: Filters networks on the subnet.
    :param builtins.int vlan_id: Filters networks on the vlan id.
    """
    __args__ = dict()
    __args__['serviceName'] = service_name
    __args__['subnet'] = subnet
    __args__['vlanId'] = vlan_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('ovh:index/getVrackNetworks:getVrackNetworks', __args__, opts=opts, typ=GetVrackNetworksResult)
    return __ret__.apply(lambda __response__: GetVrackNetworksResult(
        id=pulumi.get(__response__, 'id'),
        results=pulumi.get(__response__, 'results'),
        service_name=pulumi.get(__response__, 'service_name'),
        subnet=pulumi.get(__response__, 'subnet'),
        vlan_id=pulumi.get(__response__, 'vlan_id')))
