Class MultipartUploader
- Aws\Multipart\AbstractUploadManager implements GuzzleHttp\Promise\PromisorInterface
-
Aws\Multipart\AbstractUploader
-
Aws\Glacier\MultipartUploader
- Namespace: Aws\Glacier
- Located at Glacier/MultipartUploader.php
Encapsulates the execution of a multipart upload to Glacier.
Methods Summary
-
static
getStateFromService ( Aws\Glacier\GlacierClient $client, string $vaultName, string $uploadId, string $accountId = '-' )
Creates an UploadState object for a multipart upload by querying the service for the specified upload's information.
-
__construct ( Aws\Glacier\GlacierClient $client, mixed $source, array $config = [] )
Creates a multipart upload for a Glacier archive.
Methods inherited from Aws\Multipart\AbstractUploadManager
getState()
,
promise()
,
upload()
Methods Details
static
Aws\Multipart\UploadState
getStateFromService (
Aws\Glacier\GlacierClient
$client,
string
$vaultName,
string
$uploadId,
string
$accountId = '-'
)
Creates an UploadState object for a multipart upload by querying the service for the specified upload's information.
Parameters
Aws\Glacier\GlacierClient |
$client | GlacierClient object to use. |
string | $vaultName | Vault name for the multipart upload. |
string | $uploadId | Upload ID for the multipart upload. |
string | $accountId = '-' | Account ID for the multipart upload. |
Returns
Aws\Multipart\UploadState |
__construct (
Aws\Glacier\GlacierClient
$client,
mixed
$source,
array
$config = []
)
Creates a multipart upload for a Glacier archive.
The valid configuration options are as follows:
- account_id: (string, default=string('-')) Account ID for the archive being uploaded, if different from the account making the request.
- archive_description: (string) Description of the archive.
- before_complete: (callable) Callback to invoke before the
CompleteMultipartUpload
operation. The callback should have a function signature likefunction (Aws\Command $command) {...}
. - before_initiate: (callable) Callback to invoke before the
InitiateMultipartUpload
operation. The callback should have a function signature likefunction (Aws\Command $command) {...}
. - before_upload: (callable) Callback to invoke before any
UploadMultipartPart
operations. The callback should have a function signature likefunction (Aws\Command $command) {...}
. - concurrency: (int, default=int(3)) Maximum number of concurrent
UploadMultipartPart
operations allowed during the multipart upload. - part_size: (int, default=int(1048576)) Part size, in bytes, to use when doing a multipart upload. This must between 1 MB and 4 GB, and must be a power of 2 (in megabytes).
- prepare_data_source: (callable) Callback to invoke before starting the multipart upload workflow. The callback should have a function signature like
function () {...}
. - state: (Aws\Multipart\UploadState) An object that represents the state of the multipart upload and that is used to resume a previous upload. When this options is provided, the
account_id
,key
, andpart_size
options are ignored. - vault_name: (string, required) Vault name to use for the archive being uploaded.
Parameters
Aws\Glacier\GlacierClient |
$client | Client used for the upload. |
mixed | $source | Source of the data to upload. |
array | $config = [] | Configuration used to perform the upload. |
Overrides
Aws\Multipart\AbstractUploader::__construct
Constants summary
integer |
PART_MIN_SIZE
|
#
1048576
|
Constants inherited from Aws\Multipart\AbstractUploadManager
DEFAULT_CONCURRENCY