File manager - Edit - /home/opticamezl/www/newok/aws-sdk-php.zip
Back
PK M�\��l��# �# LICENSE.mdnu &1i� # Apache License Version 2.0, January 2004 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ## 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. ## 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. ## 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. ## 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and 2. You must cause any modified files to carry prominent notices stating that You changed the files; and 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. ## 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. ## 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. ## 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. ## 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. ## 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS PK M�\���� � composer.jsonnu &1i� { "name": "aws/aws-sdk-php", "homepage": "http://aws.amazon.com/sdkforphp", "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", "keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"], "type": "library", "license": "Apache-2.0", "authors": [ { "name": "Amazon Web Services", "homepage": "http://aws.amazon.com" } ], "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues" }, "require": { "php": ">=5.5", "guzzlehttp/guzzle": "^5.3.1|^6.2.1", "guzzlehttp/psr7": "^1.3.1, !=1.4.0", "guzzlehttp/promises": "~1.0", "mtdowling/jmespath.php": "~2.2" }, "require-dev": { "ext-openssl": "*", "ext-pcre": "*", "ext-spl": "*", "ext-json": "*", "ext-dom": "*", "ext-simplexml": "*", "phpunit/phpunit": "~4.0|~5.0", "behat/behat": "~3.0", "doctrine/cache": "~1.4", "aws/aws-php-sns-message-validator": "~1.0", "nette/neon": "^2.3", "andrewsville/php-token-reflection": "^1.4", "psr/cache": "^1.0" }, "suggest": { "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", "ext-curl": "To send requests using cURL", "doctrine/cache": "To use the DoctrineCacheAdapter", "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications" }, "autoload": { "psr-4": { "Aws\\": "src/" }, "files": ["src/functions.php"] }, "autoload-dev": { "psr-4": { "Aws\\Test\\": "tests/" }, "classmap": ["build/"] }, "extra": { "branch-alias": { "dev-master": "3.0-dev" } } } PK M�\�"��O O .changes/3.24.0nu &1i� [ { "type": "NEW_SERVICE", "category": "WorkDocs", "description": "The Administrative SDKs for Amazon WorkDocs provides full administrator level access to WorkDocs site resources, allowing developers to integrate their applications to manage WorkDocs users, content and permissions programmatically" } ]PK M�\a8Y�= = .changes/3.23.2nu &1i� [ { "type": "NEW_FEATURE", "category": "OpsWorksCM", "description": "OpsWorks for Chef Automate has added a new field \"AssociatePublicIpAddress\" to the CreateServer request, \"CloudFormationStackArn\" to the Server model and \"TERMINATED\" server state." }, { "type": "NEW_FEATURE", "category": "Budgets", "description": "When creating or editing a budget via the AWS Budgets API you can define notifications that are sent to subscribers when the actual or forecasted value for cost or usage exceeds the notificationThreshold associated with the budget notification object. Starting today, the maximum allowed value for the notificationThreshold was raised from 100 to 300. This change was made to give you more flexibility when setting budget notifications." } ]PK M�\���k� � .changes/3.24.3nu &1i� [ { "type": "NEW_FEATURE", "category": "CloudWatchEvents", "description": "This update extends Target Data Type for configuring Target behavior during invocation." }, { "type": "NEW_FEATURE", "category": "DeviceFarm", "description": "Network shaping allows users to simulate network connections and conditions while testing their Android, iOS, and web apps with AWS Device Farm." } ]PK M�\��{ { .changes/3.22.10nu &1i� [ { "type": "NEW_FEATURE", "category": "Ec2", "description": "New EC2 I3 instance type" } ]PK M�\��#�{ { .changes/3.24.4nu &1i� [ { "type": "NEW_FEATURE", "category": "events", "description": "Update documentation" } ] PK M�\bak5 5 .changes/3.23.0nu &1i� [ { "type": "NEW_SERVICE", "category": "Organizations", "description": "AWS Organizations is a web service that enables you to consolidate your multiple AWS accounts into an organization and centrally manage your accounts and their resources." }, { "type": "NEW_FEATURE", "category": "DynamoDB", "description": "Time to Live (TTL) is a feature that allows you to define when items in a table expire and can be purged from the database, so that you don't have to track expired data and delete it manually. With TTL enabled on a DynamoDB table, you can set a timestamp for deletion on a per-item basis, allowing you to limit storage usage to only those records that are relevant." }, { "type": "NEW_FEATURE", "category": "IAM", "description": "Added support for AWS Organizations service control policies (SCPs) to SimulatePrincipalPolicy operation. If there are SCPs associated with the simulated user's account, their effect on the result is captured in the OrganizationDecisionDetail element in the EvaluationResult." }, { "type": "NEW_SERVICE", "category": "MechanicalTurkRequesterService", "description": "Amazon Mechanical Turk is a web service that provides an on-demand, scalable, human workforce to complete jobs that humans can do better than computers, for example, recognizing objects in photos." }, { "type": "NEW_FEATURE", "category": "DynamoDBStreams", "description": "Added support for TTL on a DynamoDB tables" } ]PK M�\��p( ( .changes/3.24.1nu &1i� [ { "type": "NEW_FEATURE", "category": "APIGateway", "description": "API Gateway has added support for ACM certificates on custom domain names. Both Amazon-issued certificates and uploaded third-part certificates are supported." }, { "type": "NEW_FEATURE", "category": "CloudDirectory", "description": "Introduces a new Cloud Directory API that enables you to retrieve all available parent paths for any type of object (a node, leaf node, policy node, and index node) in a hierarchy." } ]PK M�\�� � .changes/3.22.9nu &1i� [ { "type": "NEW_FEATURE", "category": "ElasticBeanstalk", "description": "Elastic Beanstalk adds support for creating and managing custom platform." }, { "type": "NEW_FEATURE", "category": "CloudDirectory", "description": "ListObjectAttributes documentation updated based on forum feedback" }, { "type": "NEW_FEATURE", "category": "Route53", "description": "Added support for operations CreateVPCAssociationAuthorization and DeleteVPCAssociationAuthorization to throw a ConcurrentModification error when a conflicting modification occurs in parallel to the authorizations in place for a given hosted zone." }, { "type": "NEW_FEATURE", "category": "GameLift", "description": "Allow developers to configure global queues for creating GameSessions. Allow PlayerData on PlayerSessions to store player-specific data." } ]PK M�\?�c� � .changes/3.22.11nu &1i� [ { "type": "NEW_FEATURE", "category": "ElasticsearchService", "description": "Added three new API calls to existing Amazon Elasticsearch service to expose Amazon Elasticsearch imposed limits to customers." } ]PK M�\���B .changes/3.23.3nu &1i� [ { "type": "NEW_FEATURE", "category": "RDS", "description": "Add support to using encrypted clusters as cross-region replication masters. Update CopyDBClusterSnapshot API to support encrypted cross region copy of Aurora cluster snapshots." } ]PK M�\ax �( ( .changes/3.24.2nu &1i� [ { "type": "NEW_FEATURE", "category": "EMR", "description": "This release includes support for instance fleets in Amazon EMR." }, { "type": "NEW_FEATURE", "category": "CodeDeploy", "description": "Add paginators for Codedeploy" } ]PK M�\���A A NOTICE.mdnu &1i� # AWS SDK for PHP <http://aws.amazon.com/php> Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at <http://aws.amazon.com/apache2.0> or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. # Guzzle <https://github.com/guzzle/guzzle> Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # jmespath.php <https://github.com/mtdowling/jmespath.php> Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK M�\��U)�s �s src/ClientResolver.phpnu &1i� <?php namespace Aws; use Aws\Api\Validator; use Aws\Api\ApiProvider; use Aws\Api\Service; use Aws\Credentials\Credentials; use Aws\Credentials\CredentialsInterface; use Aws\Endpoint\Partition; use Aws\Endpoint\PartitionEndpointProvider; use Aws\Endpoint\PartitionProviderInterface; use Aws\Signature\SignatureProvider; use Aws\Endpoint\EndpointProvider; use Aws\Credentials\CredentialProvider; use GuzzleHttp\Promise; use InvalidArgumentException as IAE; use Psr\Http\Message\RequestInterface; /** * @internal Resolves a hash of client arguments to construct a client. */ class ClientResolver { /** @var array */ private $argDefinitions; /** @var array Map of types to a corresponding function */ private static $typeMap = [ 'resource' => 'is_resource', 'callable' => 'is_callable', 'int' => 'is_int', 'bool' => 'is_bool', 'string' => 'is_string', 'object' => 'is_object', 'array' => 'is_array', ]; private static $defaultArgs = [ 'service' => [ 'type' => 'value', 'valid' => ['string'], 'doc' => 'Name of the service to utilize. This value will be supplied by default when using one of the SDK clients (e.g., Aws\\S3\\S3Client).', 'required' => true, 'internal' => true ], 'exception_class' => [ 'type' => 'value', 'valid' => ['string'], 'doc' => 'Exception class to create when an error occurs.', 'default' => 'Aws\Exception\AwsException', 'internal' => true ], 'scheme' => [ 'type' => 'value', 'valid' => ['string'], 'default' => 'https', 'doc' => 'URI scheme to use when connecting connect. The SDK will utilize "https" endpoints (i.e., utilize SSL/TLS connections) by default. You can attempt to connect to a service over an unencrypted "http" endpoint by setting ``scheme`` to "http".', ], 'endpoint' => [ 'type' => 'value', 'valid' => ['string'], 'doc' => 'The full URI of the webservice. This is only required when connecting to a custom endpoint (e.g., a local version of S3).', 'fn' => [__CLASS__, '_apply_endpoint'], ], 'region' => [ 'type' => 'value', 'valid' => ['string'], 'required' => [__CLASS__, '_missing_region'], 'doc' => 'Region to connect to. See http://docs.aws.amazon.com/general/latest/gr/rande.html for a list of available regions.', ], 'version' => [ 'type' => 'value', 'valid' => ['string'], 'required' => [__CLASS__, '_missing_version'], 'doc' => 'The version of the webservice to utilize (e.g., 2006-03-01).', ], 'signature_provider' => [ 'type' => 'value', 'valid' => ['callable'], 'doc' => 'A callable that accepts a signature version name (e.g., "v4"), a service name, and region, and returns a SignatureInterface object or null. This provider is used to create signers utilized by the client. See Aws\\Signature\\SignatureProvider for a list of built-in providers', 'default' => [__CLASS__, '_default_signature_provider'], ], 'api_provider' => [ 'type' => 'value', 'valid' => ['callable'], 'doc' => 'An optional PHP callable that accepts a type, service, and version argument, and returns an array of corresponding configuration data. The type value can be one of api, waiter, or paginator.', 'fn' => [__CLASS__, '_apply_api_provider'], 'default' => [ApiProvider::class, 'defaultProvider'], ], 'endpoint_provider' => [ 'type' => 'value', 'valid' => ['callable'], 'fn' => [__CLASS__, '_apply_endpoint_provider'], 'doc' => 'An optional PHP callable that accepts a hash of options including a "service" and "region" key and returns NULL or a hash of endpoint data, of which the "endpoint" key is required. See Aws\\Endpoint\\EndpointProvider for a list of built-in providers.', 'default' => [__CLASS__, '_default_endpoint_provider'], ], 'serializer' => [ 'default' => [__CLASS__, '_default_serializer'], 'fn' => [__CLASS__, '_apply_serializer'], 'internal' => true, 'type' => 'value', 'valid' => ['callable'], ], 'signature_version' => [ 'type' => 'config', 'valid' => ['string'], 'doc' => 'A string representing a custom signature version to use with a service (e.g., v4). Note that per/operation signature version MAY override this requested signature version.', 'default' => [__CLASS__, '_default_signature_version'], ], 'signing_name' => [ 'type' => 'config', 'valid' => ['string'], 'doc' => 'A string representing a custom service name to be used when calculating a request signature.', 'default' => [__CLASS__, '_default_signing_name'], ], 'signing_region' => [ 'type' => 'config', 'valid' => ['string'], 'doc' => 'A string representing a custom region name to be used when calculating a request signature.', 'default' => [__CLASS__, '_default_signing_region'], ], 'profile' => [ 'type' => 'config', 'valid' => ['string'], 'doc' => 'Allows you to specify which profile to use when credentials are created from the AWS credentials file in your HOME directory. This setting overrides the AWS_PROFILE environment variable. Note: Specifying "profile" will cause the "credentials" key to be ignored.', 'fn' => [__CLASS__, '_apply_profile'], ], 'credentials' => [ 'type' => 'value', 'valid' => [CredentialsInterface::class, CacheInterface::class, 'array', 'bool', 'callable'], 'doc' => 'Specifies the credentials used to sign requests. Provide an Aws\Credentials\CredentialsInterface object, an associative array of "key", "secret", and an optional "token" key, `false` to use null credentials, or a callable credentials provider used to create credentials or return null. See Aws\\Credentials\\CredentialProvider for a list of built-in credentials providers. If no credentials are provided, the SDK will attempt to load them from the environment.', 'fn' => [__CLASS__, '_apply_credentials'], 'default' => [CredentialProvider::class, 'defaultProvider'], ], 'stats' => [ 'type' => 'value', 'valid' => ['bool', 'array'], 'default' => false, 'doc' => 'Set to true to gather transfer statistics on requests sent. Alternatively, you can provide an associative array with the following keys: retries: (bool) Set to false to disable reporting on retries attempted; http: (bool) Set to true to enable collecting statistics from lower level HTTP adapters (e.g., values returned in GuzzleHttp\TransferStats). HTTP handlers must support an http_stats_receiver option for this to have an effect; timer: (bool) Set to true to enable a command timer that reports the total wall clock time spent on an operation in seconds.', 'fn' => [__CLASS__, '_apply_stats'], ], 'retries' => [ 'type' => 'value', 'valid' => ['int'], 'doc' => 'Configures the maximum number of allowed retries for a client (pass 0 to disable retries). ', 'fn' => [__CLASS__, '_apply_retries'], 'default' => 3, ], 'validate' => [ 'type' => 'value', 'valid' => ['bool', 'array'], 'default' => true, 'doc' => 'Set to false to disable client-side parameter validation. Set to true to utilize default validation constraints. Set to an associative array of validation options to enable specific validation constraints.', 'fn' => [__CLASS__, '_apply_validate'], ], 'debug' => [ 'type' => 'value', 'valid' => ['bool', 'array'], 'doc' => 'Set to true to display debug information when sending requests. Alternatively, you can provide an associative array with the following keys: logfn: (callable) Function that is invoked with log messages; stream_size: (int) When the size of a stream is greater than this number, the stream data will not be logged (set to "0" to not log any stream data); scrub_auth: (bool) Set to false to disable the scrubbing of auth data from the logged messages; http: (bool) Set to false to disable the "debug" feature of lower level HTTP adapters (e.g., verbose curl output).', 'fn' => [__CLASS__, '_apply_debug'], ], 'http' => [ 'type' => 'value', 'valid' => ['array'], 'default' => [], 'doc' => 'Set to an array of SDK request options to apply to each request (e.g., proxy, verify, etc.).', ], 'http_handler' => [ 'type' => 'value', 'valid' => ['callable'], 'doc' => 'An HTTP handler is a function that accepts a PSR-7 request object and returns a promise that is fulfilled with a PSR-7 response object or rejected with an array of exception data. NOTE: This option supersedes any provided "handler" option.', 'fn' => [__CLASS__, '_apply_http_handler'] ], 'handler' => [ 'type' => 'value', 'valid' => ['callable'], 'doc' => 'A handler that accepts a command object, request object and returns a promise that is fulfilled with an Aws\ResultInterface object or rejected with an Aws\Exception\AwsException. A handler does not accept a next handler as it is terminal and expected to fulfill a command. If no handler is provided, a default Guzzle handler will be utilized.', 'fn' => [__CLASS__, '_apply_handler'], 'default' => [__CLASS__, '_default_handler'] ], 'ua_append' => [ 'type' => 'value', 'valid' => ['string', 'array'], 'doc' => 'Provide a string or array of strings to send in the User-Agent header.', 'fn' => [__CLASS__, '_apply_user_agent'], 'default' => [], ], 'idempotency_auto_fill' => [ 'type' => 'value', 'valid' => ['bool', 'callable'], 'doc' => 'Set to false to disable SDK to populate parameters that enabled \'idempotencyToken\' trait with a random UUID v4 value on your behalf. Using default value \'true\' still allows parameter value to be overwritten when provided. Note: auto-fill only works when cryptographically secure random bytes generator functions(random_bytes, openssl_random_pseudo_bytes or mcrypt_create_iv) can be found. You may also provide a callable source of random bytes.', 'default' => true, 'fn' => [__CLASS__, '_apply_idempotency_auto_fill'] ], ]; /** * Gets an array of default client arguments, each argument containing a * hash of the following: * * - type: (string, required) option type described as follows: * - value: The default option type. * - config: The provided value is made available in the client's * getConfig() method. * - valid: (array, required) Valid PHP types or class names. Note: null * is not an allowed type. * - required: (bool, callable) Whether or not the argument is required. * Provide a function that accepts an array of arguments and returns a * string to provide a custom error message. * - default: (mixed) The default value of the argument if not provided. If * a function is provided, then it will be invoked to provide a default * value. The function is provided the array of options and is expected * to return the default value of the option. * - doc: (string) The argument documentation string. * - fn: (callable) Function used to apply the argument. The function * accepts the provided value, array of arguments by reference, and an * event emitter. * * Note: Order is honored and important when applying arguments. * * @return array */ public static function getDefaultArguments() { return self::$defaultArgs; } /** * @param array $argDefinitions Client arguments. */ public function __construct(array $argDefinitions) { $this->argDefinitions = $argDefinitions; } /** * Resolves client configuration options and attached event listeners. * * @param array $args Provided constructor arguments. * @param HandlerList $list Handler list to augment. * * @return array Returns the array of provided options. * @throws \InvalidArgumentException * @see Aws\AwsClient::__construct for a list of available options. */ public function resolve(array $args, HandlerList $list) { $args['config'] = []; foreach ($this->argDefinitions as $key => $a) { // Add defaults, validate required values, and skip if not set. if (!isset($args[$key])) { if (isset($a['default'])) { // Merge defaults in when not present. $args[$key] = is_callable($a['default']) ? $a['default']($args) : $a['default']; } elseif (empty($a['required'])) { continue; } else { $this->throwRequired($args); } } // Validate the types against the provided value. foreach ($a['valid'] as $check) { if (isset(self::$typeMap[$check])) { $fn = self::$typeMap[$check]; if ($fn($args[$key])) { goto is_valid; } } elseif ($args[$key] instanceof $check) { goto is_valid; } } $this->invalidType($key, $args[$key]); // Apply the value is_valid: if (isset($a['fn'])) { $a['fn']($args[$key], $args, $list); } if ($a['type'] === 'config') { $args['config'][$key] = $args[$key]; } } return $args; } /** * Creates a verbose error message for an invalid argument. * * @param string $name Name of the argument that is missing. * @param array $args Provided arguments * @param bool $useRequired Set to true to show the required fn text if * available instead of the documentation. * @return string */ private function getArgMessage($name, $args = [], $useRequired = false) { $arg = $this->argDefinitions[$name]; $msg = ''; $modifiers = []; if (isset($arg['valid'])) { $modifiers[] = implode('|', $arg['valid']); } if (isset($arg['choice'])) { $modifiers[] = 'One of ' . implode(', ', $arg['choice']); } if ($modifiers) { $msg .= '(' . implode('; ', $modifiers) . ')'; } $msg = wordwrap("{$name}: {$msg}", 75, "\n "); if ($useRequired && is_callable($arg['required'])) { $msg .= "\n\n "; $msg .= str_replace("\n", "\n ", call_user_func($arg['required'], $args)); } elseif (isset($arg['doc'])) { $msg .= wordwrap("\n\n {$arg['doc']}", 75, "\n "); } return $msg; } /** * Throw when an invalid type is encountered. * * @param string $name Name of the value being validated. * @param mixed $provided The provided value. * @throws \InvalidArgumentException */ private function invalidType($name, $provided) { $expected = implode('|', $this->argDefinitions[$name]['valid']); $msg = "Invalid configuration value " . "provided for \"{$name}\". Expected {$expected}, but got " . describe_type($provided) . "\n\n" . $this->getArgMessage($name); throw new IAE($msg); } /** * Throws an exception for missing required arguments. * * @param array $args Passed in arguments. * @throws \InvalidArgumentException */ private function throwRequired(array $args) { $missing = []; foreach ($this->argDefinitions as $k => $a) { if (empty($a['required']) || isset($a['default']) || array_key_exists($k, $args) ) { continue; } $missing[] = $this->getArgMessage($k, $args, true); } $msg = "Missing required client configuration options: \n\n"; $msg .= implode("\n\n", $missing); throw new IAE($msg); } public static function _apply_retries($value, array &$args, HandlerList $list) { if ($value) { $decider = RetryMiddleware::createDefaultDecider($value); $list->appendSign( Middleware::retry($decider, null, $args['stats']['retries']), 'retry' ); } } public static function _apply_credentials($value, array &$args) { if (is_callable($value)) { return; } elseif ($value instanceof CredentialsInterface) { $args['credentials'] = CredentialProvider::fromCredentials($value); } elseif (is_array($value) && isset($value['key']) && isset($value['secret']) ) { $args['credentials'] = CredentialProvider::fromCredentials( new Credentials( $value['key'], $value['secret'], isset($value['token']) ? $value['token'] : null, isset($value['expires']) ? $value['expires'] : null ) ); } elseif ($value === false) { $args['credentials'] = CredentialProvider::fromCredentials( new Credentials('', '') ); $args['config']['signature_version'] = 'anonymous'; } elseif ($value instanceof CacheInterface) { $args['credentials'] = CredentialProvider::defaultProvider($args); } else { throw new IAE('Credentials must be an instance of ' . 'Aws\Credentials\CredentialsInterface, an associative ' . 'array that contains "key", "secret", and an optional "token" ' . 'key-value pairs, a credentials provider function, or false.'); } } public static function _apply_api_provider(callable $value, array &$args) { $api = new Service( ApiProvider::resolve( $value, 'api', $args['service'], $args['version'] ), $value ); if ( empty($args['config']['signing_name']) && isset($api['metadata']['signingName']) ) { $args['config']['signing_name'] = $api['metadata']['signingName']; } $args['api'] = $api; $args['parser'] = Service::createParser($api); $args['error_parser'] = Service::createErrorParser($api->getProtocol()); } public static function _apply_endpoint_provider(callable $value, array &$args) { if (!isset($args['endpoint'])) { $endpointPrefix = isset($args['api']['metadata']['endpointPrefix']) ? $args['api']['metadata']['endpointPrefix'] : $args['service']; // Invoke the endpoint provider and throw if it does not resolve. $result = EndpointProvider::resolve($value, [ 'service' => $endpointPrefix, 'region' => $args['region'], 'scheme' => $args['scheme'] ]); $args['endpoint'] = $result['endpoint']; if ( empty($args['config']['signature_version']) && isset($result['signatureVersion']) ) { $args['config']['signature_version'] = $result['signatureVersion']; } if ( empty($args['config']['signing_region']) && isset($result['signingRegion']) ) { $args['config']['signing_region'] = $result['signingRegion']; } if ( empty($args['config']['signing_name']) && isset($result['signingName']) ) { $args['config']['signing_name'] = $result['signingName']; } } } public static function _apply_serializer($value, array &$args, HandlerList $list) { $list->prependBuild(Middleware::requestBuilder($value), 'builder'); } public static function _apply_debug($value, array &$args, HandlerList $list) { if ($value !== false) { $list->interpose(new TraceMiddleware($value === true ? [] : $value)); } } public static function _apply_stats($value, array &$args, HandlerList $list) { // Create an array of stat collectors that are disabled (set to false) // by default. If the user has passed in true, enable all stat // collectors. $defaults = array_fill_keys( ['http', 'retries', 'timer'], $value === true ); $args['stats'] = is_array($value) ? array_replace($defaults, $value) : $defaults; if ($args['stats']['timer']) { $list->prependInit(Middleware::timer(), 'timer'); } } public static function _apply_profile($_, array &$args) { $args['credentials'] = CredentialProvider::ini($args['profile']); } public static function _apply_validate($value, array &$args, HandlerList $list) { if ($value === false) { return; } $validator = $value === true ? new Validator() : new Validator($value); $list->appendValidate( Middleware::validation($args['api'], $validator), 'validation' ); } public static function _apply_handler($value, array &$args, HandlerList $list) { $list->setHandler($value); } public static function _default_handler(array &$args) { return new WrappedHttpHandler( default_http_handler(), $args['parser'], $args['error_parser'], $args['exception_class'], $args['stats']['http'] ); } public static function _apply_http_handler($value, array &$args, HandlerList $list) { $args['handler'] = new WrappedHttpHandler( $value, $args['parser'], $args['error_parser'], $args['exception_class'], $args['stats']['http'] ); } public static function _apply_user_agent($value, array &$args, HandlerList $list) { if (!is_array($value)) { $value = [$value]; } $value = array_map('strval', $value); array_unshift($value, 'aws-sdk-php/' . Sdk::VERSION); $args['ua_append'] = $value; $list->appendBuild(static function (callable $handler) use ($value) { return function ( CommandInterface $command, RequestInterface $request ) use ($handler, $value) { return $handler($command, $request->withHeader( 'User-Agent', implode(' ', array_merge( $value, $request->getHeader('User-Agent') )) )); }; }); } public static function _apply_endpoint($value, array &$args, HandlerList $list) { $parts = parse_url($value); if (empty($parts['scheme']) || empty($parts['host'])) { throw new IAE( 'Endpoints must be full URIs and include a scheme and host' ); } $args['endpoint'] = $value; } public static function _apply_idempotency_auto_fill( $value, array &$args, HandlerList $list ) { $enabled = false; $generator = null; if (is_bool($value)) { $enabled = $value; } elseif (is_callable($value)) { $enabled = true; $generator = $value; } if ($enabled) { $list->prependInit( IdempotencyTokenMiddleware::wrap($args['api'], $generator), 'idempotency_auto_fill' ); } } public static function _default_endpoint_provider(array $args) { return PartitionEndpointProvider::defaultProvider() ->getPartition($args['region'], $args['service']); } public static function _default_serializer(array $args) { return Service::createSerializer( $args['api'], $args['endpoint'] ); } public static function _default_signature_provider() { return SignatureProvider::defaultProvider(); } public static function _default_signature_version(array &$args) { if (isset($args['config']['signature_version'])) { return $args['config']['signature_version']; } $args['__partition_result'] = isset($args['__partition_result']) ? isset($args['__partition_result']) : call_user_func(PartitionEndpointProvider::defaultProvider(), [ 'service' => $args['service'], 'region' => $args['region'], ]); return isset($args['__partition_result']['signatureVersion']) ? $args['__partition_result']['signatureVersion'] : $args['api']->getSignatureVersion(); } public static function _default_signing_name(array &$args) { if (isset($args['config']['signing_name'])) { return $args['config']['signing_name']; } $args['__partition_result'] = isset($args['__partition_result']) ? isset($args['__partition_result']) : call_user_func(PartitionEndpointProvider::defaultProvider(), [ 'service' => $args['service'], 'region' => $args['region'], ]); if (isset($args['__partition_result']['signingName'])) { return $args['__partition_result']['signingName']; } if ($signingName = $args['api']->getSigningName()) { return $signingName; } return $args['service']; } public static function _default_signing_region(array &$args) { if (isset($args['config']['signing_region'])) { return $args['config']['signing_region']; } $args['__partition_result'] = isset($args['__partition_result']) ? isset($args['__partition_result']) : call_user_func(PartitionEndpointProvider::defaultProvider(), [ 'service' => $args['service'], 'region' => $args['region'], ]); return isset($args['__partition_result']['signingRegion']) ? $args['__partition_result']['signingRegion'] : $args['region']; } public static function _missing_version(array $args) { $service = isset($args['service']) ? $args['service'] : ''; $versions = ApiProvider::defaultProvider()->getVersions($service); $versions = implode("\n", array_map(function ($v) { return "* \"$v\""; }, $versions)) ?: '* (none found)'; return <<<EOT A "version" configuration value is required. Specifying a version constraint ensures that your code will not be affected by a breaking change made to the service. For example, when using Amazon S3, you can lock your API version to "2006-03-01". Your build of the SDK has the following version(s) of "{$service}": {$versions} You may provide "latest" to the "version" configuration value to utilize the most recent available API version that your client's API provider can find. Note: Using 'latest' in a production application is not recommended. A list of available API versions can be found on each client's API documentation page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are unable to load a specific API version, then you may need to update your copy of the SDK. EOT; } public static function _missing_region(array $args) { $service = isset($args['service']) ? $args['service'] : ''; return <<<EOT A "region" configuration value is required for the "{$service}" service (e.g., "us-west-2"). A list of available public regions and endpoints can be found at http://docs.aws.amazon.com/general/latest/gr/rande.html. EOT; } } PK M�\I)�� � # src/CodeCommit/CodeCommitClient.phpnu &1i� <?php namespace Aws\CodeCommit; use Aws\AwsClient; /** * This client is used to interact with the **AWS CodeCommit** service. * * @method \Aws\Result batchGetRepositories(array $args = []) * @method \GuzzleHttp\Promise\Promise batchGetRepositoriesAsync(array $args = []) * @method \Aws\Result createBranch(array $args = []) * @method \GuzzleHttp\Promise\Promise createBranchAsync(array $args = []) * @method \Aws\Result createRepository(array $args = []) * @method \GuzzleHttp\Promise\Promise createRepositoryAsync(array $args = []) * @method \Aws\Result deleteRepository(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteRepositoryAsync(array $args = []) * @method \Aws\Result getBlob(array $args = []) * @method \GuzzleHttp\Promise\Promise getBlobAsync(array $args = []) * @method \Aws\Result getBranch(array $args = []) * @method \GuzzleHttp\Promise\Promise getBranchAsync(array $args = []) * @method \Aws\Result getCommit(array $args = []) * @method \GuzzleHttp\Promise\Promise getCommitAsync(array $args = []) * @method \Aws\Result getDifferences(array $args = []) * @method \GuzzleHttp\Promise\Promise getDifferencesAsync(array $args = []) * @method \Aws\Result getRepository(array $args = []) * @method \GuzzleHttp\Promise\Promise getRepositoryAsync(array $args = []) * @method \Aws\Result getRepositoryTriggers(array $args = []) * @method \GuzzleHttp\Promise\Promise getRepositoryTriggersAsync(array $args = []) * @method \Aws\Result listBranches(array $args = []) * @method \GuzzleHttp\Promise\Promise listBranchesAsync(array $args = []) * @method \Aws\Result listRepositories(array $args = []) * @method \GuzzleHttp\Promise\Promise listRepositoriesAsync(array $args = []) * @method \Aws\Result putRepositoryTriggers(array $args = []) * @method \GuzzleHttp\Promise\Promise putRepositoryTriggersAsync(array $args = []) * @method \Aws\Result testRepositoryTriggers(array $args = []) * @method \GuzzleHttp\Promise\Promise testRepositoryTriggersAsync(array $args = []) * @method \Aws\Result updateDefaultBranch(array $args = []) * @method \GuzzleHttp\Promise\Promise updateDefaultBranchAsync(array $args = []) * @method \Aws\Result updateRepositoryDescription(array $args = []) * @method \GuzzleHttp\Promise\Promise updateRepositoryDescriptionAsync(array $args = []) * @method \Aws\Result updateRepositoryName(array $args = []) * @method \GuzzleHttp\Promise\Promise updateRepositoryNameAsync(array $args = []) */ class CodeCommitClient extends AwsClient {} PK M�\F�>� � 0 src/CodeCommit/Exception/CodeCommitException.phpnu &1i� <?php namespace Aws\CodeCommit\Exception; use Aws\Exception\AwsException; /** * Represents an error interacting with the **AWS CodeCommit** service. */ class CodeCommitException extends AwsException {} PK M�\'���� � "