R6 Class representing Projects resource.
Super class
sevenbridges2::Resource
-> Projects
Methods
Method query()
A method to list all projects available to 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
name
Project's name.
owner
The username of the owner whose projects you want to query.
tags
The list of project tags.
limit
The maximum number of collection items to return for a single request. Minimum value is
1
. The maximum value is100
and the default value is50
. 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 other query parameters or 'fields', etc.
Returns
Collection
of Project
objects.
Method get()
This call creates Project object containing the details of a specified project.
Arguments
id
Project 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 project from a 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
name
The name of the project you are creating.
billing_group
The Billing object or ID of the billing group for the project.
description
Description of the project.
tags
The list of project tags.
locked
Set this field to
TRUE
to lock down a project. Locking down a project prevents any Seven Bridges team member from viewing any information about the task.controlled
Set this field to
TRUE
to define this project as controlled i.e. one which will contain controlled data. SetFALSE
to define the project as open i.e. one which will contain open data.location
Specify the location for this project:
aws:us-east-1
oraws:us-west-2
.use_interruptible_instances
Defines the use of spot instances.
use_memoization
Set to
FALSE
by default. Set toTRUE
to enable memoization.use_elastic_disk
Set to
TRUE
to enable Elastic disk.intermediate_files
A 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 is120
and 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) {
projects_object <- Projects$new(auth = auth)
# Query projects
projects_object$query(name = name)
}
## ------------------------------------------------
## Method `Projects$get`
## ------------------------------------------------
if (FALSE) {
projects_object <- Projects$new(auth = auth)
# Get project by id
projects_object$get(id = id)
}
## ------------------------------------------------
## Method `Projects$delete`
## ------------------------------------------------
if (FALSE) {
projects_object <- Projects$new(auth = auth)
# Delete a project
projects_object$delete(project = project)
}
## ------------------------------------------------
## Method `Projects$create`
## ------------------------------------------------
if (FALSE) {
projects_object <- Projects$new(auth = auth)
# Create a project
projects_object$create(
name = name,
billing_group = billing_group,
description = description
)
}