Sha256: 8de763c4194accc7446f953170755c36134512b6a84702036cad56cdf6635306

Contents?: true

Size: 608 Bytes

Versions: 15

Compression:

Stored size: 608 Bytes

Contents

module Aws
  module Plugins
    class S3GetBucketLocationFix < Seahorse::Client::Plugin

      class Handler < Seahorse::Client::Handler

        def call(context)
          @handler.call(context).on(200) do |response|
            response.data = Structure.new([:location_constraint])
            xml = context.http_response.body_contents
            matches = xml.match(/>(.+?)<\/LocationConstraint>/)
            response.data[:location_constraint] = matches ? matches[1] : ''
          end
        end
      end

      handler(Handler, priority: 60, operations: [:get_bucket_location])

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
aws-sdk-core-2.0.48 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.47 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.46 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.45 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.44 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.43 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.42 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.41 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.40 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.39 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.38 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.37 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.36 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.35 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
aws-sdk-core-2.0.34 lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb