AWS-S3
view release on metacpan or search on metacpan
t/010_basic.t
t/aws/s3.t
t/aws/s3/file.t
t/aws/s3/signer.t
t/aws/s3/bucket.t
t/aws/s3/file_iterator.t
t/aws/s3/http_request.t
t/aws/s3/signer/v4.t
t/aws/s3/signer/v4_parse_host.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
},
"runtime" : {
"requires" : {
"Carp" : "0",
"Class::Load" : "0",
"Date::Parse" : "0",
"Digest::HMAC_SHA1" : "0",
"Digest::SHA" : "5.47",
"HTTP::Date" : "0",
"HTTP::Headers" : "6.07",
"JSON::XS" : "0",
"LWP" : "5.835",
"LWP::UserAgent::Determined" : "0",
"Log::Any" : "1.718",
"MIME::Base64" : "0",
"Moose" : "2.0",
"MooseX::Types" : "0",
"MooseX::Types::URI" : "0",
"Test::Deep" : "0",
"URI" : "1.59",
"URI::Escape" : "0",
},
"homepage" : "https://metacpan.org/module/AWS-S3",
"license" : [
"http://dev.perl.org/licenses/"
],
"repository" : {
"url" : "https://github.com/leejo/AWS-S3"
}
},
"version" : "2.00",
"x_serialization_backend" : "JSON::PP version 4.16"
}
- t
- inc
requires:
Carp: '0'
Class::Load: '0'
Date::Parse: '0'
Digest::HMAC_SHA1: '0'
Digest::SHA: '5.47'
HTTP::Date: '0'
HTTP::Headers: '6.07'
JSON::XS: '0'
LWP: '5.835'
LWP::UserAgent::Determined: '0'
Log::Any: '1.718'
MIME::Base64: '0'
Moose: '2.0'
MooseX::Types: '0'
MooseX::Types::URI: '0'
Test::Deep: '0'
URI: '1.59'
URI::Escape: '0'
Makefile.PL view on Meta::CPAN
'XML::LibXML' => 0,
'XML::LibXML::XPathContext' => 0,
'LWP::UserAgent::Determined' => 0,
'Carp' => 0,
'HTTP::Date' => 0,
'HTTP::Headers' => 6.07,
'MIME::Base64' => 0,
'URI::Escape' => 0,
'Digest::HMAC_SHA1' => 0,
'Test::Deep' => 0,
'JSON::XS' => 0,
'LWP' => 5.835,
'Digest::SHA' => '5.47',
'URI' => 1.59,
'URI::QueryParam' => 0,
'Date::Parse' => 0,
'Log::Any' => '1.718',
},
BUILD_REQUIRES => {
'Test::More' => 0.31,
'Test::Deep' => 0.112,
lib/AWS/S3/Bucket.pm view on Meta::CPAN
);
# XXX: Not tested.
sub enable_cloudfront_distribution {
my ( $s, $cloudfront_dist ) = @_;
$cloudfront_dist->isa( 'AWS::CloudFront::Distribution' )
or die "Usage: enable_cloudfront_distribution( <AWS::CloudFront::Distribution object> )";
my $ident = $cloudfront_dist->cf->create_origin_access_identity( Comment => "Access to s3://" . $s->name, );
$s->policy( <<"JSON");
{
"Version":"2008-10-17",
"Id":"PolicyForCloudFrontPrivateContent",
"Statement":[{
"Sid": "Grant a CloudFront Origin Identity access to support private content",
"Effect":"Allow",
"Principal": {
"CanonicalUser":"@{[ $ident->S3CanonicalUserId ]}"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::@{[ $s->name ]}/*"
}
]
}
JSON
} # end enable_cloudfront_distribution()
sub files {
my ( $s, %args ) = @_;
return AWS::S3::FileIterator->new( %args, bucket => $s, );
} # end files()
sub file {
my ( $s, $key ) = @_;
lib/AWS/S3/Bucket.pm view on Meta::CPAN
=item * ap-northeast-1
=back
The default value is undef which means 'US'.
See also L<PUT Bucket|http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTBucketPUT.html>
=head2 policy
Read-only. String of JSON.
Looks something like this:
{
"Version":"2008-10-17",
"Id":"aaaa-bbbb-cccc-dddd",
"Statement" : [
{
"Effect":"Deny",
"Sid":"1",
lib/AWS/S3/Request/SetBucketPolicy.pm view on Meta::CPAN
package AWS::S3::Request::SetBucketPolicy;
use Moose;
use AWS::S3::Signer;
use AWS::S3::ResponseParser;
use JSON::XS;
with 'AWS::S3::Roles::Request';
has 'bucket' => ( is => 'ro', isa => 'Str', required => 1 );
has '_subresource' => (
is => 'ro',
isa => 'Str',
init_arg => undef,
default => 'policy'
);
has 'policy' => (
is => 'ro',
isa => 'Maybe[Str]',
required => 1,
# Evan Carroll 6/14/2012
# COMMENTED THIS OUT, not sure if it ever worked on VSO
# Must be able to decode the JSON string:
# where => sub {
# eval { decode_json( $_ ); 1 };
# }
);
has '+_expect_nothing' => ( default => 1 );
sub request {
my $s = shift;
( run in 1.317 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )