///
import { S3 } from '@aws-sdk/client-s3';
import { CFNTemplate } from './cloudFormationTemplate';
export default class S3Service {
private _s3;
constructor(s3: S3);
/**
* Upload files to S3
* @param s3BucketArn - The arn of the S3 bucket to place the files in
* @param files -
* fileContent: the file buffer of what you want to upload,
* s3Prefix: where you want to upload the file within the s3 bucket,
* fileName: the name you want to give the file in s3
*/
uploadFiles(s3BucketArn: string, files: Array<{
fileContent: Buffer;
s3Prefix: string;
fileName: string;
}>): Promise;
/**
* Upload an entire folder with contained files as-is to S3
*
* Warnings for developers:
* 1. This is not a solution to offer customers for remote file upload.
* This is only to be used from the application deployer's local machine (eg. during post deployment)
* 2. When using, account for this method's limitations for scenarios where:
* - network/lambda timeouts might occur for larger folder/long operations
* - maximum single file size is limited to 5GB even if your connection can handle the time needed.
*
* @param s3BucketName - The name of the S3 bucket to place the folder in
* @param prefix - The key name to create in S3 for this folder
* @param path - The full local directory path in local system of the folder
*/
uploadFolder(s3BucketName: string, prefix: string, path: string): Promise;
/**
* Read Template from Bucket
* @param s3BucketURL - URL of provision artifact template
* @returns json object containing yaml file configuration
*/
getTemplateByURL(s3BucketURL: string): Promise;
/**
* Parse stream into string with utf8
* @param stream - stream to parse
* @returns string with stream content
*/
private _streamToString;
/**
* Get a presigned URL for a GetObjectCommand
* @param s3bucketName - name of the bucket
* @param key - name of the file to get from the bucket
* @param expirationSeconds - expiration in seconds of the presigned URL
*
* @returns A presigned URL
*/
getPresignedUrl(s3BucketName: string, key: string, expirationSeconds: number): Promise;
/**
* Create a presigned URL for a signle-part file upload
* @param s3BucketName - the name of the s3 bucket
* @param prefix - the s3 prefix to upload to
* @param timeToLiveSeconds - length of time (in seconds) the URL is valid.
* @returns the presigned URL
*/
createPresignedUploadUrl(s3BucketName: string, prefix: string, timeToLiveSeconds: number): Promise;
}
//# sourceMappingURL=s3Service.d.ts.map