Class S3EncryptionMultipartUploader
- Aws\Multipart\AbstractUploadManager implements GuzzleHttp\Promise\PromisorInterface
- Aws\Multipart\AbstractUploader
- Aws\S3\MultipartUploader uses Aws\S3\MultipartUploadingTrait
- Aws\S3\Crypto\S3EncryptionMultipartUploader uses Aws\Crypto\Cipher\CipherBuilderTrait, Aws\S3\Crypto\CryptoParamsTrait, Aws\Crypto\EncryptionTrait, Aws\S3\Crypto\UserAgentTrait
- Namespace: Aws\S3\Crypto
- Deprecated
- Located at S3/Crypto/S3EncryptionMultipartUploader.php
Encapsulates the execution of a multipart upload of an encrypted object to S3.
Legacy implementation using older encryption workflow. Use S3EncryptionMultipartUploaderV2 if possible.
Methods Summary
-
static
isSupportedCipher ( string $cipherName )
Returns if the passed cipher name is supported for encryption by the SDK.
-
__construct ( Aws\S3\S3ClientInterface $client, mixed $source, array $config = [] )
Creates a multipart upload for an S3 object after encrypting it.
Methods inherited from Aws\Multipart\AbstractUploadManager
getState()
,
promise()
,
upload()
Methods used from Aws\S3\MultipartUploadingTrait
Methods Details
static boolean isSupportedCipher ( string $cipherName )
Returns if the passed cipher name is supported for encryption by the SDK.
Parameters
string | $cipherName | The name of a cipher to verify is registered. |
Returns
boolean If the cipher passed is in our supported list. |
__construct (
Aws\S3\S3ClientInterface
$client,
mixed
$source,
array
$config = []
)
Creates a multipart upload for an S3 object after encrypting it.
The required configuration options are as follows:
- @MaterialsProvider: (MaterialsProvider) Provides Cek, Iv, and Cek encrypting/decrypting for encryption metadata.
- @CipherOptions: (array) Cipher options for encrypting data. A Cipher is required. Accepts the following options: - Cipher: (string) cbc|gcm See also: AbstractCryptoClient::$supportedCiphers. Note that cbc is deprecated and gcm should be used when possible. - KeySize: (int) 128|192|256 See also: MaterialsProvider::$supportedKeySizes - Aad: (string) Additional authentication data. This option is passed directly to OpenSSL when using gcm. It is ignored when using cbc.
- bucket: (string) Name of the bucket to which the object is being uploaded.
- key: (string) Key to use for the object being uploaded.
The optional configuration arguments are as follows:
- @MetadataStrategy: (MetadataStrategy|string|null) Strategy for storing MetadataEnvelope information. Defaults to using a HeadersMetadataStrategy. Can either be a class implementing MetadataStrategy, a class name of a predefined strategy, or empty/null to default.
- @InstructionFileSuffix: (string|null) Suffix used when writing to an instruction file if an using an InstructionFileMetadataHandler was determined.
- acl: (string) ACL to set on the object being upload. Objects are private by default.
- 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
CreateMultipartUpload
operation. The callback should have a function signature likefunction (Aws\Command $command) {...}
. - before_upload: (callable) Callback to invoke before any
UploadPart
operations. The callback should have a function signature likefunction (Aws\Command $command) {...}
. - concurrency: (int, default=int(5)) Maximum number of concurrent
UploadPart
operations allowed during the multipart upload. - params: (array) An array of key/value parameters that will be applied to each of the sub-commands run by the uploader as a base. Auto-calculated options will override these parameters. If you need more granularity over parameters to each sub-command, use the before_* options detailed above to update the commands directly.
- part_size: (int, default=int(5242880)) Part size, in bytes, to use when doing a multipart upload. This must between 5 MB and 5 GB, inclusive.
- 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 option is provided, the
bucket
,key
, andpart_size
options are ignored.
Parameters
Aws\S3\S3ClientInterface |
$client | Client used for the upload. |
mixed | $source | Source of the data to upload. |
array | $config = [] | Configuration used to perform the upload. |
Overrides
Constants summary
string |
CRYPTO_VERSION
|
#
'1n'
|
Constants inherited from Aws\S3\MultipartUploader
Constants inherited from Aws\Multipart\AbstractUploadManager
DEFAULT_CONCURRENCY