SOAP::Amazon::S3 - A module for interfacing with Amazon S3 through SOAP
Version 0.023
An object-oriented interface to handle your Amazon S3 storage. (Still experimental, although functional)
use SOAP::Amazon::S3; my $s3 = SOAP::Amazon::S3->new( $access_key_id, $secret_access_key, { Debug => 1, RaiseError => 1 } ); my @buckets = $s3->listbuckets; my $bucket = $s3->createbucket('mybucketname'); my $bucket = $s3->bucket('myoldbucket'); # won't create a new bucket print $bucket->name; $bucket->delete; my @objects = $bucket->list; my $object = $bucket->putobject( $obj_key, $obj_data, { 'Content-Type' => 'text/plain' } ); my $object = $bucket->object( $old_obj_key ); # won't put a new object in the bucket print $object->name; $object->delete; $object->acl('public'); $object->acl('private'); print $object->acl(); # will print 'public' or 'private' $data = $object->getdata;
Creates a new S3 requester object. The {} parameters are optional and default to 0. Debug will output all SOAP communications on screen. RaiseError will make your program die if it receives an error reply from Amazon S3, and output the error message on screen. If RaiseError is off, then $s3->{'error'} will still be set to true when an S3 error occurs.
Returns the list of buckets in SOAP::Amazon::S3::Bucket form
Creates a bucket named $bucket_name in your S3 space and returns the appropriate ...::S3::Bucket type object for further use
Returns an ...::S3::Bucket type object, corresponding to an already existing bucket in your S3 space, named $bucket_name
Deletes the bucket if empty. If not empty, Amazon S3 returns an error (viewable in $s3->{'error'})
Returns the list of objects in the bucket, in the form of ..::S3::Object type objects
Returns the name of the bucket
Creates an object in the S3 bucket, named $obj_key. The {} section is optional, and may contain the Content-Type (defaults to 'text/plain'). Returns an ...::S3::Object type object pointing to the object just created, if successful.
Returns an ...::S3::Object type object, corresponding to an already created object in the S3 bucket, named $old_obj_key
Returns the Key attribute of an object
Deletes the object
Gets or sets the object's ACL, making it public (and viewable through the web) or private just to you. If no parameter is entered, returns either 'public' or 'private'.
Returns the data of the object, after fetching it from S3
Alexander Karelas, <karjala at karjala.org>
<karjala at karjala.org>
Please report any bugs or feature requests to bug-soap-amazon-s3 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SOAP-Amazon-S3. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-soap-amazon-s3 at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc SOAP::Amazon::S3
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/SOAP-Amazon-S3
CPAN Ratings
http://cpanratings.perl.org/d/SOAP-Amazon-S3
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SOAP-Amazon-S3
Search CPAN
http://search.cpan.org/dist/SOAP-Amazon-S3
Copyright 2006 Alexander Karelas, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SOAP::Amazon::S3, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SOAP::Amazon::S3
CPAN shell
perl -MCPAN -e shell install SOAP::Amazon::S3
For more information on module installation, please visit the detailed CPAN module installation guide.