Volumes {sevenbridges2} | R Documentation |
R6 Class representing volumes endpoints
Description
R6 Class representing volumes resource endpoints.
Super class
sevenbridges2::Resource
-> Volumes
Public fields
URL
List of URL endpoints for this resource.
Methods
Public methods
Method new()
Create a new Volumes object.
Usage
Volumes$new(...)
Arguments
...
Other response arguments.
Method query()
This call lists all the volumes you've registered.
Usage
Volumes$query(...)
Arguments
...
Other arguments that can be passed to core
api()
function like 'limit', 'offset', 'fields', etc.
Returns
Collection
of Volume
objects.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Query volumes volumes_object$query() }
Method get()
This call returns details of the specified volume. The volume is referred to by its ID, which you can obtain by making the call to list all the volumes you've registered.
Usage
Volumes$get(id)
Arguments
id
The Volume ID consists of volume owner's name (for enterprise users) and volume name in form
{volume_owner}/{volume_name}
, or division name (if user belongs to some division) and volume name in form{division}/{volume_name}
. You can also get the Volume ID for a volume by making the call to list all volumes you've registered.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Get volumes volumes_object$get(id = id) }
Method delete()
This call deletes a volume you've created to refer to storage on Amazon Web Services or Google Cloud Storage. 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.
Volumes are specified by their IDs, which you can obtain by using
Volumes$query()
to list files or by getting a single file
using Volumes$get()
.
Usage
Volumes$delete(volume, ...)
Arguments
volume
Volume
object or volume ID....
Other arguments that can be passed to core
api()
function as 'fields', etc.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Get volumes volumes_object$delete(volume = volume) }
Method create_s3_using_iam_user()
Create new volume to connect to your s3 bucket on AWS cloud.
Volumes authorize the Platform to access and query objects on a
specified cloud storage (Amazon Web Services, Google Cloud Storage,
Azure or Ali cloud) on your behalf. This function uses
IAM User credentials to connect to your s3 bucket.
Read more about volume creation in our API documentation.
Usage
Volumes$create_s3_using_iam_user( name = NULL, access_mode = "RW", description = NULL, prefix = NULL, bucket = NULL, endpoint = "s3.amazonaws.com", access_key_id = NULL, secret_access_key = NULL, properties = list(sse_algorithm = "AES256"), from_path = NULL )
Arguments
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.
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"
.description
An optional description of this volume.
prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
bucket
The name of the AWS S3 bucket you wish to register as a volume.
Required iffrom_path
parameter is not provided.endpoint
AWS API endpoint to use when accessing this bucket. Default:
s3.amazonaws.com
.access_key_id
AWS access key ID in form of string of the IAM user shared with Seven Bridges to access this bucket. Required if
from_path
parameter is not provided.secret_access_key
AWS secret access key in form of string of the IAM user shared with Seven Bridges to access this bucket. Required if
from_path
parameter is not provided.properties
Named list containing the properties of a specific service. These values set the defaults for operations performed with this volume. Individual operations can override these defaults by providing a custom properties object. For AWS S3, there are:
-
sse_algorithm
- S3 server-side encryption to use when exporting to this bucket. Supported values:AES256
(SSE-S3 encryption),aws:kms
,null
(no server-side encryption). Default:AES256
. -
sse_aws_kms_key_id
: Applies to type:s3
. If AWS KMS encryption is used, this should be set to the required KMS key. If not set andaws:kms
is set assse_algorithm
, default KMS key is used. -
aws_canned_acl
: S3 canned ACL to apply on the object on during export. Supported values: any one of S3 canned ACLs;null
(do not apply canned ACLs). Default:null
.
-
from_path
Path to JSON configuration file containing all required information for registering a volume. If provided, it will overwrite all previous parameters set.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create new AWS Volume (IAM User) aws_iam_user_volume <- volumes_object$create_s3_using_iam_user( name = "my_new_aws_user_volume", bucket = "<bucket-name>", description = "AWS IAM User Vol", access_key_id = "<access-key>", secret_access_key = "<secret-access-key>" ) }
Method create_s3_using_iam_role()
Create new volume to connect to your s3 bucket on AWS cloud.
Volumes authorize the Platform to access and query objects on a
specified cloud storage (Amazon Web Services, Google Cloud Storage,
Azure or Ali cloud) on your behalf. This function uses
IAM Role credentials to connect to your s3 bucket.
In order to use these credentials, user must have specific user tag
enabled by Support team.
Read more about volume creation in our API documentation.
Usage
Volumes$create_s3_using_iam_role( name = NULL, access_mode = "RW", description = NULL, prefix = NULL, bucket = NULL, endpoint = "s3.amazonaws.com", role_arn = NULL, external_id = NULL, properties = list(sse_algorithm = "AES256"), from_path = NULL )
Arguments
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.
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"
.description
An optional description of this volume.
prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
bucket
The name of the AWS S3 bucket you wish to register as a volume.
Required iffrom_path
parameter is not provided.endpoint
AWS API endpoint to use when accessing this bucket. Default:
s3.amazonaws.com
.role_arn
The ARN (Amazon Resource Name) of your role that is used to connect your S3 bucket. Required if
from_path
parameter is not provided.external_id
Optional information that you can use in an IAM role trust policy to designate who can assume the role. Must be provided if it is configured in your role trust policy on AWS. Required if
from_path
parameter is not provided.properties
Named list containing the properties of a specific service. These values set the defaults for operations performed with this volume. Individual operations can override these defaults by providing a custom properties object. For AWS S3, there are:
-
sse_algorithm
- S3 server-side encryption to use when exporting to this bucket. Supported values:AES256
(SSE-S3 encryption),aws:kms
,null
(no server-side encryption). Default:AES256
. -
sse_aws_kms_key_id
: Applies to type:s3
. If AWS KMS encryption is used, this should be set to the required KMS key. If not set andaws:kms
is set assse_algorithm
, default KMS key is used. -
aws_canned_acl
: S3 canned ACL to apply on the object on during export. Supported values: any one of S3 canned ACLs;null
(do not apply canned ACLs). Default:null
.
-
from_path
Path to JSON configuration file containing all required information for registering a volume. If provided, it will overwrite all previous parameters set.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create new AWS Volume (IAM Role) aws_iam_role_volume <- volumes_object$create_s3_using_iam_role( name = "my_new_aws_user_volume", bucket = "<bucket-name>", description = "AWS IAM Role Vol", role_arn = "<role-arn-key>", external_id = "<external-id>" ) }
Method create_google_using_iam_user()
Create new volume to connect to your bucket on GCS.
Volumes authorize the Platform to access and query objects on a
specified cloud storage (Amazon Web Services, Google Cloud Storage,
Azure or Ali cloud) on your behalf. This function uses
IAM User credentials to connect with your GCS bucket.
Read more about volume creations in our
API documentation.
Usage
Volumes$create_google_using_iam_user( name = NULL, access_mode = "RW", description = NULL, prefix = NULL, bucket = NULL, root_url = "https://www.googleapis.com", client_email = NULL, private_key = NULL, properties = NULL, from_path = NULL )
Arguments
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.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"
.description
An optional description of this volume.
prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
bucket
The name of the GCS bucket you wish to register as a volume. Required if
from_path
parameter is not provided.root_url
Google Cloud Storage API endpoint for accessing this bucket.
Default:https://www.googleapis.com
.client_email
The client email address for the Google Cloud service account to use for operations on this bucket. This can be found in the JSON containing your service account credentials. Required if
from_path
parameter is not provided.private_key
Google Cloud Platform private key. Required if
from_path
parameter is not provided.properties
Named list containing the properties of a specific service. These values set the defaults for operations performed with this volume. Individual operations can override these defaults by providing a custom properties object.
from_path
Path to JSON configuration file containing all required information for registering a volume. If provided, it will overwrite all previous parameters set.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create Google cloud volume using IAM User authentication type gc_iam_user_volume <- volumes_object$create_google_using_iam_user( name = "my_new_gc_user_volume", access_mode = "RW", bucket = "<bucket-name>", description = "GC IAM User volume", client_email = "<client_email>", private_key = "<private_key-string>" ) }
Method create_google_using_iam_role()
Create new volume to connect to your bucket on GCS.
Volumes authorize the Platform to access and query objects on a
specified cloud storage (Amazon Web Services, Google Cloud Storage,
Azure or Ali cloud) on your behalf. This function uses
IAM Role credentials to connect to your GCS bucket.
In order to use these credentials, user must have specific user tag
enabled by Support team.
Read more about volume creations in our
API documentation.
Usage
Volumes$create_google_using_iam_role( name = NULL, access_mode = "RW", description = NULL, prefix = NULL, bucket = NULL, root_url = "https://www.googleapis.com", configuration = NULL, properties = NULL, from_path = NULL )
Arguments
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.
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"
.description
An optional description of this volume.
prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
bucket
The name of the GCS bucket you wish to register as a volume. Required if
from_path
parameter is not provided.root_url
Google Cloud Storage API endpoint for accessing this bucket.
Default:https://www.googleapis.com
.configuration
Connection configuration parameters in JSON format downloaded from the Google Cloud Console once prerequisites have been set up. Could be provided as a named list, or as path to the downloaded JSON file.
properties
Named list containing the properties of a specific service. These values set the defaults for operations performed with this volume. Individual operations can override these defaults by providing a custom properties object.
from_path
Path to JSON configuration file containing all required information for registering a volume. If provided, it will overwrite all previous parameters set.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create Google cloud volume using IAM User authentication type gc_iam_role_volume <- volumes_object$create_google_using_iam_role( name = "my_new_gc_role_volume", access_mode = "RO", bucket = "<bucket-name>", description = "GC IAM Role volume", configuration = list( type = "<type-name>", audience = "<audience-link>", subject_token_type = "<subject_token_type>", service_account_impersonation_url = "<service_account_impersonation_url>", token_url = "<token_url>", credential_source = list( environment_id = "<environment_id>", region_url = "<region_url>", url = "<url>", regional_cred_verification_url = "<regional_cred_verification_url>" ) ) ) }
Method create_azure()
This call creates a new volume by attaching a Microsoft Azure storage container to the Platform.
Usage
Volumes$create_azure( name = NULL, description = NULL, endpoint = NULL, storage_account = NULL, container = NULL, prefix = NULL, tenant_id = NULL, client_id = NULL, client_secret = NULL, resource_id = NULL, from_path = NULL )
Arguments
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
An optional description of this volume.
endpoint
Specify a Microsoft Azure endpoint, only if you are using an endpoint that is different from the default one
https://(serviceaccount).blob.core.windows.net
. To make a non-default endpoint work with the Platform, please first make sure it is supported by Seven Bridges.storage_account
The name of the storage account that holds the container you want to attach as a volume.
container
The name of the container that you want to attach as a Volume.
prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
tenant_id
Directory (tenant) ID of the application you created on the Azure Portal for the purpose of attaching your storage container.
client_id
Application (client) ID of the application you created on the Azure Portal for the purpose of attaching your storage container.
client_secret
Value of the client secret you created on the Azure Portal for the purpose of attaching your storage container.
resource_id
Resource ID of the Azure storage account. To get it, go to the Azure Portal, open the storage account's Overview page and click JSON View.
from_path
JSON configuration file containing all required information for registering a volume.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create Azure volume azure_volume <- volumes_object$create_azure( name = "my_new_azure_volume", description = "Azure volume", endpoint = "<endpoint>", container = "<bucket-name", storage_account = "<storage_account-name>", tenant_id = "<tenant_id>", client_id = "<client_id>", client_secret = "<client_secret>", resource_id = "<resource_id>" ) }
Method create_ali_oss()
Create new volume to connect to your bucket on ALI (OSS) platform.
Usage
Volumes$create_ali_oss( name = NULL, description = NULL, endpoint = NULL, bucket = NULL, prefix = NULL, access_key_id = NULL, secret_access_key = NULL, properties = NULL, from_path = NULL )
Arguments
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
An optional description of this volume.
endpoint
Specify an Ali Cloud endpoint.
bucket
The name of the ALI(OSS) bucket you wish to register as a volume. Required if
from_path
parameter is not provided.prefix
A service-specific string prefix to append to all objects created in this volume. If the service supports folders, and this prefix includes them, the API will attempt to create any missing folders when it outputs a file.
access_key_id
ALI(OSS) access key ID of the user shared with Seven Bridges to access this bucket. Required if
from_path
parameter is not provided.secret_access_key
ALI(OSS) secret access key of the user shared with Seven Bridges to access this bucket. Required if
from_path
parameter is not provided.properties
Named list containing the properties of a specific service. These values set the defaults for operations performed with this volume. Individual operations can override these defaults by providing a custom properties object.
from_path
JSON configuration file containing all required information for registering a volume.
Returns
Volume
object.
Examples
\dontrun{ volumes_object <- Volumes$new(auth = auth) # Create Ali cloud volume ali_volume <- volumes_object$create_ali_oss( name = "my_new_azure_volume", description = "Ali volume", endpoint = "<endpoint>", bucket = "<bucket-name", access_key_id = "<access_key_id>", secret_access_key = "<secret_access_key>" ) }
Method clone()
The objects of this class are cloneable with this method.
Usage
Volumes$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
## ------------------------------------------------
## Method `Volumes$query`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Query volumes
volumes_object$query()
## End(Not run)
## ------------------------------------------------
## Method `Volumes$get`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Get volumes
volumes_object$get(id = id)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$delete`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Get volumes
volumes_object$delete(volume = volume)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_s3_using_iam_user`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create new AWS Volume (IAM User)
aws_iam_user_volume <- volumes_object$create_s3_using_iam_user(
name = "my_new_aws_user_volume",
bucket = "<bucket-name>",
description = "AWS IAM User Vol",
access_key_id = "<access-key>",
secret_access_key = "<secret-access-key>"
)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_s3_using_iam_role`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create new AWS Volume (IAM Role)
aws_iam_role_volume <- volumes_object$create_s3_using_iam_role(
name = "my_new_aws_user_volume",
bucket = "<bucket-name>",
description = "AWS IAM Role Vol",
role_arn = "<role-arn-key>",
external_id = "<external-id>"
)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_google_using_iam_user`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create Google cloud volume using IAM User authentication type
gc_iam_user_volume <- volumes_object$create_google_using_iam_user(
name = "my_new_gc_user_volume",
access_mode = "RW",
bucket = "<bucket-name>",
description = "GC IAM User volume",
client_email = "<client_email>",
private_key = "<private_key-string>"
)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_google_using_iam_role`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create Google cloud volume using IAM User authentication type
gc_iam_role_volume <- volumes_object$create_google_using_iam_role(
name = "my_new_gc_role_volume",
access_mode = "RO",
bucket = "<bucket-name>",
description = "GC IAM Role volume",
configuration = list(
type = "<type-name>",
audience = "<audience-link>",
subject_token_type = "<subject_token_type>",
service_account_impersonation_url = "<service_account_impersonation_url>",
token_url = "<token_url>",
credential_source = list(
environment_id = "<environment_id>",
region_url = "<region_url>",
url = "<url>",
regional_cred_verification_url = "<regional_cred_verification_url>"
)
)
)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_azure`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create Azure volume
azure_volume <- volumes_object$create_azure(
name = "my_new_azure_volume",
description = "Azure volume",
endpoint = "<endpoint>",
container = "<bucket-name",
storage_account = "<storage_account-name>",
tenant_id = "<tenant_id>",
client_id = "<client_id>",
client_secret = "<client_secret>",
resource_id = "<resource_id>"
)
## End(Not run)
## ------------------------------------------------
## Method `Volumes$create_ali_oss`
## ------------------------------------------------
## Not run:
volumes_object <- Volumes$new(auth = auth)
# Create Ali cloud volume
ali_volume <- volumes_object$create_ali_oss(
name = "my_new_azure_volume",
description = "Ali volume",
endpoint = "<endpoint>",
bucket = "<bucket-name",
access_key_id = "<access_key_id>",
secret_access_key = "<secret_access_key>"
)
## End(Not run)