2009-07-13 22:14:59 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class S3
|
|
|
|
|
|
|
|
# Get location constraint for an S3 bucket
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * bucket_name<~String> - name of bucket to get location constraint for
|
|
|
|
#
|
|
|
|
# ==== Returns
|
2009-07-20 22:47:48 -04:00
|
|
|
# * response<~Fog::AWS::Response>:
|
|
|
|
# * body<~Hash>:
|
2009-07-29 22:50:51 -04:00
|
|
|
# * 'LocationConstraint'<~String> - Location constraint of the bucket
|
2009-07-13 22:14:59 -04:00
|
|
|
def get_bucket_location(bucket_name)
|
|
|
|
request({
|
2009-07-14 19:04:39 -04:00
|
|
|
:expects => 200,
|
2009-07-13 22:14:59 -04:00
|
|
|
:headers => {},
|
|
|
|
:host => "#{bucket_name}.#{@host}",
|
|
|
|
:method => 'GET',
|
|
|
|
:parser => Fog::Parsers::AWS::S3::GetBucketLocation.new,
|
|
|
|
:query => 'location'
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|