NAME

AnyEvent::Net::Amazon::S3::Client - An easy-to-use Amazon S3 client with AnyEvent

VERSION

version v0.04.0.80

SYNOPSIS

  my $s3 = AnyEvent::Net::Amazon::S3->new(
    aws_access_key_id     => $aws_access_key_id,
    aws_secret_access_key => $aws_secret_access_key,
    retry                 => 1,
  );
  my $client = AnyEvent::Net::Amazon::S3::Client->new( s3 => $s3 );

  # list all my buckets
  # returns a list of L<AnyEvent::Net::Amazon::S3::Client::Bucket> objects
  my @buckets = $client->buckets;
  foreach my $bucket (@buckets) {
    print $bucket->name . "\n";
  }

  # create a new bucket
  # returns a L<AnyEvent::Net::Amazon::S3::Client::Bucket> object
  my $bucket = $client->create_bucket(
    name                => $bucket_name,
    acl_short           => 'private',
    location_constraint => 'US',
  );

  # or use an existing bucket
  # returns a L<AnyEvent::Net::Amazon::S3::Client::Bucket> object
  my $bucket = $client->bucket( name => $bucket_name );

DESCRIPTION

This module provides the same interface as Net::Amazon::S3::Client. In addition, some asynchronous methods returning AnyEvent condition variable are added.

WARNING: Original Net::Amazon::S3::Client says that it is an early release of the Client classes, the APIs may change.

METHODS

All Net::Amazon::S3::Client methods are available. In addition, there are the following asynchronous methods. Arguments of the methods are identical as original but return value becomes AnyEvent condition variable. You can get actual return value by calling shift->recv().

buckets_async
create_bucket_async

SEE ALSO

AUTHOR

Yasutaka ATARASHI <yakex@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Yasutaka ATARASHI.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.