class Aws::Plugins::EC2CopyEncryptedSnapshot::Handler
@api private
Public Instance Methods
call(context)
click to toggle source
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 16 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
Private Instance Methods
presigned_url(client, params)
click to toggle source
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 27 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
source_region_client(client, params)
click to toggle source
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 33 def source_region_client(client, params) config = client.config.to_h config.delete(:endpoint) config[:region] = params[:source_region] client.class.new(config) end