1. Packages
  2. Databricks
  3. API Docs
  4. DbfsFile
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.DbfsFile

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    This is a resource that lets you manage relatively small files on Databricks File System (DBFS). The best use cases are libraries for databricks.Cluster or databricks_job. You can also use databricks.DbfsFile and databricks.getDbfsFilePaths data sources.

    Create DbfsFile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DbfsFile(name: string, args: DbfsFileArgs, opts?: CustomResourceOptions);
    @overload
    def DbfsFile(resource_name: str,
                 args: DbfsFileArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def DbfsFile(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 path: Optional[str] = None,
                 content_base64: Optional[str] = None,
                 md5: Optional[str] = None,
                 source: Optional[str] = None)
    func NewDbfsFile(ctx *Context, name string, args DbfsFileArgs, opts ...ResourceOption) (*DbfsFile, error)
    public DbfsFile(string name, DbfsFileArgs args, CustomResourceOptions? opts = null)
    public DbfsFile(String name, DbfsFileArgs args)
    public DbfsFile(String name, DbfsFileArgs args, CustomResourceOptions options)
    
    type: databricks:DbfsFile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DbfsFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DbfsFileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DbfsFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DbfsFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DbfsFileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dbfsFileResource = new Databricks.DbfsFile("dbfsFileResource", new()
    {
        Path = "string",
        ContentBase64 = "string",
        Md5 = "string",
        Source = "string",
    });
    
    example, err := databricks.NewDbfsFile(ctx, "dbfsFileResource", &databricks.DbfsFileArgs{
    	Path:          pulumi.String("string"),
    	ContentBase64: pulumi.String("string"),
    	Md5:           pulumi.String("string"),
    	Source:        pulumi.String("string"),
    })
    
    var dbfsFileResource = new DbfsFile("dbfsFileResource", DbfsFileArgs.builder()
        .path("string")
        .contentBase64("string")
        .md5("string")
        .source("string")
        .build());
    
    dbfs_file_resource = databricks.DbfsFile("dbfsFileResource",
        path="string",
        content_base64="string",
        md5="string",
        source="string")
    
    const dbfsFileResource = new databricks.DbfsFile("dbfsFileResource", {
        path: "string",
        contentBase64: "string",
        md5: "string",
        source: "string",
    });
    
    type: databricks:DbfsFile
    properties:
        contentBase64: string
        md5: string
        path: string
        source: string
    

    DbfsFile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DbfsFile resource accepts the following input properties:

    Path string
    The path of the file in which you wish to save.
    ContentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    Md5 string
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    Path string
    The path of the file in which you wish to save.
    ContentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    Md5 string
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    path String
    The path of the file in which you wish to save.
    contentBase64 String
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    md5 String
    source String
    The full absolute path to the file. Conflicts with content_base64.
    path string
    The path of the file in which you wish to save.
    contentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    md5 string
    source string
    The full absolute path to the file. Conflicts with content_base64.
    path str
    The path of the file in which you wish to save.
    content_base64 str
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    md5 str
    source str
    The full absolute path to the file. Conflicts with content_base64.
    path String
    The path of the file in which you wish to save.
    contentBase64 String
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    md5 String
    source String
    The full absolute path to the file. Conflicts with content_base64.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DbfsFile resource produces the following output properties:

    DbfsPath string
    Path, but with dbfs: prefix.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Id string
    The provider-assigned unique ID for this managed resource.
    DbfsPath string
    Path, but with dbfs: prefix.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Id string
    The provider-assigned unique ID for this managed resource.
    dbfsPath String
    Path, but with dbfs: prefix.
    fileSize Integer
    The file size of the file that is being tracked by this resource in bytes.
    id String
    The provider-assigned unique ID for this managed resource.
    dbfsPath string
    Path, but with dbfs: prefix.
    fileSize number
    The file size of the file that is being tracked by this resource in bytes.
    id string
    The provider-assigned unique ID for this managed resource.
    dbfs_path str
    Path, but with dbfs: prefix.
    file_size int
    The file size of the file that is being tracked by this resource in bytes.
    id str
    The provider-assigned unique ID for this managed resource.
    dbfsPath String
    Path, but with dbfs: prefix.
    fileSize Number
    The file size of the file that is being tracked by this resource in bytes.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DbfsFile Resource

    Get an existing DbfsFile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DbfsFileState, opts?: CustomResourceOptions): DbfsFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content_base64: Optional[str] = None,
            dbfs_path: Optional[str] = None,
            file_size: Optional[int] = None,
            md5: Optional[str] = None,
            path: Optional[str] = None,
            source: Optional[str] = None) -> DbfsFile
    func GetDbfsFile(ctx *Context, name string, id IDInput, state *DbfsFileState, opts ...ResourceOption) (*DbfsFile, error)
    public static DbfsFile Get(string name, Input<string> id, DbfsFileState? state, CustomResourceOptions? opts = null)
    public static DbfsFile get(String name, Output<String> id, DbfsFileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ContentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    DbfsPath string
    Path, but with dbfs: prefix.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Md5 string
    Path string
    The path of the file in which you wish to save.
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    ContentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    DbfsPath string
    Path, but with dbfs: prefix.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Md5 string
    Path string
    The path of the file in which you wish to save.
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 String
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    dbfsPath String
    Path, but with dbfs: prefix.
    fileSize Integer
    The file size of the file that is being tracked by this resource in bytes.
    md5 String
    path String
    The path of the file in which you wish to save.
    source String
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 string
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    dbfsPath string
    Path, but with dbfs: prefix.
    fileSize number
    The file size of the file that is being tracked by this resource in bytes.
    md5 string
    path string
    The path of the file in which you wish to save.
    source string
    The full absolute path to the file. Conflicts with content_base64.
    content_base64 str
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    dbfs_path str
    Path, but with dbfs: prefix.
    file_size int
    The file size of the file that is being tracked by this resource in bytes.
    md5 str
    path str
    The path of the file in which you wish to save.
    source str
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 String
    Encoded file contents. Conflicts with source. Use of content_base64 is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a data pipeline configuration file.
    dbfsPath String
    Path, but with dbfs: prefix.
    fileSize Number
    The file size of the file that is being tracked by this resource in bytes.
    md5 String
    path String
    The path of the file in which you wish to save.
    source String
    The full absolute path to the file. Conflicts with content_base64.

    Import

    The resource dbfs file can be imported using the path of the file:

    bash

    $ pulumi import databricks:index/dbfsFile:DbfsFile this <path>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi