Table of Contents

Interface ICoreAmazonS3

Namespace
Amazon.Runtime.SharedInterfaces
Assembly
AWSSDK.Core.dll

ICoreAmazonS3 is not meant to use directly. It defines S3 with basic .NET types and allows other services to be able to use S3 as a runtime dependency. This interface is implemented by the AmazonS3Client defined in the S3 assembly.

public interface ICoreAmazonS3

Methods

DeleteAsync(string, string, IDictionary<string, object>, CancellationToken)

Delete an object.

Task DeleteAsync(string bucketName, string objectKey, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKey string
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task

DeletesAsync(string, IEnumerable<string>, IDictionary<string, object>, CancellationToken)

Delete an object.

Task DeletesAsync(string bucketName, IEnumerable<string> objectKeys, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKeys IEnumerable<string>
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task

DoesS3BucketExistAsync(string)

Check to see if the bucket exists.

[Obsolete("This method is deprecated: its behavior is inconsistent and always uses HTTP. Please use Amazon.S3.Util.AmazonS3Util.DoesS3BucketExistV2Async instead.")]
Task<bool> DoesS3BucketExistAsync(string bucketName)

Parameters

bucketName string

Returns

Task<bool>

DownloadToFilePathAsync(string, string, string, IDictionary<string, object>, CancellationToken)

Download an object in S3 to a file path.

Task DownloadToFilePathAsync(string bucketName, string objectKey, string filepath, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKey string
filepath string
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task

EnsureBucketExistsAsync(string)

Check to see if the bucket exists and if it doesn't create the bucket.

Task EnsureBucketExistsAsync(string bucketName)

Parameters

bucketName string

Returns

Task

GeneratePreSignedURL(string, string, DateTime, IDictionary<string, object>)

Generate a presigned URL.

string GeneratePreSignedURL(string bucketName, string objectKey, DateTime expiration, IDictionary<string, object> additionalProperties)

Parameters

bucketName string
objectKey string
expiration DateTime
additionalProperties IDictionary<string, object>

Returns

string

GetAllObjectKeysAsync(string, string, IDictionary<string, object>)

Get all the object keys for the particular bucket and key prefix.

Task<IList<string>> GetAllObjectKeysAsync(string bucketName, string prefix, IDictionary<string, object> additionalProperties)

Parameters

bucketName string
prefix string
additionalProperties IDictionary<string, object>

Returns

Task<IList<string>>

GetObjectStreamAsync(string, string, IDictionary<string, object>, CancellationToken)

Open a stream to an object in S3.

Task<Stream> GetObjectStreamAsync(string bucketName, string objectKey, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKey string
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task<Stream>

MakeObjectPublicAsync(string, string, bool)

Set the ACL on the object to public readable.

Task MakeObjectPublicAsync(string bucketName, string objectKey, bool enable)

Parameters

bucketName string
objectKey string
enable bool

Returns

Task

UploadObjectFromFilePathAsync(string, string, string, IDictionary<string, object>, CancellationToken)

Upload an object from a file path.

Task UploadObjectFromFilePathAsync(string bucketName, string objectKey, string filepath, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKey string
filepath string
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task

UploadObjectFromStreamAsync(string, string, Stream, IDictionary<string, object>, CancellationToken)

Upload an object from a stream.

Task UploadObjectFromStreamAsync(string bucketName, string objectKey, Stream stream, IDictionary<string, object> additionalProperties, CancellationToken cancellationToken = default)

Parameters

bucketName string
objectKey string
stream Stream
additionalProperties IDictionary<string, object>
cancellationToken CancellationToken

Returns

Task