Class: Aws::Plugins::S3GetBucketLocationFix::Handler
- Inherits:
-
Seahorse::Client::Handler
- Object
- Seahorse::Client::Handler
- Aws::Plugins::S3GetBucketLocationFix::Handler
- Defined in:
- lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Handler
Instance Method Summary collapse
Methods inherited from Seahorse::Client::Handler
Constructor Details
This class inherits a constructor from Seahorse::Client::Handler
Instance Method Details
#call(context) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb', line 7 def call(context) @handler.call(context).on(200) do |response| xml = MultiXml.parse(context.http_response.body_contents) if xml.key?('LocationConstraint') constraint = xml['LocationConstraint'] response.data[:location_constraint] = case constraint when String then constraint when Hash then constraint['__content__'].to_s when nil then '' end end end end |