You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Plugins::S3Md5s

Inherits:
Seahorse::Client::Plugin show all
Defined in:
aws-sdk-core/lib/aws-sdk-core/plugins/s3_md5s.rb

Constant Summary

REQUIRED_OPERATIONS =

Amazon S3 requires these operations to have an MD5 checksum

[
  :delete_objects,
  :put_bucket_cors,
  :put_bucket_lifecycle,
  :put_bucket_policy,
  :put_bucket_tagging,
]

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_options, #after_initialize, after_initialize, #before_initialize, before_initialize, option

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Instance Method Details

#add_handlers(handlers, config) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'aws-sdk-core/lib/aws-sdk-core/plugins/s3_md5s.rb', line 38

def add_handlers(handlers, config)
  # priority set low to ensure md5 is computed AFTER the request is
  # built but before it is signed
  handlers.add(Handler, {
    priority: 10,
    step: :build,
    operations: config.compute_checksums ? nil : REQUIRED_OPERATIONS,
  })
end