Class InstructionFileMetadataStrategy
- Aws\S3\Crypto\InstructionFileMetadataStrategy implements Aws\Crypto\MetadataStrategyInterface
- Namespace: Aws\S3\Crypto
- Located at S3/Crypto/InstructionFileMetadataStrategy.php
Stores and reads encryption MetadataEnvelope information in a file on Amazon S3.
A file with the contents of a MetadataEnvelope will be created or read from alongside the base file on Amazon S3. The provided client will be used for reading or writing this object. A specified suffix (default of '.instruction' will be applied to each of the operations involved with the instruction file.
If there is a failure after an instruction file has been uploaded, it will not be automatically deleted.
Methods Summary
- __construct ( Aws\S3\S3Client $client, string|null $suffix = null )
-
save ( Aws\Crypto\MetadataEnvelope $envelope, array $args )
Places the information in the MetadataEnvelope to a location on S3.
-
load ( array $args )
Uses the strategy's client to retrieve the instruction file from S3 and generates a MetadataEnvelope from its contents.
Methods Details
__construct (
Aws\S3\S3Client
$client,
string|null
$suffix = null
)
Parameters
Aws\S3\S3Client |
$client | Client for use in uploading the instruction file. |
string|null | $suffix = null | Optional override suffix for instruction file object keys. |
array save ( Aws\Crypto\MetadataEnvelope $envelope, array $args )
Places the information in the MetadataEnvelope to a location on S3.
Parameters
Aws\Crypto\MetadataEnvelope | $envelope | Encryption data to save according to the strategy. |
array | $args | Starting arguments for PutObject, used for saving extra the instruction file. |
Returns
array Updated arguments for PutObject. |
Implementation of
Aws\Crypto\MetadataEnvelope load ( array $args )
Uses the strategy's client to retrieve the instruction file from S3 and generates a MetadataEnvelope from its contents.
Parameters
array | $args | Arguments from Command and Result that contains S3 Object information, relevant headers, and command configuration. |
Returns
Aws\Crypto\MetadataEnvelope |
Implementation of
Constants summary
string |
DEFAULT_FILE_SUFFIX
|
#
'.instruction'
|