R6 Class representing a Projects resource.
Super class
sevenbridges2::Resource -> Projects
Methods
Method query()
A method to list all projects available to a particular
user. If the username is not provided, all projects available to the
currently authenticated user will be listed.
Otherwise, projects will be listed for the user whose username
is provided.
Please keep in mind that this way you will only be able to list
projects you are a member of.
More details on how to query projects, you can find in our
documentation.
Arguments
nameProject's name.
ownerThe username of the owner whose projects you want to query.
tagsA list of project tags used to filter the query results. Each tag should be provided as a string within the list, and tags may include spaces. For example, both "my_tag_1" and "tag with spaces" are valid tag values. The method will return only projects that have all the specified tags.
limitThe maximum number of collection items to return for a single request. Minimum value is
1. The maximum value is100and the default value is50. This is a pagination-specific attribute.offsetThe 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 other query parameters or 'fields', etc.
Returns
Collection of Project objects.
Method get()
This call creates a Project object containing the details of a specified project.
Arguments
idProject ID. It consists of project owner's username or if you are using Enterprise, then the Division name and project's short name in form of
<owner_username>/<project-short-name>or<division-name>/<project-short-name>....Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
Project object.
Method delete()
Method that allows you to delete a project from the
platform. It can only be successfully made if you have admin status for
the project.
Projects are specified by their IDs, which you can obtain
by using Projects$query() to list projects or by getting a
single project using Projects$get().
Please be careful when using this method and note that calling it will
permanently delete the project from the platform.
Method create()
A method for creating a new project.
Usage
Projects$create(
name,
billing_group = NULL,
description = name,
tags = NULL,
locked = FALSE,
controlled = FALSE,
location = NULL,
use_interruptible_instances = TRUE,
use_memoization = FALSE,
use_elastic_disk = FALSE,
intermediate_files = list(retention = "LIMITED", duration = 24),
...
)Arguments
nameThe name of the project you are creating.
billing_groupThe Billing object or ID of the billing group for the project.
descriptionDescription of the project.
tagsThe list of project tags.
lockedSet this field to
TRUEto lock down a project. Locking down a project prevents any Seven Bridges team member from viewing any information about the task.controlledSet this field to
TRUEto define this project as controlled i.e. one which will contain controlled data. SetFALSEto define the project as open i.e. one which will contain open data.locationSpecify the location for this project:
aws:us-east-1oraws:us-west-2.use_interruptible_instancesDefines the use of spot instances.
use_memoizationSet to
FALSEby default. Set toTRUEto enable memoization.use_elastic_diskSet to
TRUEto enable Elastic disk.intermediate_filesA list defining the retention period for intermediate files. Expected elements:
retention- Specifies that intermediate files should be retained for a limited amount of time. The value is alwaysLIMITED.duration- Specifies intermediate files retention period in hours. The minimum value is1. The maximum value is120and the default value is24.
...Other arguments that can be passed to core
api()function like 'fields', etc.
Returns
Project object.
Examples
## ------------------------------------------------
## Method `Projects$query`
## ------------------------------------------------
if (FALSE) { # \dontrun{
projects_object <- Projects$new(auth = auth)
# Query projects
projects_object$query(name = name)
} # }
## ------------------------------------------------
## Method `Projects$get`
## ------------------------------------------------
if (FALSE) { # \dontrun{
projects_object <- Projects$new(auth = auth)
# Get project by id
projects_object$get(id = id)
} # }
## ------------------------------------------------
## Method `Projects$delete`
## ------------------------------------------------
if (FALSE) { # \dontrun{
projects_object <- Projects$new(auth = auth)
# Delete a project
projects_object$delete(project = project)
} # }
## ------------------------------------------------
## Method `Projects$create`
## ------------------------------------------------
if (FALSE) { # \dontrun{
projects_object <- Projects$new(auth = auth)
# Create a project
projects_object$create(
name = name,
billing_group = billing_group,
description = description
)
} # }