| VolumePrefix | R Documentation |
R6 Class representing a resource for managing VolumePrefix objects.
sevenbridges2::Item -> VolumePrefix
URLList of URL endpoints for this resource.
prefixFile/prefix name on the volume.
volumeVolume id.
new()Create a new VolumePrefix object.
VolumePrefix$new(res = NA, ...)
resResponse containing VolumePrefix object information.
...Other response arguments.
print()Print method for VolumePrefix class.
VolumePrefix$print()
\dontrun{
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print the Volume Prefix object
volume_prefix_object$print()
}
reload()Reload the VolumePrefix object information.
VolumePrefix$reload()
\dontrun{
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload volume prefix object
volume_prefix_object$reload()
}
list_contents()List the contents of a volume folder. This call lists the contents of a specific volume folder.
VolumePrefix$list_contents(
limit = getOption("sevenbridges2")$limit,
continuation_token = NULL,
...
)limitThe maximum number of collection items to return
for a single request. Minimum value is 1.
The maximum value is 100 and the default value is 50.
This is a pagination-specific attribute.
continuation_tokenContinuation token received to use for next chunk of results. Behaves similarly like offset parameter.
...Other arguments that can be passed to core api() function,
like 'fields' for example.
With fields parameter you can specify a subset of fields to include in
the response. You can use: href, location, volume, type,
metadata, _all. Default: _all.
VolumeContentCollection object containing list of
VolumeFile and VolumePrefix objects.
\dontrun{
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume prefix object contents
volume_prefix_object$list_contents()
}
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.
VolumePrefix$import( destination_project = NULL, destination_parent = NULL, name = NULL, overwrite = FALSE, autorename = FALSE, preserve_folder_structure = NULL, ... )
destination_projectString destination project id or Project
object. Not required, but either destination_project or
destination_parent directory must be provided.
destination_parentString folder id or File object
(with type = 'FOLDER'). Not required, but either destination_project
or destination_parent directory 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 the overwrite query 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 underscores (_), hyphens (-), and dots (.).
overwriteSet to TRUE if 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 TRUE if 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.
preserve_folder_structureSet to TRUE if you want to keep the
exact source folder structure. The default value is TRUE if the item
being imported is a folder. Should not be used if you are importing a
file. Bear in mind that if you use preserve_folder_structure = FALSE,
that the response will be the parent folder object containing imported
files alongside with other files if they exist.
...Other arguments that can be passed to core api() function
like 'fields', etc.
Import object.
\dontrun{
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume prefix object contents
volume_prefix_object$import(destination_project = destination_project)
}
clone()The objects of this class are cloneable with this method.
VolumePrefix$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `VolumePrefix$print`
## ------------------------------------------------
## Not run:
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print the Volume Prefix object
volume_prefix_object$print()
## End(Not run)
## ------------------------------------------------
## Method `VolumePrefix$reload`
## ------------------------------------------------
## Not run:
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload volume prefix object
volume_prefix_object$reload()
## End(Not run)
## ------------------------------------------------
## Method `VolumePrefix$list_contents`
## ------------------------------------------------
## Not run:
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume prefix object contents
volume_prefix_object$list_contents()
## End(Not run)
## ------------------------------------------------
## Method `VolumePrefix$import`
## ------------------------------------------------
## Not run:
# x is API response when volume prefix is requested
volume_prefix_object <- VolumePrefix$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume prefix object contents
volume_prefix_object$import(destination_project = destination_project)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.