Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi
databricks.File
Explore with Pulumi AI
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)
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.
Constructor 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
. - Content
Base64 string - Contents in base 64 format. Conflicts with
source
. - Md5 string
- Remote
File boolModified - 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
. - Content
Base64 string - Contents in base 64 format. Conflicts with
source
. - Md5 string
- Remote
File boolModified - 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
. - content
Base64 String - Contents in base 64 format. Conflicts with
source
. - md5 String
- remote
File BooleanModified - 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
. - content
Base64 string - Contents in base 64 format. Conflicts with
source
. - md5 string
- remote
File booleanModified - 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_ boolmodified - 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
. - content
Base64 String - Contents in base 64 format. Conflicts with
source
. - md5 String
- remote
File BooleanModified - 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:
- File
Size 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.
- Modification
Time 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 string
- The provider-assigned unique ID for this managed resource.
- Modification
Time string - The last time stamp when the file was modified
- file
Size 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.
- modification
Time String - The last time stamp when the file was modified
- file
Size 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.
- modification
Time 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
- file
Size 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.
- modification
Time 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.
- Content
Base64 string - 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 string
- Modification
Time 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
. - Remote
File boolModified - Source string
- The full absolute path to the file. Conflicts with
content_base64
.
- Content
Base64 string - 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 string
- Modification
Time 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
. - Remote
File boolModified - Source string
- The full absolute path to the file. Conflicts with
content_base64
.
- content
Base64 String - Contents in base 64 format. Conflicts with
source
. - file
Size Integer - The file size of the file that is being tracked by this resource in bytes.
- md5 String
- modification
Time 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
. - remote
File BooleanModified - source String
- The full absolute path to the file. Conflicts with
content_base64
.
- content
Base64 string - Contents in base 64 format. Conflicts with
source
. - file
Size number - The file size of the file that is being tracked by this resource in bytes.
- md5 string
- modification
Time 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
. - remote
File booleanModified - 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_ boolmodified - source str
- The full absolute path to the file. Conflicts with
content_base64
.
- content
Base64 String - Contents in base 64 format. Conflicts with
source
. - file
Size Number - The file size of the file that is being tracked by this resource in bytes.
- md5 String
- modification
Time 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
. - remote
File BooleanModified - 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.