IS3Manager Interface

Summary

Provides a high level utility for managing transfers to and from Amazon S3. It makes extensive use of Amazon S3 multipart uploads to achieve enhanced throughput, performance, and reliability. When uploading large files by specifying file paths instead of a stream, TransferUtility uses multiple threads to upload multiple parts of a single upload at once. When dealing with large content sizes and high bandwidth, this can increase throughput significantly.
Assembly
Cake.AWS.S3.dll
Namespace
Cake.AWS.S3
Implementing Types
graph BT Type["IS3Manager"] class Type type-node Implementing0["S3Manager"]-.->Type click Implementing0 "/api/Cake.AWS.S3/S3Manager"

Syntax

public interface IS3Manager

Properties

Name Value Summary
LogProgress bool
If the manager should output progrtess events to the cake log

Methods

Name Value Summary
Delete(string, string, S3Settings, CancellationToken) Task
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects.
DeleteAll(string, DateTimeOffset, S3Settings, CancellationToken) Task<IList<string>>
Removes all objects from the bucket
Download(FilePath, string, string, DownloadSettings, CancellationToken) Task
Downloads the content from Amazon S3 and writes it to the specified file.
GenerateEncryptionKey(FilePath, int) void
Generates a base64-encoded encryption key for Amazon S3 to use to encrypt / decrypt objects
GetBytes(string, string, DownloadSettings, CancellationToken) Task<byte[]>
Get the byte array of the content from Amazon S3
GetHash(IFile) string
Gets the hash of a file
GetObject(string, string, S3Settings, CancellationToken) Task<S3Object>
Retrieves object from Amazon S3.
GetObjectMetaData(string, string, S3Settings, CancellationToken) Task<MetadataCollection>
Retrieves object Metadata from Amazon S3.
GetObjects(string, S3Settings, CancellationToken) Task<IList<S3Object>>
Returns all the objects in a S3 bucket.
GetPreSignedURL(string, string, DateTime, S3Settings) string
Create a signed URL allowing access to a resource that would usually require authentication. cts
Open(string, string, DownloadSettings, CancellationToken) Task<Stream>
Opens a stream of the content from Amazon S3
SyncDownload(DirectoryPath, SyncSettings, CancellationToken) Task<IList<string>>
Syncs the specified directory from Amazon S3, checking the modified date of the local files with existing S3Objects and downloading them if its changed.
SyncDownload(FilePath, SyncSettings, CancellationToken) Task<string>
Syncs the specified file from Amazon S3, checking the modified date of the local files with existing S3Objects and downloading them if its changed.
SyncUpload(DirectoryPath, SyncSettings, CancellationToken) Task<IList<string>>
Syncs the specified file to Amazon S3, checking the modified date of the local files with existing S3Objects and uploading them if its changes.
SyncUpload(FilePath, SyncSettings, CancellationToken) Task<string>
Syncs the specified directory to Amazon S3, checking the modified date of the local files with existing S3Objects and uploading them if its changes.
Upload(FilePath, string, UploadSettings, CancellationToken) Task
Uploads the specified file. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3.
Upload(Stream, string, UploadSettings, CancellationToken) Task
Uploads the contents of the specified stream. For large uploads, the file will be divided and uploaded in parts using Amazon S3's multipart API. The parts will be reassembled as one object in Amazon S3.

Extension Methods

Name Value Summary
Dump<IS3Manager>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IS3Manager>(IS3Manager[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IS3Manager>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<IS3Manager>(string) void
Requires the Cake.Issues addin
ThrowIfNull<IS3Manager>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<IS3Manager>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin