public function onInit(InitEvent $event) { $cmd = $event->getCommand(); if ($cmd->getName() == 'CopySnapshot') { /** @var AwsClientInterface $client */ $client = $event->getClient(); $cmd['PresignedUrl'] = $this->createPresignedUrl($client, $cmd); $cmd['DestinationRegion'] = $client->getRegion(); } }
public function onInit(InitEvent $e) { $command = $e->getCommand(); // Allows only HTTPS connections when using SSE-C if ($command['SSECustomerKey'] || $command['CopySourceSSECustomerKey']) { $this->validateScheme($e->getClient()); } // Prepare the normal SSE-CPK headers if ($command['SSECustomerKey']) { $this->prepareSseParams($command); } // If it's a copy operation, prepare the SSE-CPK headers for the source. if ($command['CopySourceSSECustomerKey']) { $this->prepareSseParams($command, true); } }