Home > @hapoosjs/aws-buckets > AWSBuckets
Implementation of Buckets interface for AWS
Signature:
export declare class AWSBuckets implements Buckets
Implements: Buckets
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) |
Property | Modifiers | Type | Description |
---|---|---|---|
client | S3Client | ||
region | string | ||
regionalClients | Map<string, S3Client> |
Method | Modifiers | Description |
---|---|---|
blockPublicAccess(bucketName, blockAccess) | Block or unblock public access | |
bucketExists(bucketName) | Check if a bucket of a given name exists | |
clean(bucketName, folder) | Delete all files in a bucket or a folder in the bucket | |
createBucket(bucketName, options) | Create a new bucket | |
deleteBucket(bucketName, options) | Delete a bucket | |
deleteFile(bucketName, filePath, versionId) | Delete a file | |
deletePolicy(bucketName) | Delete resource permission policy associated with a bucket | |
getEncryption(bucketName) | Get encryption configuration for a bucket | |
getFileAsBuffer(bucketName, filePath) | Download file contents | |
getFileAsStream(bucketName, filePath) | Download file contents | |
getFileMetadata(bucketName, filePath) | Get file metadata | |
getPolicy(bucketName) | Retrieve resource permission policy associated with a bucket | |
getVersioning(bucketName) | Check if versioning of files is enabled for a bucket | |
getWebsiteConfiguration(bucketName) | Get Website configuration associated with a bucket | |
getWebsiteDomain(bucketName) | Get the Website URL corresponding to a bucket | |
listBuckets() | List buckets visible to the current user or role. Note that AWS does not support pagination so start and max options are ignored. | |
listFiles(bucketName, options) | List files in a bucket or folder within a bucket | |
listFileVersions(bucketName, options) | Retrieve a paginated list of versions for a file | |
putFile(bucketName, filePath, file, options) | Upload a file to a bucket | |
setEncryption(bucketName, flag, options) | Turn default server side encryption of bucket files on or off. | |
setPolicy(bucketName, policy) | Set bucket permission policy | |
setVersioning(bucketName, flag) | Turn on/off versioning of files in a bucket | |
setWebsiteConfiguration(bucketName, options) | Set Website configuration associated with a bucket |