def METHOD_NAME(resource_group_name: Optional[str] = None,
                             server_name: Optional[str] = None,
                             virtual_network_rule_name: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVirtualNetworkRuleResult:
    """
    Gets a virtual network rule.
    :param str resource_group_name: The name of the resource group. The name is case insensitive.
    :param str server_name: The name of the server.
    :param str virtual_network_rule_name: The name of the virtual network rule.
    """
    __args__ = dict()
    __args__['resourceGroupName'] = resource_group_name
    __args__['serverName'] = server_name
    __args__['virtualNetworkRuleName'] = virtual_network_rule_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:dbformariadb/v20180601:getVirtualNetworkRule', __args__, opts=opts, typ=GetVirtualNetworkRuleResult).value
    return AwaitableGetVirtualNetworkRuleResult(
        id=pulumi.get(__ret__, 'id'),
        ignore_missing_vnet_service_endpoint=pulumi.get(__ret__, 'ignore_missing_vnet_service_endpoint'),
        name=pulumi.get(__ret__, 'name'),
        state=pulumi.get(__ret__, 'state'),
        type=pulumi.get(__ret__, 'type'),
        virtual_network_subnet_id=pulumi.get(__ret__, 'virtual_network_subnet_id'))