hcp_aws_url: Construct AWS S3 String

Description Usage Arguments Value Examples

View source: R/hcp_aws_url.R

Description

Constructs url string for AWS S3 Bucket to pass in for HCP downloading

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hcp_aws_url(
  path_to_file = "",
  bucket = "hcp-openaccess",
  region = "us-east-1",
  access_key = NULL,
  secret_key = NULL,
  lifetime_minutes = 20,
  query = NULL,
  verb = "GET",
  sign = TRUE
)

Arguments

path_to_file

Path to file on HCP S3 Bucket

bucket

Bucket to download from

region

Region of S3 Bucket

access_key

Amazon S3 Access Key

secret_key

Amazon S3 Secret Key

lifetime_minutes

Time that connection can be opened

query

additional query to add to url

verb

httr VERB to be used

sign

Should the url be signed?

Value

Character of the url to be passed to httr 'VERB's

Examples

1
2
3
4
if (have_aws_key()){
path_to_file <- "HCP_900/100206/MNINonLinear/100206.164k_fs_LR.wb.spec"
hcp_aws_url(path_to_file)
}

muschellij2/neurohcp documentation built on Sept. 18, 2021, 7:19 p.m.