class Seahorse::Client::RequestContext
Attributes
@return [Seahorse::Client::Base]
@return [Configuration] The client configuration.
@return [Http::Request]
@return [Http::Response]
@return [Hash]
@return [Model::Operation]
@return [Symbol] Name of the API operation called.
@return [Hash] The hash of request parameters.
@return [Integer]
@return [Tracer]
Public Class Methods
@option options [required,Symbol] :operation_name (nil) @option options [required,Model::Operation] :operation (nil) @option options [Model::Authorizer] :authorizer (nil) @option options [Client] :client (nil) @option options [Hash] :params ({}) @option options [Configuration] :config (nil) @option options [Http::Request] :http_request (Http::Request.new
) @option options [Http::Response] :http_response (Http::Response.new
) @option options [Integer] :retries (0) @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new) @options options [Hash] :metadata ({})
# File lib/seahorse/client/request_context.rb, line 20 def initialize(options = {}) @operation_name = options[:operation_name] @operation = options[:operation] @authorizer = options[:authorizer] @client = options[:client] @params = options[:params] || {} @config = options[:config] @http_request = options[:http_request] || Http::Request.new @http_response = options[:http_response] || Http::Response.new @retries = 0 @tracer = options[:tracer] || Aws::Telemetry::NoOpTracer.new @metadata = {} end
Public Instance Methods
Returns the metadata for the given ‘key`. @param [Symbol] key @return [Object]
# File lib/seahorse/client/request_context.rb, line 70 def [](key) @metadata[key] end
Sets the request context metadata for the given ‘key`. Request
metadata useful for handlers that need to keep state on the request, without sending that data with the request over HTTP. @param [Symbol] key @param [Object] value
# File lib/seahorse/client/request_context.rb, line 79 def []=(key, value) @metadata[key] = value end