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

databricks.WorkspaceFile

Explore with Pulumi AI

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

    This resource allows you to manage Databricks Workspace Files.

    Create WorkspaceFile Resource

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

    Constructor syntax

    new WorkspaceFile(name: string, args: WorkspaceFileArgs, opts?: CustomResourceOptions);
    @overload
    def WorkspaceFile(resource_name: str,
                      args: WorkspaceFileArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceFile(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      path: Optional[str] = None,
                      content_base64: Optional[str] = None,
                      md5: Optional[str] = None,
                      object_id: Optional[int] = None,
                      source: Optional[str] = None)
    func NewWorkspaceFile(ctx *Context, name string, args WorkspaceFileArgs, opts ...ResourceOption) (*WorkspaceFile, error)
    public WorkspaceFile(string name, WorkspaceFileArgs args, CustomResourceOptions? opts = null)
    public WorkspaceFile(String name, WorkspaceFileArgs args)
    public WorkspaceFile(String name, WorkspaceFileArgs args, CustomResourceOptions options)
    
    type: databricks:WorkspaceFile
    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 WorkspaceFileArgs
    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 WorkspaceFileArgs
    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 WorkspaceFileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceFileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceFileArgs
    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 workspaceFileResource = new Databricks.WorkspaceFile("workspaceFileResource", new()
    {
        Path = "string",
        ContentBase64 = "string",
        Md5 = "string",
        ObjectId = 0,
        Source = "string",
    });
    
    example, err := databricks.NewWorkspaceFile(ctx, "workspaceFileResource", &databricks.WorkspaceFileArgs{
    	Path:          pulumi.String("string"),
    	ContentBase64: pulumi.String("string"),
    	Md5:           pulumi.String("string"),
    	ObjectId:      pulumi.Int(0),
    	Source:        pulumi.String("string"),
    })
    
    var workspaceFileResource = new WorkspaceFile("workspaceFileResource", WorkspaceFileArgs.builder()
        .path("string")
        .contentBase64("string")
        .md5("string")
        .objectId(0)
        .source("string")
        .build());
    
    workspace_file_resource = databricks.WorkspaceFile("workspaceFileResource",
        path="string",
        content_base64="string",
        md5="string",
        object_id=0,
        source="string")
    
    const workspaceFileResource = new databricks.WorkspaceFile("workspaceFileResource", {
        path: "string",
        contentBase64: "string",
        md5: "string",
        objectId: 0,
        source: "string",
    });
    
    type: databricks:WorkspaceFile
    properties:
        contentBase64: string
        md5: string
        objectId: 0
        path: string
        source: string
    

    WorkspaceFile 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 WorkspaceFile resource accepts the following input properties:

    Path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    ContentBase64 string
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    Md5 string
    ObjectId int
    Unique identifier for a workspace file
    Source string
    Path to file on local filesystem. Conflicts with content_base64.
    Path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    ContentBase64 string
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    Md5 string
    ObjectId int
    Unique identifier for a workspace file
    Source string
    Path to file on local filesystem. Conflicts with content_base64.
    path String
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    contentBase64 String
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 String
    objectId Integer
    Unique identifier for a workspace file
    source String
    Path to file on local filesystem. Conflicts with content_base64.
    path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    contentBase64 string
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 string
    objectId number
    Unique identifier for a workspace file
    source string
    Path to file on local filesystem. Conflicts with content_base64.
    path str
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    content_base64 str
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 str
    object_id int
    Unique identifier for a workspace file
    source str
    Path to file on local filesystem. Conflicts with content_base64.
    path String
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    contentBase64 String
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 String
    objectId Number
    Unique identifier for a workspace file
    source String
    Path to file on local filesystem. Conflicts with content_base64.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    Routable URL of the workspace file
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    Routable URL of the workspace file
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    Routable URL of the workspace file
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    id string
    The provider-assigned unique ID for this managed resource.
    url string
    Routable URL of the workspace file
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id str
    The provider-assigned unique ID for this managed resource.
    url str
    Routable URL of the workspace file
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    Routable URL of the workspace file
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    Look up Existing WorkspaceFile Resource

    Get an existing WorkspaceFile 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?: WorkspaceFileState, opts?: CustomResourceOptions): WorkspaceFile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content_base64: Optional[str] = None,
            md5: Optional[str] = None,
            object_id: Optional[int] = None,
            path: Optional[str] = None,
            source: Optional[str] = None,
            url: Optional[str] = None,
            workspace_path: Optional[str] = None) -> WorkspaceFile
    func GetWorkspaceFile(ctx *Context, name string, id IDInput, state *WorkspaceFileState, opts ...ResourceOption) (*WorkspaceFile, error)
    public static WorkspaceFile Get(string name, Input<string> id, WorkspaceFileState? state, CustomResourceOptions? opts = null)
    public static WorkspaceFile get(String name, Output<String> id, WorkspaceFileState 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
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    Md5 string
    ObjectId int
    Unique identifier for a workspace file
    Path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    Source string
    Path to file on local filesystem. Conflicts with content_base64.
    Url string
    Routable URL of the workspace file
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    ContentBase64 string
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    Md5 string
    ObjectId int
    Unique identifier for a workspace file
    Path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    Source string
    Path to file on local filesystem. Conflicts with content_base64.
    Url string
    Routable URL of the workspace file
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    contentBase64 String
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 String
    objectId Integer
    Unique identifier for a workspace file
    path String
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    source String
    Path to file on local filesystem. Conflicts with content_base64.
    url String
    Routable URL of the workspace file
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    contentBase64 string
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 string
    objectId number
    Unique identifier for a workspace file
    path string
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    source string
    Path to file on local filesystem. Conflicts with content_base64.
    url string
    Routable URL of the workspace file
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    content_base64 str
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 str
    object_id int
    Unique identifier for a workspace file
    path str
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    source str
    Path to file on local filesystem. Conflicts with content_base64.
    url str
    Routable URL of the workspace file
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    contentBase64 String
    The base64-encoded file content. 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 workspace file with configuration properties for a data pipeline.
    md5 String
    objectId Number
    Unique identifier for a workspace file
    path String
    The absolute path of the workspace file, beginning with "/", e.g. "/Demo".
    source String
    Path to file on local filesystem. Conflicts with content_base64.
    url String
    Routable URL of the workspace file
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    Import

    The workspace file resource can be imported using workspace file path

    bash

    $ pulumi import databricks:index/workspaceFile:WorkspaceFile this /path/to/file
    

    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