Created
June 23, 2015 17:15
-
-
Save larssono/1c2b9acfc2fba25a96fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make S3 bucket the default storage location for project you set up. Lets assume that this project has Id syn123 | |
#In R run: | |
library(synapseClient) | |
synapseLogin() | |
# Set up a storage location for this bucket in Synapse. Only need to do this once per bucket. | |
AWSbucketName = "your-bucket-name-here" | |
storageLocation <- synRestPOST("/storageLocation", list( | |
concreteType="org.sagebionetworks.repo.model.project.ExternalS3StorageLocationSetting", | |
uploadType="S3", | |
bucket=AWSbucketName, | |
baseKey="")) | |
##Add this as the default storage location for the new project at syn123 | |
synRestPOST('/projectSettings', list( | |
"concreteType": "org.sagebionetworks.repo.model.project.UploadDestinationListSetting", | |
"settingsType": "upload", | |
"projectId": "syn123", | |
"locations" = [storageLocationt['storageLocationId']]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment