Sha256: bc5b273d3e7a98a14a02dd0e64c8967989226776caf04e24eac13b6e73ab0f27
Contents?: true
Size: 789 Bytes
Versions: 3
Compression:
Stored size: 789 Bytes
Contents
# frozen_string_literal: true module Aws module S3Control module Plugins class S3ControlDns < Seahorse::Client::Plugin def add_handlers(handlers, config) handlers.add(Handler, step: :build, priority: 1) end class Handler < Seahorse::Client::Handler def call(context) if context.operation.endpoint_pattern.nil? move_account_id_to_subdomain(context) end @handler.call(context) end private def move_account_id_to_subdomain(context) account_id = context.params[:account_id] endpoint = context.http_request.endpoint endpoint.host = "#{account_id}.#{endpoint.host}" end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems