Class S3

java.lang.Object
com.workfusion.rpa.helpers.S3

public class S3 extends Object
This class adds static methods for work this S3.
Samples
downloadFileS3(s3EndpointUrl, accessKey, secretKey, bucket, s3Key, targetPath);
uploadFileS3(s3EndpointUrl, accessKey, secretKey, bucket, s3Key, sourcePath, strategy);
createFolderS3(s3EndpointUrl, accessKey, secretKey, bucket, s3Key);
deleteFolderFileS3(s3EndpointUrl, accessKey, secretKey, bucket, s3Key);
directoryListS3(s3EndpointUrl, accessKey, secretKey, bucket, s3Key);

Driver Type: Desktop

  • Field Details

    • S3_TIMEOUT

      public static final long S3_TIMEOUT
  • Method Details

    • downloadFileS3

      public static String downloadFileS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key, String targetPath)

      Download file from S3 bucket to local file

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of file on bucket
      targetPath - string representation path for destination file
      Returns:
      absolute path to local file
    • downloadFileS3

      public static String downloadFileS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key, String targetPath, long timeout)

      Download file from S3 bucket to local file

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of file on bucket
      targetPath - string representation path for destination file
      timeout - in milliseconds how long wait to response
      Returns:
      absolute path to local file
    • uploadFileS3

      public static String uploadFileS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key, String sourcePath, S3OverwriteStrategy strategy)

      Upload file to S3 bucket from local file

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of file on bucket
      sourcePath - string representation path for source file
      strategy - enum for values OVERWRITE, SKIP and FAIL
      Returns:
      link to uploaded file
    • uploadFileS3

      public static String uploadFileS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key, String sourcePath, S3OverwriteStrategy strategy, long timeout)

      Upload file to S3 bucket from local file

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of file on bucket
      sourcePath - string representation path for source file
      strategy - enum for values OVERWRITE, SKIP and FAIL
      timeout - in milliseconds how long wait to response
      Returns:
      link to uploaded file
    • createFolderS3

      public static String createFolderS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key)

      Create folder on S3 bucket

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of folder on bucket
      Returns:
      link to created folder
    • deleteFolderFileS3

      public static void deleteFolderFileS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key)

      Delete folder or file on S3 bucket

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of folder or file on bucket
    • directoryListS3

      public static List<Object> directoryListS3(String s3EndpointUrl, String signerType, String accessKey, String secretKey, String bucket, String s3Key)

      Get list of folders and files from S# bucket

      Driver Type: Desktop

      Parameters:
      s3EndpointUrl - string representation of url to S3
      accessKey - string representation of access key to S3 bucket
      secretKey - string representation of secret key to S3 bucket
      bucket - string representation name of bucket
      s3Key - string representation path of root folder or file on bucket