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
stringobjectKey
stringadditionalProperties
IDictionary<string, object>cancellationToken
CancellationToken
Returns
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
stringobjectKeys
IEnumerable<string>additionalProperties
IDictionary<string, object>cancellationToken
CancellationToken
Returns
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
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
stringobjectKey
stringfilepath
stringadditionalProperties
IDictionary<string, object>cancellationToken
CancellationToken
Returns
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
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
stringobjectKey
stringexpiration
DateTimeadditionalProperties
IDictionary<string, object>
Returns
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
stringprefix
stringadditionalProperties
IDictionary<string, object>
Returns
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
stringobjectKey
stringadditionalProperties
IDictionary<string, object>cancellationToken
CancellationToken
Returns
MakeObjectPublicAsync(string, string, bool)
Set the ACL on the object to public readable.
Task MakeObjectPublicAsync(string bucketName, string objectKey, bool enable)
Parameters
Returns
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
stringobjectKey
stringfilepath
stringadditionalProperties
IDictionary<string, object>cancellationToken
CancellationToken
Returns
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
stringobjectKey
stringstream
StreamadditionalProperties
IDictionary<string, object>cancellationToken
CancellationToken