@api private
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 16 def call(context) params = context.params params[:destination_region] = context.config.region params[:presigned_url] = presigned_url(context.client, params) @handler.call(context) end
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 25 def presigned_url(client, params) client = source_region_client(client, params) client.handle(PresignHandler, step: :build, priority: 0) client.handlers.remove(Handler) client.copy_snapshot(params).data # presigned url end
# File lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb, line 32 def source_region_client(client, params) EC2::Client.new({ region: params[:source_region] || 'region', credentials: client.config.credentials, }) end