1. Packages
  2. Databricks
  3. API Docs
  4. File
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

databricks.File

Explore with Pulumi AI

databricks logo
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

    Import

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

    bash

    $ pulumi import databricks:index/file:File this <path>
    

    Create File Resource

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

    Constructor syntax

    new File(name: string, args: FileArgs, opts?: CustomResourceOptions);
    @overload
    def File(resource_name: str,
             args: FileArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def File(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             path: Optional[str] = None,
             content_base64: Optional[str] = None,
             md5: Optional[str] = None,
             remote_file_modified: Optional[bool] = None,
             source: Optional[str] = None)
    func NewFile(ctx *Context, name string, args FileArgs, opts ...ResourceOption) (*File, error)
    public File(string name, FileArgs args, CustomResourceOptions? opts = null)
    public File(String name, FileArgs args)
    public File(String name, FileArgs args, CustomResourceOptions options)
    
    type: databricks:File
    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 FileArgs
    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 FileArgs
    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 FileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var fileResource = new Databricks.File("fileResource", new()
    {
        Path = "string",
        ContentBase64 = "string",
        Md5 = "string",
        RemoteFileModified = false,
        Source = "string",
    });
    
    example, err := databricks.NewFile(ctx, "fileResource", &databricks.FileArgs{
    	Path:               pulumi.String("string"),
    	ContentBase64:      pulumi.String("string"),
    	Md5:                pulumi.String("string"),
    	RemoteFileModified: pulumi.Bool(false),
    	Source:             pulumi.String("string"),
    })
    
    var fileResource = new File("fileResource", FileArgs.builder()        
        .path("string")
        .contentBase64("string")
        .md5("string")
        .remoteFileModified(false)
        .source("string")
        .build());
    
    file_resource = databricks.File("fileResource",
        path="string",
        content_base64="string",
        md5="string",
        remote_file_modified=False,
        source="string")
    
    const fileResource = new databricks.File("fileResource", {
        path: "string",
        contentBase64: "string",
        md5: "string",
        remoteFileModified: false,
        source: "string",
    });
    
    type: databricks:File
    properties:
        contentBase64: string
        md5: string
        path: string
        remoteFileModified: false
        source: string
    

    File Resource Properties

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

    Inputs

    The File resource accepts the following input properties:

    Path string
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    ContentBase64 string
    Contents in base 64 format. Conflicts with source.
    Md5 string
    RemoteFileModified bool
    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. For example, /Volumes/main/default/volume1/file.txt.
    ContentBase64 string
    Contents in base 64 format. Conflicts with source.
    Md5 string
    RemoteFileModified bool
    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. For example, /Volumes/main/default/volume1/file.txt.
    contentBase64 String
    Contents in base 64 format. Conflicts with source.
    md5 String
    remoteFileModified Boolean
    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. For example, /Volumes/main/default/volume1/file.txt.
    contentBase64 string
    Contents in base 64 format. Conflicts with source.
    md5 string
    remoteFileModified boolean
    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. For example, /Volumes/main/default/volume1/file.txt.
    content_base64 str
    Contents in base 64 format. Conflicts with source.
    md5 str
    remote_file_modified bool
    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. For example, /Volumes/main/default/volume1/file.txt.
    contentBase64 String
    Contents in base 64 format. Conflicts with source.
    md5 String
    remoteFileModified Boolean
    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 File resource produces the following output properties:

    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.
    ModificationTime string
    The last time stamp when the file was modified
    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.
    ModificationTime string
    The last time stamp when the file was modified
    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.
    modificationTime String
    The last time stamp when the file was modified
    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.
    modificationTime string
    The last time stamp when the file was modified
    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.
    modification_time str
    The last time stamp when the file was modified
    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.
    modificationTime String
    The last time stamp when the file was modified

    Look up Existing File Resource

    Get an existing File 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?: FileState, opts?: CustomResourceOptions): File
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content_base64: Optional[str] = None,
            file_size: Optional[int] = None,
            md5: Optional[str] = None,
            modification_time: Optional[str] = None,
            path: Optional[str] = None,
            remote_file_modified: Optional[bool] = None,
            source: Optional[str] = None) -> File
    func GetFile(ctx *Context, name string, id IDInput, state *FileState, opts ...ResourceOption) (*File, error)
    public static File Get(string name, Input<string> id, FileState? state, CustomResourceOptions? opts = null)
    public static File get(String name, Output<String> id, FileState 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
    Contents in base 64 format. Conflicts with source.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Md5 string
    ModificationTime string
    The last time stamp when the file was modified
    Path string
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    RemoteFileModified bool
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    ContentBase64 string
    Contents in base 64 format. Conflicts with source.
    FileSize int
    The file size of the file that is being tracked by this resource in bytes.
    Md5 string
    ModificationTime string
    The last time stamp when the file was modified
    Path string
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    RemoteFileModified bool
    Source string
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 String
    Contents in base 64 format. Conflicts with source.
    fileSize Integer
    The file size of the file that is being tracked by this resource in bytes.
    md5 String
    modificationTime String
    The last time stamp when the file was modified
    path String
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    remoteFileModified Boolean
    source String
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 string
    Contents in base 64 format. Conflicts with source.
    fileSize number
    The file size of the file that is being tracked by this resource in bytes.
    md5 string
    modificationTime string
    The last time stamp when the file was modified
    path string
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    remoteFileModified boolean
    source string
    The full absolute path to the file. Conflicts with content_base64.
    content_base64 str
    Contents in base 64 format. Conflicts with source.
    file_size int
    The file size of the file that is being tracked by this resource in bytes.
    md5 str
    modification_time str
    The last time stamp when the file was modified
    path str
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    remote_file_modified bool
    source str
    The full absolute path to the file. Conflicts with content_base64.
    contentBase64 String
    Contents in base 64 format. Conflicts with source.
    fileSize Number
    The file size of the file that is being tracked by this resource in bytes.
    md5 String
    modificationTime String
    The last time stamp when the file was modified
    path String
    The path of the file in which you wish to save. For example, /Volumes/main/default/volume1/file.txt.
    remoteFileModified Boolean
    source String
    The full absolute path to the file. Conflicts with content_base64.

    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.38.0 published on Monday, Apr 29, 2024 by Pulumi