class Aws::Plugins::EndpointPattern::Handler

def apply_endpoint_trait(context, trait)

def apply_endpoint_trait(context, trait)
  pattern = trait['hostPrefix']
  return unless pattern
  host_prefix = pattern.gsub(/\{.+?}/) do |label|
    label = label.delete('{}')
    replace_label_value(label, context.operation.input, context.params)
  end
  context.http_request.endpoint.host = host_prefix + context.http_request.endpoint.host
end