Public Member Functions | Static Public Member Functions

AmazonS3Client Class Reference

AmazonS3Client is an implementation of AmazonS3. More...

#import <AmazonS3Client.h>

Inherits AmazonWebServiceClient.

List of all members.

Public Member Functions

(NSArray *) - listBuckets
 Returns a list of all Amazon S3 buckets that the authenticated sender of the request owns.
(S3ListBucketsResponse *) - listBuckets:
 Returns a list of all Amazon S3 buckets that the authenticated sender of the request owns.
(S3CreateBucketResponse *) - createBucket:
 Creates a bucket using the the specified request object.
(S3DeleteBucketResponse *) - deleteBucket:
 Deletes a bucket with the specified name.
(S3Region *) - getBucketLocation:
 Takes in a bucket's name and lists the location of the bucket.
(S3GetObjectMetadataResponse *) - getObjectMetadata:
 Retrieve metadata from an object without returning the object itself.
(S3PutObjectResponse *) - putObject:
 Upload an object to S3.
(S3GetObjectResponse *) - getObject:
 Fetch the most recent version of an S3 object from the specified S3 bucket.
(S3DeleteObjectResponse *) - deleteObject:
 Removes the specified object from Amazon S3.
(S3ListObjectsResponse *) - listObjects:
 List the objects in a bucket.
(NSArray *) - listObjectsInBucket:
 List the objects in a bucket.
(S3CopyObjectResponse *) - copyObject:
 Create a copy of an object that is already stored in Amazon S3.
(S3GetACLResponse *) - getACL:
 Gets the access control list for a given bucket or object.
(S3SetACLResponse *) - setACL:
 Sets the S3AccessControlList for a given bucket or object.
(NSURL *) - getPreSignedURL:
 Creates a signed http request.
(S3Response *) - invoke:
 Utility method that sends the raw S3 Request to be processed.

Static Public Member Functions

(S3Response *) + constructResponseFromRequest:
 Sign a URL request.
(void) + initializeResponseObjects
 Ensure that all response classes have been loaded by the runtime.
(NSString *) + apiVersion
 Return the version of the S3 API.

Detailed Description

AmazonS3Client is an implementation of AmazonS3.

The client allows you to manage your AmazonS3 buckets and keys/objects.

Amazon S3 is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites. The service aims to maximize benefits of scale and to pass those benefits on to developers.


Member Function Documentation

+ (S3Response * AmazonS3Client.)constructResponseFromRequest: (S3Request *)  request  

Sign a URL request.

See also:
http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/index.html?RESTAccessPolicy.html
Parameters:
request a mutable URL request
Returns:
the signed request Constructs an empty response object of the appropriate type to match the given request object.
Parameters:
request An instance of a subclass of S3Request.
Returns:
An instance of the appropriate subclass of S3Response, or an instance of S3Response if there is no response class to match the instance passed in.
- (S3CopyObjectResponse * AmazonS3Client.)copyObject: (S3CopyObjectRequest *)  copyObjectRequest  

Create a copy of an object that is already stored in Amazon S3.

When copying an object, you can preserve all metadata (default) or specify new metadata. However, the ACL is not preserved and is set to private for the user making the request. To override the default ACL setting, specify a new ACL when generating a copy request.

- (S3CreateBucketResponse * AmazonS3Client.)createBucket: (S3CreateBucketRequest *)  createBucketRequest  

Creates a bucket using the the specified request object.

Parameters:
createBucketRequest An S3CreateBucketRequest that defines the parameters of the request.
Returns:
An S3CreateBucketResponse from S3
- (S3DeleteBucketResponse * AmazonS3Client.)deleteBucket: (S3DeleteBucketRequest *)  deleteBucketRequest  

Deletes a bucket with the specified name.

All objects in the bucket must be deleted before the bucket itself can be deleted.

Parameters:
deleteBucketRequest An S3DeleteBucketRequest that defines the parameters of the request.
Returns:
An S3DeleteBucketResponse from S3
- (S3DeleteObjectResponse * AmazonS3Client.)deleteObject: (S3DeleteObjectRequest *)  deleteObjectRequest  

Removes the specified object from Amazon S3.

Once deleted, there is no method to restore or undelete an object.

Parameters:
deleteObjectRequest The S3DeleteObjectRequest that defines the parameters of the operation.
Returns:
An S3DeleteObjectResponse from S3.
- (S3GetACLResponse * AmazonS3Client.)getACL: (S3GetACLRequest *)  getACLRequest  

Gets the access control list for a given bucket or object.

Parameters:
getACLRequest The S3GetACLRequest that defines the parameters of the operation.
Returns:
An S3GetACLResponse from S3.
- (S3Region * AmazonS3Client.)getBucketLocation: (NSString *)  bucketName  

Takes in a bucket's name and lists the location of the bucket.

This information can be used to determine the bucket's geographical location. To determine the location of a bucket, you must be the bucket owner

Parameters:
bucketName The name of the bucket.
Returns:
The S3Region object that represents the region.
- (S3GetObjectResponse * AmazonS3Client.)getObject: (S3GetObjectRequest *)  getObjectRequest  

Fetch the most recent version of an S3 object from the specified S3 bucket.

You must have READ access to the object. If READ access is granted to an anonymous user, an object can be retrieved without an authorization header. Providing a version-id for the object will fetch the specific version from S3 instead of the most recent one.

Parameters:
getObjectRequest The S3GetObjectRequest that defines the parameters of the request.
Returns:
An S3GetObjectResponse from S3.
- (S3GetObjectMetadataResponse * AmazonS3Client.)getObjectMetadata: (S3GetObjectMetadataRequest *)  getObjectMetadataRequest  

Retrieve metadata from an object without returning the object itself.

Parameters:
getObjectMetadataRequest The S3DeleteBucketRequest object that defines the parameters of the request.
Returns:
An S3GetObjectMetadataResponse from S3.
- (NSURL * AmazonS3Client.)getPreSignedURL: (S3GetPreSignedURLRequest *)  preSignedURLRequest  

Creates a signed http request.

Query string authentication is useful for giving HTTP or browser access to resources that would normally require authentication. When using query string authentication, you create a query, specify an expiration time for the query, sign it with your signature, place the data in an HTTP request, and distribute the request to a user or embed the request in a web page. A PreSigned URL can be generated for GET, PUT and HEAD operations on your bucket, and keys.

Parameters:
preSignedURLRequest The S3GetPreSignedURLRequest that defines the parameters of the operation.
Returns:
An signed NSURL for the resource.
+ (void AmazonS3Client.)initializeResponseObjects  

Ensure that all response classes have been loaded by the runtime.

- (S3Response * AmazonS3Client.)invoke: (S3Request *)  request  

Utility method that sends the raw S3 Request to be processed.

Parameters:
request A request describing the parameters of an S3 request.
Returns:
The response from S3.
- (NSArray * AmazonS3Client.)listBuckets  

Returns a list of all Amazon S3 buckets that the authenticated sender of the request owns.

Returns:
An NSArray of S3Bucket objects.
- (S3ListBucketsResponse * AmazonS3Client.)listBuckets: (S3ListBucketsRequest *)  listBucketsRequest  

Returns a list of all Amazon S3 buckets that the authenticated sender of the request owns.

Parameters:
listBucketsRequest An S3ListBucketsRequest object that defines the parameters of the request.
Returns:
An S3ListBucketsResponse from S3. The buckets property of the S3ListBucketsResult has the list of buckets.
- (S3ListObjectsResponse * AmazonS3Client.)listObjects: (S3ListObjectsRequest *)  listObjectsRequest  

List the objects in a bucket.

Parameters:
listObjectsRequest The S3ListObjectsRequest that defines the parameters of the operation.
Returns:
An S3ListObjectsResponse from S3.
- (NSArray * AmazonS3Client.)listObjectsInBucket: (NSString *)  bucketName  

List the objects in a bucket.

Parameters:
bucketName The name of the bucket.
Returns:
An NSArray of S3ObjectSummary objects.
- (S3PutObjectResponse * AmazonS3Client.)putObject: (S3PutObjectRequest *)  putObjectRequest  

Upload an object to S3.

Parameters:
putObjectRequest The S3PutObjectRequest that defines the parameters of the request.
Returns:
An S3PutObjectResponse from S3.
- (S3SetACLResponse * AmazonS3Client.)setACL: (S3SetACLRequest *)  setACLRequest  

Sets the S3AccessControlList for a given bucket or object.

Parameters:
setACLRequest The S3SetACLRequest that defines the parameters of the operation.
Returns:
An S3SetACLResponse from S3.

The documentation for this class was generated from the following file: