From 08deb1fa5fd43d1709b229b0e5b2f8b80be12574 Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Fri, 20 May 2016 10:54:44 -0700 Subject: [PATCH 1/2] Run update script, get rid of import/export bridge, and make sure v2 is always used --- build/JsonCompiler.php | 16 +- build/PhpFileLinterTrait.php | 7 +- composer.json | 6 +- .../Aws/Test/Integ/BatchingContext.php | 227 ++++++ .../Aws/Test/Integ/BlockingContext.php | 158 +++++ .../Aws/Test/Integ/ConcurrencyContext.php | 173 +++++ .../Aws/Test/Integ/MultipartContext.php | 173 +++++ .../Aws/Test/Integ/NativeStreamContext.php | 196 ++++++ .../bootstrap/Aws/Test/Integ/S3Context.php | 293 ++++++++ .../bootstrap/Aws/Test/Integ/SmokeContext.php | 59 ++ .../bootstrap/Aws/Test/PerformanceContext.php | 4 +- .../bootstrap/Aws/Test/UsesServiceTrait.php | 13 +- src/AwsCompatibilityClient.php | 4 +- .../Exception/ImportExportException.php | 9 - src/ImportExport/ImportExportClient.php | 22 - src/data/importexport/2010-06-01/api-2.json | 655 ------------------ .../importexport/2010-06-01/api-2.json.php | 3 - src/data/importexport/2010-06-01/docs-2.json | 431 ------------ .../importexport/2010-06-01/docs-2.json.php | 3 - .../importexport/2010-06-01/paginators-1.json | 11 - .../2010-06-01/paginators-1.json.php | 3 - src/data/manifest.json | 7 - src/data/manifest.json.php | 2 +- src/data/sdb/2009-04-15/docs-2.json.php | 2 +- tests/Api/BridgeApiProviderTest.php | 1 - 25 files changed, 1317 insertions(+), 1161 deletions(-) create mode 100644 features/bootstrap/Aws/Test/Integ/BatchingContext.php create mode 100644 features/bootstrap/Aws/Test/Integ/BlockingContext.php create mode 100644 features/bootstrap/Aws/Test/Integ/ConcurrencyContext.php create mode 100644 features/bootstrap/Aws/Test/Integ/MultipartContext.php create mode 100644 features/bootstrap/Aws/Test/Integ/NativeStreamContext.php create mode 100644 features/bootstrap/Aws/Test/Integ/S3Context.php delete mode 100644 src/ImportExport/Exception/ImportExportException.php delete mode 100644 src/ImportExport/ImportExportClient.php delete mode 100644 src/data/importexport/2010-06-01/api-2.json delete mode 100644 src/data/importexport/2010-06-01/api-2.json.php delete mode 100644 src/data/importexport/2010-06-01/docs-2.json delete mode 100644 src/data/importexport/2010-06-01/docs-2.json.php delete mode 100644 src/data/importexport/2010-06-01/paginators-1.json delete mode 100644 src/data/importexport/2010-06-01/paginators-1.json.php diff --git a/build/JsonCompiler.php b/build/JsonCompiler.php index 11feaeb..0b81fa4 100644 --- a/build/JsonCompiler.php +++ b/build/JsonCompiler.php @@ -4,6 +4,11 @@ class JsonCompiler { use PhpFileLinterTrait; + private static $tokensToReplace = [ + '(' => '__OPEN_PARENTHESIS__', + ')' => '__CLOSE_PARENTHESIS__', + ]; + /** @var string */ private $path; @@ -66,7 +71,10 @@ private function getTranspiledPhp() private function getDecodedData() { - return json_decode(file_get_contents($this->path), true); + return json_decode( + strtr(file_get_contents($this->path), self::$tokensToReplace), + true + ); } private function readPhpFile($path) @@ -78,6 +86,10 @@ private function readPhpFile($path) private function writeFile($path, $contents) { - return file_put_contents($path, $contents, LOCK_EX); + return file_put_contents( + $path, + strtr($contents, array_flip(self::$tokensToReplace)), + LOCK_EX + ); } } diff --git a/build/PhpFileLinterTrait.php b/build/PhpFileLinterTrait.php index cc59a69..76bb5eb 100644 --- a/build/PhpFileLinterTrait.php +++ b/build/PhpFileLinterTrait.php @@ -19,9 +19,10 @@ private function lintFile($path) static $linter; if (empty($linter)) { - $linter = !empty(opcache_get_status(false)['opcache_enabled']) - ? [$this, 'opcacheLint'] - : [$this, 'commandLineLint']; + $linter = function_exists('opcache_get_status') + && !empty(opcache_get_status(false)['opcache_enabled']) + ? [$this, 'opcacheLint'] + : [$this, 'commandLineLint']; } return call_user_func($linter, $path); diff --git a/composer.json b/composer.json index 260481a..81c20f8 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "aws/aws-sdk-php-v3-bridge", - "description": "A compatibility pack for services no longer supported in V3", + "description": "A compatibility pack for using Amazon SimpleDB with v3 of the AWS SDK for PHP", "minimum-stability": "stable", - "keywords": ["aws","amazon","sdb","importexport","sdk","simpledb"], + "keywords": ["aws","amazon","sdb","sdk","simpledb"], "type": "library", "license": "Apache-2.0", "authors": [ @@ -27,7 +27,7 @@ "classmap": ["build/"] }, "require": { - "aws/aws-sdk-php": "^3.2.1" + "aws/aws-sdk-php": "^3.18.7" }, "require-dev": { "phpunit/phpunit": "^4.8", diff --git a/features/bootstrap/Aws/Test/Integ/BatchingContext.php b/features/bootstrap/Aws/Test/Integ/BatchingContext.php new file mode 100644 index 0000000..f3c2f9f --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/BatchingContext.php @@ -0,0 +1,227 @@ +client = self::getSdk()->createClient($service); + } + + /** + * @BeforeFeature @dynamodb + * + * @param BeforeFeatureScope $scope + */ + public static function setUpDynamoTable(BeforeFeatureScope $scope) + { + self::$resource = self::getResourcePrefix() + . str_replace(' ', '-', strtolower($scope->getName())); + + $client = self::getSdk()->createDynamoDb(); + $client->createTable([ + 'TableName' => self::$resource, + 'AttributeDefinitions' => [ + ['AttributeName' => 'id', 'AttributeType' => 'N'] + ], + 'KeySchema' => [ + ['AttributeName' => 'id', 'KeyType' => 'HASH'] + ], + 'ProvisionedThroughput' => [ + 'ReadCapacityUnits' => 1, + 'WriteCapacityUnits' => 1 + ] + ]); + + $client->waitUntil('TableExists', ['TableName' => self::$resource]); + } + + /** + * @AfterFeature @dynamodb + * + * @param AfterFeatureScope $scope + */ + public static function tearDownDynamoTable(AfterFeatureScope $scope) + { + self::getSdk() + ->createDynamoDb() + ->deleteTable(['TableName' => self::$resource]); + + self::$resource = null; + } + + /** + * @BeforeFeature @sqs + * + * @param BeforeFeatureScope $scope + */ + public static function setUpQueue(BeforeFeatureScope $scope) + { + $sqs = self::getSdk()->createSqs(); + self::$resource = self::getResourcePrefix() + . preg_replace('/\W/', '-', strtolower($scope->getName())); + + $sqs->createQueue(['QueueName' => self::$resource]); + $sqs->waitUntil('QueueExists', ['QueueName' => self::$resource]); + } + + /** + * @AfterFeature @sqs + * + * @param AfterFeatureScope $scope + */ + public static function tearDownQueue(AfterFeatureScope $scope) + { + $sqs = self::getSdk() + ->createSqs(); + + $sqs->deleteQueue([ + 'QueueUrl' => $sqs->getQueueUrl([ + 'QueueName' => self::$resource, + ])['QueueUrl'] + ]); + + self::$resource = null; + } + + /** + * @When /^I create a WriteRequestBatch with a batch size of (\d+) and a pool size of (\d+)$/ + */ + public function iCreateAWriteRequestBatch($batchSize, $poolSize) + { + $this->batch = new WriteRequestBatch($this->client, [ + 'table' => self::$resource, + 'batch_size' => $batchSize, + 'pool_size' => $poolSize, + 'before' => function () { + $this->flushCount++; + }, + 'error' => function (AwsException $e) { + trigger_error($e->getMessage(), E_USER_WARNING); + } + ]); + } + + /** + * @When /^I put (\d+) items in the batch$/ + */ + public function iPutItemsInTheBatch($itemCount) + { + for ($i = 0; $i < $itemCount; $i++) { + $this->batch->put(['id' => ['N' => (string) $i]]); + } + } + + /** + * @When I flush the batch + */ + public function iFlushTheBatch() + { + $this->batch->flush(); + } + + /** + * @Then /^(\d+) items should have been written$/ + */ + public function itemsShouldHaveBeenWritten($itemCount) + { + $actualItems = $this->client->getIterator('Scan', [ + 'TableName' => self::$resource, + ]); + + $this->assertSame((int) $itemCount, iterator_count($actualItems)); + } + + /** + * @Then /^the batch should have been flushed at least (\d+) times$/ + */ + public function theBatchShouldHaveBeenFlushedTimes($flushCount) + { + $this->assertGreaterThanOrEqual((int) $flushCount, $this->flushCount); + } + + /** + * @Given /^I have put (\d+) messages in a queue$/ + */ + public function iHavePutMessagesInAQueue($messageCount) + { + $queueUrl = $this->client + ->getQueueUrl(['QueueName' => self::$resource])['QueueUrl']; + for ($i = 0; $i < $messageCount; $i++) { + $this->client->sendMessage([ + 'QueueUrl' => $queueUrl, + 'MessageBody' => json_encode(['testing' => 'testing']), + ]); + } + } + + /** + * @When /^I delete a batch of (\d+) messages$/ + */ + public function iDeleteABatchOfMessages($messageCount) + { + $queueUrl = $this->client + ->getQueueUrl(['QueueName' => self::$resource])['QueueUrl']; + $messages = []; + while (count($messages) < $messageCount) { + $result = $this->client->receiveMessage([ + 'QueueUrl' => $queueUrl, + 'MaxNumberOfMessages' => $messageCount, + ]); + + foreach ($result['Messages'] as $message) { + $messages[$message['MessageId']] = [ + 'Id' => $message['MessageId'], + 'ReceiptHandle' => $message['ReceiptHandle'], + ]; + } + } + + $this->response = $this->client + ->deleteMessageBatch([ + 'QueueUrl' => $queueUrl, + 'Entries' => array_values($messages), + ]); + } + + /** + * @Then /^(\d+) messages should have been deleted from the queue$/ + */ + public function messagesShouldHaveBeenDeletedFromTheQueue($messageCount) + { + $this->assertSame((int) $messageCount, count($this->response['Failed']) + + count($this->response['Successful'])); + } +} diff --git a/features/bootstrap/Aws/Test/Integ/BlockingContext.php b/features/bootstrap/Aws/Test/Integ/BlockingContext.php new file mode 100644 index 0000000..9915931 --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/BlockingContext.php @@ -0,0 +1,158 @@ +client = self::getSdk()->createClient($service); + } + + /** + * @When I create a table named :table + */ + public function iCreateATableNamed($table) + { + $this->client->createTable([ + 'TableName' => self::getResourcePrefix() . "-$table", + 'AttributeDefinitions' => [ + ['AttributeName' => 'id', 'AttributeType' => 'N'] + ], + 'KeySchema' => [ + ['AttributeName' => 'id', 'KeyType' => 'HASH'] + ], + 'ProvisionedThroughput' => [ + 'ReadCapacityUnits' => 20, + 'WriteCapacityUnits' => 20 + ] + ]); + } + + /** + * @When wait for the table named :table to exist + */ + public function waitForTheTableNamedToExist($table) + { + $this->client->waitUntil('TableExists', [ + 'TableName' => self::getResourcePrefix() . "-$table", + ]); + } + + /** + * @When the table named :table exists + */ + public function theTableNamedWillExist($table) + { + self::getSdk(['http' => ['synchronous' => true]]) + ->createDynamoDb() + ->describeTable(['TableName' => self::getResourcePrefix() . "-$table"]); + } + + /** + * @Then I can delete the table named :table + */ + public function iCanDeleteTheTableNamed($table) + { + $this->client->deleteTable([ + 'TableName' => self::getResourcePrefix() . "-$table", + ]); + } + + /** + * @Then wait for the table named :table to be deleted + */ + public function waitForTheTableNamedToBeDeleted($table) + { + $this->client->waitUntil('TableNotExists', [ + 'TableName' => self::getResourcePrefix() . "-$table", + ]); + } + + /** + * @Then the table named :table does not exist + */ + public function theTableNamedWillNotExist($table) + { + try { + $this->theTableNamedWillExist($table); + $this->fail("$table exists but should not."); + } catch (DynamoDbException $e) { + $this->assertSame('ResourceNotFoundException', $e->getAwsErrorCode()); + } + } + + /** + * @When I create a promise to create and await a table named :table + */ + public function iCreateAPromiseToCreateAndAwaitATableNamed($table) + { + $this->promises []= $this->client->createTableAsync([ + 'TableName' => self::getResourcePrefix() . "-$table", + 'AttributeDefinitions' => [ + ['AttributeName' => 'id', 'AttributeType' => 'N'] + ], + 'KeySchema' => [ + ['AttributeName' => 'id', 'KeyType' => 'HASH'] + ], + 'ProvisionedThroughput' => [ + 'ReadCapacityUnits' => 20, + 'WriteCapacityUnits' => 20 + ] + ]) + ->then(function () use ($table) { + return $this->client + ->getWaiter('TableExists', [ + 'TableName' => self::getResourcePrefix() . "-$table", + ])->promise(); + }); + } + + /** + * @Then I can wait on all promises + */ + public function iCanWaitOnAllPromises() + { + Promise\all($this->promises) + ->wait(); + } + + /** + * @When I create a promise to delete and await the purging of the table named :table + */ + public function iCreateAPromiseToDeleteAndAwaitThePurgingOfTheTableNamed($table) + { + $this->promises []= $this->client + ->deleteTableAsync([ + 'TableName' => self::getResourcePrefix() . "-$table", + ])->then(function () use ($table) { + return $this->client + ->getWaiter('TableNotExists', [ + 'TableName' => self::getResourcePrefix() . "-$table", + ])->promise(); + }); + } +} diff --git a/features/bootstrap/Aws/Test/Integ/ConcurrencyContext.php b/features/bootstrap/Aws/Test/Integ/ConcurrencyContext.php new file mode 100644 index 0000000..d4cf23a --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/ConcurrencyContext.php @@ -0,0 +1,173 @@ +createS3(); + + self::$bucket = self::getResourcePrefix() + . str_replace(' ', '-', strtolower($scope->getName())); + + $client->createBucket(['Bucket' => self::$bucket]); + $client->waitUntil('BucketExists', ['Bucket' => self::$bucket]); + } + + /** + * @AfterFeature @s3 + * + * @param AfterFeatureScope $scope + */ + public static function tearDownS3Bucket(AfterFeatureScope $scope) + { + $client = self::getSdk()->createS3(); + + $client->deleteMatchingObjects(self::$bucket, '', '//'); + $client->deleteBucket(['Bucket' => self::$bucket]); + + self::$bucket = null; + } + + /** + * @Given I have a :service client + */ + public function iHaveAClient($service) + { + $this->client = self::getSdk()->createClient($service); + } + + /** + * @When I call the :command API + */ + public function iCallTheApi($command) + { + $this->result = $this->client->{$command}(); + } + + /** + * @Then the value at :key should be a :type + */ + public function theValueAtShouldBeA($key, $type) + { + $this->assertInstanceOf(Result::class, $this->result); + $this->assertInternalType($type, $this->result->search($key)); + } + + /** + * @When I call the :command API asynchronously + */ + public function iCallTheApiAsynchronously($command) + { + $this->promise = call_user_func([$this->client, "{$command}Async"]); + } + + /** + * @When I wait on the promise + */ + public function thenWaitOnThePromise() + { + $this->result = $this->promise->wait(); + } + + /** + * @Given a promise composed of the following asynchronous operations: + */ + public function aPromiseComposedOfTheFollowingAsynchronousOperations(TableNode $table) + { + $this->promise = Promise\all(array_map(function (array $row) { + return call_user_func( + [ + self::getSdk()->createClient($row['service']), + "{$row['command']}Async", + ], + json_decode($row['payload'], true) ?: [] + ); + }, iterator_to_array($table))); + } + + /** + * @Given a pool composed of the following commands: + */ + public function aPoolComposedOfTheFollowingCommands(TableNode $table) + { + $this->commands = array_map(function (array $row) { + return self::getSdk() + ->createClient($row['service']) + ->getCommand( + $row['command'], + json_decode($row['payload'], true) ?: [] + ); + }, iterator_to_array($table)); + } + + /** + * @When I send the commands as a batch to :service + */ + public function iSendTheCommandsAsABatchTo($service) + { + $this->result = CommandPool::batch( + self::getSdk()->createClient($service), + $this->commands + ); + } + + /** + * @Then there should be :count results + */ + public function thereShouldBeResults($count) + { + $this->assertCount((int) $count, $this->result); + } + + /** + * @Then there should be :count value at :path + */ + public function thereShouldBeValueAt($count, $path) + { + $this->assertCount((int) $count, array_unique( + JmesPath\search($path, $this->result) + )); + } +} diff --git a/features/bootstrap/Aws/Test/Integ/MultipartContext.php b/features/bootstrap/Aws/Test/Integ/MultipartContext.php new file mode 100644 index 0000000..01cbd12 --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/MultipartContext.php @@ -0,0 +1,173 @@ +stream = Psr7\stream_for(Psr7\try_fopen(self::$tempFile, 'r')); + } + + /** + * @When /^I upload the stream to S3 with a concurrency factor of "(\d+)"$/ + */ + public function iUploadTheStreamToS3WithAConcurrencyFactorOf($concurrency) + { + $client = self::getSdk()->createS3(); + $uploader = new S3MultipartUploader($client, $this->stream, [ + 'bucket' => self::getResourceName(), + 'key' => get_class($this->stream) . $concurrency, + 'concurrency' => $concurrency, + ]); + + try { + $this->result = $uploader->upload(); + } catch (MultipartUploadException $e) { + $client->abortMultipartUpload($e->getState()->getId()); + $message = "=====\n"; + while ($e) { + $message .= $e->getMessage() . "\n"; + $e = $e->getPrevious(); + } + $message .= "=====\n"; + Assert::fail($message); + } + } + + /** + * @When /^I upload the stream to Glacier with a concurrency factor of "(\d+)"$/ + */ + public function iUploadTheStreamToGlacierWithAConcurrencyFactorOf($concurrency) + { + $client = self::getSdk()->createGlacier(); + $uploader = new GlacierMultipartUploader($client, $this->stream, [ + 'vault_name' => self::RESOURCE_POSTFIX, + 'archive_description' => get_class($this->stream) . $concurrency, + 'concurrency' => $concurrency, + ]); + + try { + $this->result = $uploader->upload(); + } catch (MultipartUploadException $e) { + $client->abortMultipartUpload($e->getState()->getId()); + $message = "=====\n"; + while ($e) { + $message .= $e->getMessage() . "\n"; + $e = $e->getPrevious(); + } + $message .= "=====\n"; + Assert::fail($message); + } + } + + /** + * @Then /^the result should contain a\(n\) "([^"]+)"$/ + */ + public function theResultShouldContainA($key) + { + Assert::assertArrayHasKey($key, $this->result); + } + + /** + * @Given I have a non-seekable read stream + */ + public function iHaveANonSeekableReadStream() + { + $this->iHaveASeekableReadStream(); + $this->stream = new NoSeekStream($this->stream); + } + + /** + * @BeforeSuite + */ + public static function createTempFile() + { + self::$tempFile = tempnam(sys_get_temp_dir(), self::getResourceName()); + file_put_contents(self::$tempFile, str_repeat('x', 10 * self::MB + 1024)); + } + + /** + * @AfterSuite + */ + public static function deleteTempFile() + { + unlink(self::$tempFile); + } + + /** + * @BeforeFeature @s3 + */ + public static function createTestBucket() + { + $client = self::getSdk()->createS3(); + if (!$client->doesBucketExist(self::getResourceName())) { + $client->createBucket(['Bucket' => self::getResourceName()]); + $client->waitUntil('BucketExists', ['Bucket' => self::getResourceName()]); + } + } + + /** + * @AfterFeature @s3 + */ + public static function deleteTestBucket() + { + $client = self::getSdk()->createS3(); + BatchDelete::fromListObjects($client, ['Bucket' => self::getResourceName()])->delete(); + $client->deleteBucket(['Bucket' => self::getResourceName()]); + $client->waitUntil('BucketNotExists', ['Bucket' => self::getResourceName()]); + } + + /** + * @BeforeFeature @glacier + */ + public static function createTestVault() + { + $client = self::getSdk()->createGlacier(); + $client->createVault(['vaultName' => self::RESOURCE_POSTFIX]); + $client->waitUntil('VaultExists', ['vaultName' => self::RESOURCE_POSTFIX]); + } + + private static function getResourceName() + { + static $bucketName; + + if (empty($bucketName)) { + $bucketName = self::getResourcePrefix() . self::RESOURCE_POSTFIX; + } + + return $bucketName; + } +} diff --git a/features/bootstrap/Aws/Test/Integ/NativeStreamContext.php b/features/bootstrap/Aws/Test/Integ/NativeStreamContext.php new file mode 100644 index 0000000..8ed1ed0 --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/NativeStreamContext.php @@ -0,0 +1,196 @@ +handle)) { + fclose($this->handle); + } + } + + /** + * @BeforeFeature @s3 + * + * @param BeforeFeatureScope $scope + */ + public static function setUpS3Bucket(BeforeFeatureScope $scope) + { + $client = self::getSdk() + ->createS3(); + + self::$bucket = self::getResourcePrefix() + . str_replace(' ', '-', strtolower($scope->getName())); + + $client->createBucket(['Bucket' => self::$bucket]); + $client->waitUntil('BucketExists', ['Bucket' => self::$bucket]); + } + + /** + * @AfterFeature @s3 + * + * @param AfterFeatureScope $scope + */ + public static function tearDownS3Bucket(AfterFeatureScope $scope) + { + $client = self::getSdk()->createS3(); + + $client->deleteMatchingObjects(self::$bucket, '', '//'); + $client->deleteBucket(['Bucket' => self::$bucket]); + + self::$bucket = null; + } + + /** + * @Given I have a :service client + */ + public function iHaveAClient($service) + { + $this->client = self::getSdk()->createClient($service); + } + + /** + * @Given have registered an s3 stream wrapper + */ + public function haveRegisteredAnS3StreamWrapper() + { + $this->client->registerStreamWrapper(); + } + + /** + * @Given I create a subdirectory :subdir with mkdir + */ + public function iCreateASubdirectory($subdir) + { + mkdir($this->getS3Path($subdir)); + sleep(1); + } + + /** + * @When /^I call (\w+) on the (\S+) path$/ + */ + public function iCallOnThePath($method, $path) + { + $this->callSucceeded = call_user_func($method, $this->getS3Path($path)); + } + + /** + * @Then /^the call should return (true|false)$/ + */ + public function theCallShouldReturn($booleanString) + { + $this->assertSame( + filter_var($booleanString, FILTER_VALIDATE_BOOLEAN), + $this->callSucceeded + ); + } + + /** + * @Given I have a file at :path with the content :contents + */ + public function iHaveAFileAtWithTheContent($path, $contents) + { + $this->assertGreaterThan( + 0, + file_put_contents($this->getS3Path($path), $contents) + ); + } + + /** + * @Given I have a file at :path with no content + */ + public function iHaveAFileAtWithNoContent($path) + { + $this->assertSame(0, file_put_contents($this->getS3Path($path), '')); + } + + /** + * @Then the file at :arg1 should contain :arg2 + */ + public function theFileAtShouldContain($key, $contents) + { + $this->assertSame($contents, file_get_contents($this->getS3Path($key))); + } + + /** + * @Given I have a read handle on the file at :arg1 + */ + public function iHaveAReadHandleOnTheFileAt($key) + { + $this->handle = fopen($this->getS3Path($key), 'r'); + } + + /** + * @Then /^reading (\d+) bytes should return (.+)$/ + */ + public function readingBytesShouldReturn($byteCount, $expected) + { + $this->assertSame($expected, fread($this->handle, $byteCount)); + } + + /** + * @Then /^calling fstat should report a size of (\d+)$/ + */ + public function callingFstatShouldReportASizeOf($size) + { + $this->assertSame((int) $size, fstat($this->handle)['size']); + } + + /** + * @Given I have cleared the last error + */ + public function iHaveClearedTheLastError() + { + while (error_get_last()) { + error_clear_last(); + } + } + + /** + * @Then no errors should have been raised + */ + public function errorsShouldHaveBeenRaised() + { + $this->assertNull(error_get_last()); + } + + /** + * @Then scanning the directory at :dir should return a list with one member named :file + */ + public function scanningTheDirectoryAtShouldReturnAListWithOneMemberNamed($dir, $file) + { + $this->assertSame([$file], scandir($this->getS3Path($dir))); + } + + private function getS3Path($path) + { + return 's3://' . self::$bucket . '/' . ltrim($path, '/'); + } +} diff --git a/features/bootstrap/Aws/Test/Integ/S3Context.php b/features/bootstrap/Aws/Test/Integ/S3Context.php new file mode 100644 index 0000000..ee65f75 --- /dev/null +++ b/features/bootstrap/Aws/Test/Integ/S3Context.php @@ -0,0 +1,293 @@ +createS3(); + if (!$client->doesBucketExist(self::getResourceName())) { + $client->createBucket(['Bucket' => self::getResourceName()]); + $client->waitUntil('BucketExists', [ + 'Bucket' => self::getResourceName(), + ]); + } + } + + /** + * @AfterSuite + */ + public static function deleteTestBucket() + { + $client = self::getSdk()->createS3(); + $client->deleteMatchingObjects(self::getResourceName(), '', '//'); + $client->deleteBucket(['Bucket' => self::getResourceName()]); + $client->waitUntil('BucketNotExists', [ + 'Bucket' => self::getResourceName(), + ]); + } + + /** + * @Given I have uploaded an object to S3 with a key of :key and a body of :body + */ + public function iHaveUploadedThatStringToSWithAKeyOfAndABodyOf($key, $body) + { + self::getSdk() + ->createS3() + ->putObject([ + 'Bucket' => self::getResourceName(), + 'Key' => $key, + 'Body' => $body, + ]); + } + + /** + * @When I create a pre-signed request for a :command command with: + */ + public function iCreateAPreSignedUrlForACommandWith( + $commandName, + TableNode $table + ) { + $args = ['Bucket' => self::getResourceName()]; + foreach ($table as $row) { + $args[$row['key']] = $row['value']; + } + $client = self::getSdk()->createS3(); + $command = $client->getCommand($commandName, $args); + $this->presignedRequest = $client + ->createPresignedRequest($command, '+1 hour'); + } + + /** + * @Then the contents of the response to the presigned request should be :body + */ + public function theContentsAtThePresignedUrlShouldBe($body) + { + Assert::assertSame( + $body, + file_get_contents((string) $this->presignedRequest->getUri()) + ); + } + + /** + * @Given I send the pre-signed request + */ + public function iSendThePreSignedRequest() + { + (new Client)->send($this->presignedRequest); + } + + /** + * @Given I change the body of the pre-signed request to be :body + */ + public function iChangeTheBodyOfThePreSignedRequestToBe($body) + { + $this->presignedRequest = $this->presignedRequest + ->withBody(Psr7\stream_for($body)); + } + + /** + * @Given I have an s3 client and I have a file + */ + public function iHaveAnClientAndIHaveAFile() + { + $this->s3Client = self::getSdk()->createS3(); + $this->stream = Psr7\stream_for(Psr7\try_fopen(self::$tempFile, 'r')); + } + + /** + * @Given I have an array of form inputs as following: + */ + public function iHaveAnArrayOfFormInputsAsFollowing(TableNode $table) + { + foreach ($table as $row) { + $this->formInputs += [$row['key'] => $row['value']]; + } + } + + /** + * @Given I provide a json string policy as following: + */ + public function iProvideAJsonStringPolicyAsFollowing(PyStringNode $string) + { + $policy = json_decode($string->getRaw(),true); + $policy['conditions'][] = ["bucket" => self::getResourceName()]; + $policy['conditions'][] = ["starts-with", '$key', ""]; + + $this->jsonPolicy = json_encode($policy); + } + + /** + * @When I create a POST object SigV2 with inputs and policy + */ + public function iCreateAPostObjectSigvWithInputsAndPolicy() + { + $postObject = new PostObject( + $this->s3Client, + self::getResourceName(), + $this->formInputs, + $this->jsonPolicy + ); + $this->preparePostData($postObject); + } + + /** + * @Given I provide an array of policy conditions as following: + */ + public function iProvideAnArrayOfPolicyConditionsAsFollowing(TableNode $table) + { + $this->options = [ + ["bucket" => self::getResourceName()], + ["starts-with", '$key', ""], + ]; + foreach ($table as $row) { + $this->options[] = [$row['key'] => $row['value']]; + } + } + + /** + * @Given I want the policy expires after :expires + */ + public function iWantThePolicyExpiresAfter($expires) + { + $this->expires = $expires; + } + + /** + * @When I create a POST object SigV4 with inputs and policy + */ + public function iCreateAPostObjectSigvWithInputsAndPolicy2() + { + $postObject = new PostObjectV4( + $this->s3Client, + self::getResourceName(), + $this->formInputs, + $this->options, + $this->expires + ); + + $this->preparePostData($postObject); + } + + /** + * @When I make a HTTP POST request + */ + public function iMakeAHttpPostRequest() + { + try { + (new Client)->request( + $this->attributes['method'], + $this->attributes['action'], + [ + 'multipart' => $this->inputs, + ] + ); + } catch (\GuzzleHttp\Exception\ClientException $e) { + echo $e->getResponse()->getBody(); + } + } + + /** + * @Then the file called :filename is uploaded + */ + public function theFileCalledIsUploaded($filename) + { + Assert::assertTrue($this->s3Client->doesObjectExist( + self::getResourceName(), + $filename + )); + + $fileContents = str_repeat('x', 128 * 1024); + Assert::assertEquals( + $fileContents, + $this->s3Client->getObject([ + 'Bucket' => self::getResourceName(), + 'Key' => $filename, + ])['Body']->getContents() + ); + } + + /** + * Prepare form inputs and attribute for POST + */ + private function preparePostData($postObject) + { + $this->attributes = $postObject->getFormAttributes(); + foreach ($postObject->getFormInputs() as $name => $contents) { + $this->inputs[] = [ + 'name' => $name, + 'contents' => $contents, + ]; + } + $this->inputs[] = [ + 'name' => 'file', + 'contents' => $this->stream, + 'filename' => 'file.ext', + ]; + } +} diff --git a/features/bootstrap/Aws/Test/Integ/SmokeContext.php b/features/bootstrap/Aws/Test/Integ/SmokeContext.php index 5b4d177..a439ba0 100644 --- a/features/bootstrap/Aws/Test/Integ/SmokeContext.php +++ b/features/bootstrap/Aws/Test/Integ/SmokeContext.php @@ -59,6 +59,9 @@ class SmokeContext extends PHPUnit_Framework_Assert implements 'Efs' => [ 'region' => 'us-west-2', ], + 'Inspector' => [ + 'region' => 'us-west-2', + ], ]; /** @@ -135,6 +138,62 @@ public static function setUpEfs(BeforeFeatureScope $scope) } } + /** + * @BeforeFeature @inspector + * + * Ensure that the testing credentials have access to the Inspector preview; + * skip entire feature otherwise. + * + * @param BeforeFeatureScope $scope + */ + public static function setUpInspector(BeforeFeatureScope $scope) + { + try { + self::getSdk(self::$configOverrides) + ->createInspector() + ->listApplications(); + } catch (\Exception $e) { + // If the test failed because the account has no access to EFS, + // throw the exception to cause the feature to be skipped. + if ($e instanceof AwsException + && 'AccessDeniedException' === $e->getAwsErrorCode() + ) { + throw $e; + } + } + } + + /** + * @BeforeFeature @marketplacecommerceanalytics + * + * Ensure that the testing credentials have a Marketplace Commerce Analytics + * subscription; skip entire feature otherwise. + * + * @param BeforeFeatureScope $scope + */ + public static function setUpMarketplaceCommerceAnalytics(BeforeFeatureScope $scope) + { + try { + self::getSdk(self::$configOverrides) + ->createMarketplaceCommerceAnalytics() + ->generateDataSet([ + 'dataSetType' => 'fake-type', + 'dataSetPublicationDate' => 'fake-date', + 'roleNameArn' => 'fake-arn', + 'destinationS3BucketName' => 'fake-bucket', + 'snsTopicArn' => 'fake-arn', + ]); + } catch (\Exception $e) { + // If the test failed because the account has no support subscription, + // throw the exception to cause the feature to be skipped. + if ($e instanceof AwsException + && 'SubscriptionRequiredException' === $e->getAwsErrorCode() + ) { + throw $e; + } + } + } + /** * @BeforeFeature @sqs * diff --git a/features/bootstrap/Aws/Test/PerformanceContext.php b/features/bootstrap/Aws/Test/PerformanceContext.php index eedf939..4f0de3a 100644 --- a/features/bootstrap/Aws/Test/PerformanceContext.php +++ b/features/bootstrap/Aws/Test/PerformanceContext.php @@ -233,7 +233,9 @@ public function iShouldNotHaveLeakedAnyResources() static $memoryFudge; static $handlesFudge; if (empty($memoryFudge)) { - $memoryFudge = !empty(opcache_get_status(false)['opcache_enabled']) + $opcacheEnabled = function_exists('opcache_get_status') + && !empty(opcache_get_status(false)['opcache_enabled']); + $memoryFudge = $opcacheEnabled ? 256 * 1024 // 256KB if OPCache is enabled : 5 * 1024 * 1024; // 5MB otherwise $handlesFudge = 5; diff --git a/features/bootstrap/Aws/Test/UsesServiceTrait.php b/features/bootstrap/Aws/Test/UsesServiceTrait.php index f1feaee..b256e69 100644 --- a/features/bootstrap/Aws/Test/UsesServiceTrait.php +++ b/features/bootstrap/Aws/Test/UsesServiceTrait.php @@ -13,6 +13,8 @@ */ trait UsesServiceTrait { + private $_mock_handler; + /** * Creates an instance of the AWS SDK for a test * @@ -45,7 +47,7 @@ private function getTestClient($service, array $args = []) && !isset($args['handler']) && !isset($args['http_handler']) ) { - $args['handler'] = new MockHandler([]); + $this->_mock_handler = $args['handler'] = new MockHandler([]); } return $this->getTestSdk($args)->createClient($service); @@ -73,12 +75,17 @@ private function addMockResults( } } - $mock = new MockHandler($results, $onFulfilled, $onRejected); - $client->getHandlerList()->setHandler($mock); + $this->_mock_handler = new MockHandler($results, $onFulfilled, $onRejected); + $client->getHandlerList()->setHandler($this->_mock_handler); return $client; } + private function mockQueueEmpty() + { + return 0 === count($this->_mock_handler); + } + /** * Creates a mock CommandException with a given error code * diff --git a/src/AwsCompatibilityClient.php b/src/AwsCompatibilityClient.php index 73ca1f1..4350286 100644 --- a/src/AwsCompatibilityClient.php +++ b/src/AwsCompatibilityClient.php @@ -9,7 +9,6 @@ class AwsCompatibilityClient extends AwsClient { private static $compatibilityServices = [ 'simpledb' => 'sdb', - 'importexport' => 'importexport' ]; public static function getArguments() @@ -26,7 +25,8 @@ public static function getArguments() public function __construct(array $args) { parent::__construct($args + [ - 'service' => $this->getService() + 'service' => $this->getService(), + 'signature_version' => 'v2', ]); } diff --git a/src/ImportExport/Exception/ImportExportException.php b/src/ImportExport/Exception/ImportExportException.php deleted file mode 100644 index a4306ea..0000000 --- a/src/ImportExport/Exception/ImportExportException.php +++ /dev/null @@ -1,9 +0,0 @@ - [ 'apiVersion' => '2010-06-01', 'endpointPrefix' => 'importexport', 'globalEndpoint' => 'importexport.amazonaws.com', 'serviceFullName' => 'AWS Import/Export', 'signatureVersion' => 'v2', 'xmlNamespace' => 'http://importexport.amazonaws.com/doc/2010-06-01/', 'protocol' => 'query', ], 'operations' => [ 'CancelJob' => [ 'name' => 'CancelJob', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=CancelJob', ], 'input' => [ 'shape' => 'CancelJobInput', ], 'output' => [ 'shape' => 'CancelJobOutput', 'resultWrapper' => 'CancelJobResult', ], 'errors' => [ [ 'shape' => 'InvalidJobIdException', 'exception' => true, ], [ 'shape' => 'ExpiredJobIdException', 'exception' => true, ], [ 'shape' => 'CanceledJobIdException', 'exception' => true, ], [ 'shape' => 'UnableToCancelJobIdException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], ], ], 'CreateJob' => [ 'name' => 'CreateJob', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=CreateJob', ], 'input' => [ 'shape' => 'CreateJobInput', ], 'output' => [ 'shape' => 'CreateJobOutput', 'resultWrapper' => 'CreateJobResult', ], 'errors' => [ [ 'shape' => 'MissingParameterException', 'exception' => true, ], [ 'shape' => 'InvalidParameterException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidAddressException', 'exception' => true, ], [ 'shape' => 'InvalidManifestFieldException', 'exception' => true, ], [ 'shape' => 'MissingManifestFieldException', 'exception' => true, ], [ 'shape' => 'NoSuchBucketException', 'exception' => true, ], [ 'shape' => 'MissingCustomsException', 'exception' => true, ], [ 'shape' => 'InvalidCustomsException', 'exception' => true, ], [ 'shape' => 'InvalidFileSystemException', 'exception' => true, ], [ 'shape' => 'MultipleRegionsException', 'exception' => true, ], [ 'shape' => 'BucketPermissionException', 'exception' => true, ], [ 'shape' => 'MalformedManifestException', 'exception' => true, ], [ 'shape' => 'CreateJobQuotaExceededException', 'exception' => true, ], [ 'shape' => 'InvalidJobIdException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], ], ], 'GetShippingLabel' => [ 'name' => 'GetShippingLabel', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=GetShippingLabel', ], 'input' => [ 'shape' => 'GetShippingLabelInput', ], 'output' => [ 'shape' => 'GetShippingLabelOutput', 'resultWrapper' => 'GetShippingLabelResult', ], 'errors' => [ [ 'shape' => 'InvalidJobIdException', 'exception' => true, ], [ 'shape' => 'ExpiredJobIdException', 'exception' => true, ], [ 'shape' => 'CanceledJobIdException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidAddressException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], [ 'shape' => 'InvalidParameterException', 'exception' => true, ], ], ], 'GetStatus' => [ 'name' => 'GetStatus', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=GetStatus', ], 'input' => [ 'shape' => 'GetStatusInput', ], 'output' => [ 'shape' => 'GetStatusOutput', 'resultWrapper' => 'GetStatusResult', ], 'errors' => [ [ 'shape' => 'InvalidJobIdException', 'exception' => true, ], [ 'shape' => 'ExpiredJobIdException', 'exception' => true, ], [ 'shape' => 'CanceledJobIdException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], ], ], 'ListJobs' => [ 'name' => 'ListJobs', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=ListJobs', ], 'input' => [ 'shape' => 'ListJobsInput', ], 'output' => [ 'shape' => 'ListJobsOutput', 'resultWrapper' => 'ListJobsResult', ], 'errors' => [ [ 'shape' => 'InvalidParameterException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], ], ], 'UpdateJob' => [ 'name' => 'UpdateJob', 'http' => [ 'method' => 'POST', 'requestUri' => '/?Operation=UpdateJob', ], 'input' => [ 'shape' => 'UpdateJobInput', ], 'output' => [ 'shape' => 'UpdateJobOutput', 'resultWrapper' => 'UpdateJobResult', ], 'errors' => [ [ 'shape' => 'MissingParameterException', 'exception' => true, ], [ 'shape' => 'InvalidParameterException', 'exception' => true, ], [ 'shape' => 'InvalidAccessKeyIdException', 'exception' => true, ], [ 'shape' => 'InvalidAddressException', 'exception' => true, ], [ 'shape' => 'InvalidManifestFieldException', 'exception' => true, ], [ 'shape' => 'InvalidJobIdException', 'exception' => true, ], [ 'shape' => 'MissingManifestFieldException', 'exception' => true, ], [ 'shape' => 'NoSuchBucketException', 'exception' => true, ], [ 'shape' => 'ExpiredJobIdException', 'exception' => true, ], [ 'shape' => 'CanceledJobIdException', 'exception' => true, ], [ 'shape' => 'MissingCustomsException', 'exception' => true, ], [ 'shape' => 'InvalidCustomsException', 'exception' => true, ], [ 'shape' => 'InvalidFileSystemException', 'exception' => true, ], [ 'shape' => 'MultipleRegionsException', 'exception' => true, ], [ 'shape' => 'BucketPermissionException', 'exception' => true, ], [ 'shape' => 'MalformedManifestException', 'exception' => true, ], [ 'shape' => 'UnableToUpdateJobIdException', 'exception' => true, ], [ 'shape' => 'InvalidVersionException', 'exception' => true, ], ], ], ], 'shapes' => [ 'APIVersion' => [ 'type' => 'string', ], 'Artifact' => [ 'type' => 'structure', 'members' => [ 'Description' => [ 'shape' => 'Description', ], 'URL' => [ 'shape' => 'URL', ], ], ], 'ArtifactList' => [ 'type' => 'list', 'member' => [ 'shape' => 'Artifact', ], ], 'BucketPermissionException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'CancelJobInput' => [ 'type' => 'structure', 'required' => [ 'JobId', ], 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'APIVersion' => [ 'shape' => 'APIVersion', ], ], ], 'CancelJobOutput' => [ 'type' => 'structure', 'members' => [ 'Success' => [ 'shape' => 'Success', ], ], ], 'CanceledJobIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'Carrier' => [ 'type' => 'string', ], 'CreateJobInput' => [ 'type' => 'structure', 'required' => [ 'JobType', 'Manifest', 'ValidateOnly', ], 'members' => [ 'JobType' => [ 'shape' => 'JobType', ], 'Manifest' => [ 'shape' => 'Manifest', ], 'ManifestAddendum' => [ 'shape' => 'ManifestAddendum', ], 'ValidateOnly' => [ 'shape' => 'ValidateOnly', ], 'APIVersion' => [ 'shape' => 'APIVersion', ], ], ], 'CreateJobOutput' => [ 'type' => 'structure', 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'JobType' => [ 'shape' => 'JobType', ], 'Signature' => [ 'shape' => 'Signature', ], 'SignatureFileContents' => [ 'shape' => 'SignatureFileContents', ], 'WarningMessage' => [ 'shape' => 'WarningMessage', ], 'ArtifactList' => [ 'shape' => 'ArtifactList', ], ], ], 'CreateJobQuotaExceededException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'CreationDate' => [ 'type' => 'timestamp', ], 'CurrentManifest' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'ErrorCount' => [ 'type' => 'integer', ], 'ErrorMessage' => [ 'type' => 'string', ], 'ExpiredJobIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'GenericString' => [ 'type' => 'string', ], 'GetShippingLabelInput' => [ 'type' => 'structure', 'required' => [ 'jobIds', ], 'members' => [ 'jobIds' => [ 'shape' => 'JobIdList', ], 'name' => [ 'shape' => 'GenericString', ], 'company' => [ 'shape' => 'GenericString', ], 'phoneNumber' => [ 'shape' => 'GenericString', ], 'country' => [ 'shape' => 'GenericString', ], 'stateOrProvince' => [ 'shape' => 'GenericString', ], 'city' => [ 'shape' => 'GenericString', ], 'postalCode' => [ 'shape' => 'GenericString', ], 'street1' => [ 'shape' => 'GenericString', ], 'street2' => [ 'shape' => 'GenericString', ], 'street3' => [ 'shape' => 'GenericString', ], 'APIVersion' => [ 'shape' => 'GenericString', ], ], ], 'GetShippingLabelOutput' => [ 'type' => 'structure', 'members' => [ 'ShippingLabelURL' => [ 'shape' => 'GenericString', ], 'Warning' => [ 'shape' => 'GenericString', ], ], ], 'GetStatusInput' => [ 'type' => 'structure', 'required' => [ 'JobId', ], 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'APIVersion' => [ 'shape' => 'APIVersion', ], ], ], 'GetStatusOutput' => [ 'type' => 'structure', 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'JobType' => [ 'shape' => 'JobType', ], 'LocationCode' => [ 'shape' => 'LocationCode', ], 'LocationMessage' => [ 'shape' => 'LocationMessage', ], 'ProgressCode' => [ 'shape' => 'ProgressCode', ], 'ProgressMessage' => [ 'shape' => 'ProgressMessage', ], 'Carrier' => [ 'shape' => 'Carrier', ], 'TrackingNumber' => [ 'shape' => 'TrackingNumber', ], 'LogBucket' => [ 'shape' => 'LogBucket', ], 'LogKey' => [ 'shape' => 'LogKey', ], 'ErrorCount' => [ 'shape' => 'ErrorCount', ], 'Signature' => [ 'shape' => 'Signature', ], 'SignatureFileContents' => [ 'shape' => 'Signature', ], 'CurrentManifest' => [ 'shape' => 'CurrentManifest', ], 'CreationDate' => [ 'shape' => 'CreationDate', ], 'ArtifactList' => [ 'shape' => 'ArtifactList', ], ], ], 'InvalidAccessKeyIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidAddressException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidCustomsException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidFileSystemException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidJobIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidManifestFieldException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidParameterException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'InvalidVersionException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'IsCanceled' => [ 'type' => 'boolean', ], 'IsTruncated' => [ 'type' => 'boolean', ], 'Job' => [ 'type' => 'structure', 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'CreationDate' => [ 'shape' => 'CreationDate', ], 'IsCanceled' => [ 'shape' => 'IsCanceled', ], 'JobType' => [ 'shape' => 'JobType', ], ], ], 'JobId' => [ 'type' => 'string', ], 'JobIdList' => [ 'type' => 'list', 'member' => [ 'shape' => 'GenericString', ], ], 'JobType' => [ 'type' => 'string', 'enum' => [ 'Import', 'Export', ], ], 'JobsList' => [ 'type' => 'list', 'member' => [ 'shape' => 'Job', ], ], 'ListJobsInput' => [ 'type' => 'structure', 'members' => [ 'MaxJobs' => [ 'shape' => 'MaxJobs', ], 'Marker' => [ 'shape' => 'Marker', ], 'APIVersion' => [ 'shape' => 'APIVersion', ], ], ], 'ListJobsOutput' => [ 'type' => 'structure', 'members' => [ 'Jobs' => [ 'shape' => 'JobsList', ], 'IsTruncated' => [ 'shape' => 'IsTruncated', ], ], ], 'LocationCode' => [ 'type' => 'string', ], 'LocationMessage' => [ 'type' => 'string', ], 'LogBucket' => [ 'type' => 'string', ], 'LogKey' => [ 'type' => 'string', ], 'MalformedManifestException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'Manifest' => [ 'type' => 'string', ], 'ManifestAddendum' => [ 'type' => 'string', ], 'Marker' => [ 'type' => 'string', ], 'MaxJobs' => [ 'type' => 'integer', ], 'MissingCustomsException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'MissingManifestFieldException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'MissingParameterException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'MultipleRegionsException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'NoSuchBucketException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'ProgressCode' => [ 'type' => 'string', ], 'ProgressMessage' => [ 'type' => 'string', ], 'Signature' => [ 'type' => 'string', ], 'SignatureFileContents' => [ 'type' => 'string', ], 'Success' => [ 'type' => 'boolean', ], 'TrackingNumber' => [ 'type' => 'string', ], 'URL' => [ 'type' => 'string', ], 'UnableToCancelJobIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'UnableToUpdateJobIdException' => [ 'type' => 'structure', 'members' => [ 'message' => [ 'shape' => 'ErrorMessage', ], ], 'exception' => true, ], 'UpdateJobInput' => [ 'type' => 'structure', 'required' => [ 'JobId', 'Manifest', 'JobType', 'ValidateOnly', ], 'members' => [ 'JobId' => [ 'shape' => 'JobId', ], 'Manifest' => [ 'shape' => 'Manifest', ], 'JobType' => [ 'shape' => 'JobType', ], 'ValidateOnly' => [ 'shape' => 'ValidateOnly', ], 'APIVersion' => [ 'shape' => 'APIVersion', ], ], ], 'UpdateJobOutput' => [ 'type' => 'structure', 'members' => [ 'Success' => [ 'shape' => 'Success', ], 'WarningMessage' => [ 'shape' => 'WarningMessage', ], 'ArtifactList' => [ 'shape' => 'ArtifactList', ], ], ], 'ValidateOnly' => [ 'type' => 'boolean', ], 'WarningMessage' => [ 'type' => 'string', ], ],]; diff --git a/src/data/importexport/2010-06-01/docs-2.json b/src/data/importexport/2010-06-01/docs-2.json deleted file mode 100644 index 2504b1b..0000000 --- a/src/data/importexport/2010-06-01/docs-2.json +++ /dev/null @@ -1,431 +0,0 @@ -{ - "operations": { - "CancelJob": "This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.", - "CreateJob": "This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.", - "GetShippingLabel": "This operation returns information about a job, including where the job is in the processing pipeline, the status of the results, and the signature value associated with the job. You can only return information about jobs you own.", - "GetStatus": "This operation returns information about a job, including where the job is in the processing pipeline, the status of the results, and the signature value associated with the job. You can only return information about jobs you own.", - "ListJobs": "This operation returns the jobs associated with the requester. AWS Import/Export lists the jobs in reverse chronological order based on the date of creation. For example if Job Test1 was created 2009Dec30 and Test2 was created 2010Feb05, the ListJobs operation would return Test2 followed by Test1.", - "UpdateJob": "You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own." - }, - "service": "AWS Import/Export Service AWS Import/Export accelerates transferring large amounts of data between the AWS cloud and portable storage devices that you mail to us. AWS Import/Export transfers data directly onto and off of your storage devices using Amazon's high-speed internal network and bypassing the Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your connectivity.", - "shapes": { - "APIVersion": { - "base": "Specifies the version of the client tool.", - "refs": { - "CancelJobInput$APIVersion": null, - "CreateJobInput$APIVersion": null, - "GetStatusInput$APIVersion": null, - "ListJobsInput$APIVersion": null, - "UpdateJobInput$APIVersion": null - } - }, - "Artifact": { - "base": "A discrete item that contains the description and URL of an artifact (such as a PDF).", - "refs": { - "ArtifactList$member": null - } - }, - "ArtifactList": { - "base": "A collection of artifacts.", - "refs": { - "CreateJobOutput$ArtifactList": null, - "GetStatusOutput$ArtifactList": null, - "UpdateJobOutput$ArtifactList": null - } - }, - "BucketPermissionException": { - "base": "The account specified does not have the appropriate bucket permissions.", - "refs": { - } - }, - "CancelJobInput": { - "base": "Input structure for the CancelJob operation.", - "refs": { - } - }, - "CancelJobOutput": { - "base": "Output structure for the CancelJob operation.", - "refs": { - } - }, - "CanceledJobIdException": { - "base": "The specified job ID has been canceled and is no longer valid.", - "refs": { - } - }, - "Carrier": { - "base": "Name of the shipping company. This value is included when the LocationCode is \"Returned\".", - "refs": { - "GetStatusOutput$Carrier": null - } - }, - "CreateJobInput": { - "base": "Input structure for the CreateJob operation.", - "refs": { - } - }, - "CreateJobOutput": { - "base": "Output structure for the CreateJob operation.", - "refs": { - } - }, - "CreateJobQuotaExceededException": { - "base": "Each account can create only a certain number of jobs per day. If you need to create more than this, please contact awsimportexport@amazon.com to explain your particular use case.", - "refs": { - } - }, - "CreationDate": { - "base": "Timestamp of the CreateJob request in ISO8601 date format. For example \"2010-03-28T20:27:35Z\".", - "refs": { - "GetStatusOutput$CreationDate": null, - "Job$CreationDate": null - } - }, - "CurrentManifest": { - "base": "The last manifest submitted, which will be used to process the job.", - "refs": { - "GetStatusOutput$CurrentManifest": null - } - }, - "Description": { - "base": "The associated description for this object.", - "refs": { - "Artifact$Description": null - } - }, - "ErrorCount": { - "base": "Number of errors. We return this value when the ProgressCode is Success or SuccessWithErrors.", - "refs": { - "GetStatusOutput$ErrorCount": null - } - }, - "ErrorMessage": { - "base": "The human-readable description of a particular error.", - "refs": { - "BucketPermissionException$message": null, - "CanceledJobIdException$message": null, - "CreateJobQuotaExceededException$message": null, - "ExpiredJobIdException$message": null, - "InvalidAccessKeyIdException$message": null, - "InvalidAddressException$message": null, - "InvalidCustomsException$message": null, - "InvalidFileSystemException$message": null, - "InvalidJobIdException$message": null, - "InvalidManifestFieldException$message": null, - "InvalidParameterException$message": null, - "InvalidVersionException$message": null, - "MalformedManifestException$message": null, - "MissingCustomsException$message": null, - "MissingManifestFieldException$message": null, - "MissingParameterException$message": null, - "MultipleRegionsException$message": null, - "NoSuchBucketException$message": null, - "UnableToCancelJobIdException$message": null, - "UnableToUpdateJobIdException$message": null - } - }, - "ExpiredJobIdException": { - "base": "Indicates that the specified job has expired out of the system.", - "refs": { - } - }, - "GenericString": { - "base": null, - "refs": { - "GetShippingLabelInput$name": null, - "GetShippingLabelInput$company": null, - "GetShippingLabelInput$phoneNumber": null, - "GetShippingLabelInput$country": null, - "GetShippingLabelInput$stateOrProvince": null, - "GetShippingLabelInput$city": null, - "GetShippingLabelInput$postalCode": null, - "GetShippingLabelInput$street1": null, - "GetShippingLabelInput$street2": null, - "GetShippingLabelInput$street3": null, - "GetShippingLabelInput$APIVersion": null, - "GetShippingLabelOutput$ShippingLabelURL": null, - "GetShippingLabelOutput$Warning": null, - "JobIdList$member": null - } - }, - "GetShippingLabelInput": { - "base": null, - "refs": { - } - }, - "GetShippingLabelOutput": { - "base": null, - "refs": { - } - }, - "GetStatusInput": { - "base": "Input structure for the GetStatus operation.", - "refs": { - } - }, - "GetStatusOutput": { - "base": "Output structure for the GetStatus operation.", - "refs": { - } - }, - "InvalidAccessKeyIdException": { - "base": "The AWS Access Key ID specified in the request did not match the manifest's accessKeyId value. The manifest and the request authentication must use the same AWS Access Key ID.", - "refs": { - } - }, - "InvalidAddressException": { - "base": "The address specified in the manifest is invalid.", - "refs": { - } - }, - "InvalidCustomsException": { - "base": "One or more customs parameters was invalid. Please correct and resubmit.", - "refs": { - } - }, - "InvalidFileSystemException": { - "base": "File system specified in export manifest is invalid.", - "refs": { - } - }, - "InvalidJobIdException": { - "base": "The JOBID was missing, not found, or not associated with the AWS account.", - "refs": { - } - }, - "InvalidManifestFieldException": { - "base": "One or more manifest fields was invalid. Please correct and resubmit.", - "refs": { - } - }, - "InvalidParameterException": { - "base": "One or more parameters had an invalid value.", - "refs": { - } - }, - "InvalidVersionException": { - "base": "The client tool version is invalid.", - "refs": { - } - }, - "IsCanceled": { - "base": "Indicates whether the job was canceled.", - "refs": { - "Job$IsCanceled": null - } - }, - "IsTruncated": { - "base": "Indicates whether the list of jobs was truncated. If true, then call ListJobs again using the last JobId element as the marker.", - "refs": { - "ListJobsOutput$IsTruncated": null - } - }, - "Job": { - "base": "Representation of a job returned by the ListJobs operation.", - "refs": { - "JobsList$member": null - } - }, - "JobId": { - "base": "A unique identifier which refers to a particular job.", - "refs": { - "CancelJobInput$JobId": null, - "CreateJobOutput$JobId": null, - "GetStatusInput$JobId": null, - "GetStatusOutput$JobId": null, - "Job$JobId": null, - "UpdateJobInput$JobId": null - } - }, - "JobIdList": { - "base": null, - "refs": { - "GetShippingLabelInput$jobIds": null - } - }, - "JobType": { - "base": "Specifies whether the job to initiate is an import or export job.", - "refs": { - "CreateJobInput$JobType": null, - "CreateJobOutput$JobType": null, - "GetStatusOutput$JobType": null, - "Job$JobType": null, - "UpdateJobInput$JobType": null - } - }, - "JobsList": { - "base": "A list container for Jobs returned by the ListJobs operation.", - "refs": { - "ListJobsOutput$Jobs": null - } - }, - "ListJobsInput": { - "base": "Input structure for the ListJobs operation.", - "refs": { - } - }, - "ListJobsOutput": { - "base": "Output structure for the ListJobs operation.", - "refs": { - } - }, - "LocationCode": { - "base": "A token representing the location of the storage device, such as \"AtAWS\".", - "refs": { - "GetStatusOutput$LocationCode": null - } - }, - "LocationMessage": { - "base": "A more human readable form of the physical location of the storage device.", - "refs": { - "GetStatusOutput$LocationMessage": null - } - }, - "LogBucket": { - "base": "Amazon S3 bucket for user logs.", - "refs": { - "GetStatusOutput$LogBucket": null - } - }, - "LogKey": { - "base": "The key where the user logs were stored.", - "refs": { - "GetStatusOutput$LogKey": null - } - }, - "MalformedManifestException": { - "base": "Your manifest is not well-formed.", - "refs": { - } - }, - "Manifest": { - "base": "The UTF-8 encoded text of the manifest file.", - "refs": { - "CreateJobInput$Manifest": null, - "UpdateJobInput$Manifest": null - } - }, - "ManifestAddendum": { - "base": "For internal use only.", - "refs": { - "CreateJobInput$ManifestAddendum": null - } - }, - "Marker": { - "base": "Specifies the JOBID to start after when listing the jobs created with your account. AWS Import/Export lists your jobs in reverse chronological order. See MaxJobs.", - "refs": { - "ListJobsInput$Marker": null - } - }, - "MaxJobs": { - "base": "Sets the maximum number of jobs returned in the response. If there are additional jobs that were not returned because MaxJobs was exceeded, the response contains <IsTruncated>true</IsTruncated>. To return the additional jobs, see Marker.", - "refs": { - "ListJobsInput$MaxJobs": null - } - }, - "MissingCustomsException": { - "base": "One or more required customs parameters was missing from the manifest.", - "refs": { - } - }, - "MissingManifestFieldException": { - "base": "One or more required fields were missing from the manifest file. Please correct and resubmit.", - "refs": { - } - }, - "MissingParameterException": { - "base": "One or more required parameters was missing from the request.", - "refs": { - } - }, - "MultipleRegionsException": { - "base": "Your manifest file contained buckets from multiple regions. A job is restricted to buckets from one region. Please correct and resubmit.", - "refs": { - } - }, - "NoSuchBucketException": { - "base": "The specified bucket does not exist. Create the specified bucket or change the manifest's bucket, exportBucket, or logBucket field to a bucket that the account, as specified by the manifest's Access Key ID, has write permissions to.", - "refs": { - } - }, - "ProgressCode": { - "base": "A token representing the state of the job, such as \"Started\".", - "refs": { - "GetStatusOutput$ProgressCode": null - } - }, - "ProgressMessage": { - "base": "A more human readable form of the job status.", - "refs": { - "GetStatusOutput$ProgressMessage": null - } - }, - "Signature": { - "base": "An encrypted code used to authenticate the request and response, for example, \"DV+TpDfx1/TdSE9ktyK9k/bDTVI=\". Only use this value is you want to create the signature file yourself. Generally you should use the SignatureFileContents value.", - "refs": { - "CreateJobOutput$Signature": null, - "GetStatusOutput$Signature": null, - "GetStatusOutput$SignatureFileContents": null - } - }, - "SignatureFileContents": { - "base": "The actual text of the SIGNATURE file to be written to disk.", - "refs": { - "CreateJobOutput$SignatureFileContents": null - } - }, - "Success": { - "base": "Specifies whether (true) or not (false) AWS Import/Export updated your job.", - "refs": { - "CancelJobOutput$Success": null, - "UpdateJobOutput$Success": null - } - }, - "TrackingNumber": { - "base": "The shipping tracking number assigned by AWS Import/Export to the storage device when it's returned to you. We return this value when the LocationCode is \"Returned\".", - "refs": { - "GetStatusOutput$TrackingNumber": null - } - }, - "URL": { - "base": "The URL for a given Artifact.", - "refs": { - "Artifact$URL": null - } - }, - "UnableToCancelJobIdException": { - "base": "AWS Import/Export cannot cancel the job", - "refs": { - } - }, - "UnableToUpdateJobIdException": { - "base": "AWS Import/Export cannot update the job", - "refs": { - } - }, - "UpdateJobInput": { - "base": "Input structure for the UpateJob operation.", - "refs": { - } - }, - "UpdateJobOutput": { - "base": "Output structure for the UpateJob operation.", - "refs": { - } - }, - "ValidateOnly": { - "base": "Validate the manifest and parameter values in the request but do not actually create a job.", - "refs": { - "CreateJobInput$ValidateOnly": null, - "UpdateJobInput$ValidateOnly": null - } - }, - "WarningMessage": { - "base": "An optional message notifying you of non-fatal issues with the job, such as use of an incompatible Amazon S3 bucket name.", - "refs": { - "CreateJobOutput$WarningMessage": null, - "UpdateJobOutput$WarningMessage": null - } - } - } -} diff --git a/src/data/importexport/2010-06-01/docs-2.json.php b/src/data/importexport/2010-06-01/docs-2.json.php deleted file mode 100644 index 9941227..0000000 --- a/src/data/importexport/2010-06-01/docs-2.json.php +++ /dev/null @@ -1,3 +0,0 @@ - [ 'CancelJob' => 'This operation cancels a specified job. Only the job owner can cancel it. The operation fails if the job has already started or is complete.', 'CreateJob' => 'This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.', 'GetShippingLabel' => 'This operation returns information about a job, including where the job is in the processing pipeline, the status of the results, and the signature value associated with the job. You can only return information about jobs you own.', 'GetStatus' => 'This operation returns information about a job, including where the job is in the processing pipeline, the status of the results, and the signature value associated with the job. You can only return information about jobs you own.', 'ListJobs' => 'This operation returns the jobs associated with the requester. AWS Import/Export lists the jobs in reverse chronological order based on the date of creation. For example if Job Test1 was created 2009Dec30 and Test2 was created 2010Feb05, the ListJobs operation would return Test2 followed by Test1.', 'UpdateJob' => 'You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own.', ], 'service' => 'AWS Import/Export Service AWS Import/Export accelerates transferring large amounts of data between the AWS cloud and portable storage devices that you mail to us. AWS Import/Export transfers data directly onto and off of your storage devices using Amazon\'s high-speed internal network and bypassing the Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your connectivity.', 'shapes' => [ 'APIVersion' => [ 'base' => 'Specifies the version of the client tool.', 'refs' => [ 'CancelJobInput$APIVersion' => NULL, 'CreateJobInput$APIVersion' => NULL, 'GetStatusInput$APIVersion' => NULL, 'ListJobsInput$APIVersion' => NULL, 'UpdateJobInput$APIVersion' => NULL, ], ], 'Artifact' => [ 'base' => 'A discrete item that contains the description and URL of an artifact (such as a PDF].', 'refs' => [ 'ArtifactList$member' => NULL, ], ], 'ArtifactList' => [ 'base' => 'A collection of artifacts.', 'refs' => [ 'CreateJobOutput$ArtifactList' => NULL, 'GetStatusOutput$ArtifactList' => NULL, 'UpdateJobOutput$ArtifactList' => NULL, ], ], 'BucketPermissionException' => [ 'base' => 'The account specified does not have the appropriate bucket permissions.', 'refs' => [], ], 'CancelJobInput' => [ 'base' => 'Input structure for the CancelJob operation.', 'refs' => [], ], 'CancelJobOutput' => [ 'base' => 'Output structure for the CancelJob operation.', 'refs' => [], ], 'CanceledJobIdException' => [ 'base' => 'The specified job ID has been canceled and is no longer valid.', 'refs' => [], ], 'Carrier' => [ 'base' => 'Name of the shipping company. This value is included when the LocationCode is "Returned".', 'refs' => [ 'GetStatusOutput$Carrier' => NULL, ], ], 'CreateJobInput' => [ 'base' => 'Input structure for the CreateJob operation.', 'refs' => [], ], 'CreateJobOutput' => [ 'base' => 'Output structure for the CreateJob operation.', 'refs' => [], ], 'CreateJobQuotaExceededException' => [ 'base' => 'Each account can create only a certain number of jobs per day. If you need to create more than this, please contact awsimportexport@amazon.com to explain your particular use case.', 'refs' => [], ], 'CreationDate' => [ 'base' => 'Timestamp of the CreateJob request in ISO8601 date format. For example "2010-03-28T20:27:35Z".', 'refs' => [ 'GetStatusOutput$CreationDate' => NULL, 'Job$CreationDate' => NULL, ], ], 'CurrentManifest' => [ 'base' => 'The last manifest submitted, which will be used to process the job.', 'refs' => [ 'GetStatusOutput$CurrentManifest' => NULL, ], ], 'Description' => [ 'base' => 'The associated description for this object.', 'refs' => [ 'Artifact$Description' => NULL, ], ], 'ErrorCount' => [ 'base' => 'Number of errors. We return this value when the ProgressCode is Success or SuccessWithErrors.', 'refs' => [ 'GetStatusOutput$ErrorCount' => NULL, ], ], 'ErrorMessage' => [ 'base' => 'The human-readable description of a particular error.', 'refs' => [ 'BucketPermissionException$message' => NULL, 'CanceledJobIdException$message' => NULL, 'CreateJobQuotaExceededException$message' => NULL, 'ExpiredJobIdException$message' => NULL, 'InvalidAccessKeyIdException$message' => NULL, 'InvalidAddressException$message' => NULL, 'InvalidCustomsException$message' => NULL, 'InvalidFileSystemException$message' => NULL, 'InvalidJobIdException$message' => NULL, 'InvalidManifestFieldException$message' => NULL, 'InvalidParameterException$message' => NULL, 'InvalidVersionException$message' => NULL, 'MalformedManifestException$message' => NULL, 'MissingCustomsException$message' => NULL, 'MissingManifestFieldException$message' => NULL, 'MissingParameterException$message' => NULL, 'MultipleRegionsException$message' => NULL, 'NoSuchBucketException$message' => NULL, 'UnableToCancelJobIdException$message' => NULL, 'UnableToUpdateJobIdException$message' => NULL, ], ], 'ExpiredJobIdException' => [ 'base' => 'Indicates that the specified job has expired out of the system.', 'refs' => [], ], 'GenericString' => [ 'base' => NULL, 'refs' => [ 'GetShippingLabelInput$name' => NULL, 'GetShippingLabelInput$company' => NULL, 'GetShippingLabelInput$phoneNumber' => NULL, 'GetShippingLabelInput$country' => NULL, 'GetShippingLabelInput$stateOrProvince' => NULL, 'GetShippingLabelInput$city' => NULL, 'GetShippingLabelInput$postalCode' => NULL, 'GetShippingLabelInput$street1' => NULL, 'GetShippingLabelInput$street2' => NULL, 'GetShippingLabelInput$street3' => NULL, 'GetShippingLabelInput$APIVersion' => NULL, 'GetShippingLabelOutput$ShippingLabelURL' => NULL, 'GetShippingLabelOutput$Warning' => NULL, 'JobIdList$member' => NULL, ], ], 'GetShippingLabelInput' => [ 'base' => NULL, 'refs' => [], ], 'GetShippingLabelOutput' => [ 'base' => NULL, 'refs' => [], ], 'GetStatusInput' => [ 'base' => 'Input structure for the GetStatus operation.', 'refs' => [], ], 'GetStatusOutput' => [ 'base' => 'Output structure for the GetStatus operation.', 'refs' => [], ], 'InvalidAccessKeyIdException' => [ 'base' => 'The AWS Access Key ID specified in the request did not match the manifest\'s accessKeyId value. The manifest and the request authentication must use the same AWS Access Key ID.', 'refs' => [], ], 'InvalidAddressException' => [ 'base' => 'The address specified in the manifest is invalid.', 'refs' => [], ], 'InvalidCustomsException' => [ 'base' => 'One or more customs parameters was invalid. Please correct and resubmit.', 'refs' => [], ], 'InvalidFileSystemException' => [ 'base' => 'File system specified in export manifest is invalid.', 'refs' => [], ], 'InvalidJobIdException' => [ 'base' => 'The JOBID was missing, not found, or not associated with the AWS account.', 'refs' => [], ], 'InvalidManifestFieldException' => [ 'base' => 'One or more manifest fields was invalid. Please correct and resubmit.', 'refs' => [], ], 'InvalidParameterException' => [ 'base' => 'One or more parameters had an invalid value.', 'refs' => [], ], 'InvalidVersionException' => [ 'base' => 'The client tool version is invalid.', 'refs' => [], ], 'IsCanceled' => [ 'base' => 'Indicates whether the job was canceled.', 'refs' => [ 'Job$IsCanceled' => NULL, ], ], 'IsTruncated' => [ 'base' => 'Indicates whether the list of jobs was truncated. If true, then call ListJobs again using the last JobId element as the marker.', 'refs' => [ 'ListJobsOutput$IsTruncated' => NULL, ], ], 'Job' => [ 'base' => 'Representation of a job returned by the ListJobs operation.', 'refs' => [ 'JobsList$member' => NULL, ], ], 'JobId' => [ 'base' => 'A unique identifier which refers to a particular job.', 'refs' => [ 'CancelJobInput$JobId' => NULL, 'CreateJobOutput$JobId' => NULL, 'GetStatusInput$JobId' => NULL, 'GetStatusOutput$JobId' => NULL, 'Job$JobId' => NULL, 'UpdateJobInput$JobId' => NULL, ], ], 'JobIdList' => [ 'base' => NULL, 'refs' => [ 'GetShippingLabelInput$jobIds' => NULL, ], ], 'JobType' => [ 'base' => 'Specifies whether the job to initiate is an import or export job.', 'refs' => [ 'CreateJobInput$JobType' => NULL, 'CreateJobOutput$JobType' => NULL, 'GetStatusOutput$JobType' => NULL, 'Job$JobType' => NULL, 'UpdateJobInput$JobType' => NULL, ], ], 'JobsList' => [ 'base' => 'A list container for Jobs returned by the ListJobs operation.', 'refs' => [ 'ListJobsOutput$Jobs' => NULL, ], ], 'ListJobsInput' => [ 'base' => 'Input structure for the ListJobs operation.', 'refs' => [], ], 'ListJobsOutput' => [ 'base' => 'Output structure for the ListJobs operation.', 'refs' => [], ], 'LocationCode' => [ 'base' => 'A token representing the location of the storage device, such as "AtAWS".', 'refs' => [ 'GetStatusOutput$LocationCode' => NULL, ], ], 'LocationMessage' => [ 'base' => 'A more human readable form of the physical location of the storage device.', 'refs' => [ 'GetStatusOutput$LocationMessage' => NULL, ], ], 'LogBucket' => [ 'base' => 'Amazon S3 bucket for user logs.', 'refs' => [ 'GetStatusOutput$LogBucket' => NULL, ], ], 'LogKey' => [ 'base' => 'The key where the user logs were stored.', 'refs' => [ 'GetStatusOutput$LogKey' => NULL, ], ], 'MalformedManifestException' => [ 'base' => 'Your manifest is not well-formed.', 'refs' => [], ], 'Manifest' => [ 'base' => 'The UTF-8 encoded text of the manifest file.', 'refs' => [ 'CreateJobInput$Manifest' => NULL, 'UpdateJobInput$Manifest' => NULL, ], ], 'ManifestAddendum' => [ 'base' => 'For internal use only.', 'refs' => [ 'CreateJobInput$ManifestAddendum' => NULL, ], ], 'Marker' => [ 'base' => 'Specifies the JOBID to start after when listing the jobs created with your account. AWS Import/Export lists your jobs in reverse chronological order. See MaxJobs.', 'refs' => [ 'ListJobsInput$Marker' => NULL, ], ], 'MaxJobs' => [ 'base' => 'Sets the maximum number of jobs returned in the response. If there are additional jobs that were not returned because MaxJobs was exceeded, the response contains <IsTruncated>true</IsTruncated>. To return the additional jobs, see Marker.', 'refs' => [ 'ListJobsInput$MaxJobs' => NULL, ], ], 'MissingCustomsException' => [ 'base' => 'One or more required customs parameters was missing from the manifest.', 'refs' => [], ], 'MissingManifestFieldException' => [ 'base' => 'One or more required fields were missing from the manifest file. Please correct and resubmit.', 'refs' => [], ], 'MissingParameterException' => [ 'base' => 'One or more required parameters was missing from the request.', 'refs' => [], ], 'MultipleRegionsException' => [ 'base' => 'Your manifest file contained buckets from multiple regions. A job is restricted to buckets from one region. Please correct and resubmit.', 'refs' => [], ], 'NoSuchBucketException' => [ 'base' => 'The specified bucket does not exist. Create the specified bucket or change the manifest\'s bucket, exportBucket, or logBucket field to a bucket that the account, as specified by the manifest\'s Access Key ID, has write permissions to.', 'refs' => [], ], 'ProgressCode' => [ 'base' => 'A token representing the state of the job, such as "Started".', 'refs' => [ 'GetStatusOutput$ProgressCode' => NULL, ], ], 'ProgressMessage' => [ 'base' => 'A more human readable form of the job status.', 'refs' => [ 'GetStatusOutput$ProgressMessage' => NULL, ], ], 'Signature' => [ 'base' => 'An encrypted code used to authenticate the request and response, for example, "DV+TpDfx1/TdSE9ktyK9k/bDTVI=". Only use this value is you want to create the signature file yourself. Generally you should use the SignatureFileContents value.', 'refs' => [ 'CreateJobOutput$Signature' => NULL, 'GetStatusOutput$Signature' => NULL, 'GetStatusOutput$SignatureFileContents' => NULL, ], ], 'SignatureFileContents' => [ 'base' => 'The actual text of the SIGNATURE file to be written to disk.', 'refs' => [ 'CreateJobOutput$SignatureFileContents' => NULL, ], ], 'Success' => [ 'base' => 'Specifies whether (true] or not (false] AWS Import/Export updated your job.', 'refs' => [ 'CancelJobOutput$Success' => NULL, 'UpdateJobOutput$Success' => NULL, ], ], 'TrackingNumber' => [ 'base' => 'The shipping tracking number assigned by AWS Import/Export to the storage device when it\'s returned to you. We return this value when the LocationCode is "Returned".', 'refs' => [ 'GetStatusOutput$TrackingNumber' => NULL, ], ], 'URL' => [ 'base' => 'The URL for a given Artifact.', 'refs' => [ 'Artifact$URL' => NULL, ], ], 'UnableToCancelJobIdException' => [ 'base' => 'AWS Import/Export cannot cancel the job', 'refs' => [], ], 'UnableToUpdateJobIdException' => [ 'base' => 'AWS Import/Export cannot update the job', 'refs' => [], ], 'UpdateJobInput' => [ 'base' => 'Input structure for the UpateJob operation.', 'refs' => [], ], 'UpdateJobOutput' => [ 'base' => 'Output structure for the UpateJob operation.', 'refs' => [], ], 'ValidateOnly' => [ 'base' => 'Validate the manifest and parameter values in the request but do not actually create a job.', 'refs' => [ 'CreateJobInput$ValidateOnly' => NULL, 'UpdateJobInput$ValidateOnly' => NULL, ], ], 'WarningMessage' => [ 'base' => 'An optional message notifying you of non-fatal issues with the job, such as use of an incompatible Amazon S3 bucket name.', 'refs' => [ 'CreateJobOutput$WarningMessage' => NULL, 'UpdateJobOutput$WarningMessage' => NULL, ], ], ],]; diff --git a/src/data/importexport/2010-06-01/paginators-1.json b/src/data/importexport/2010-06-01/paginators-1.json deleted file mode 100644 index cf4d628..0000000 --- a/src/data/importexport/2010-06-01/paginators-1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "pagination": { - "ListJobs": { - "input_token": "Marker", - "output_token": "Jobs[-1].JobId", - "more_results": "IsTruncated", - "limit_key": "MaxJobs", - "result_key": "Jobs" - } - } -} diff --git a/src/data/importexport/2010-06-01/paginators-1.json.php b/src/data/importexport/2010-06-01/paginators-1.json.php deleted file mode 100644 index aed1671..0000000 --- a/src/data/importexport/2010-06-01/paginators-1.json.php +++ /dev/null @@ -1,3 +0,0 @@ - [ 'ListJobs' => [ 'input_token' => 'Marker', 'output_token' => 'Jobs[-1].JobId', 'more_results' => 'IsTruncated', 'limit_key' => 'MaxJobs', 'result_key' => 'Jobs', ], ],]; diff --git a/src/data/manifest.json b/src/data/manifest.json index ebb3510..97393d3 100644 --- a/src/data/manifest.json +++ b/src/data/manifest.json @@ -1,11 +1,4 @@ { - "importexport": { - "namespace": "ImportExport", - "versions": { - "latest": "2010-06-01", - "2010-06-01": "2010-06-01" - } - }, "sdb": { "namespace": "SimpleDb", "versions": { diff --git a/src/data/manifest.json.php b/src/data/manifest.json.php index fde418b..15b305b 100644 --- a/src/data/manifest.json.php +++ b/src/data/manifest.json.php @@ -1,3 +1,3 @@ [ 'namespace' => 'ImportExport', 'versions' => [ 'latest' => '2010-06-01', '2010-06-01' => '2010-06-01', ], ], 'sdb' => [ 'namespace' => 'SimpleDb', 'versions' => [ 'latest' => '2009-04-15', '2009-04-15' => '2009-04-15', ], ],]; +return [ 'sdb' => [ 'namespace' => 'SimpleDb', 'versions' => [ 'latest' => '2009-04-15', '2009-04-15' => '2009-04-15', ], ],]; diff --git a/src/data/sdb/2009-04-15/docs-2.json.php b/src/data/sdb/2009-04-15/docs-2.json.php index 1285129..d4a9e94 100644 --- a/src/data/sdb/2009-04-15/docs-2.json.php +++ b/src/data/sdb/2009-04-15/docs-2.json.php @@ -1,3 +1,3 @@ [ 'BatchDeleteAttributes' => '

Performs multiple DeleteAttributes operations in a single call, which reduces round trips and latencies. This enables Amazon SimpleDB to optimize requests, which generally yields better throughput.

The following limitations are enforced for this operation:

', 'BatchPutAttributes' => '

The BatchPutAttributes operation creates or replaces attributes within one or more items. By using this operation, the client can perform multiple PutAttribute operation with a single call. This helps yield savings in round trips and latencies, enabling Amazon SimpleDB to optimize requests and generally produce better throughput.

The client may specify the item name with the Item.X.ItemName parameter. The client may specify new attributes using a combination of the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value parameters. The client may specify the first attribute for the first item using the parameters Item.0.Attribute.0.Name and Item.0.Attribute.0.Value, and for the second attribute for the first item by the parameters Item.0.Attribute.1.Name and Item.0.Attribute.1.Value, and so on.

Attributes are uniquely identified within an item by their name/value combination. For example, a single item can have the attributes { "first_name", "first_value" } and { "first_name", "second_value" }. However, it cannot have two attribute instances where both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value are the same.

Optionally, the requester can supply the Replace parameter for each individual value. Setting this value to true will cause the new attribute values to replace the existing attribute values. For example, if an item I has the attributes { \'a\', \'1\' }, { \'b\', \'2\'} and { \'b\', \'3\' } and the requester does a BatchPutAttributes of {\'I\', \'b\', \'4\' } with the Replace parameter set to true, the final attributes of the item will be { \'a\', \'1\' } and { \'b\', \'4\' }, replacing the previous values of the \'b\' attribute with the new value.

This operation is vulnerable to exceeding the maximum URL size when making a REST request using the HTTP GET method. This operation does not support conditions using Expected.X.Name, Expected.X.Value, or Expected.X.Exists.

You can execute multiple BatchPutAttributes operations and other operations in parallel. However, large numbers of concurrent BatchPutAttributes calls can result in Service Unavailable (503] responses.

The following limitations are enforced for this operation:

', 'CreateDomain' => '

The CreateDomain operation creates a new domain. The domain name should be unique among the domains associated with the Access Key ID provided in the request. The CreateDomain operation may take 10 or more seconds to complete.

The client can create up to 100 domains per account.

If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/.

', 'DeleteAttributes' => '

Deletes one or more attributes associated with an item. If all attributes of the item are deleted, the item is deleted.

DeleteAttributes is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.

Because Amazon SimpleDB makes multiple copies of item data and uses an eventual consistency update model, performing a GetAttributes or Select operation (read] immediately after a DeleteAttributes or PutAttributes operation (write] might not return updated item data.

', 'DeleteDomain' => '

The DeleteDomain operation deletes a domain. Any items (and their attributes] in the domain are deleted as well. The DeleteDomain operation might take 10 or more seconds to complete.

', 'DomainMetadata' => '

Returns information about the domain, including when the domain was created, the number of items and attributes in the domain, and the size of the attribute names and values.

', 'GetAttributes' => '

Returns all of the attributes associated with the specified item. Optionally, the attributes returned can be limited to one or more attributes by specifying an attribute name parameter.

If the item does not exist on the replica that was accessed for this operation, an empty set is returned. The system does not return an error as it cannot guarantee the item does not exist on other replicas.

', 'ListDomains' => '

The ListDomains operation lists all domains associated with the Access Key ID. It returns domain names up to the limit set by MaxNumberOfDomains. A NextToken is returned if there are more than MaxNumberOfDomains domains. Calling ListDomains successive times with the NextToken provided by the operation returns up to MaxNumberOfDomains more domain names with each successive operation call.

', 'PutAttributes' => '

The PutAttributes operation creates or replaces attributes in an item. The client may specify new attributes using a combination of the Attribute.X.Name and Attribute.X.Value parameters. The client specifies the first attribute by the parameters Attribute.0.Name and Attribute.0.Value, the second attribute by the parameters Attribute.1.Name and Attribute.1.Value, and so on.

Attributes are uniquely identified in an item by their name/value combination. For example, a single item can have the attributes { "first_name", "first_value" } and { "first_name", second_value" }. However, it cannot have two attribute instances where both the Attribute.X.Name and Attribute.X.Value are the same.

Optionally, the requestor can supply the Replace parameter for each individual attribute. Setting this value to true causes the new attribute value to replace the existing attribute value(s]. For example, if an item has the attributes { \'a\', \'1\' }, { \'b\', \'2\'} and { \'b\', \'3\' } and the requestor calls PutAttributes using the attributes { \'b\', \'4\' } with the Replace parameter set to true, the final attributes of the item are changed to { \'a\', \'1\' } and { \'b\', \'4\' }, which replaces the previous values of the \'b\' attribute with the new value.

You cannot specify an empty string as an attribute name.

Because Amazon SimpleDB makes multiple copies of client data and uses an eventual consistency update model, an immediate GetAttributes or Select operation (read] immediately after a PutAttributes or DeleteAttributes operation (write] might not return the updated data.

The following limitations are enforced for this operation:

', 'Select' => '

The Select operation returns a set of attributes for ItemNames that match the select expression. Select is similar to the standard SQL SELECT statement.

The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB automatically adjusts the number of items returned per page to enforce this limit. For example, if the client asks to retrieve 2500 items, but each individual item is 10 kB in size, the system returns 100 items and an appropriate NextToken so the client can access the next page of results.

For information on how to construct select expressions, see Using Select to Create Amazon SimpleDB Queries in the Developer Guide.

', ], 'service' => 'Amazon SimpleDB is a web service providing the core database functions of data indexing and querying in the cloud. By offloading the time and effort associated with building and operating a web-scale database, SimpleDB provides developers the freedom to focus on application development.

A traditional, clustered relational database requires a sizable upfront capital outlay, is complex to design, and often requires extensive and repetitive database administration. Amazon SimpleDB is dramatically simpler, requiring no schema, automatically indexing your data and providing a simple API for storage and access. This approach eliminates the administrative burden of data modeling, index maintenance, and performance tuning. Developers gain access to this functionality within Amazon\'s proven computing environment, are able to scale instantly, and pay only for what they use.

Visit http://aws.amazon.com/simpledb/ for more information.

', 'shapes' => [ 'Attribute' => [ 'base' => '

', 'refs' => [ 'AttributeList$member' => NULL, ], ], 'AttributeDoesNotExist' => [ 'base' => '

The specified attribute does not exist.

', 'refs' => [], ], 'AttributeList' => [ 'base' => NULL, 'refs' => [ 'DeletableItem$Attributes' => NULL, 'DeleteAttributesRequest$Attributes' => 'A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.', 'GetAttributesResult$Attributes' => 'The list of attributes returned by the operation.', 'Item$Attributes' => 'A list of attributes.', ], ], 'AttributeNameList' => [ 'base' => NULL, 'refs' => [ 'GetAttributesRequest$AttributeNames' => 'The names of the attributes.', ], ], 'BatchDeleteAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'BatchPutAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'Boolean' => [ 'base' => NULL, 'refs' => [ 'GetAttributesRequest$ConsistentRead' => 'Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.', 'ReplaceableAttribute$Replace' => 'A flag specifying whether or not to replace the attribute/value pair or to add a new attribute/value pair. The default setting is false.', 'SelectRequest$ConsistentRead' => 'Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.', 'UpdateCondition$Exists' => '

A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied. Specify true if the attribute must exist for the update condition to be satisfied. Specify false if the attribute should not exist in order for the update condition to be satisfied.

', ], ], 'CreateDomainRequest' => [ 'base' => NULL, 'refs' => [], ], 'DeletableItem' => [ 'base' => NULL, 'refs' => [ 'DeletableItemList$member' => NULL, ], ], 'DeletableItemList' => [ 'base' => NULL, 'refs' => [ 'BatchDeleteAttributesRequest$Items' => 'A list of items on which to perform the operation.', ], ], 'DeleteAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'DeleteDomainRequest' => [ 'base' => NULL, 'refs' => [], ], 'DomainMetadataRequest' => [ 'base' => NULL, 'refs' => [], ], 'DomainMetadataResult' => [ 'base' => NULL, 'refs' => [], ], 'DomainNameList' => [ 'base' => NULL, 'refs' => [ 'ListDomainsResult$DomainNames' => 'A list of domain names that match the expression.', ], ], 'DuplicateItemName' => [ 'base' => '

The item name was specified more than once.

', 'refs' => [], ], 'Float' => [ 'base' => NULL, 'refs' => [ 'AttributeDoesNotExist$BoxUsage' => NULL, 'DuplicateItemName$BoxUsage' => NULL, 'InvalidNextToken$BoxUsage' => NULL, 'InvalidNumberPredicates$BoxUsage' => NULL, 'InvalidNumberValueTests$BoxUsage' => NULL, 'InvalidParameterValue$BoxUsage' => NULL, 'InvalidQueryExpression$BoxUsage' => NULL, 'MissingParameter$BoxUsage' => NULL, 'NoSuchDomain$BoxUsage' => NULL, 'NumberDomainAttributesExceeded$BoxUsage' => NULL, 'NumberDomainBytesExceeded$BoxUsage' => NULL, 'NumberDomainsExceeded$BoxUsage' => NULL, 'NumberItemAttributesExceeded$BoxUsage' => NULL, 'NumberSubmittedAttributesExceeded$BoxUsage' => NULL, 'NumberSubmittedItemsExceeded$BoxUsage' => NULL, 'RequestTimeout$BoxUsage' => NULL, 'TooManyRequestedAttributes$BoxUsage' => NULL, ], ], 'GetAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'GetAttributesResult' => [ 'base' => NULL, 'refs' => [], ], 'Integer' => [ 'base' => NULL, 'refs' => [ 'DomainMetadataResult$ItemCount' => 'The number of all items in the domain.', 'DomainMetadataResult$AttributeNameCount' => 'The number of unique attribute names in the domain.', 'DomainMetadataResult$AttributeValueCount' => 'The number of all attribute name/value pairs in the domain.', 'DomainMetadataResult$Timestamp' => 'The data and time when metadata was calculated, in Epoch (UNIX] seconds.', 'ListDomainsRequest$MaxNumberOfDomains' => 'The maximum number of domain names you want returned. The range is 1 to 100. The default setting is 100.', ], ], 'InvalidNextToken' => [ 'base' => '

The specified NextToken is not valid.

', 'refs' => [], ], 'InvalidNumberPredicates' => [ 'base' => '

Too many predicates exist in the query expression.

', 'refs' => [], ], 'InvalidNumberValueTests' => [ 'base' => '

Too many predicates exist in the query expression.

', 'refs' => [], ], 'InvalidParameterValue' => [ 'base' => '

The value for a parameter is invalid.

', 'refs' => [], ], 'InvalidQueryExpression' => [ 'base' => '

The specified query expression syntax is not valid.

', 'refs' => [], ], 'Item' => [ 'base' => '

', 'refs' => [ 'ItemList$member' => NULL, ], ], 'ItemList' => [ 'base' => NULL, 'refs' => [ 'SelectResult$Items' => 'A list of items that match the select expression.', ], ], 'ListDomainsRequest' => [ 'base' => NULL, 'refs' => [], ], 'ListDomainsResult' => [ 'base' => NULL, 'refs' => [], ], 'Long' => [ 'base' => NULL, 'refs' => [ 'DomainMetadataResult$ItemNamesSizeBytes' => 'The total size of all item names in the domain, in bytes.', 'DomainMetadataResult$AttributeNamesSizeBytes' => 'The total size of all unique attribute names in the domain, in bytes.', 'DomainMetadataResult$AttributeValuesSizeBytes' => 'The total size of all attribute values in the domain, in bytes.', ], ], 'MissingParameter' => [ 'base' => '

The request must contain the specified missing parameter.

', 'refs' => [], ], 'NoSuchDomain' => [ 'base' => '

The specified domain does not exist.

', 'refs' => [], ], 'NumberDomainAttributesExceeded' => [ 'base' => '

Too many attributes in this domain.

', 'refs' => [], ], 'NumberDomainBytesExceeded' => [ 'base' => '

Too many bytes in this domain.

', 'refs' => [], ], 'NumberDomainsExceeded' => [ 'base' => '

Too many domains exist per this account.

', 'refs' => [], ], 'NumberItemAttributesExceeded' => [ 'base' => '

Too many attributes in this item.

', 'refs' => [], ], 'NumberSubmittedAttributesExceeded' => [ 'base' => '

Too many attributes exist in a single call.

', 'refs' => [], ], 'NumberSubmittedItemsExceeded' => [ 'base' => '

Too many items exist in a single call.

', 'refs' => [], ], 'PutAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'ReplaceableAttribute' => [ 'base' => '

', 'refs' => [ 'ReplaceableAttributeList$member' => NULL, ], ], 'ReplaceableAttributeList' => [ 'base' => NULL, 'refs' => [ 'PutAttributesRequest$Attributes' => 'The list of attributes.', 'ReplaceableItem$Attributes' => 'The list of attributes for a replaceable item.', ], ], 'ReplaceableItem' => [ 'base' => '

', 'refs' => [ 'ReplaceableItemList$member' => NULL, ], ], 'ReplaceableItemList' => [ 'base' => NULL, 'refs' => [ 'BatchPutAttributesRequest$Items' => 'A list of items on which to perform the operation.', ], ], 'RequestTimeout' => [ 'base' => '

A timeout occurred when attempting to query the specified domain with specified query expression.

', 'refs' => [], ], 'SelectRequest' => [ 'base' => NULL, 'refs' => [], ], 'SelectResult' => [ 'base' => NULL, 'refs' => [], ], 'String' => [ 'base' => NULL, 'refs' => [ 'Attribute$Name' => 'The name of the attribute.', 'Attribute$AlternateNameEncoding' => '

', 'Attribute$Value' => 'The value of the attribute.', 'Attribute$AlternateValueEncoding' => '

', 'AttributeNameList$member' => NULL, 'BatchDeleteAttributesRequest$DomainName' => 'The name of the domain in which the attributes are being deleted.', 'BatchPutAttributesRequest$DomainName' => 'The name of the domain in which the attributes are being stored.', 'CreateDomainRequest$DomainName' => 'The name of the domain to create. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, \'_\', \'-\', and \'.\'.', 'DeletableItem$Name' => NULL, 'DeleteAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'DeleteAttributesRequest$ItemName' => 'The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.', 'DeleteDomainRequest$DomainName' => 'The name of the domain to delete.', 'DomainMetadataRequest$DomainName' => 'The name of the domain for which to display the metadata of.', 'DomainNameList$member' => NULL, 'GetAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'GetAttributesRequest$ItemName' => 'The name of the item.', 'Item$Name' => 'The name of the item.', 'Item$AlternateNameEncoding' => '

', 'ListDomainsRequest$NextToken' => 'A string informing Amazon SimpleDB where to start the next list of domain names.', 'ListDomainsResult$NextToken' => 'An opaque token indicating that there are more domains than the specified MaxNumberOfDomains still available.', 'PutAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'PutAttributesRequest$ItemName' => 'The name of the item.', 'ReplaceableAttribute$Name' => 'The name of the replaceable attribute.', 'ReplaceableAttribute$Value' => 'The value of the replaceable attribute.', 'ReplaceableItem$Name' => 'The name of the replaceable item.', 'SelectRequest$SelectExpression' => 'The expression used to query the domain.', 'SelectRequest$NextToken' => 'A string informing Amazon SimpleDB where to start the next list of ItemNames.', 'SelectResult$NextToken' => 'An opaque token indicating that more items than MaxNumberOfItems were matched, the response size exceeded 1 megabyte, or the execution time exceeded 5 seconds.', 'UpdateCondition$Name' => '

The name of the attribute involved in the condition.

', 'UpdateCondition$Value' => '

The value of an attribute. This value can only be specified when the Exists parameter is equal to true.

', ], ], 'TooManyRequestedAttributes' => [ 'base' => '

Too many attributes requested.

', 'refs' => [], ], 'UpdateCondition' => [ 'base' => '

Specifies the conditions under which data should be updated. If an update condition is specified for a request, the data will only be updated if the condition is satisfied. For example, if an attribute with a specific name and value exists, or if a specific attribute doesn\'t exist.

', 'refs' => [ 'DeleteAttributesRequest$Expected' => 'The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.', 'PutAttributesRequest$Expected' => 'The update condition which, if specified, determines whether the specified attributes will be updated or not. The update condition must be satisfied in order for this request to be processed and the attributes to be updated.', ], ], ],]; +return [ 'operations' => [ 'BatchDeleteAttributes' => '

Performs multiple DeleteAttributes operations in a single call, which reduces round trips and latencies. This enables Amazon SimpleDB to optimize requests, which generally yields better throughput.

The following limitations are enforced for this operation:

', 'BatchPutAttributes' => '

The BatchPutAttributes operation creates or replaces attributes within one or more items. By using this operation, the client can perform multiple PutAttribute operation with a single call. This helps yield savings in round trips and latencies, enabling Amazon SimpleDB to optimize requests and generally produce better throughput.

The client may specify the item name with the Item.X.ItemName parameter. The client may specify new attributes using a combination of the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value parameters. The client may specify the first attribute for the first item using the parameters Item.0.Attribute.0.Name and Item.0.Attribute.0.Value, and for the second attribute for the first item by the parameters Item.0.Attribute.1.Name and Item.0.Attribute.1.Value, and so on.

Attributes are uniquely identified within an item by their name/value combination. For example, a single item can have the attributes { "first_name", "first_value" } and { "first_name", "second_value" }. However, it cannot have two attribute instances where both the Item.X.Attribute.Y.Name and Item.X.Attribute.Y.Value are the same.

Optionally, the requester can supply the Replace parameter for each individual value. Setting this value to true will cause the new attribute values to replace the existing attribute values. For example, if an item I has the attributes { \'a\', \'1\' }, { \'b\', \'2\'} and { \'b\', \'3\' } and the requester does a BatchPutAttributes of {\'I\', \'b\', \'4\' } with the Replace parameter set to true, the final attributes of the item will be { \'a\', \'1\' } and { \'b\', \'4\' }, replacing the previous values of the \'b\' attribute with the new value.

This operation is vulnerable to exceeding the maximum URL size when making a REST request using the HTTP GET method. This operation does not support conditions using Expected.X.Name, Expected.X.Value, or Expected.X.Exists.

You can execute multiple BatchPutAttributes operations and other operations in parallel. However, large numbers of concurrent BatchPutAttributes calls can result in Service Unavailable (503) responses.

The following limitations are enforced for this operation:

', 'CreateDomain' => '

The CreateDomain operation creates a new domain. The domain name should be unique among the domains associated with the Access Key ID provided in the request. The CreateDomain operation may take 10 or more seconds to complete.

The client can create up to 100 domains per account.

If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/.

', 'DeleteAttributes' => '

Deletes one or more attributes associated with an item. If all attributes of the item are deleted, the item is deleted.

DeleteAttributes is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.

Because Amazon SimpleDB makes multiple copies of item data and uses an eventual consistency update model, performing a GetAttributes or Select operation (read) immediately after a DeleteAttributes or PutAttributes operation (write) might not return updated item data.

', 'DeleteDomain' => '

The DeleteDomain operation deletes a domain. Any items (and their attributes) in the domain are deleted as well. The DeleteDomain operation might take 10 or more seconds to complete.

', 'DomainMetadata' => '

Returns information about the domain, including when the domain was created, the number of items and attributes in the domain, and the size of the attribute names and values.

', 'GetAttributes' => '

Returns all of the attributes associated with the specified item. Optionally, the attributes returned can be limited to one or more attributes by specifying an attribute name parameter.

If the item does not exist on the replica that was accessed for this operation, an empty set is returned. The system does not return an error as it cannot guarantee the item does not exist on other replicas.

', 'ListDomains' => '

The ListDomains operation lists all domains associated with the Access Key ID. It returns domain names up to the limit set by MaxNumberOfDomains. A NextToken is returned if there are more than MaxNumberOfDomains domains. Calling ListDomains successive times with the NextToken provided by the operation returns up to MaxNumberOfDomains more domain names with each successive operation call.

', 'PutAttributes' => '

The PutAttributes operation creates or replaces attributes in an item. The client may specify new attributes using a combination of the Attribute.X.Name and Attribute.X.Value parameters. The client specifies the first attribute by the parameters Attribute.0.Name and Attribute.0.Value, the second attribute by the parameters Attribute.1.Name and Attribute.1.Value, and so on.

Attributes are uniquely identified in an item by their name/value combination. For example, a single item can have the attributes { "first_name", "first_value" } and { "first_name", second_value" }. However, it cannot have two attribute instances where both the Attribute.X.Name and Attribute.X.Value are the same.

Optionally, the requestor can supply the Replace parameter for each individual attribute. Setting this value to true causes the new attribute value to replace the existing attribute value(s). For example, if an item has the attributes { \'a\', \'1\' }, { \'b\', \'2\'} and { \'b\', \'3\' } and the requestor calls PutAttributes using the attributes { \'b\', \'4\' } with the Replace parameter set to true, the final attributes of the item are changed to { \'a\', \'1\' } and { \'b\', \'4\' }, which replaces the previous values of the \'b\' attribute with the new value.

You cannot specify an empty string as an attribute name.

Because Amazon SimpleDB makes multiple copies of client data and uses an eventual consistency update model, an immediate GetAttributes or Select operation (read) immediately after a PutAttributes or DeleteAttributes operation (write) might not return the updated data.

The following limitations are enforced for this operation:

', 'Select' => '

The Select operation returns a set of attributes for ItemNames that match the select expression. Select is similar to the standard SQL SELECT statement.

The total size of the response cannot exceed 1 MB in total size. Amazon SimpleDB automatically adjusts the number of items returned per page to enforce this limit. For example, if the client asks to retrieve 2500 items, but each individual item is 10 kB in size, the system returns 100 items and an appropriate NextToken so the client can access the next page of results.

For information on how to construct select expressions, see Using Select to Create Amazon SimpleDB Queries in the Developer Guide.

', ], 'service' => 'Amazon SimpleDB is a web service providing the core database functions of data indexing and querying in the cloud. By offloading the time and effort associated with building and operating a web-scale database, SimpleDB provides developers the freedom to focus on application development.

A traditional, clustered relational database requires a sizable upfront capital outlay, is complex to design, and often requires extensive and repetitive database administration. Amazon SimpleDB is dramatically simpler, requiring no schema, automatically indexing your data and providing a simple API for storage and access. This approach eliminates the administrative burden of data modeling, index maintenance, and performance tuning. Developers gain access to this functionality within Amazon\'s proven computing environment, are able to scale instantly, and pay only for what they use.

Visit http://aws.amazon.com/simpledb/ for more information.

', 'shapes' => [ 'Attribute' => [ 'base' => '

', 'refs' => [ 'AttributeList$member' => NULL, ], ], 'AttributeDoesNotExist' => [ 'base' => '

The specified attribute does not exist.

', 'refs' => [], ], 'AttributeList' => [ 'base' => NULL, 'refs' => [ 'DeletableItem$Attributes' => NULL, 'DeleteAttributesRequest$Attributes' => 'A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.', 'GetAttributesResult$Attributes' => 'The list of attributes returned by the operation.', 'Item$Attributes' => 'A list of attributes.', ], ], 'AttributeNameList' => [ 'base' => NULL, 'refs' => [ 'GetAttributesRequest$AttributeNames' => 'The names of the attributes.', ], ], 'BatchDeleteAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'BatchPutAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'Boolean' => [ 'base' => NULL, 'refs' => [ 'GetAttributesRequest$ConsistentRead' => 'Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.', 'ReplaceableAttribute$Replace' => 'A flag specifying whether or not to replace the attribute/value pair or to add a new attribute/value pair. The default setting is false.', 'SelectRequest$ConsistentRead' => 'Determines whether or not strong consistency should be enforced when data is read from SimpleDB. If true, any data previously written to SimpleDB will be returned. Otherwise, results will be consistent eventually, and the client may not see data that was written immediately before your read.', 'UpdateCondition$Exists' => '

A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied. Specify true if the attribute must exist for the update condition to be satisfied. Specify false if the attribute should not exist in order for the update condition to be satisfied.

', ], ], 'CreateDomainRequest' => [ 'base' => NULL, 'refs' => [], ], 'DeletableItem' => [ 'base' => NULL, 'refs' => [ 'DeletableItemList$member' => NULL, ], ], 'DeletableItemList' => [ 'base' => NULL, 'refs' => [ 'BatchDeleteAttributesRequest$Items' => 'A list of items on which to perform the operation.', ], ], 'DeleteAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'DeleteDomainRequest' => [ 'base' => NULL, 'refs' => [], ], 'DomainMetadataRequest' => [ 'base' => NULL, 'refs' => [], ], 'DomainMetadataResult' => [ 'base' => NULL, 'refs' => [], ], 'DomainNameList' => [ 'base' => NULL, 'refs' => [ 'ListDomainsResult$DomainNames' => 'A list of domain names that match the expression.', ], ], 'DuplicateItemName' => [ 'base' => '

The item name was specified more than once.

', 'refs' => [], ], 'Float' => [ 'base' => NULL, 'refs' => [ 'AttributeDoesNotExist$BoxUsage' => NULL, 'DuplicateItemName$BoxUsage' => NULL, 'InvalidNextToken$BoxUsage' => NULL, 'InvalidNumberPredicates$BoxUsage' => NULL, 'InvalidNumberValueTests$BoxUsage' => NULL, 'InvalidParameterValue$BoxUsage' => NULL, 'InvalidQueryExpression$BoxUsage' => NULL, 'MissingParameter$BoxUsage' => NULL, 'NoSuchDomain$BoxUsage' => NULL, 'NumberDomainAttributesExceeded$BoxUsage' => NULL, 'NumberDomainBytesExceeded$BoxUsage' => NULL, 'NumberDomainsExceeded$BoxUsage' => NULL, 'NumberItemAttributesExceeded$BoxUsage' => NULL, 'NumberSubmittedAttributesExceeded$BoxUsage' => NULL, 'NumberSubmittedItemsExceeded$BoxUsage' => NULL, 'RequestTimeout$BoxUsage' => NULL, 'TooManyRequestedAttributes$BoxUsage' => NULL, ], ], 'GetAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'GetAttributesResult' => [ 'base' => NULL, 'refs' => [], ], 'Integer' => [ 'base' => NULL, 'refs' => [ 'DomainMetadataResult$ItemCount' => 'The number of all items in the domain.', 'DomainMetadataResult$AttributeNameCount' => 'The number of unique attribute names in the domain.', 'DomainMetadataResult$AttributeValueCount' => 'The number of all attribute name/value pairs in the domain.', 'DomainMetadataResult$Timestamp' => 'The data and time when metadata was calculated, in Epoch (UNIX) seconds.', 'ListDomainsRequest$MaxNumberOfDomains' => 'The maximum number of domain names you want returned. The range is 1 to 100. The default setting is 100.', ], ], 'InvalidNextToken' => [ 'base' => '

The specified NextToken is not valid.

', 'refs' => [], ], 'InvalidNumberPredicates' => [ 'base' => '

Too many predicates exist in the query expression.

', 'refs' => [], ], 'InvalidNumberValueTests' => [ 'base' => '

Too many predicates exist in the query expression.

', 'refs' => [], ], 'InvalidParameterValue' => [ 'base' => '

The value for a parameter is invalid.

', 'refs' => [], ], 'InvalidQueryExpression' => [ 'base' => '

The specified query expression syntax is not valid.

', 'refs' => [], ], 'Item' => [ 'base' => '

', 'refs' => [ 'ItemList$member' => NULL, ], ], 'ItemList' => [ 'base' => NULL, 'refs' => [ 'SelectResult$Items' => 'A list of items that match the select expression.', ], ], 'ListDomainsRequest' => [ 'base' => NULL, 'refs' => [], ], 'ListDomainsResult' => [ 'base' => NULL, 'refs' => [], ], 'Long' => [ 'base' => NULL, 'refs' => [ 'DomainMetadataResult$ItemNamesSizeBytes' => 'The total size of all item names in the domain, in bytes.', 'DomainMetadataResult$AttributeNamesSizeBytes' => 'The total size of all unique attribute names in the domain, in bytes.', 'DomainMetadataResult$AttributeValuesSizeBytes' => 'The total size of all attribute values in the domain, in bytes.', ], ], 'MissingParameter' => [ 'base' => '

The request must contain the specified missing parameter.

', 'refs' => [], ], 'NoSuchDomain' => [ 'base' => '

The specified domain does not exist.

', 'refs' => [], ], 'NumberDomainAttributesExceeded' => [ 'base' => '

Too many attributes in this domain.

', 'refs' => [], ], 'NumberDomainBytesExceeded' => [ 'base' => '

Too many bytes in this domain.

', 'refs' => [], ], 'NumberDomainsExceeded' => [ 'base' => '

Too many domains exist per this account.

', 'refs' => [], ], 'NumberItemAttributesExceeded' => [ 'base' => '

Too many attributes in this item.

', 'refs' => [], ], 'NumberSubmittedAttributesExceeded' => [ 'base' => '

Too many attributes exist in a single call.

', 'refs' => [], ], 'NumberSubmittedItemsExceeded' => [ 'base' => '

Too many items exist in a single call.

', 'refs' => [], ], 'PutAttributesRequest' => [ 'base' => NULL, 'refs' => [], ], 'ReplaceableAttribute' => [ 'base' => '

', 'refs' => [ 'ReplaceableAttributeList$member' => NULL, ], ], 'ReplaceableAttributeList' => [ 'base' => NULL, 'refs' => [ 'PutAttributesRequest$Attributes' => 'The list of attributes.', 'ReplaceableItem$Attributes' => 'The list of attributes for a replaceable item.', ], ], 'ReplaceableItem' => [ 'base' => '

', 'refs' => [ 'ReplaceableItemList$member' => NULL, ], ], 'ReplaceableItemList' => [ 'base' => NULL, 'refs' => [ 'BatchPutAttributesRequest$Items' => 'A list of items on which to perform the operation.', ], ], 'RequestTimeout' => [ 'base' => '

A timeout occurred when attempting to query the specified domain with specified query expression.

', 'refs' => [], ], 'SelectRequest' => [ 'base' => NULL, 'refs' => [], ], 'SelectResult' => [ 'base' => NULL, 'refs' => [], ], 'String' => [ 'base' => NULL, 'refs' => [ 'Attribute$Name' => 'The name of the attribute.', 'Attribute$AlternateNameEncoding' => '

', 'Attribute$Value' => 'The value of the attribute.', 'Attribute$AlternateValueEncoding' => '

', 'AttributeNameList$member' => NULL, 'BatchDeleteAttributesRequest$DomainName' => 'The name of the domain in which the attributes are being deleted.', 'BatchPutAttributesRequest$DomainName' => 'The name of the domain in which the attributes are being stored.', 'CreateDomainRequest$DomainName' => 'The name of the domain to create. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, \'_\', \'-\', and \'.\'.', 'DeletableItem$Name' => NULL, 'DeleteAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'DeleteAttributesRequest$ItemName' => 'The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.', 'DeleteDomainRequest$DomainName' => 'The name of the domain to delete.', 'DomainMetadataRequest$DomainName' => 'The name of the domain for which to display the metadata of.', 'DomainNameList$member' => NULL, 'GetAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'GetAttributesRequest$ItemName' => 'The name of the item.', 'Item$Name' => 'The name of the item.', 'Item$AlternateNameEncoding' => '

', 'ListDomainsRequest$NextToken' => 'A string informing Amazon SimpleDB where to start the next list of domain names.', 'ListDomainsResult$NextToken' => 'An opaque token indicating that there are more domains than the specified MaxNumberOfDomains still available.', 'PutAttributesRequest$DomainName' => 'The name of the domain in which to perform the operation.', 'PutAttributesRequest$ItemName' => 'The name of the item.', 'ReplaceableAttribute$Name' => 'The name of the replaceable attribute.', 'ReplaceableAttribute$Value' => 'The value of the replaceable attribute.', 'ReplaceableItem$Name' => 'The name of the replaceable item.', 'SelectRequest$SelectExpression' => 'The expression used to query the domain.', 'SelectRequest$NextToken' => 'A string informing Amazon SimpleDB where to start the next list of ItemNames.', 'SelectResult$NextToken' => 'An opaque token indicating that more items than MaxNumberOfItems were matched, the response size exceeded 1 megabyte, or the execution time exceeded 5 seconds.', 'UpdateCondition$Name' => '

The name of the attribute involved in the condition.

', 'UpdateCondition$Value' => '

The value of an attribute. This value can only be specified when the Exists parameter is equal to true.

', ], ], 'TooManyRequestedAttributes' => [ 'base' => '

Too many attributes requested.

', 'refs' => [], ], 'UpdateCondition' => [ 'base' => '

Specifies the conditions under which data should be updated. If an update condition is specified for a request, the data will only be updated if the condition is satisfied. For example, if an attribute with a specific name and value exists, or if a specific attribute doesn\'t exist.

', 'refs' => [ 'DeleteAttributesRequest$Expected' => 'The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.', 'PutAttributesRequest$Expected' => 'The update condition which, if specified, determines whether the specified attributes will be updated or not. The update condition must be satisfied in order for this request to be processed and the attributes to be updated.', ], ], ],]; diff --git a/tests/Api/BridgeApiProviderTest.php b/tests/Api/BridgeApiProviderTest.php index 934d81d..df3dc47 100644 --- a/tests/Api/BridgeApiProviderTest.php +++ b/tests/Api/BridgeApiProviderTest.php @@ -7,6 +7,5 @@ public function testCanGetDefaultProvider() { $p = BridgeApiProvider::defaultProvider(); $this->assertArrayHasKey('sdb', $this->readAttribute($p, 'manifest')); - $this->assertArrayHasKey('importexport', $this->readAttribute($p, 'manifest')); } } From b24bdb218c09162f42e6af2cddc335569bbc28bb Mon Sep 17 00:00:00 2001 From: Jonathan Eskew Date: Fri, 20 May 2016 11:42:13 -0700 Subject: [PATCH 2/2] Update README to reflect changes --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d89f5ce..57645b0 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,9 @@ [![Apache 2 License](https://img.shields.io/packagist/l/aws/aws-sdk-php-v3-bridge.svg?style=flat)](http://aws.amazon.com/apache-2-0/) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aws/aws-sdk-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -This package provides support for using Amazon SimpleDB and Amazon Import/Export -with version 3 of the AWS SDK for PHP. It depends on the AWS SDK for PHP v3 and -allows users to construct SimpleDb and Import/Export clients as they would any -other v3 service: +This package provides support for using Amazon SimpleDB with version 3 of the +AWS SDK for PHP. It depends on the AWS SDK for PHP v3 and allows users to +construct SimpleDb clients as they would any other v3 service: ```php listDomains(); ``` -Please note that you cannot use the `Aws\Sdk` service locator with SimpleDb or -Import/Export. You must create clients using the `new` keyword. +Please note that you cannot use the `Aws\Sdk` service locator with SimpleDb. +You must create clients using the `new` keyword. ## Installation @@ -31,7 +30,7 @@ This package can be installed via [Composer](http://getcomposer.org) by requirin ```json { "require": { - "aws/aws-sdk-php-v3-bridge": "~1.0" + "aws/aws-sdk-php-v3-bridge": "^0.2.0" } } ```