| VolumeFile {sevenbridges2} | R Documentation |
R6 Class representing a VolumeFile
Description
R6 Class representing a resource for managing VolumeFile objects.
Super class
sevenbridges2::Item -> VolumeFile
Public fields
URLList of URL endpoints for this resource.
locationFile location on the volume.
typeType of storage (cloud provider). Can be one of:
s3,gcs,azure,OSS.volumeVolume id.
metadataFile's metadata if exists.
Methods
Public methods
Method new()
Create a new VolumeFile object.
Usage
VolumeFile$new(res = NA, ...)
Arguments
resResponse containing VolumeFile object info.
...Other response arguments.
Method print()
Print method for VolumeFile class.
Usage
VolumeFile$print()
Examples
\dontrun{
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print volume file object
volume_file_object$print()
}
Method reload()
Reload VolumeFile object information.
Usage
VolumeFile$reload(...)
Arguments
...Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
VolumeFile object.
Examples
\dontrun{
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload volume file object
volume_file_object$reload()
}
Method import()
This call lets you queue a job to import this file or folder
from a volume into a project on the Platform.
Essentially, you are importing an item from your cloud storage provider
(Amazon Web Services, Google Cloud Storage, Azure or Ali Cloud) via the
volume onto the Platform.
If successful, an alias will be created on the Platform. Aliases appear
on the Platform and can be copied, executed, and modified as such.
They refer back to the respective item on the given volume.
Usage
VolumeFile$import( destination_project = NULL, destination_parent = NULL, name = NULL, overwrite = FALSE, autorename = FALSE, ... )
Arguments
destination_projectString destination project id or Project object. Not required, but either
destination_projectordestination_parentdirectory must be provided.destination_parentString folder id or File object (with
type = 'FOLDER'). Not required, but eitherdestination_projectordestination_parentdirectory must be provided.nameThe name of the alias to create. This name should be unique to the project.
If the name is already in use in the project, you should use theoverwritequery parameter in this call to force any item with that name to be deleted before the alias is created. If name is omitted, the alias name will default to the last segment of the complete location (including the prefix) on the volume.
Segments are considered to be separated with forward slashes /. Allowed characters in file names are all alphanumeric and special characters except forward slash /, while folder names can contain alphanumeric and special characters _, - and ..
overwriteSet to
TRUEif you want to overwrite the item if another one with the same name already exists at the destination. Bear in mind that if used with folders import, the folder's content (files with the same name) will be overwritten, not the whole folder.autorenameSet to
TRUEif you want to automatically rename the item (by prefixing its name with an underscore and number) if another one with the same name already exists at the destination. Bear in mind that if used with folders import, the folder content will be renamed, not the whole folder....Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
Import object.
Examples
\dontrun{
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Import volume file object
volume_file_object$import(destination_project = destination_project)
}
Method clone()
The objects of this class are cloneable with this method.
Usage
VolumeFile$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## Method `VolumeFile$print`
## ------------------------------------------------
## Not run:
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print volume file object
volume_file_object$print()
## End(Not run)
## ------------------------------------------------
## Method `VolumeFile$reload`
## ------------------------------------------------
## Not run:
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload volume file object
volume_file_object$reload()
## End(Not run)
## ------------------------------------------------
## Method `VolumeFile$import`
## ------------------------------------------------
## Not run:
# x is API response when volume file is requested
volume_file_object <- VolumeFile$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Import volume file object
volume_file_object$import(destination_project = destination_project)
## End(Not run)