hello
Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : chryzalihi ( 621211) PHP Version : 8.3.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/chryzalihi/www/wp-content/languages/themes/the/ |
PK J�]F<�^� � S3SignatureInterface.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3;
use Aws\Common\Signature\SignatureInterface;
/**
* @deprecated
*/
interface S3SignatureInterface extends SignatureInterface {}
PK J�]�5�E E ResumableDownload.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3;
use Aws\Common\Exception\RuntimeException;
use Aws\Common\Exception\UnexpectedValueException;
use Guzzle\Http\EntityBody;
use Guzzle\Http\ReadLimitEntityBody;
use Guzzle\Http\EntityBodyInterface;
use Guzzle\Service\Resource\Model;
/**
* Allows you to resume the download of a partially downloaded object.
*
* Downloads objects from Amazon S3 in using "Range" downloads. This allows a partially downloaded object to be resumed
* so that only the remaining portion of the object is downloaded.
*/
class ResumableDownload
{
/** @var S3Client The S3 client to use to download objects and issue HEAD requests */
protected $client;
/** @var Model Model object returned when the initial HeadObject operation was called */
protected $meta;
/** @var array Array of parameters to pass to a GetObject operation */
protected $params;
/** @var EntityBody Where the object will be downloaded */
protected $target;
/**
* @param S3Client $client Client to use when executing requests
* @param string $bucket Bucket that holds the object
* @param string $key Key of the object
* @param string|resource|EntityBodyInterface $target Where the object should be downloaded to. Pass a string to
* save the object to a file, pass a resource returned by
* fopen() to save the object to a stream resource, or pass a
* Guzzle EntityBody object to save the contents to an
* EntityBody.
* @param array $params Any additional GetObject or HeadObject parameters to use
* with each command issued by the client. (e.g. pass "Version"
* to download a specific version of an object)
* @throws RuntimeException if the target variable points to a file that cannot be opened
*/
public function __construct(S3Client $client, $bucket, $key, $target, array $params = array())
{
$this->params = $params;
$this->client = $client;
$this->params['Bucket'] = $bucket;
$this->params['Key'] = $key;
// If a string is passed, then assume that the download should stream to a file on disk
if (is_string($target)) {
if (!($target = fopen($target, 'a+'))) {
throw new RuntimeException("Unable to open {$target} for writing");
}
// Always append to the file
fseek($target, 0, SEEK_END);
}
// Get the metadata and Content-MD5 of the object
$this->target = EntityBody::factory($target);
}
/**
* Get the bucket of the download
*
* @return string
*/
public function getBucket()
{
return $this->params['Bucket'];
}
/**
* Get the key of the download
*
* @return string
*/
public function getKey()
{
return $this->params['Key'];
}
/**
* Get the file to which the contents are downloaded
*
* @return string
*/
public function getFilename()
{
return $this->target->getUri();
}
/**
* Download the remainder of the object from Amazon S3
*
* Performs a message integrity check if possible
*
* @return Model
*/
public function __invoke()
{
$command = $this->client->getCommand('HeadObject', $this->params);
$this->meta = $command->execute();
if ($this->target->ftell() >= $this->meta['ContentLength']) {
return false;
}
$this->meta['ContentMD5'] = (string) $command->getResponse()->getHeader('Content-MD5');
// Use a ReadLimitEntityBody so that rewinding the stream after an error does not cause the file pointer
// to enter an inconsistent state with the data being downloaded
$this->params['SaveAs'] = new ReadLimitEntityBody(
$this->target,
$this->meta['ContentLength'],
$this->target->ftell()
);
$result = $this->getRemaining();
$this->checkIntegrity();
return $result;
}
/**
* Send the command to get the remainder of the object
*
* @return Model
*/
protected function getRemaining()
{
$current = $this->target->ftell();
$targetByte = $this->meta['ContentLength'] - 1;
$this->params['Range'] = "bytes={$current}-{$targetByte}";
// Set the starting offset so that the body is never seeked to before this point in the event of a retry
$this->params['SaveAs']->setOffset($current);
$command = $this->client->getCommand('GetObject', $this->params);
return $command->execute();
}
/**
* Performs an MD5 message integrity check if possible
*
* @throws UnexpectedValueException if the message does not validate
*/
protected function checkIntegrity()
{
if ($this->target->isReadable() && $expected = $this->meta['ContentMD5']) {
$actual = $this->target->getContentMd5();
if ($actual != $expected) {
throw new UnexpectedValueException(
"Message integrity check failed. Expected {$expected} but got {$actual}."
);
}
}
}
}
PK J�]�@�� Command/.htaccessnu ��6�$ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>PK J�]���;� � Command/S3Command.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Command;
use Guzzle\Service\Command\OperationCommand;
use Guzzle\Service\Resource\Model;
use Guzzle\Common\Event;
/**
* Adds functionality to Amazon S3 commands:
* - Adds the PutObject URL to a response
* - Allows creating a Pre-signed URL from any command
*/
class S3Command extends OperationCommand
{
/**
* Create a pre-signed URL for the operation
*
* @param int|string $expires The Unix timestamp to expire at or a string that can be evaluated by strtotime
*
* @return string
*/
public function createPresignedUrl($expires)
{
return $this->client->createPresignedUrl($this->prepare(), $expires);
}
/**
* {@inheritdoc}
*/
protected function process()
{
$request = $this->getRequest();
$response = $this->getResponse();
// Dispatch an error if a 301 redirect occurred
if ($response->getStatusCode() == 301) {
$this->getClient()->getEventDispatcher()->dispatch('request.error', new Event(array(
'request' => $this->getRequest(),
'response' => $response
)));
}
parent::process();
// Set the GetObject URL if using the PutObject operation
if ($this->result instanceof Model && $this->getName() == 'PutObject') {
$this->result->set('ObjectURL', $request->getUrl());
}
}
}
PK J�]�m�h h SseCpkListener.phpnu &1i� <?php
namespace Aws\S3;
use Aws\Common\Exception\RuntimeException;
use Guzzle\Common\Event;
use Guzzle\Service\Command\CommandInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* This listener simplifies the SSE-C process by encoding and hashing the key.
*/
class SseCpkListener implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array('command.before_prepare' => 'onCommandBeforePrepare');
}
public function onCommandBeforePrepare(Event $event)
{
/** @var CommandInterface $command */
$command = $event['command'];
// Allows only HTTPS connections when using SSE-C
if ($command['SSECustomerKey'] ||
$command['CopySourceSSECustomerKey']
) {
$this->validateScheme($command);
}
// Prepare the normal SSE-CPK headers
if ($command['SSECustomerKey']) {
$this->prepareSseParams($command);
}
// If it's a copy operation, prepare the SSE-CPK headers for the source.
if ($command['CopySourceSSECustomerKey']) {
$this->prepareSseParams($command, true);
}
}
private function validateScheme(CommandInterface $command)
{
if ($command->getClient()->getConfig('scheme') !== 'https') {
throw new RuntimeException('You must configure your S3 client to '
. 'use HTTPS in order to use the SSE-C features.');
}
}
private function prepareSseParams(
CommandInterface $command,
$isCopy = false
) {
$prefix = $isCopy ? 'CopySource' : '';
// Base64 encode the provided key
$key = $command[$prefix . 'SSECustomerKey'];
$command[$prefix . 'SSECustomerKey'] = base64_encode($key);
// Base64 the provided MD5 or, generate an MD5 if not provided
if ($md5 = $command[$prefix . 'SSECustomerKeyMD5']) {
$command[$prefix . 'SSECustomerKeyMD5'] = base64_encode($md5);
} else {
$command[$prefix . 'SSECustomerKeyMD5'] = base64_encode(md5($key, true));
}
}
}
PK J�]�@�� Resources/.htaccessnu ��6�$ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>PK J�]�[V��� �� Resources/s3-2006-03-01.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
return array (
'apiVersion' => '2006-03-01',
'endpointPrefix' => 's3',
'serviceFullName' => 'Amazon Simple Storage Service',
'serviceAbbreviation' => 'Amazon S3',
'serviceType' => 'rest-xml',
'timestampFormat' => 'rfc822',
'globalEndpoint' => 's3.amazonaws.com',
'signatureVersion' => 's3',
'namespace' => 'S3',
'regions' => array(
'us-east-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3.amazonaws.com',
),
'us-west-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-us-west-1.amazonaws.com',
),
'us-west-2' => array(
'http' => true,
'https' => true,
'hostname' => 's3-us-west-2.amazonaws.com',
),
'eu-west-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-eu-west-1.amazonaws.com',
),
'eu-central-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-eu-central-1.amazonaws.com',
),
'ap-northeast-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-ap-northeast-1.amazonaws.com',
),
'ap-southeast-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-ap-southeast-1.amazonaws.com',
),
'ap-southeast-2' => array(
'http' => true,
'https' => true,
'hostname' => 's3-ap-southeast-2.amazonaws.com',
),
'sa-east-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-sa-east-1.amazonaws.com',
),
'cn-north-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3.cn-north-1.amazonaws.com.cn',
),
'us-gov-west-1' => array(
'http' => true,
'https' => true,
'hostname' => 's3-us-gov-west-1.amazonaws.com',
),
),
'operations' => array(
'AbortMultipartUpload' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'AbortMultipartUploadOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadAbort.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'UploadId' => array(
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified multipart upload does not exist.',
'class' => 'NoSuchUploadException',
),
),
),
'CompleteMultipartUpload' => array(
'httpMethod' => 'POST',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'CompleteMultipartUploadOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html',
'data' => array(
'xmlRoot' => array(
'name' => 'CompleteMultipartUpload',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Parts' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CompletedPart',
'type' => 'object',
'sentAs' => 'Part',
'properties' => array(
'ETag' => array(
'type' => 'string',
),
'PartNumber' => array(
'type' => 'numeric',
),
),
),
),
'UploadId' => array(
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'CopyObject' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'CopyObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html',
'data' => array(
'xmlRoot' => array(
'name' => 'CopyObjectRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'CacheControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Cache-Control',
),
'ContentDisposition' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Disposition',
),
'ContentEncoding' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Encoding',
),
'ContentLanguage' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Language',
),
'ContentType' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Type',
),
'CopySource' => array(
'required' => true,
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source',
),
'CopySourceIfMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-match',
),
'CopySourceIfModifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-modified-since',
),
'CopySourceIfNoneMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-none-match',
),
'CopySourceIfUnmodifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-unmodified-since',
),
'Expires' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Metadata' => array(
'type' => 'object',
'location' => 'header',
'sentAs' => 'x-amz-meta-',
'additionalProperties' => array(
'type' => 'string',
),
),
'MetadataDirective' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-metadata-directive',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'StorageClass' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-storage-class',
),
'WebsiteRedirectLocation' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-website-redirect-location',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'CopySourceSSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-algorithm',
),
'CopySourceSSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key',
),
'CopySourceSSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
'errorResponses' => array(
array(
'reason' => 'The source object of the COPY operation is not in the active tier and is only stored in Amazon Glacier.',
'class' => 'ObjectNotInActiveTierErrorException',
),
),
),
'CreateBucket' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'CreateBucketOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html',
'data' => array(
'xmlRoot' => array(
'name' => 'CreateBucketConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'LocationConstraint' => array(
'type' => 'string',
'location' => 'xml',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWrite' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
),
'errorResponses' => array(
array(
'reason' => 'The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.',
'class' => 'BucketAlreadyExistsException',
),
),
),
'CreateMultipartUpload' => array(
'httpMethod' => 'POST',
'uri' => '/{Bucket}{/Key*}?uploads',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'CreateMultipartUploadOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html',
'data' => array(
'xmlRoot' => array(
'name' => 'CreateMultipartUploadRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'CacheControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Cache-Control',
),
'ContentDisposition' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Disposition',
),
'ContentEncoding' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Encoding',
),
'ContentLanguage' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Language',
),
'ContentType' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Type',
),
'Expires' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Metadata' => array(
'type' => 'object',
'location' => 'header',
'sentAs' => 'x-amz-meta-',
'additionalProperties' => array(
'type' => 'string',
),
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'StorageClass' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-storage-class',
),
'WebsiteRedirectLocation' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-website-redirect-location',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'DeleteBucket' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETE.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketCors' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?cors',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketCorsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEcors.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketLifecycle' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?lifecycle',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketLifecycleOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketPolicy' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?policy',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketPolicyOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketReplication' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?replication',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketReplicationOutput',
'responseType' => 'model',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketTagging' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?tagging',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketTaggingOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEtagging.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteBucketWebsite' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}?website',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteBucketWebsiteOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'DeleteObject' => array(
'httpMethod' => 'DELETE',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'MFA' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-mfa',
),
'VersionId' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'versionId',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
),
'DeleteObjects' => array(
'httpMethod' => 'POST',
'uri' => '/{Bucket}?delete',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'DeleteObjectsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html',
'data' => array(
'xmlRoot' => array(
'name' => 'Delete',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'contentMd5' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Objects' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ObjectIdentifier',
'type' => 'object',
'sentAs' => 'Object',
'properties' => array(
'Key' => array(
'required' => true,
'type' => 'string',
'minLength' => 1,
),
'VersionId' => array(
'type' => 'string',
),
),
),
),
'Quiet' => array(
'type' => 'boolean',
'format' => 'boolean-string',
'location' => 'xml',
),
'MFA' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-mfa',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketAcl' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?acl',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketAclOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETacl.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketCors' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?cors',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketCorsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETcors.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketLifecycle' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?lifecycle',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketLifecycleOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketLifecycleConfiguration' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?lifecycle',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketLifecycleConfigurationOutput',
'responseType' => 'model',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketLocation' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?location',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketLocationOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'GetBucketLogging' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?logging',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketLoggingOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlogging.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketNotification' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?notification',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'NotificationConfigurationDeprecated',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETnotification.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketNotificationConfiguration' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?notification',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'NotificationConfiguration',
'responseType' => 'model',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketPolicy' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?policy',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketPolicyOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETpolicy.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
),
'GetBucketReplication' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?replication',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketReplicationOutput',
'responseType' => 'model',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketRequestPayment' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?requestPayment',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketRequestPaymentOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTrequestPaymentGET.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketTagging' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?tagging',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketTaggingOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETtagging.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketVersioning' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?versioning',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketVersioningOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetBucketWebsite' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?website',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetBucketWebsiteOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETwebsite.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'GetObject' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'IfMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'If-Match',
),
'IfModifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'If-Modified-Since',
),
'IfNoneMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'If-None-Match',
),
'IfUnmodifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'If-Unmodified-Since',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Range' => array(
'type' => 'string',
'location' => 'header',
),
'ResponseCacheControl' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'response-cache-control',
),
'ResponseContentDisposition' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'response-content-disposition',
),
'ResponseContentEncoding' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'response-content-encoding',
),
'ResponseContentLanguage' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'response-content-language',
),
'ResponseContentType' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'response-content-type',
),
'ResponseExpires' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'query',
'sentAs' => 'response-expires',
),
'VersionId' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'versionId',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'SaveAs' => array(
'location' => 'response_body',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified key does not exist.',
'class' => 'NoSuchKeyException',
),
),
),
'GetObjectAcl' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}{/Key*}?acl',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetObjectAclOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGETacl.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'VersionId' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'versionId',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified key does not exist.',
'class' => 'NoSuchKeyException',
),
),
),
'GetObjectTorrent' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}{/Key*}?torrent',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'GetObjectTorrentOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGETtorrent.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
),
'HeadBucket' => array(
'httpMethod' => 'HEAD',
'uri' => '/{Bucket}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'HeadBucketOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified bucket does not exist.',
'class' => 'NoSuchBucketException',
),
),
),
'HeadObject' => array(
'httpMethod' => 'HEAD',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'HeadObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectHEAD.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'IfMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'If-Match',
),
'IfModifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'If-Modified-Since',
),
'IfNoneMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'If-None-Match',
),
'IfUnmodifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'If-Unmodified-Since',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Range' => array(
'type' => 'string',
'location' => 'header',
),
'VersionId' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'versionId',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified key does not exist.',
'class' => 'NoSuchKeyException',
),
),
),
'ListBuckets' => array(
'httpMethod' => 'GET',
'uri' => '/',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'ListBucketsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html',
'parameters' => array(
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'ListMultipartUploads' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?uploads',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'ListMultipartUploadsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadListMPUpload.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'delimiter',
),
'EncodingType' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'encoding-type',
),
'KeyMarker' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'key-marker',
),
'MaxUploads' => array(
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'max-uploads',
),
'Prefix' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'prefix',
),
'UploadIdMarker' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'upload-id-marker',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'ListObjectVersions' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}?versions',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'ListObjectVersionsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETVersion.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'delimiter',
),
'EncodingType' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'encoding-type',
),
'KeyMarker' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'key-marker',
),
'MaxKeys' => array(
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'max-keys',
),
'Prefix' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'prefix',
),
'VersionIdMarker' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'version-id-marker',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'ListObjects' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'ListObjectsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'delimiter',
),
'EncodingType' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'encoding-type',
),
'Marker' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'marker',
),
'MaxKeys' => array(
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'max-keys',
),
'Prefix' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'prefix',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
'errorResponses' => array(
array(
'reason' => 'The specified bucket does not exist.',
'class' => 'NoSuchBucketException',
),
),
),
'ListParts' => array(
'httpMethod' => 'GET',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'ListPartsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadListParts.html',
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'MaxParts' => array(
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'max-parts',
),
'PartNumberMarker' => array(
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'part-number-marker',
),
'UploadId' => array(
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
'PutBucketAcl' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?acl',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketAclOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTacl.html',
'data' => array(
'xmlRoot' => array(
'name' => 'AccessControlPolicy',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Grants' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'AccessControlList',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWrite' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
),
),
'PutBucketCors' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?cors',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketCorsOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTcors.html',
'data' => array(
'xmlRoot' => array(
'name' => 'CORSConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'contentMd5' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'CORSRules' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CORSRule',
'type' => 'object',
'sentAs' => 'CORSRule',
'properties' => array(
'AllowedHeaders' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedHeader',
'type' => 'string',
'sentAs' => 'AllowedHeader',
),
),
'AllowedMethods' => array(
'required' => true,
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedMethod',
'type' => 'string',
'sentAs' => 'AllowedMethod',
),
),
'AllowedOrigins' => array(
'required' => true,
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedOrigin',
'type' => 'string',
'sentAs' => 'AllowedOrigin',
),
),
'ExposeHeaders' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ExposeHeader',
'type' => 'string',
'sentAs' => 'ExposeHeader',
),
),
'MaxAgeSeconds' => array(
'type' => 'numeric',
),
),
),
),
),
),
'PutBucketLifecycle' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?lifecycle',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketLifecycleOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html',
'data' => array(
'xmlRoot' => array(
'name' => 'LifecycleConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'contentMd5' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Rules' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Rule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'Expiration' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time',
),
'Days' => array(
'type' => 'numeric',
),
),
),
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'required' => true,
'type' => 'string',
),
'Status' => array(
'required' => true,
'type' => 'string',
),
'Transition' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time',
),
'Days' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
'NoncurrentVersionTransition' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
'NoncurrentVersionExpiration' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
),
),
),
),
),
),
),
'PutBucketLifecycleConfiguration' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?lifecycle',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketLifecycleConfigurationOutput',
'responseType' => 'model',
'data' => array(
'xmlRoot' => array(
'name' => 'LifecycleConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Rules' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'LifecycleRule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'Expiration' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
),
'Days' => array(
'type' => 'numeric',
),
),
),
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'required' => true,
'type' => 'string',
),
'Status' => array(
'required' => true,
'type' => 'string',
),
'Transitions' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Transition',
'type' => 'object',
'sentAs' => 'Transition',
'properties' => array(
'Date' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
),
'Days' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
'NoncurrentVersionTransitions' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'NoncurrentVersionTransition',
'type' => 'object',
'sentAs' => 'NoncurrentVersionTransition',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
'NoncurrentVersionExpiration' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
),
),
),
),
),
),
),
'PutBucketLogging' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?logging',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketLoggingOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html',
'data' => array(
'xmlRoot' => array(
'name' => 'BucketLoggingStatus',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'xmlAllowEmpty' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'LoggingEnabled' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'TargetBucket' => array(
'type' => 'string',
),
'TargetGrants' => array(
'type' => 'array',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'TargetPrefix' => array(
'type' => 'string',
),
),
),
),
),
'PutBucketNotification' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?notification',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketNotificationOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTnotification.html',
'data' => array(
'xmlRoot' => array(
'name' => 'NotificationConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'xmlAllowEmpty' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'TopicConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
),
),
'Event' => array(
'type' => 'string',
),
'Topic' => array(
'type' => 'string',
),
),
),
'QueueConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Event' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
),
),
'Queue' => array(
'type' => 'string',
),
),
),
'CloudFunctionConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Event' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
),
),
'CloudFunction' => array(
'type' => 'string',
),
'InvocationRole' => array(
'type' => 'string',
),
),
),
),
),
'PutBucketNotificationConfiguration' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?notification',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketNotificationConfigurationOutput',
'responseType' => 'model',
'data' => array(
'xmlRoot' => array(
'name' => 'NotificationConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'TopicConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'TopicConfiguration',
'type' => 'object',
'sentAs' => 'TopicConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'TopicArn' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'Topic',
),
'Events' => array(
'required' => true,
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
'QueueConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'QueueConfiguration',
'type' => 'object',
'sentAs' => 'QueueConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'QueueArn' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'Queue',
),
'Events' => array(
'required' => true,
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
'LambdaFunctionConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'LambdaFunctionConfiguration',
'type' => 'object',
'sentAs' => 'CloudFunctionConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'LambdaFunctionArn' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'CloudFunction',
),
'Events' => array(
'required' => true,
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
),
),
'PutBucketPolicy' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?policy',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketPolicyOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTpolicy.html',
'data' => array(
'xmlRoot' => array(
'name' => 'PutBucketPolicyRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Policy' => array(
'required' => true,
'type' => array(
'string',
'object',
),
'location' => 'body',
),
),
),
'PutBucketReplication' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?replication',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketReplicationOutput',
'responseType' => 'model',
'data' => array(
'xmlRoot' => array(
'name' => 'ReplicationConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Role' => array(
'required' => true,
'type' => 'string',
'location' => 'xml',
),
'Rules' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ReplicationRule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'required' => true,
'type' => 'string',
),
'Status' => array(
'required' => true,
'type' => 'string',
),
'Destination' => array(
'required' => true,
'type' => 'object',
'properties' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
'PutBucketRequestPayment' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?requestPayment',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketRequestPaymentOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html',
'data' => array(
'xmlRoot' => array(
'name' => 'RequestPaymentConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Payer' => array(
'required' => true,
'type' => 'string',
'location' => 'xml',
),
),
),
'PutBucketTagging' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?tagging',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketTaggingOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTtagging.html',
'data' => array(
'xmlRoot' => array(
'name' => 'Tagging',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'contentMd5' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'TagSet' => array(
'required' => true,
'type' => 'array',
'location' => 'xml',
'items' => array(
'name' => 'Tag',
'type' => 'object',
'properties' => array(
'Key' => array(
'required' => true,
'type' => 'string',
'minLength' => 1,
),
'Value' => array(
'required' => true,
'type' => 'string',
),
),
),
),
),
),
'PutBucketVersioning' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?versioning',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketVersioningOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html',
'data' => array(
'xmlRoot' => array(
'name' => 'VersioningConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'MFA' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-mfa',
),
'MFADelete' => array(
'type' => 'string',
'location' => 'xml',
'sentAs' => 'MfaDelete',
),
'Status' => array(
'type' => 'string',
'location' => 'xml',
),
),
),
'PutBucketWebsite' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}?website',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutBucketWebsiteOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTwebsite.html',
'data' => array(
'xmlRoot' => array(
'name' => 'WebsiteConfiguration',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
'xmlAllowEmpty' => true,
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'ErrorDocument' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Key' => array(
'required' => true,
'type' => 'string',
'minLength' => 1,
),
),
),
'IndexDocument' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Suffix' => array(
'required' => true,
'type' => 'string',
),
),
),
'RedirectAllRequestsTo' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'HostName' => array(
'required' => true,
'type' => 'string',
),
'Protocol' => array(
'type' => 'string',
),
),
),
'RoutingRules' => array(
'type' => 'array',
'location' => 'xml',
'items' => array(
'name' => 'RoutingRule',
'type' => 'object',
'properties' => array(
'Condition' => array(
'type' => 'object',
'properties' => array(
'HttpErrorCodeReturnedEquals' => array(
'type' => 'string',
),
'KeyPrefixEquals' => array(
'type' => 'string',
),
),
),
'Redirect' => array(
'required' => true,
'type' => 'object',
'properties' => array(
'HostName' => array(
'type' => 'string',
),
'HttpRedirectCode' => array(
'type' => 'string',
),
'Protocol' => array(
'type' => 'string',
),
'ReplaceKeyPrefixWith' => array(
'type' => 'string',
),
'ReplaceKeyWith' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
'PutObject' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html',
'data' => array(
'xmlRoot' => array(
'name' => 'PutObjectRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Body' => array(
'type' => array(
'string',
'object',
),
'location' => 'body',
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'CacheControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Cache-Control',
),
'ContentDisposition' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Disposition',
),
'ContentEncoding' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Encoding',
),
'ContentLanguage' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Language',
),
'ContentLength' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'Content-Length',
),
'ContentMD5' => array(
'type' => array(
'string',
'boolean',
),
'location' => 'header',
'sentAs' => 'Content-MD5',
),
'ContentType' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Type',
),
'Expires' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'Metadata' => array(
'type' => 'object',
'location' => 'header',
'sentAs' => 'x-amz-meta-',
'additionalProperties' => array(
'type' => 'string',
),
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'StorageClass' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-storage-class',
),
'WebsiteRedirectLocation' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-website-redirect-location',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
),
),
'PutObjectAcl' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}{/Key*}?acl',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'PutObjectAclOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html',
'data' => array(
'xmlRoot' => array(
'name' => 'AccessControlPolicy',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'ACL' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-acl',
),
'Grants' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'AccessControlList',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'required' => true,
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'GrantFullControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-full-control',
),
'GrantRead' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read',
),
'GrantReadACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-read-acp',
),
'GrantWrite' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write',
),
'GrantWriteACP' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-grant-write-acp',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'ACP' => array(
'type' => 'object',
'additionalProperties' => true,
),
),
'errorResponses' => array(
array(
'reason' => 'The specified key does not exist.',
'class' => 'NoSuchKeyException',
),
),
),
'RestoreObject' => array(
'httpMethod' => 'POST',
'uri' => '/{Bucket}{/Key*}?restore',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'RestoreObjectOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectRestore.html',
'data' => array(
'xmlRoot' => array(
'name' => 'RestoreRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'VersionId' => array(
'type' => 'string',
'location' => 'query',
'sentAs' => 'versionId',
),
'Days' => array(
'required' => true,
'type' => 'numeric',
'location' => 'xml',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
'errorResponses' => array(
array(
'reason' => 'This operation is not allowed against this storage tier',
'class' => 'ObjectAlreadyInActiveTierErrorException',
),
),
),
'UploadPart' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'UploadPartOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPart.html',
'data' => array(
'xmlRoot' => array(
'name' => 'UploadPartRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Body' => array(
'type' => array(
'string',
'object',
),
'location' => 'body',
),
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'ContentLength' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'Content-Length',
),
'ContentMD5' => array(
'type' => array(
'string',
'boolean',
),
'location' => 'header',
'sentAs' => 'Content-MD5',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'PartNumber' => array(
'required' => true,
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'partNumber',
),
'UploadId' => array(
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
),
),
'UploadPartCopy' => array(
'httpMethod' => 'PUT',
'uri' => '/{Bucket}{/Key*}',
'class' => 'Aws\\S3\\Command\\S3Command',
'responseClass' => 'UploadPartCopyOutput',
'responseType' => 'model',
'documentationUrl' => 'http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html',
'data' => array(
'xmlRoot' => array(
'name' => 'UploadPartCopyRequest',
'namespaces' => array(
'http://s3.amazonaws.com/doc/2006-03-01/',
),
),
),
'parameters' => array(
'Bucket' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
),
'CopySource' => array(
'required' => true,
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source',
),
'CopySourceIfMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-match',
),
'CopySourceIfModifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-modified-since',
),
'CopySourceIfNoneMatch' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-none-match',
),
'CopySourceIfUnmodifiedSince' => array(
'type' => array(
'object',
'string',
'integer',
),
'format' => 'date-time-http',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-if-unmodified-since',
),
'CopySourceRange' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-range',
),
'Key' => array(
'required' => true,
'type' => 'string',
'location' => 'uri',
'minLength' => 1,
'filters' => array(
'Aws\\S3\\S3Client::explodeKey',
),
),
'PartNumber' => array(
'required' => true,
'type' => 'numeric',
'location' => 'query',
'sentAs' => 'partNumber',
),
'UploadId' => array(
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'CopySourceSSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-algorithm',
),
'CopySourceSSECustomerKey' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key',
),
'CopySourceSSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-server-side-encryption-customer-key-MD5',
),
'RequestPayer' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-payer',
),
'command.expects' => array(
'static' => true,
'default' => 'application/xml',
),
),
),
),
'models' => array(
'AbortMultipartUploadOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'CompleteMultipartUploadOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Location' => array(
'type' => 'string',
'location' => 'xml',
),
'Bucket' => array(
'type' => 'string',
'location' => 'xml',
),
'Key' => array(
'type' => 'string',
'location' => 'xml',
),
'Expiration' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-expiration',
),
'ETag' => array(
'type' => 'string',
'location' => 'xml',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'CopyObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'ETag' => array(
'type' => 'string',
'location' => 'xml',
),
'LastModified' => array(
'type' => 'string',
'location' => 'xml',
),
'Expiration' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-expiration',
),
'CopySourceVersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-version-id',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'CreateBucketOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Location' => array(
'type' => 'string',
'location' => 'header',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'CreateMultipartUploadOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Bucket' => array(
'type' => 'string',
'location' => 'xml',
'sentAs' => 'Bucket',
),
'Key' => array(
'type' => 'string',
'location' => 'xml',
),
'UploadId' => array(
'type' => 'string',
'location' => 'xml',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketCorsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketLifecycleOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketPolicyOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketReplicationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketTaggingOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteBucketWebsiteOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'DeleteMarker' => array(
'type' => 'boolean',
'location' => 'header',
'sentAs' => 'x-amz-delete-marker',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'DeleteObjectsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Deleted' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'DeletedObject',
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'string',
),
'VersionId' => array(
'type' => 'string',
),
'DeleteMarker' => array(
'type' => 'boolean',
),
'DeleteMarkerVersionId' => array(
'type' => 'string',
),
),
),
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'Errors' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Error',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Error',
'type' => 'object',
'sentAs' => 'Error',
'properties' => array(
'Key' => array(
'type' => 'string',
),
'VersionId' => array(
'type' => 'string',
),
'Code' => array(
'type' => 'string',
),
'Message' => array(
'type' => 'string',
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketAclOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Grants' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'AccessControlList',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'sentAs' => 'Grant',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketCorsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'CORSRules' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'CORSRule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CORSRule',
'type' => 'object',
'sentAs' => 'CORSRule',
'properties' => array(
'AllowedHeaders' => array(
'type' => 'array',
'sentAs' => 'AllowedHeader',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedHeader',
'type' => 'string',
'sentAs' => 'AllowedHeader',
),
),
'AllowedMethods' => array(
'type' => 'array',
'sentAs' => 'AllowedMethod',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedMethod',
'type' => 'string',
'sentAs' => 'AllowedMethod',
),
),
'AllowedOrigins' => array(
'type' => 'array',
'sentAs' => 'AllowedOrigin',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'AllowedOrigin',
'type' => 'string',
'sentAs' => 'AllowedOrigin',
),
),
'ExposeHeaders' => array(
'type' => 'array',
'sentAs' => 'ExposeHeader',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ExposeHeader',
'type' => 'string',
'sentAs' => 'ExposeHeader',
),
),
'MaxAgeSeconds' => array(
'type' => 'numeric',
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketLifecycleOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Rules' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Rule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Rule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'Expiration' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => 'string',
),
'Days' => array(
'type' => 'numeric',
),
),
),
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'type' => 'string',
),
'Status' => array(
'type' => 'string',
),
'Transition' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => 'string',
),
'Days' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
'NoncurrentVersionTransition' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
'NoncurrentVersionExpiration' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
),
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketLifecycleConfigurationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Rules' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Rule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'LifecycleRule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'Expiration' => array(
'type' => 'object',
'properties' => array(
'Date' => array(
'type' => 'string',
),
'Days' => array(
'type' => 'numeric',
),
),
),
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'type' => 'string',
),
'Status' => array(
'type' => 'string',
),
'Transitions' => array(
'type' => 'array',
'sentAs' => 'Transition',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Transition',
'type' => 'object',
'sentAs' => 'Transition',
'properties' => array(
'Date' => array(
'type' => 'string',
),
'Days' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
'NoncurrentVersionTransitions' => array(
'type' => 'array',
'sentAs' => 'NoncurrentVersionTransition',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'NoncurrentVersionTransition',
'type' => 'object',
'sentAs' => 'NoncurrentVersionTransition',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
'NoncurrentVersionExpiration' => array(
'type' => 'object',
'properties' => array(
'NoncurrentDays' => array(
'type' => 'numeric',
),
),
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketLocationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Location' => array(
'type' => 'string',
'location' => 'body',
'filters' => array(
'strval',
'strip_tags',
'trim',
),
),
),
),
'GetBucketLoggingOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'LoggingEnabled' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'TargetBucket' => array(
'type' => 'string',
),
'TargetGrants' => array(
'type' => 'array',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'sentAs' => 'Grant',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'TargetPrefix' => array(
'type' => 'string',
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'NotificationConfigurationDeprecated' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'TopicConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Event' => array(
'type' => 'string',
),
'Topic' => array(
'type' => 'string',
),
),
),
'QueueConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Event' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Queue' => array(
'type' => 'string',
),
),
),
'CloudFunctionConfiguration' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'Event' => array(
'type' => 'string',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'CloudFunction' => array(
'type' => 'string',
),
'InvocationRole' => array(
'type' => 'string',
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'NotificationConfiguration' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'TopicConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'TopicConfiguration',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'TopicConfiguration',
'type' => 'object',
'sentAs' => 'TopicConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'TopicArn' => array(
'type' => 'string',
'sentAs' => 'Topic',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'sentAs' => 'FilterRule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
'QueueConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'QueueConfiguration',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'QueueConfiguration',
'type' => 'object',
'sentAs' => 'QueueConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'QueueArn' => array(
'type' => 'string',
'sentAs' => 'Queue',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'sentAs' => 'FilterRule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
'LambdaFunctionConfigurations' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'CloudFunctionConfiguration',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'LambdaFunctionConfiguration',
'type' => 'object',
'sentAs' => 'CloudFunctionConfiguration',
'properties' => array(
'Id' => array(
'type' => 'string',
),
'LambdaFunctionArn' => array(
'type' => 'string',
'sentAs' => 'CloudFunction',
),
'Events' => array(
'type' => 'array',
'sentAs' => 'Event',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Event',
'type' => 'string',
'sentAs' => 'Event',
),
),
'Filter' => array(
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'object',
'sentAs' => 'S3Key',
'properties' => array(
'FilterRules' => array(
'type' => 'array',
'sentAs' => 'FilterRule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'FilterRule',
'type' => 'object',
'sentAs' => 'FilterRule',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
),
),
),
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketPolicyOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Policy' => array(
'type' => 'string',
'instanceOf' => 'Guzzle\\Http\\EntityBody',
'location' => 'body',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketReplicationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Role' => array(
'type' => 'string',
'location' => 'xml',
),
'Rules' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Rule',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ReplicationRule',
'type' => 'object',
'sentAs' => 'Rule',
'properties' => array(
'ID' => array(
'type' => 'string',
),
'Prefix' => array(
'type' => 'string',
),
'Status' => array(
'type' => 'string',
),
'Destination' => array(
'type' => 'object',
'properties' => array(
'Bucket' => array(
'type' => 'string',
),
'StorageClass' => array(
'type' => 'string',
),
),
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketRequestPaymentOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Payer' => array(
'type' => 'string',
'location' => 'xml',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketTaggingOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'TagSet' => array(
'type' => 'array',
'location' => 'xml',
'items' => array(
'name' => 'Tag',
'type' => 'object',
'sentAs' => 'Tag',
'properties' => array(
'Key' => array(
'type' => 'string',
),
'Value' => array(
'type' => 'string',
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketVersioningOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Status' => array(
'type' => 'string',
'location' => 'xml',
),
'MFADelete' => array(
'type' => 'string',
'location' => 'xml',
'sentAs' => 'MfaDelete',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetBucketWebsiteOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RedirectAllRequestsTo' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'HostName' => array(
'type' => 'string',
),
'Protocol' => array(
'type' => 'string',
),
),
),
'IndexDocument' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Suffix' => array(
'type' => 'string',
),
),
),
'ErrorDocument' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'Key' => array(
'type' => 'string',
),
),
),
'RoutingRules' => array(
'type' => 'array',
'location' => 'xml',
'items' => array(
'name' => 'RoutingRule',
'type' => 'object',
'sentAs' => 'RoutingRule',
'properties' => array(
'Condition' => array(
'type' => 'object',
'properties' => array(
'HttpErrorCodeReturnedEquals' => array(
'type' => 'string',
),
'KeyPrefixEquals' => array(
'type' => 'string',
),
),
),
'Redirect' => array(
'type' => 'object',
'properties' => array(
'HostName' => array(
'type' => 'string',
),
'HttpRedirectCode' => array(
'type' => 'string',
),
'Protocol' => array(
'type' => 'string',
),
'ReplaceKeyPrefixWith' => array(
'type' => 'string',
),
'ReplaceKeyWith' => array(
'type' => 'string',
),
),
),
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Body' => array(
'type' => 'string',
'instanceOf' => 'Guzzle\\Http\\EntityBody',
'location' => 'body',
),
'DeleteMarker' => array(
'type' => 'boolean',
'location' => 'header',
'sentAs' => 'x-amz-delete-marker',
),
'AcceptRanges' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'accept-ranges',
),
'Expiration' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-expiration',
),
'Restore' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-restore',
),
'LastModified' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Last-Modified',
),
'ContentLength' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'Content-Length',
),
'ETag' => array(
'type' => 'string',
'location' => 'header',
),
'MissingMeta' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'x-amz-missing-meta',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'CacheControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Cache-Control',
),
'ContentDisposition' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Disposition',
),
'ContentEncoding' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Encoding',
),
'ContentLanguage' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Language',
),
'ContentRange' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Range',
),
'ContentType' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Type',
),
'Expires' => array(
'type' => 'string',
'location' => 'header',
),
'WebsiteRedirectLocation' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-website-redirect-location',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'Metadata' => array(
'type' => 'object',
'location' => 'header',
'sentAs' => 'x-amz-meta-',
'additionalProperties' => array(
'type' => 'string',
),
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'StorageClass' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-storage-class',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'ReplicationStatus' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-replication-status',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetObjectAclOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Grants' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'AccessControlList',
'items' => array(
'name' => 'Grant',
'type' => 'object',
'sentAs' => 'Grant',
'properties' => array(
'Grantee' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'EmailAddress' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
'Type' => array(
'type' => 'string',
'sentAs' => 'xsi:type',
'data' => array(
'xmlAttribute' => true,
'xmlNamespace' => 'http://www.w3.org/2001/XMLSchema-instance',
),
),
'URI' => array(
'type' => 'string',
),
),
),
'Permission' => array(
'type' => 'string',
),
),
),
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'GetObjectTorrentOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Body' => array(
'type' => 'string',
'instanceOf' => 'Guzzle\\Http\\EntityBody',
'location' => 'body',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'HeadBucketOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'HeadObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'DeleteMarker' => array(
'type' => 'boolean',
'location' => 'header',
'sentAs' => 'x-amz-delete-marker',
),
'AcceptRanges' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'accept-ranges',
),
'Expiration' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-expiration',
),
'Restore' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-restore',
),
'LastModified' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Last-Modified',
),
'ContentLength' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'Content-Length',
),
'ETag' => array(
'type' => 'string',
'location' => 'header',
),
'MissingMeta' => array(
'type' => 'numeric',
'location' => 'header',
'sentAs' => 'x-amz-missing-meta',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'CacheControl' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Cache-Control',
),
'ContentDisposition' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Disposition',
),
'ContentEncoding' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Encoding',
),
'ContentLanguage' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Language',
),
'ContentType' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'Content-Type',
),
'Expires' => array(
'type' => 'string',
'location' => 'header',
),
'WebsiteRedirectLocation' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-website-redirect-location',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'Metadata' => array(
'type' => 'object',
'location' => 'header',
'sentAs' => 'x-amz-meta-',
'additionalProperties' => array(
'type' => 'string',
),
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'StorageClass' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-storage-class',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'ReplicationStatus' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-replication-status',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'ListBucketsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Buckets' => array(
'type' => 'array',
'location' => 'xml',
'items' => array(
'name' => 'Bucket',
'type' => 'object',
'sentAs' => 'Bucket',
'properties' => array(
'Name' => array(
'type' => 'string',
),
'CreationDate' => array(
'type' => 'string',
),
),
),
),
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'ListMultipartUploadsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Bucket' => array(
'type' => 'string',
'location' => 'xml',
),
'KeyMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'UploadIdMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'NextKeyMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'Prefix' => array(
'type' => 'string',
'location' => 'xml',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'xml',
),
'NextUploadIdMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'MaxUploads' => array(
'type' => 'numeric',
'location' => 'xml',
),
'IsTruncated' => array(
'type' => 'boolean',
'location' => 'xml',
),
'Uploads' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Upload',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'MultipartUpload',
'type' => 'object',
'sentAs' => 'Upload',
'properties' => array(
'UploadId' => array(
'type' => 'string',
),
'Key' => array(
'type' => 'string',
),
'Initiated' => array(
'type' => 'string',
),
'StorageClass' => array(
'type' => 'string',
),
'Owner' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Initiator' => array(
'type' => 'object',
'properties' => array(
'ID' => array(
'type' => 'string',
),
'DisplayName' => array(
'type' => 'string',
),
),
),
),
),
),
'CommonPrefixes' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CommonPrefix',
'type' => 'object',
'properties' => array(
'Prefix' => array(
'type' => 'string',
),
),
),
),
'EncodingType' => array(
'type' => 'string',
'location' => 'xml',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'ListObjectVersionsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'IsTruncated' => array(
'type' => 'boolean',
'location' => 'xml',
),
'KeyMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'VersionIdMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'NextKeyMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'NextVersionIdMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'Versions' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Version',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'ObjectVersion',
'type' => 'object',
'sentAs' => 'Version',
'properties' => array(
'ETag' => array(
'type' => 'string',
),
'Size' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
'Key' => array(
'type' => 'string',
),
'VersionId' => array(
'type' => 'string',
),
'IsLatest' => array(
'type' => 'boolean',
),
'LastModified' => array(
'type' => 'string',
),
'Owner' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
),
),
),
'DeleteMarkers' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'DeleteMarker',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'DeleteMarkerEntry',
'type' => 'object',
'sentAs' => 'DeleteMarker',
'properties' => array(
'Owner' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'Key' => array(
'type' => 'string',
),
'VersionId' => array(
'type' => 'string',
),
'IsLatest' => array(
'type' => 'boolean',
),
'LastModified' => array(
'type' => 'string',
),
),
),
),
'Name' => array(
'type' => 'string',
'location' => 'xml',
),
'Prefix' => array(
'type' => 'string',
'location' => 'xml',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'xml',
),
'MaxKeys' => array(
'type' => 'numeric',
'location' => 'xml',
),
'CommonPrefixes' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CommonPrefix',
'type' => 'object',
'properties' => array(
'Prefix' => array(
'type' => 'string',
),
),
),
),
'EncodingType' => array(
'type' => 'string',
'location' => 'xml',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'ListObjectsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'IsTruncated' => array(
'type' => 'boolean',
'location' => 'xml',
),
'Marker' => array(
'type' => 'string',
'location' => 'xml',
),
'NextMarker' => array(
'type' => 'string',
'location' => 'xml',
),
'Contents' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Object',
'type' => 'object',
'properties' => array(
'Key' => array(
'type' => 'string',
),
'LastModified' => array(
'type' => 'string',
),
'ETag' => array(
'type' => 'string',
),
'Size' => array(
'type' => 'numeric',
),
'StorageClass' => array(
'type' => 'string',
),
'Owner' => array(
'type' => 'object',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
),
),
),
'Name' => array(
'type' => 'string',
'location' => 'xml',
),
'Prefix' => array(
'type' => 'string',
'location' => 'xml',
),
'Delimiter' => array(
'type' => 'string',
'location' => 'xml',
),
'MaxKeys' => array(
'type' => 'numeric',
'location' => 'xml',
),
'CommonPrefixes' => array(
'type' => 'array',
'location' => 'xml',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'CommonPrefix',
'type' => 'object',
'properties' => array(
'Prefix' => array(
'type' => 'string',
),
),
),
),
'EncodingType' => array(
'type' => 'string',
'location' => 'xml',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'ListPartsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Bucket' => array(
'type' => 'string',
'location' => 'xml',
),
'Key' => array(
'type' => 'string',
'location' => 'xml',
),
'UploadId' => array(
'type' => 'string',
'location' => 'xml',
),
'PartNumberMarker' => array(
'type' => 'numeric',
'location' => 'xml',
),
'NextPartNumberMarker' => array(
'type' => 'numeric',
'location' => 'xml',
),
'MaxParts' => array(
'type' => 'numeric',
'location' => 'xml',
),
'IsTruncated' => array(
'type' => 'boolean',
'location' => 'xml',
),
'Parts' => array(
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Part',
'data' => array(
'xmlFlattened' => true,
),
'items' => array(
'name' => 'Part',
'type' => 'object',
'sentAs' => 'Part',
'properties' => array(
'PartNumber' => array(
'type' => 'numeric',
),
'LastModified' => array(
'type' => 'string',
),
'ETag' => array(
'type' => 'string',
),
'Size' => array(
'type' => 'numeric',
),
),
),
),
'Initiator' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'ID' => array(
'type' => 'string',
),
'DisplayName' => array(
'type' => 'string',
),
),
),
'Owner' => array(
'type' => 'object',
'location' => 'xml',
'properties' => array(
'DisplayName' => array(
'type' => 'string',
),
'ID' => array(
'type' => 'string',
),
),
),
'StorageClass' => array(
'type' => 'string',
'location' => 'xml',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketAclOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketCorsOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketLifecycleOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketLifecycleConfigurationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketLoggingOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketNotificationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketNotificationConfigurationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketPolicyOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketReplicationOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketRequestPaymentOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketTaggingOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketVersioningOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutBucketWebsiteOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'PutObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'Expiration' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-expiration',
),
'ETag' => array(
'type' => 'string',
'location' => 'header',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'VersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-version-id',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
'ObjectURL' => array(
),
),
),
'PutObjectAclOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'RestoreObjectOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'UploadPartOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'ETag' => array(
'type' => 'string',
'location' => 'header',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
'UploadPartCopyOutput' => array(
'type' => 'object',
'additionalProperties' => true,
'properties' => array(
'CopySourceVersionId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-copy-source-version-id',
),
'ETag' => array(
'type' => 'string',
'location' => 'xml',
),
'LastModified' => array(
'type' => 'string',
'location' => 'xml',
),
'ServerSideEncryption' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption',
),
'SSECustomerAlgorithm' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-algorithm',
),
'SSECustomerKeyMD5' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-customer-key-MD5',
),
'SSEKMSKeyId' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-server-side-encryption-aws-kms-key-id',
),
'RequestCharged' => array(
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-request-charged',
),
'RequestId' => array(
'location' => 'header',
'sentAs' => 'x-amz-request-id',
),
),
),
),
'iterators' => array(
'ListBuckets' => array(
'result_key' => 'Buckets',
),
'ListMultipartUploads' => array(
'limit_key' => 'MaxUploads',
'more_results' => 'IsTruncated',
'output_token' => array(
'NextKeyMarker',
'NextUploadIdMarker',
),
'input_token' => array(
'KeyMarker',
'UploadIdMarker',
),
'result_key' => array(
'Uploads',
'CommonPrefixes',
),
),
'ListObjectVersions' => array(
'more_results' => 'IsTruncated',
'limit_key' => 'MaxKeys',
'output_token' => array(
'NextKeyMarker',
'NextVersionIdMarker',
),
'input_token' => array(
'KeyMarker',
'VersionIdMarker',
),
'result_key' => array(
'Versions',
'DeleteMarkers',
'CommonPrefixes',
),
),
'ListObjects' => array(
'more_results' => 'IsTruncated',
'limit_key' => 'MaxKeys',
'output_token' => 'NextMarker',
'input_token' => 'Marker',
'result_key' => array(
'Contents',
'CommonPrefixes',
),
),
'ListParts' => array(
'more_results' => 'IsTruncated',
'limit_key' => 'MaxParts',
'output_token' => 'NextPartNumberMarker',
'input_token' => 'PartNumberMarker',
'result_key' => 'Parts',
),
),
'waiters' => array(
'__default__' => array(
'interval' => 5,
'max_attempts' => 20,
),
'BucketExists' => array(
'operation' => 'HeadBucket',
'success.type' => 'output',
'ignore_errors' => array(
'NoSuchBucket',
),
),
'BucketNotExists' => array(
'operation' => 'HeadBucket',
'success.type' => 'error',
'success.value' => 'NoSuchBucket',
),
'ObjectExists' => array(
'operation' => 'HeadObject',
'success.type' => 'output',
'ignore_errors' => array(
'NoSuchKey',
),
),
'ObjectNotExists' => array(
'operation' => 'HeadObject',
'success.type' => 'error',
'success.value' => 'NoSuchKey'
),
),
);
PK J�]#T�# �# Model/PostObject.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\Common\Enum\DateFormat;
use Aws\S3\S3Client;
use Guzzle\Common\Collection;
use Guzzle\Http\Url;
/**
* Encapsulates the logic for getting the data for an S3 object POST upload form
*/
class PostObject extends Collection
{
/**
* @var S3Client The S3 client being used to sign the policy
*/
protected $client;
/**
* @var string The bucket name where the object will be posted
*/
protected $bucket;
/**
* @var array The <form> tag attributes as an array
*/
protected $formAttributes;
/**
* @var array The form's <input> elements as an array
*/
protected $formInputs;
/**
* @var string The raw json policy
*/
protected $jsonPolicy;
/**
* Constructs the PostObject
*
* The options array accepts the following keys:
*
* - acl: The access control setting to apply to the uploaded file. Accepts any of the
* CannedAcl constants
* - Cache-Control: The Cache-Control HTTP header value to apply to the uploaded file
* - Content-Disposition: The Content-Disposition HTTP header value to apply to the uploaded file
* - Content-Encoding: The Content-Encoding HTTP header value to apply to the uploaded file
* - Content-Type: The Content-Type HTTP header value to apply to the uploaded file. The default
* value is `application/octet-stream`
* - Expires: The Expires HTTP header value to apply to the uploaded file
* - key: The location where the file should be uploaded to. The default value is
* `^${filename}` which will use the name of the uploaded file
* - policy: A raw policy in JSON format. By default, the PostObject creates one for you
* - policy_callback: A callback used to modify the policy before encoding and signing it. The
* method signature for the callback should accept an array of the policy data as
* the 1st argument, (optionally) the PostObject as the 2nd argument, and return
* the policy data with the desired modifications.
* - success_action_redirect: The URI for Amazon S3 to redirect to upon successful upload
* - success_action_status: The status code for Amazon S3 to return upon successful upload
* - ttd: The expiration time for the generated upload form data
* - x-amz-meta-*: Any custom meta tag that should be set to the object
* - x-amz-server-side-encryption: The server-side encryption mechanism to use
* - x-amz-storage-class: The storage setting to apply to the object
* - x-amz-server-side-encryption-customer-algorithm: The SSE-C algorithm
* - x-amz-server-side-encryption-customer-key: The SSE-C customer secret key
* - x-amz-server-side-encryption-customer-key-MD5: The MD5 hash of the SSE-C customer secret key
*
* For the Cache-Control, Content-Disposition, Content-Encoding,
* Content-Type, Expires, and key options, to use a "starts-with" comparison
* instead of an equals comparison, prefix the value with a ^ (carat)
* character
*
* @param S3Client $client
* @param $bucket
* @param array $options
*/
public function __construct(S3Client $client, $bucket, array $options = array())
{
$this->setClient($client);
$this->setBucket($bucket);
parent::__construct($options);
}
/**
* Analyzes the provided data and turns it into useful data that can be
* consumed and used to build an upload form
*
* @return PostObject
*/
public function prepareData()
{
// Validate required options
$options = Collection::fromConfig($this->data, array(
'ttd' => '+1 hour',
'key' => '^${filename}',
));
// Format ttd option
$ttd = $options['ttd'];
$ttd = is_numeric($ttd) ? (int) $ttd : strtotime($ttd);
unset($options['ttd']);
// If a policy or policy callback were provided, extract those from the options
$rawJsonPolicy = $options['policy'];
$policyCallback = $options['policy_callback'];
unset($options['policy'], $options['policy_callback']);
// Setup policy document
$policy = array(
'expiration' => gmdate(DateFormat::ISO8601_S3, $ttd),
'conditions' => array(array('bucket' => $this->bucket))
);
// Configure the endpoint/action
$url = Url::factory($this->client->getBaseUrl());
if ($url->getScheme() === 'https' && strpos($this->bucket, '.') !== false) {
// Use path-style URLs
$url->setPath($this->bucket);
} else {
// Use virtual-style URLs
$url->setHost($this->bucket . '.' . $url->getHost());
}
// Setup basic form
$this->formAttributes = array(
'action' => (string) $url,
'method' => 'POST',
'enctype' => 'multipart/form-data'
);
$this->formInputs = array(
'AWSAccessKeyId' => $this->client->getCredentials()->getAccessKeyId()
);
// Add success action status
$status = (int) $options->get('success_action_status');
if ($status && in_array($status, array(200, 201, 204))) {
$this->formInputs['success_action_status'] = (string) $status;
$policy['conditions'][] = array(
'success_action_status' => (string) $status
);
unset($options['success_action_status']);
}
// Add other options
foreach ($options as $key => $value) {
$value = (string) $value;
if ($value[0] === '^') {
$value = substr($value, 1);
$this->formInputs[$key] = $value;
$value = preg_replace('/\$\{(\w*)\}/', '', $value);
$policy['conditions'][] = array('starts-with', '$' . $key, $value);
} else {
$this->formInputs[$key] = $value;
$policy['conditions'][] = array($key => $value);
}
}
// Handle the policy
$policy = is_callable($policyCallback) ? $policyCallback($policy, $this) : $policy;
$this->jsonPolicy = $rawJsonPolicy ?: json_encode($policy);
$this->applyPolicy();
return $this;
}
/**
* Sets the S3 client
*
* @param S3Client $client
*
* @return PostObject
*/
public function setClient(S3Client $client)
{
$this->client = $client;
return $this;
}
/**
* Gets the S3 client
*
* @return S3Client
*/
public function getClient()
{
return $this->client;
}
/**
* Sets the bucket and makes sure it is a valid bucket name
*
* @param string $bucket
*
* @return PostObject
*/
public function setBucket($bucket)
{
$this->bucket = $bucket;
return $this;
}
/**
* Gets the bucket name
*
* @return string
*/
public function getBucket()
{
return $this->bucket;
}
/**
* Gets the form attributes as an array
*
* @return array
*/
public function getFormAttributes()
{
return $this->formAttributes;
}
/**
* Gets the form inputs as an array
*
* @return array
*/
public function getFormInputs()
{
return $this->formInputs;
}
/**
* Gets the raw JSON policy
*
* @return string
*/
public function getJsonPolicy()
{
return $this->jsonPolicy;
}
/**
* Handles the encoding, singing, and injecting of the policy
*/
protected function applyPolicy()
{
$jsonPolicy64 = base64_encode($this->jsonPolicy);
$this->formInputs['policy'] = $jsonPolicy64;
$this->formInputs['signature'] = base64_encode(hash_hmac(
'sha1',
$jsonPolicy64,
$this->client->getCredentials()->getSecretKey(),
true
));
}
}
PK J�]_���1
1
Model/Grant.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\S3\Enum\Permission;
use Aws\Common\Exception\InvalidArgumentException;
use Guzzle\Common\ToArrayInterface;
/**
* Amazon S3 Grant model
*/
class Grant implements ToArrayInterface
{
/**
* @var array A map of permissions to operation parameters
*/
protected static $parameterMap = array(
Permission::READ => 'GrantRead',
Permission::WRITE => 'GrantWrite',
Permission::READ_ACP => 'GrantReadACP',
Permission::WRITE_ACP => 'GrantWriteACP',
Permission::FULL_CONTROL => 'GrantFullControl'
);
/**
* @var Grantee The grantee affected by the grant
*/
protected $grantee;
/**
* @var string The permission set by the grant
*/
protected $permission;
/**
* Constructs an ACL
*
* @param Grantee $grantee Affected grantee
* @param string $permission Permission applied
*/
public function __construct(Grantee $grantee, $permission)
{
$this->setGrantee($grantee);
$this->setPermission($permission);
}
/**
* Set the grantee affected by the grant
*
* @param Grantee $grantee Affected grantee
*
* @return $this
*/
public function setGrantee(Grantee $grantee)
{
$this->grantee = $grantee;
return $this;
}
/**
* Get the grantee affected by the grant
*
* @return Grantee
*/
public function getGrantee()
{
return $this->grantee;
}
/**
* Set the permission set by the grant
*
* @param string $permission Permission applied
*
* @return $this
*
* @throws InvalidArgumentException
*/
public function setPermission($permission)
{
$valid = Permission::values();
if (!in_array($permission, $valid)) {
throw new InvalidArgumentException('The permission must be one of '
. 'the following: ' . implode(', ', $valid) . '.');
}
$this->permission = $permission;
return $this;
}
/**
* Get the permission set by the grant
*
* @return string
*/
public function getPermission()
{
return $this->permission;
}
/**
* Returns an array of the operation parameter and value to set on the operation
*
* @return array
*/
public function getParameterArray()
{
return array(
self::$parameterMap[$this->permission] => $this->grantee->getHeaderValue()
);
}
/**
* {@inheritdoc}
*/
public function toArray()
{
return array(
'Grantee' => $this->grantee->toArray(),
'Permission' => $this->permission
);
}
}
PK J�]*�8* *
Model/Acp.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\Common\Exception\InvalidArgumentException;
use Aws\Common\Exception\OverflowException;
use Guzzle\Common\ToArrayInterface;
use Guzzle\Service\Command\AbstractCommand;
/**
* Amazon S3 Access Control Policy (ACP)
*/
class Acp implements ToArrayInterface, \IteratorAggregate, \Countable
{
/**
* @var \SplObjectStorage List of grants on the ACP
*/
protected $grants = array();
/**
* @var Grantee The owner of the ACP
*/
protected $owner;
/**
* Constructs an ACP
*
* @param Grantee $owner ACP policy owner
* @param array|\Traversable $grants List of grants for the ACP
*/
public function __construct(Grantee $owner, $grants = null)
{
$this->setOwner($owner);
$this->setGrants($grants);
}
/**
* Create an Acp object from an array. This can be used to create an ACP from a response to a GetObject/Bucket ACL
* operation.
*
* @param array $data Array of ACP data
*
* @return Acp
*/
public static function fromArray(array $data)
{
$builder = new AcpBuilder();
$builder->setOwner((string) $data['Owner']['ID'], $data['Owner']['DisplayName']);
// Add each Grantee to the ACP
foreach ($data['Grants'] as $grant) {
$permission = $grant['Permission'];
// Determine the type for response bodies that are missing the Type parameter
if (!isset($grant['Grantee']['Type'])) {
if (isset($grant['Grantee']['ID'])) {
$grant['Grantee']['Type'] = 'CanonicalUser';
} elseif (isset($grant['Grantee']['URI'])) {
$grant['Grantee']['Type'] = 'Group';
} else {
$grant['Grantee']['Type'] = 'AmazonCustomerByEmail';
}
}
switch ($grant['Grantee']['Type']) {
case 'Group':
$builder->addGrantForGroup($permission, $grant['Grantee']['URI']);
break;
case 'AmazonCustomerByEmail':
$builder->addGrantForEmail($permission, $grant['Grantee']['EmailAddress']);
break;
case 'CanonicalUser':
$builder->addGrantForUser(
$permission,
$grant['Grantee']['ID'],
$grant['Grantee']['DisplayName']
);
}
}
return $builder->build();
}
/**
* Set the owner of the ACP policy
*
* @param Grantee $owner ACP policy owner
*
* @return $this
*
* @throws InvalidArgumentException if the grantee does not have an ID set
*/
public function setOwner(Grantee $owner)
{
if (!$owner->isCanonicalUser()) {
throw new InvalidArgumentException('The owner must have an ID set.');
}
$this->owner = $owner;
return $this;
}
/**
* Get the owner of the ACP policy
*
* @return Grantee
*/
public function getOwner()
{
return $this->owner;
}
/**
* Set the grants for the ACP
*
* @param array|\Traversable $grants List of grants for the ACP
*
* @return $this
*
* @throws InvalidArgumentException
*/
public function setGrants($grants = array())
{
$this->grants = new \SplObjectStorage();
if ($grants) {
if (is_array($grants) || $grants instanceof \Traversable) {
/** @var Grant $grant */
foreach ($grants as $grant) {
$this->addGrant($grant);
}
} else {
throw new InvalidArgumentException('Grants must be passed in as an array or Traversable object.');
}
}
return $this;
}
/**
* Get all of the grants
*
* @return \SplObjectStorage
*/
public function getGrants()
{
return $this->grants;
}
/**
* Add a Grant
*
* @param Grant $grant Grant to add
*
* @return $this
*/
public function addGrant(Grant $grant)
{
if (count($this->grants) < 100) {
$this->grants->attach($grant);
} else {
throw new OverflowException('An ACP may contain up to 100 grants.');
}
return $this;
}
/**
* Get the total number of attributes
*
* @return int
*/
public function count()
{
return count($this->grants);
}
/**
* Returns the grants for iteration
*
* @return \SplObjectStorage
*/
public function getIterator()
{
return $this->grants;
}
/**
* Applies grant headers to a command's parameters
*
* @param AbstractCommand $command Command to be updated
*
* @return $this
*/
public function updateCommand(AbstractCommand $command)
{
$parameters = array();
foreach ($this->grants as $grant) {
/** @var Grant $grant */
$parameters = array_merge_recursive($parameters, $grant->getParameterArray());
}
foreach ($parameters as $name => $values) {
$command->set($name, implode(', ', (array) $values));
}
return $this;
}
/**
* {@inheritdoc}
*/
public function toArray()
{
$grants = array();
foreach ($this->grants as $grant) {
$grants[] = $grant->toArray();
}
return array(
'Owner' => array(
'ID' => $this->owner->getId(),
'DisplayName' => $this->owner->getDisplayName()
),
'Grants' => $grants
);
}
}
PK J�]�@�� Model/.htaccessnu ��6�$ <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>PK J�]��=T�
�
Model/DeleteObjectsBatch.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\Common\Client\AwsClientInterface;
use Aws\Common\Exception\InvalidArgumentException;
use Guzzle\Service\Command\AbstractCommand;
use Guzzle\Batch\BatchBuilder;
use Guzzle\Batch\BatchSizeDivisor;
use Guzzle\Batch\AbstractBatchDecorator;
/**
* The DeleteObjectsBatch is a BatchDecorator for Guzzle that implements a
* queue for deleting keys from an Amazon S3 bucket. You can add DeleteObject
* or an array of [Key => %s, VersionId => %s] and call flush when the objects
* should be deleted.
*/
class DeleteObjectsBatch extends AbstractBatchDecorator
{
/**
* Factory for creating a DeleteObjectsBatch
*
* @param AwsClientInterface $client Client used to transfer requests
* @param string $bucket Bucket that contains the objects to delete
* @param string $mfa MFA token to use with the request
*
* @return static
*/
public static function factory(AwsClientInterface $client, $bucket, $mfa = null)
{
$batch = BatchBuilder::factory()
->createBatchesWith(new BatchSizeDivisor(1000))
->transferWith(new DeleteObjectsTransfer($client, $bucket, $mfa))
->build();
return new static($batch);
}
/**
* Add an object to be deleted
*
* @param string $key Key of the object
* @param string $versionId VersionID of the object
*
* @return $this
*/
public function addKey($key, $versionId = null)
{
return $this->add(array(
'Key' => $key,
'VersionId' => $versionId
));
}
/**
* {@inheritdoc}
*/
public function add($item)
{
if ($item instanceof AbstractCommand && $item->getName() == 'DeleteObject') {
$item = array(
'Key' => $item['Key'],
'VersionId' => $item['VersionId']
);
}
if (!is_array($item) || (!isset($item['Key']))) {
throw new InvalidArgumentException('Item must be a DeleteObject command or array containing a Key and VersionId key.');
}
return parent::add($item);
}
}
PK J�]����� � Model/Grantee.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\S3\Enum\Group;
use Aws\S3\Enum\GranteeType;
use Aws\Common\Exception\InvalidArgumentException;
use Aws\Common\Exception\UnexpectedValueException;
use Aws\Common\Exception\LogicException;
use Guzzle\Common\ToArrayInterface;
/**
* Amazon S3 Grantee model
*/
class Grantee implements ToArrayInterface
{
/**
* @var array A map of grantee types to grant header value prefixes
*/
protected static $headerMap = array(
GranteeType::USER => 'id',
GranteeType::EMAIL => 'emailAddress',
GranteeType::GROUP => 'uri'
);
/**
* @var string The account ID, email, or URL identifying the grantee
*/
protected $id;
/**
* @var string The display name of the grantee
*/
protected $displayName;
/**
* @var string The type of the grantee (CanonicalUser or Group)
*/
protected $type;
/**
* Constructs a Grantee
*
* @param string $id Grantee identifier
* @param string $displayName Grantee display name
* @param string $expectedType The expected type of the grantee
*/
public function __construct($id, $displayName = null, $expectedType = null)
{
$this->type = GranteeType::USER;
$this->setId($id, $expectedType);
$this->setDisplayName($displayName);
}
/**
* Sets the account ID, email, or URL identifying the grantee
*
* @param string $id Grantee identifier
* @param string $expectedType The expected type of the grantee
*
* @return Grantee
*
* @throws UnexpectedValueException if $expectedType is set and the grantee
* is not of that type after instantiation
* @throws InvalidArgumentException when the ID provided is not a string
*/
public function setId($id, $expectedType = null)
{
if (in_array($id, Group::values())) {
$this->type = GranteeType::GROUP;
} elseif (!is_string($id)) {
throw new InvalidArgumentException('The grantee ID must be provided as a string value.');
}
if (strpos($id, '@') !== false) {
$this->type = GranteeType::EMAIL;
}
if ($expectedType && $expectedType !== $this->type) {
throw new UnexpectedValueException('The type of the grantee after '
. 'setting the ID did not match the specified, expected type "'
. $expectedType . '" but received "' . $this->type . '".');
}
$this->id = $id;
return $this;
}
/**
* Gets the grantee identifier
*
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Gets the grantee email address (if it is set)
*
* @return null|string
*/
public function getEmailAddress()
{
return $this->isAmazonCustomerByEmail() ? $this->id : null;
}
/**
* Gets the grantee URI (if it is set)
*
* @return null|string
*/
public function getGroupUri()
{
return $this->isGroup() ? $this->id : null;
}
/**
* Sets the display name of the grantee
*
* @param string $displayName Grantee name
*
* @return Grantee
*
* @throws LogicException when the grantee type not CanonicalUser
*/
public function setDisplayName($displayName)
{
if ($this->type === GranteeType::USER) {
if (empty($displayName) || !is_string($displayName)) {
$displayName = $this->id;
}
$this->displayName = $displayName;
} else {
if ($displayName) {
throw new LogicException('The display name can only be set '
. 'for grantees specified by ID.');
}
}
return $this;
}
/**
* Gets the grantee display name
*
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Gets the grantee type (determined by ID)
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Returns true if this grantee object represents a canonical user by ID
*
* @return bool
*/
public function isCanonicalUser()
{
return ($this->type === GranteeType::USER);
}
/**
* Returns true if this grantee object represents a customer by email
*
* @return bool
*/
public function isAmazonCustomerByEmail()
{
return ($this->type === GranteeType::EMAIL);
}
/**
* Returns true if this grantee object represents a group by URL
*
* @return bool
*/
public function isGroup()
{
return ($this->type === GranteeType::GROUP);
}
/**
* Returns the value used in headers to specify this grantee
*
* @return string
*/
public function getHeaderValue()
{
$key = static::$headerMap[$this->type];
return "{$key}=\"{$this->id}\"";
}
/**
* {@inheritdoc}
*/
public function toArray()
{
$result = array(
'Type' => $this->type
);
switch ($this->type) {
case GranteeType::USER:
$result['ID'] = $this->id;
$result['DisplayName'] = $this->displayName;
break;
case GranteeType::EMAIL:
$result['EmailAddress'] = $this->id;
break;
case GranteeType::GROUP:
$result['URI'] = $this->id;
}
return $result;
}
}
PK J�]R��v v Model/DeleteObjectsTransfer.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\Common\Client\AwsClientInterface;
use Aws\Common\Exception\OverflowException;
use Aws\Common\Enum\UaString as Ua;
use Aws\S3\Exception\InvalidArgumentException;
use Aws\S3\Exception\DeleteMultipleObjectsException;
use Guzzle\Batch\BatchTransferInterface;
use Guzzle\Service\Command\CommandInterface;
/**
* Transfer logic for deleting multiple objects from an Amazon S3 bucket in a
* single request
*/
class DeleteObjectsTransfer implements BatchTransferInterface
{
/**
* @var AwsClientInterface The Amazon S3 client for doing transfers
*/
protected $client;
/**
* @var string Bucket from which to delete the objects
*/
protected $bucket;
/**
* @var string MFA token to apply to the request
*/
protected $mfa;
/**
* Constructs a transfer using the injected client
*
* @param AwsClientInterface $client Client used to transfer the requests
* @param string $bucket Name of the bucket that stores the objects
* @param string $mfa MFA token used when contacting the Amazon S3 API
*/
public function __construct(AwsClientInterface $client, $bucket, $mfa = null)
{
$this->client = $client;
$this->bucket = $bucket;
$this->mfa = $mfa;
}
/**
* Set a new MFA token value
*
* @param string $token MFA token
*
* @return $this
*/
public function setMfa($token)
{
$this->mfa = $token;
return $this;
}
/**
* {@inheritdoc}
* @throws OverflowException if a batch has more than 1000 items
* @throws InvalidArgumentException when an invalid batch item is encountered
*/
public function transfer(array $batch)
{
if (empty($batch)) {
return;
}
if (count($batch) > 1000) {
throw new OverflowException('Batches should be divided into chunks of no larger than 1000 keys');
}
$del = array();
$command = $this->client->getCommand('DeleteObjects', array(
'Bucket' => $this->bucket,
Ua::OPTION => Ua::BATCH
));
if ($this->mfa) {
$command->getRequestHeaders()->set('x-amz-mfa', $this->mfa);
}
foreach ($batch as $object) {
// Ensure that the batch item is valid
if (!is_array($object) || !isset($object['Key'])) {
throw new InvalidArgumentException('Invalid batch item encountered: ' . var_export($batch, true));
}
$del[] = array(
'Key' => $object['Key'],
'VersionId' => isset($object['VersionId']) ? $object['VersionId'] : null
);
}
$command['Objects'] = $del;
$command->execute();
$this->processResponse($command);
}
/**
* Process the response of the DeleteMultipleObjects request
*
* @paramCommandInterface $command Command executed
*/
protected function processResponse(CommandInterface $command)
{
$result = $command->getResult();
// Ensure that the objects were deleted successfully
if (!empty($result['Errors'])) {
$errors = $result['Errors'];
throw new DeleteMultipleObjectsException($errors);
}
}
}
PK J�]�@�� � Model/ClearBucket.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model;
use Aws\Common\Client\AwsClientInterface;
use Guzzle\Common\AbstractHasDispatcher;
use Guzzle\Batch\FlushingBatch;
use Guzzle\Batch\ExceptionBufferingBatch;
use Guzzle\Batch\NotifyingBatch;
use Guzzle\Common\Exception\ExceptionCollection;
/**
* Class used to clear the contents of a bucket or the results of an iterator
*/
class ClearBucket extends AbstractHasDispatcher
{
/**
* @var string Event emitted when a batch request has completed
*/
const AFTER_DELETE = 'clear_bucket.after_delete';
/**
* @var string Event emitted before the bucket is cleared
*/
const BEFORE_CLEAR = 'clear_bucket.before_clear';
/**
* @var string Event emitted after the bucket is cleared
*/
const AFTER_CLEAR = 'clear_bucket.after_clear';
/**
* @var AwsClientInterface Client used to execute the requests
*/
protected $client;
/**
* @var AbstractS3ResourceIterator Iterator used to yield keys
*/
protected $iterator;
/**
* @var string MFA used with each request
*/
protected $mfa;
/**
* @param AwsClientInterface $client Client used to execute requests
* @param string $bucket Name of the bucket to clear
*/
public function __construct(AwsClientInterface $client, $bucket)
{
$this->client = $client;
$this->bucket = $bucket;
}
/**
* {@inheritdoc}
*/
public static function getAllEvents()
{
return array(self::AFTER_DELETE, self::BEFORE_CLEAR, self::AFTER_CLEAR);
}
/**
* Set the bucket that is to be cleared
*
* @param string $bucket Name of the bucket to clear
*
* @return $this
*/
public function setBucket($bucket)
{
$this->bucket = $bucket;
return $this;
}
/**
* Get the iterator used to yield the keys to be deleted. A default iterator
* will be created and returned if no iterator has been explicitly set.
*
* @return \Iterator
*/
public function getIterator()
{
if (!$this->iterator) {
$this->iterator = $this->client->getIterator('ListObjectVersions', array(
'Bucket' => $this->bucket
));
}
return $this->iterator;
}
/**
* Sets a different iterator to use than the default iterator. This can be helpful when you wish to delete
* only specific keys from a bucket (e.g. keys that match a certain prefix or delimiter, or perhaps keys that
* pass through a filtered, decorated iterator).
*
* @param \Iterator $iterator Iterator used to yield the keys to be deleted
*
* @return $this
*/
public function setIterator(\Iterator $iterator)
{
$this->iterator = $iterator;
return $this;
}
/**
* Set the MFA token to send with each request
*
* @param string $mfa MFA token to send with each request. The value is the concatenation of the authentication
* device's serial number, a space, and the value displayed on your authentication device.
*
* @return $this
*/
public function setMfa($mfa)
{
$this->mfa = $mfa;
return $this;
}
/**
* Clear the bucket
*
* @return int Returns the number of deleted keys
* @throws ExceptionCollection
*/
public function clear()
{
$that = $this;
$batch = DeleteObjectsBatch::factory($this->client, $this->bucket, $this->mfa);
$batch = new NotifyingBatch($batch, function ($items) use ($that) {
$that->dispatch(ClearBucket::AFTER_DELETE, array('keys' => $items));
});
$batch = new FlushingBatch(new ExceptionBufferingBatch($batch), 1000);
// Let any listeners know that the bucket is about to be cleared
$this->dispatch(self::BEFORE_CLEAR, array(
'iterator' => $this->getIterator(),
'batch' => $batch,
'mfa' => $this->mfa
));
$deleted = 0;
foreach ($this->getIterator() as $object) {
if (isset($object['VersionId'])) {
$versionId = $object['VersionId'] == 'null' ? null : $object['VersionId'];
} else {
$versionId = null;
}
$batch->addKey($object['Key'], $versionId);
$deleted++;
}
$batch->flush();
// If any errors were encountered, then throw an ExceptionCollection
if (count($batch->getExceptions())) {
$e = new ExceptionCollection();
foreach ($batch->getExceptions() as $exception) {
$e->add($exception->getPrevious());
}
throw $e;
}
// Let any listeners know that the bucket was cleared
$this->dispatch(self::AFTER_CLEAR, array('deleted' => $deleted));
return $deleted;
}
}
PK J�]��l� � $ Model/MultipartUpload/UploadPart.phpnu &1i� <?php
/**
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
namespace Aws\S3\Model\MultipartUpload;
use Aws\Common\Model\MultipartUpload\AbstractUploadPart;
/**
* An object that encapsulates the data for a Glacier upload operation
*/
class UploadPart extends AbstractUploadPart
{
/**
* {@inheritdoc}
*/
protected static $keyMap = array(
'PartNumber' => 'partNumber',
'ETag' => 'eTag',
'LastModified' => 'lastModified',
'Size' => 'size'
);
/**
* @var string The ETag for this part
*/
protected $eTag;
/**
* @var string The last modified date
*/
protected $lastModified;
/**
* @var int The size (or content-length) in bytes of the upload body
*/
protected $size;
/**
* @return string
*/
public function getETag()
{
return $this->eTag;
}
/**
* @return string
*/
public function getLastModified()
{
return $this->lastModified;
}
/**
* @return int
*/
public function getSize()
{
return $this->size;
}
}
PK J�]㋄�� � '