GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOAP::AMAZON::S3 (3)

.ds Aq ’

NAME

SOAP::Amazon::S3 - A module for interfacing with Amazon S3 through SOAP

CONTENTS

VERSION

Version 0.0401

SYNOPSIS

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); # wont 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 ); # wont 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;



FUNCTIONS

SOAP::Amazon::S3->new( CW$access_key_id, CW$secret_key_id, { Debug => 0_or_1, RaiseError => 0_or_1 } );

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.

OBJECT METHODS

CW$s3->listbuckets

Returns the list of buckets in SOAP::Amazon::S3::Bucket form

CW$s3->createbucket( CW$bucket_name )

Creates a bucket named $bucket_name in your S3 space and returns the appropriate ...::S3::Bucket type object for further use

CW$s3->bucket( CW$bucket_name )

Returns an ...::S3::Bucket type object, corresponding to an already existing bucket in your S3 space, named $bucket_name

CW$bucket->delete

Deletes the bucket if empty. If not empty, Amazon S3 returns an error (viewable in $s3->{’error’})

CW$bucket->list

Returns the list of objects in the bucket, in the form of ..::S3::Object type objects

CW$bucket->name

Returns the name of the bucket

CW$bucket->putobject( CW$obj_key, CW$obj_data, { ’Content-Type’ => CW$mime_type, metadata => {color=>’red’, feel=>’soft’} } )

Creates an object in the S3 bucket, named $obj_key. The {} section is optional, and may contain the Content-Type (defaults to ’text/plain’) and a metadata hashref. Returns an ...::S3::Object type object pointing to the object just created, if successful.

CW$bucket->object( CW$old_obj_key )

Returns an ...::S3::Object type object, corresponding to an already created object in the S3 bucket, named $old_obj_key

CW$object->name

Returns the Key attribute of an object

CW$object->delete

Deletes the object

CW$object->acl( ’public’ or ’private’ or nothing )

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’.

CW$object->getdata

Returns the data of the object, after fetching it from S3

CW$object->url

Return the URL of the object

AUTHOR

Alexander Karelas, <karjala at karjala.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.



    perldoc SOAP::Amazon::S3



You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/SOAP-Amazon-S3>

o CPAN Ratings

<http://cpanratings.perl.org/d/SOAP-Amazon-S3>

o RT: CPAN’s request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=SOAP-Amazon-S3>

o Search CPAN

<http://search.cpan.org/dist/SOAP-Amazon-S3>

o Module’s RSS feed

<http://myperl.eu/permodule/SOAP-Amazon-S3>

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2006-2007 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SOAP::AMAZON::S3 (3) 2007-08-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.