# 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 warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetVirtualNetworkResult:
    """
    A collection of values returned by getVirtualNetwork.
    """
    def __init__(__self__, allowed_subnets=None, id=None, lab_name=None, name=None, resource_group_name=None, subnet_overrides=None, unique_identifier=None):
        if allowed_subnets and not isinstance(allowed_subnets, list):
            raise TypeError("Expected argument 'allowed_subnets' to be a list")
        __self__.allowed_subnets = allowed_subnets
        """
        The list of subnets enabled for the virtual network as defined below.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if lab_name and not isinstance(lab_name, str):
            raise TypeError("Expected argument 'lab_name' to be a str")
        __self__.lab_name = lab_name
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if resource_group_name and not isinstance(resource_group_name, str):
            raise TypeError("Expected argument 'resource_group_name' to be a str")
        __self__.resource_group_name = resource_group_name
        if subnet_overrides and not isinstance(subnet_overrides, list):
            raise TypeError("Expected argument 'subnet_overrides' to be a list")
        __self__.subnet_overrides = subnet_overrides
        """
        The list of permission overrides for the subnets as defined below.
        """
        if unique_identifier and not isinstance(unique_identifier, str):
            raise TypeError("Expected argument 'unique_identifier' to be a str")
        __self__.unique_identifier = unique_identifier
        """
        The unique immutable identifier of the virtual network.
        """
class AwaitableGetVirtualNetworkResult(GetVirtualNetworkResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVirtualNetworkResult(
            allowed_subnets=self.allowed_subnets,
            id=self.id,
            lab_name=self.lab_name,
            name=self.name,
            resource_group_name=self.resource_group_name,
            subnet_overrides=self.subnet_overrides,
            unique_identifier=self.unique_identifier)

def get_virtual_network(lab_name=None,name=None,resource_group_name=None,opts=None):
    """
    Use this data source to access information about an existing Dev Test Lab Virtual Network.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.devtest.get_virtual_network(name="example-network",
        lab_name="examplelab",
        resource_group_name="example-resource")
    pulumi.export("labSubnetName", example.allowed_subnets[0]["lab_subnet_name"])
    ```


    :param str lab_name: Specifies the name of the Dev Test Lab.
    :param str name: Specifies the name of the Virtual Network.
    :param str resource_group_name: Specifies the name of the resource group that contains the Virtual Network.
    """
    __args__ = dict()


    __args__['labName'] = lab_name
    __args__['name'] = name
    __args__['resourceGroupName'] = resource_group_name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:devtest/getVirtualNetwork:getVirtualNetwork', __args__, opts=opts).value

    return AwaitableGetVirtualNetworkResult(
        allowed_subnets=__ret__.get('allowedSubnets'),
        id=__ret__.get('id'),
        lab_name=__ret__.get('labName'),
        name=__ret__.get('name'),
        resource_group_name=__ret__.get('resourceGroupName'),
        subnet_overrides=__ret__.get('subnetOverrides'),
        unique_identifier=__ret__.get('uniqueIdentifier'))
