AWS SDK for .NET Documentation
AmazonS3Util Class
AmazonAmazon.S3.UtilAmazonS3Util Did this page help you?   Yes   No    Tell us about it...
Provides utilities used by the Amazon S3 client implementation. These utilities might be useful to consumers of the Amazon S3 library.
Declaration Syntax
C#
public static class AmazonS3Util
Members
All MembersMethodsProperties



IconMemberDescription
BeginDeleteS3BucketWithObjects(String, AmazonS3, AsyncCallback, Object)
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.

BeginDeleteS3BucketWithObjects(String, AmazonS3, S3DeleteBucketWithObjectsOptions, AsyncCallback, Object)
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.

BeginDeleteS3BucketWithObjects(String, AmazonS3, S3DeleteBucketWithObjectsOptions, Action<(Of <<'(S3DeleteBucketWithObjectsUpdate>)>>), AsyncCallback, Object)
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.

ConvertToS3StorageClass(String)
Converts the string representing a storage class that would come back from a ListObjects request to the S3StorageClass enumeration.

CreateHeaderEntry(String, String)
Builds and returns the name value collection that can be added to the HTTP headers for the request

DeleteS3BucketWithObjects(String, AmazonS3)
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(String, AmazonS3, 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.

DoesS3BucketExist(String, AmazonS3)
Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket (with an expiry date at the end of this decade) 2. Making a HEAD request to the Url

EndDeleteS3BucketWithObjects(IAsyncCancelableResult)
Finishes the asynchronous execution of the DeleteS3BucketWithObjects operation.

FormattedCurrentTimestamp
Formats the current date as a GMT timestamp

GenerateChecksumForContent(String, Boolean)
Generates an MD5 Digest for the string-based content

GenerateChecksumForStream(Stream, Boolean)
Generates an md5Digest for the file-stream specified

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(S3Object, S3StorageClass, AmazonS3)
Sets the storage class for the S3 Object to the value specified.

SetObjectStorageClass(String, String, S3StorageClass, AmazonS3)
Sets the storage class for the S3 Object to the value specified.

SetObjectStorageClass(S3ObjectVersion, S3StorageClass, AmazonS3)
Sets the storage class for the S3 Object Version to the value specified.

SetObjectStorageClass(String, String, String, S3StorageClass, AmazonS3)
Sets the storage class for the S3 Object's Version to the value specified.

SetServerSideEncryption(S3Object, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object to the value specified.

SetServerSideEncryption(String, String, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object to the value specified.

SetServerSideEncryption(S3ObjectVersion, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object Version to the value specified.

SetServerSideEncryption(String, String, String, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object's Version to the value specified.

SetWebsiteRedirectLocation(S3Object, String, AmazonS3)
Sets the redirect location for the S3 Object's when being accessed through the S3 website endpoint.

SetWebsiteRedirectLocation(String, String, String, AmazonS3)
Sets the redirect location for the S3 Object's when being accessed through the S3 website endpoint.

Sign(String, SecureString, KeyedHashAlgorithm)
Computes RFC 2104-compliant HMAC signature

UrlEncode(String, Boolean)
URL encodes a string. If the path property is specified, the accepted path characters {/+:} are not encoded.

ValidateV2Bucket(String)
Version2 S3 buckets adhere to RFC 1035:
  1. Less than 255 characters, with each label less than 63 characters.
  2. Label must start with a letter
  3. Label must end with a letter or digit
  4. Label can have a string of letter, digits and hyphens in the middle.
  5. Although names can be case-sensitive, no significance is attached to the case.
  6. RFC 1123: Allow label to start with letter or digit (e.g. 3ware.com works)
  7. RFC 2181: No restrictions apart from the length restrictions.
S3 V2 will start with RFCs 1035 and 1123 and impose the following additional restrictions:
  1. Length between 3 and 63 characters (to allow headroom for upper-level domains, as well as to avoid separate length restrictions for bucket-name and its labels
  2. Only lower-case to avoid user confusion.
  3. No dotted-decimal IPv4-like strings

Inheritance Hierarchy
Object
AmazonS3Util

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)