AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Provides utilities used by the Amazon S3 client implementation. These utilities might be useful to consumers of the Amazon S3 library.
Namespace: Amazon.S3.Util
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public static class AmazonS3Util
The AmazonS3Util type exposes the following members
Name | Type | Description | |
---|---|---|---|
FormattedCurrentTimestamp | System.String |
Formats the current date as a GMT timestamp |
Name | Description | |
---|---|---|
ConvertToS3StorageClass(string) |
Converts the string representing a storage class that would come back from a ListObjects request to the S3StorageClass enumeration. |
|
DeleteS3BucketWithObjects(IAmazonS3, string) |
Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjects(IAmazonS3, string, S3DeleteBucketWithObjectsOptions) |
Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjectsAsync(IAmazonS3, string) |
Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjectsAsync(IAmazonS3, string, S3DeleteBucketWithObjectsOptions) |
Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjectsAsync(IAmazonS3, string, CancellationToken) |
Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjectsAsync(IAmazonS3, string, S3DeleteBucketWithObjectsOptions, CancellationToken) |
Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DeleteS3BucketWithObjectsAsync(IAmazonS3, string, S3DeleteBucketWithObjectsOptions, Action<S3DeleteBucketWithObjectsUpdate>, CancellationToken) |
Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself. |
|
DoesS3BucketExist(IAmazonS3, string) |
Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url |
|
DoesS3BucketExistAsync(IAmazonS3, string) |
Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url |
|
DoesS3BucketExistV2(IAmazonS3, string) |
Determines whether an S3 bucket exists or not. |
|
DoesS3BucketExistV2Async(IAmazonS3, string) |
Determines whether an S3 bucket exists or not. |
|
GenerateChecksumForContent(string, bool) |
Generates an MD5 Digest for the string-based content |
|
GenerateMD5ChecksumForStream(Stream) |
Generates an MD5 Digest for the stream specified |
|
IsDirectoryBucket(IRequest) |
Check if the backend is S3Express |
|
MakeStreamSeekable(Stream) |
Converts a non-seekable stream into a System.IO.MemoryStream. A MemoryStream's position can be moved arbitrarily |
|
MimeTypeFromExtension(string) |
Determines MIME type from a file extension |
|
PostUpload(S3PostUploadRequest) |
Upload data to Amazon S3 using HTTP POST. |
|
SetObjectStorageClass(IAmazonS3, string, string, S3StorageClass) |
Sets the storage class for the S3 Object to the value specified. |
|
SetObjectStorageClass(IAmazonS3, string, string, string, S3StorageClass) |
Sets the storage class for the S3 Object's Version to the value specified. |
|
SetServerSideEncryption(IAmazonS3, string, string, ServerSideEncryptionMethod) |
Sets the server side encryption method for the S3 Object to the value specified. |
|
SetServerSideEncryption(IAmazonS3, string, string, string, ServerSideEncryptionMethod) |
Sets the server side encryption method for the S3 Object's Version to the value specified. |
|
SetWebsiteRedirectLocation(IAmazonS3, string, string, string) |
Sets the redirect location for the S3 Object's when being accessed through the S3 website endpoint. |
|
UrlEncode(string, bool) |
URL encodes a string. If the path property is specified, the accepted path characters {/+:} are not encoded. |
|
UseS3ExpressSessionAuth(IRequest) |
Check if the request should use S3Express session authentication |
|
ValidateV2Bucket(string) |
Version2 S3 buckets adhere to RFC 1035:
|
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5