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 (in AWSSDK.dll) Version: 1.4.10.0 (1.4.10.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static class AmazonS3Util
Public NotInheritable Class AmazonS3Util
public ref class AmazonS3Util abstract sealed

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
CreateHeaderEntry(String, String)
Builds and returns the name value collection that can be added to the HTTP headers for the request
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
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
SetObjectStorageClass(S3Object, 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, S3StorageClass, AmazonS3)
Sets the storage class for the S3 Object 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(S3ObjectVersion, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object Version to the value specified.
SetServerSideEncryption(String, String, ServerSideEncryptionMethod, AmazonS3)
Sets the server side encryption method for the S3 Object 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.
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

System..::..Object
  Amazon.S3.Util..::..AmazonS3Util

See Also