| Class | AWS::S3::Client |
| In: |
lib/aws/s3/client.rb
lib/aws/s3/client/xml.rb |
| Parent: | BaseClient |
Provides a low-level client to Amazon S3:
client.set_bucket_acl(# controls which host to connect to
:bucket_name => "mybucket",
# the request payload
:acl => [{ :grantee => "..." }])
response = client.list_buckets
response.http_request.http_method # => "GET"
response.http_response.body # => "<ListAllMyBucketsResult xmlns..."
response.request_id # => "32FE2CEB32F5EE25"
# (S3-specific metadata)
begin
client.create_bucket
rescue ArgumentError => e
puts e # prints "The bucket_name parameter is
# required"
end
response = client.list_buckets(:async => true)
response.on_success { p response.buckets.map(&:name) }
@private
| API_VERSION | = | '2006-03-01' |
| XMLNS | = | "http://s3.amazonaws.com/doc/#{API_VERSION}/" |
| EMPTY_BODY_ERRORS | = | { 304 => Errors::NotModified, 404 => Errors::NoSuchKey |