ObjectCopier
in package
implements
PromisorInterface
Copies objects from one S3 location to another, utilizing a multipart copy when appropriate.
Table of Contents
Interfaces
- PromisorInterface
- Interface used with classes that return a promise.
Constants
- DEFAULT_MULTIPART_THRESHOLD = \Aws\S3\MultipartUploader::PART_MAX_SIZE
Methods
- __construct() : mixed
- copy() : Result
- Perform the configured copy synchronously. Returns the result of the CompleteMultipartUpload or CopyObject operation.
- promise() : Coroutine
- 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.
Constants
DEFAULT_MULTIPART_THRESHOLD
public
mixed
DEFAULT_MULTIPART_THRESHOLD
= \Aws\S3\MultipartUploader::PART_MAX_SIZE
Methods
__construct()
public
__construct(S3ClientInterface $client, array<string|int, mixed> $source, array<string|int, mixed> $destination[, string $acl = 'private' ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $client : S3ClientInterface
-
The S3 Client used to execute the copy command(s).
- $source : array<string|int, mixed>
-
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.
- $destination : array<string|int, mixed>
-
The bucket and key to which to copy the $source, specified as an array with a 'Bucket' and 'Key' keys.
- $acl : string = 'private'
-
ACL to apply to the copy (default: private).
- $options : array<string|int, mixed> = []
-
Options used to configure the copy process. Options passed in through 'params' are added to the sub commands.
Tags
copy()
Perform the configured copy synchronously. Returns the result of the CompleteMultipartUpload or CopyObject operation.
public
copy() : Result
Tags
Return values
Resultpromise()
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.
public
promise() : Coroutine