Class: Aws::S3::Plugins::Accelerate::OptionHandler Private

Inherits:
Seahorse::Client::Handler
  • Object
show all
Defined in:
lib/aws-sdk-s3/plugins/accelerate.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/aws-sdk-s3/plugins/accelerate.rb', line 38

def call(context)
  # Support client configuration and per-operation configuration
  if context.params.is_a?(Hash)
    accelerate = context.params.delete(:use_accelerate_endpoint)
  end
  accelerate = context.config.use_accelerate_endpoint if accelerate.nil?
  # Raise if :endpoint and dualstack are both provided
  if accelerate && !context.config.regional_endpoint
    raise ArgumentError,
          'Cannot use both :use_accelerate_endpoint and :endpoint'
  end
  context[:use_accelerate_endpoint] = accelerate
  @handler.call(context)
end