Method: Aws::SMS::Plugins::Endpoints::Handler#call

Defined in:
lib/aws-sdk-sms/plugins/endpoints.rb

#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.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/aws-sdk-sms/plugins/endpoints.rb', line 28

def call(context)
  unless context[:discovered_endpoint]
    params = Aws::SMS::Endpoints.parameters_for_operation(context)
    endpoint = context.config.endpoint_provider.resolve_endpoint(params)

    context.http_request.endpoint = endpoint.url
    apply_endpoint_headers(context, endpoint.headers)

    context[:endpoint_params] = params
    context[:endpoint_properties] = endpoint.properties
  end

  context[:auth_scheme] =
    Aws::Endpoints.resolve_auth_scheme(context, endpoint)

  with_metrics(context) { @handler.call(context) }
end