Class ObjectCopier
- Aws\S3\ObjectCopier implements GuzzleHttp\Promise\PromisorInterface
- Namespace: Aws\S3
- Located at S3/ObjectCopier.php
Copies objects from one S3 location to another, utilizing a multipart copy when appropriate.
Methods Summary
- __construct ( Aws\S3\S3ClientInterface $client, array $source, array $destination, string $acl = 'private', array $options = [] )
-
promise ( )
Perform the configured copy asynchronously. Returns a promise that is fulfilled with the result of the CompleteMultipartUpload or CopyObject operation or rejected with an exception.
-
copy ( )
Perform the configured copy synchronously. Returns the result of the CompleteMultipartUpload or CopyObject operation.
Methods Details
__construct (
Aws\S3\S3ClientInterface
$client,
array
$source,
array
$destination,
string
$acl = 'private',
array
$options = []
)
Parameters
Aws\S3\S3ClientInterface |
$client | The S3 Client used to execute the copy command(s). |
array | $source | The object to copy, specified as an array with a 'Bucket' and 'Key' keys. Provide a 'VersionID' key to copy a specified version of an object. |
array | $destination | The bucket and key to which to copy the $source, specified as an array with a 'Bucket' and 'Key' keys. |
string | $acl = 'private' | ACL to apply to the copy (default: private). |
array | $options = [] | Options used to configure the copy process. Options passed in through 'params' are added to the sub commands. |
Exceptions
InvalidArgumentException |
GuzzleHttp\Promise\Coroutine
promise (
)
Perform the configured copy asynchronously. Returns a promise that is fulfilled with the result of the CompleteMultipartUpload or CopyObject operation or rejected with an exception.
Returns
GuzzleHttp\Promise\Coroutine |
Implementation of
Aws\Result
copy (
)
Perform the configured copy synchronously. Returns the result of the CompleteMultipartUpload or CopyObject operation.
Returns
Aws\Result |
Exceptions
Aws\S3\Exception\S3Exception |
Aws\Exception\MultipartUploadException |
Constants summary
string |
DEFAULT_MULTIPART_THRESHOLD
|
#
MultipartUploader::PART_MAX_SIZE
|