# 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 Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'GetDbfsFileResult',
    'AwaitableGetDbfsFileResult',
    'get_dbfs_file',
]

@pulumi.output_type
class GetDbfsFileResult:
    """
    A collection of values returned by getDbfsFile.
    """
    def __init__(__self__, content=None, file_size=None, id=None, limit_file_size=None, path=None):
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        if file_size and not isinstance(file_size, int):
            raise TypeError("Expected argument 'file_size' to be a int")
        pulumi.set(__self__, "file_size", file_size)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if limit_file_size and not isinstance(limit_file_size, bool):
            raise TypeError("Expected argument 'limit_file_size' to be a bool")
        pulumi.set(__self__, "limit_file_size", limit_file_size)
        if path and not isinstance(path, str):
            raise TypeError("Expected argument 'path' to be a str")
        pulumi.set(__self__, "path", path)

    @property
    @pulumi.getter
    def content(self) -> str:
        return pulumi.get(self, "content")

    @property
    @pulumi.getter(name="fileSize")
    def file_size(self) -> int:
        return pulumi.get(self, "file_size")

    @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="limitFileSize")
    def limit_file_size(self) -> bool:
        return pulumi.get(self, "limit_file_size")

    @property
    @pulumi.getter
    def path(self) -> str:
        return pulumi.get(self, "path")


class AwaitableGetDbfsFileResult(GetDbfsFileResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDbfsFileResult(
            content=self.content,
            file_size=self.file_size,
            id=self.id,
            limit_file_size=self.limit_file_size,
            path=self.path)


def get_dbfs_file(limit_file_size: Optional[bool] = None,
                  path: Optional[str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDbfsFileResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['limitFileSize'] = limit_file_size
    __args__['path'] = path
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('databricks:databricks/getDbfsFile:getDbfsFile', __args__, opts=opts, typ=GetDbfsFileResult).value

    return AwaitableGetDbfsFileResult(
        content=__ret__.content,
        file_size=__ret__.file_size,
        id=__ret__.id,
        limit_file_size=__ret__.limit_file_size,
        path=__ret__.path)
