class Aws::Plugins::EC2CopyEncryptedSnapshot::Handler

@api private

def call(context)

def call(context)
  params = context.params
  unless params.key?(:destination_region)
    params[:destination_region] = context.config.region
    params[:presigned_url] = presigned_url(context.client, params)
  end
  @handler.call(context)
end

def presigned_url(client, params)

def presigned_url(client, params)
  client = source_region_client(client, params)
  client.handle(PresignHandler, step: :build, priority: 0)
  client.copy_snapshot(params).data # presigned url
end

def source_region_client(client, params)

def source_region_client(client, params)
  config = client.config.to_h
  config.delete(:endpoint)
  config[:region] = params[:source_region]
  client.class.new(config)
end