Volume | R Documentation |
R6 Class representing a resource for managing volumes.
sevenbridges2::Item
-> Volume
URL
List of URL endpoints for this resource.
id
Volume ID, constructed from {division}/{volume_name}
or
{volume_owner}/{volume_name}
.
name
The name of the volume. It must be unique from all
other volumes for this user. Required if from_path
parameter
is not provided.
description
The description of the volume.
access_mode
Signifies whether this volume should be used
for read-write (RW) or read-only (RO) operations. The access mode is
consulted independently of the credentials granted to Seven Bridges
when the volume was created, so it is possible to use a read-write
credentials to register both read-write and read-only volumes using it.
Default: "RW"
.
service
This object in form of string more closely describes the mapping of the volume to the cloud service where the data is stored.
created_on
The date and time this volume was created.
modified_on
The date and time this volume was last modified.
active
If a volume is deactivated, this field will be
set to FALSE
.
new()
Create a new Volume object.
Volume$new(res = NA, ...)
res
Response containing Volume object info.
...
Other response arguments.
print()
Print method for Volume class.
Volume$print()
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Print volume object volume_object$print() }
reload()
Reload Volume object information.
Volume$reload(...)
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
Volume
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Reload volume object volume_object$reload() }
update()
Update a volume. This function updates the details of a specific volume.
Volume$update(description = NULL, access_mode = NULL, service = NULL)
description
The new description of the volume.
access_mode
Signifies whether this volume should be used
for read-write (RW) or read-only (RO) operations. The access mode is
consulted independently of the credentials granted to Seven Bridges
when the volume was created, so it is possible to use a read-write
credentials to register both read-write and read-only volumes using it.
Default: "RW"
.
service
This object in form of string more closely describes the mapping of the volume to the cloud service where the data is stored.
Volume
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Update volume object volume_object$update(description = description) }
deactivate()
Deactivate volume.
Once deactivated, you cannot import from, export to, or browse within a
volume. As such, the content of the files imported from this volume
will no longer be accessible on the Platform. However, you can update
the volume and manage members.
Note that you cannot deactivate the volume if you have running imports
or exports unless you force the operation using the query parameter
force=TRUE.
Note that to delete a volume, first you must deactivate it and delete
all files which have been imported from the volume to the Platform.
Volume$deactivate(...)
...
Other query parameters or arguments that can be passed to
core api()
function like 'force'.
Use it within query parameter, like query = list(force = TRUE)
.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Deactivate volume volume_object$deactivate() }
reactivate()
Reactivate volume.
This function reactivates the previously deactivated volume by updating
the active
field of the volume to TRUE
.
Volume$reactivate(...)
...
Other query parameters or arguments that can be passed to
core api()
function like 'force'.
Use it within query parameter, like query = list(force = TRUE)
.
Volume
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Deactivate volume volume_object$deactivate() # Reactivate volume volume_object$reactivate() }
delete()
Delete volume. This call deletes a volume you've created to refer to storage on Amazon Web Services, Google Cloud Storage, Azure or Ali cloud. To be able to delete a volume, you first need to deactivate it and then delete all files on the Platform that were previously imported from the volume.
Volume$delete()
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Delete volume volume_object$delete() }
list_contents()
List volume contents. This call lists the contents of a specific volume.
Volume$list_contents( prefix = NULL, limit = getOption("sevenbridges2")$limit, link = NULL, continuation_token = NULL, ... )
prefix
This is parent parameter in volume context. If specified, the content of the parent directory on the current volume is listed.
limit
The 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.
link
Link to use in the next chunk of results. Contains limit and continuation_token. If provided it will overwrite other arguments' values passed.
continuation_token
Continuation 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 is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # List volume contents volume_object$list_contents() }
get_file()
Get volume file information. This function returns the specific Volume File.
Volume$get_file(location = NULL, link = NULL, ...)
location
Volume file id, which is represented as file location.
link
Link to the file resource received from listing volume's contents. Cannot be used together with location.
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
VolumeFile
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Get volume file volume_object$get_file(location = location) }
list_members()
List members of a volume. This function returns the members of a specific volume.
Volume$list_members( limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
limit
The 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.
offset
The zero-based starting index in the entire collection
of the first item to return. The default value is 0
.
This is a pagination-specific attribute.
...
Other parameters that can be passed to core api()
function
like 'fields', etc.
Collection
containing Member
objects.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # List volume members volume_object$list_members() }
add_member()
Add member to a volume. This function adds members to the specified volume.
Volume$add_member( user, permissions = list(read = TRUE, copy = FALSE, write = FALSE, admin = FALSE) )
user
The Seven Bridges Platform username of the person you want to add to the volume or object of class Member containing user's username.
permissions
List of permissions granted to the user being added.
Permissions include listing the contents of a volume, importing files
from the volume to the Platform, exporting files from the Platform to
the volume, and admin privileges.
It can contain fields: 'read', 'copy', 'write' and 'admin' with
logical fields - TRUE if certain permission is allowed to the user, or
FALSE if it's not.
Example:
permissions = list(read = TRUE, copy = TRUE, write = FALSE, admin = FALSE)
Member
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Add volume member volume_object$add_member( user = user, permissions = list(read = TRUE, copy = FALSE) ) }
add_member_team()
Add a specific team as a member to a volume. Only Enterprise users that are part of some division can add teams to a volume created within that division.
Volume$add_member_team( team, permissions = list(read = TRUE, copy = FALSE, write = FALSE, admin = FALSE) )
team
The Seven Bridges Platform ID of a team you want to add to the volume or object of class Team containing team's ID. Team must be created within a division where the volume is created too.
permissions
List of permissions granted to the team being added.
Permissions include listing the contents of a volume, importing files
from the volume to the Platform, exporting files from the Platform to
the volume, and admin privileges.
It can contain fields: 'read', 'copy', 'write' and 'admin' with
logical fields - TRUE if certain permission is allowed to the team, or
FALSE if it's not.
Example:
permissions = list(read = TRUE, copy = TRUE, write = FALSE, admin = FALSE)
Member
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Add volume member volume_object$add_member_team( team = <team-id>, permissions = list(read = TRUE, copy = FALSE) ) }
add_member_division()
Add a specific division as a member to a volume. Only Enterprise users (with Enterprise accounts) can add divisions to a volume that is created with that Enterprise account (not within other divisions).
Volume$add_member_division( division, permissions = list(read = TRUE, copy = FALSE, write = FALSE, admin = FALSE) )
division
The Seven Bridges Platform ID of a division you want to add to the volume or object of class Division containing division's ID.
permissions
List of permissions granted to the division being
added. Permissions include listing the contents of a volume, importing
files from the volume to the Platform, exporting files from the
Platform to the volume, and admin privileges.
It can contain fields: 'read', 'copy', 'write' and 'admin' with
logical fields - TRUE if certain permission is allowed to the division,
or FALSE if it's not.
Example:
permissions = list(read = TRUE, copy = TRUE, write = FALSE, admin = FALSE)
Member
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Add volume member volume_object$add_member_division( division = <division-id>, permissions = list(read = TRUE, copy = FALSE) ) }
remove_member()
Remove member from a volume. This function removes members from the specified volume.
Volume$remove_member(member)
member
The Seven Bridges Platform username of the person you want to remove from the volume, or team ID or division ID (for Enterprise users only) or object of class Member containing member's ID.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Remove volume member volume_object$remove_member(member = member) }
get_member()
Get member's details. This function returns member's information.
Volume$get_member(member, ...)
member
The Seven Bridges Platform username of the person you want to get information about, or team ID or division ID (for Enterprise users only) or object of class Member containing member's ID.
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
Member
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Get volume member volume_object$get_member(member = member) }
modify_member_permissions()
Modify volume member's permissions. This function modifies the permissions for a member of a specific volume. Note that this does not overwrite all previously set permissions for the member.
Volume$modify_member_permissions( member, permissions = list(read = TRUE, copy = FALSE, write = FALSE, admin = FALSE) )
member
The Seven Bridges Platform username of the person you want to modify permissions for or team ID or division ID (for Enterprise users only) or object of class Member containing member's ID.
permissions
List of specific (or all) permissions you want to update for the member of the volume. Permissions include listing the contents of a volume, importing files from the volume to the Platform, exporting files from the Platform to the volume, and admin privileges. It can contain fields: 'read', 'copy', 'write' and 'admin' with logical fields - TRUE if certain permission is allowed to the user, or FALSE if it's not. Example:
permissions = list(read = TRUE, copy = TRUE, write = FALSE, admin = FALSE)
Permission
object.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # Modify volume member permissions volume_object$modify_member_permissions( member = member, permission = list(read = TRUE, copy = TRUE) ) }
list_imports()
This call lists import jobs initiated by particular user from this volume.
Volume$list_imports( project = NULL, state = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
project
String project id or Project object. List all volume imports to this project. Optional.
state
String. The state of the import job. Possible values are:
PENDING
: the import is queued;
RUNNING
: the import is running;
COMPLETED
: the import has completed successfully;
FAILED
: the import has failed.
Example: state = c("RUNNING", "FAILED")
limit
The 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.
offset
The zero-based starting index in the entire collection
of the first item to return. The default value is 0
.
This is a pagination-specific attribute.
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
Collection
containing list of
Import
job objects.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # List volume imports volume_object$list_imports( project = project, state = c("RUNNING", "FAILED") ) }
list_exports()
This call lists export jobs initiated by a user into this volume. Note that when you export a file from a project on the Platform into a volume, you write to your cloud storage bucket.
Volume$list_exports( state = NULL, limit = getOption("sevenbridges2")$limit, offset = getOption("sevenbridges2")$offset, ... )
state
The state of the export job. Possible values are:
PENDING
: the export is queued;
RUNNING
: the export is running;
COMPLETED
: the export has completed successfully;
FAILED
: the export has failed.
Example: state = c("RUNNING", "FAILED")
limit
The 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.
offset
The zero-based starting index in the entire collection
of the first item to return. The default value is 0
.
This is a pagination-specific attribute.
...
Other arguments that can be passed to core api()
function
like 'fields', etc.
Collection
containing list of
Export
job objects.
\dontrun{ # x is API response when volume is requested volume_object <- Volume$new( res = x, href = x$href, auth = auth, response = attr(x, "response") ) # List volume exports volume_object$list_exports(state = c("RUNNING", "FAILED")) }
clone()
The objects of this class are cloneable with this method.
Volume$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `Volume$print`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Print volume object
volume_object$print()
## End(Not run)
## ------------------------------------------------
## Method `Volume$reload`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Reload volume object
volume_object$reload()
## End(Not run)
## ------------------------------------------------
## Method `Volume$update`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Update volume object
volume_object$update(description = description)
## End(Not run)
## ------------------------------------------------
## Method `Volume$deactivate`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Deactivate volume
volume_object$deactivate()
## End(Not run)
## ------------------------------------------------
## Method `Volume$reactivate`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Deactivate volume
volume_object$deactivate()
# Reactivate volume
volume_object$reactivate()
## End(Not run)
## ------------------------------------------------
## Method `Volume$delete`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Delete volume
volume_object$delete()
## End(Not run)
## ------------------------------------------------
## Method `Volume$list_contents`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume contents
volume_object$list_contents()
## End(Not run)
## ------------------------------------------------
## Method `Volume$get_file`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Get volume file
volume_object$get_file(location = location)
## End(Not run)
## ------------------------------------------------
## Method `Volume$list_members`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume members
volume_object$list_members()
## End(Not run)
## ------------------------------------------------
## Method `Volume$add_member`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Add volume member
volume_object$add_member(
user = user,
permissions = list(read = TRUE, copy = FALSE)
)
## End(Not run)
## ------------------------------------------------
## Method `Volume$add_member_team`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Add volume member
volume_object$add_member_team(
team = <team-id>,
permissions = list(read = TRUE, copy = FALSE)
)
## End(Not run)
## ------------------------------------------------
## Method `Volume$add_member_division`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Add volume member
volume_object$add_member_division(
division = <division-id>,
permissions = list(read = TRUE, copy = FALSE)
)
## End(Not run)
## ------------------------------------------------
## Method `Volume$remove_member`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Remove volume member
volume_object$remove_member(member = member)
## End(Not run)
## ------------------------------------------------
## Method `Volume$get_member`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Get volume member
volume_object$get_member(member = member)
## End(Not run)
## ------------------------------------------------
## Method `Volume$modify_member_permissions`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# Modify volume member permissions
volume_object$modify_member_permissions(
member = member,
permission = list(read = TRUE, copy = TRUE)
)
## End(Not run)
## ------------------------------------------------
## Method `Volume$list_imports`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume imports
volume_object$list_imports(
project = project,
state = c("RUNNING", "FAILED")
)
## End(Not run)
## ------------------------------------------------
## Method `Volume$list_exports`
## ------------------------------------------------
## Not run:
# x is API response when volume is requested
volume_object <- Volume$new(
res = x,
href = x$href,
auth = auth,
response = attr(x, "response")
)
# List volume exports
volume_object$list_exports(state = c("RUNNING", "FAILED"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.