Downgraded back twig/twig and aws/aws-sdk-php vendors

This commit is contained in:
TheCartpenter 2025-03-28 20:09:16 -04:00
parent fe69569d59
commit ae32ccd6a2
327 changed files with 2749 additions and 2637 deletions

136
composer.lock generated
View File

@ -62,16 +62,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.342.15", "version": "3.336.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "e4a57e4208f7cb6f100e34fb5bd88074e3412178" "reference": "dcb43c029ca74c52fa03a739341cc77086296a83"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e4a57e4208f7cb6f100e34fb5bd88074e3412178", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/dcb43c029ca74c52fa03a739341cc77086296a83",
"reference": "e4a57e4208f7cb6f100e34fb5bd88074e3412178", "reference": "dcb43c029ca74c52fa03a739341cc77086296a83",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -79,30 +79,31 @@
"ext-json": "*", "ext-json": "*",
"ext-pcre": "*", "ext-pcre": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"guzzlehttp/promises": "^2.0", "guzzlehttp/promises": "^1.4.0 || ^2.0",
"guzzlehttp/psr7": "^2.4.5", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"mtdowling/jmespath.php": "^2.8.0", "mtdowling/jmespath.php": "^2.6",
"php": ">=8.1", "php": ">=7.2.5",
"psr/http-message": "^2.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"require-dev": { "require-dev": {
"andrewsville/php-token-reflection": "^1.4", "andrewsville/php-token-reflection": "^1.4",
"aws/aws-php-sns-message-validator": "~1.0", "aws/aws-php-sns-message-validator": "~1.0",
"behat/behat": "~3.0", "behat/behat": "~3.0",
"composer/composer": "^2.7.8", "composer/composer": "^1.10.22",
"dms/phpunit-arraysubset-asserts": "^0.4.0", "dms/phpunit-arraysubset-asserts": "^0.4.0",
"doctrine/cache": "~1.4", "doctrine/cache": "~1.4",
"ext-dom": "*", "ext-dom": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-pcntl": "*", "ext-pcntl": "*",
"ext-sockets": "*", "ext-sockets": "*",
"nette/neon": "^2.3",
"paragonie/random_compat": ">= 2",
"phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5",
"psr/cache": "^2.0 || ^3.0", "psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/simple-cache": "^2.0 || ^3.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
"sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", "sebastian/comparator": "^1.2.3 || ^4.0",
"symfony/filesystem": "^v6.4.0 || ^v7.1.0", "yoast/phpunit-polyfills": "^1.0"
"yoast/phpunit-polyfills": "^2.0"
}, },
"suggest": { "suggest": {
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
@ -151,11 +152,11 @@
"sdk" "sdk"
], ],
"support": { "support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.342.15" "source": "https://github.com/aws/aws-sdk-php/tree/3.336.13"
}, },
"time": "2025-03-27T18:12:58+00:00" "time": "2025-01-10T19:04:25+00:00"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
@ -1059,24 +1060,101 @@
"time": "2024-09-09T11:45:10+00:00" "time": "2024-09-09T11:45:10+00:00"
}, },
{ {
"name": "twig/twig", "name": "symfony/polyfill-php81",
"version": "v3.20.0", "version": "v1.31.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/symfony/polyfill-php81.git",
"reference": "3468920399451a384bef53cf7996965f7cd40183" "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/3468920399451a384bef53cf7996965f7cd40183", "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"reference": "3468920399451a384bef53cf7996965f7cd40183", "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1.0", "php": ">=7.2"
},
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/polyfill",
"name": "symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "twig/twig",
"version": "v3.18.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50",
"reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50",
"shasum": ""
},
"require": {
"php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.5|^3", "symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8", "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3" "symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php81": "^1.29"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "^2.0", "phpstan/phpstan": "^2.0",
@ -1123,7 +1201,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.20.0" "source": "https://github.com/twigphp/Twig/tree/v3.18.0"
}, },
"funding": [ "funding": [
{ {
@ -1135,7 +1213,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-02-13T08:34:43+00:00" "time": "2024-12-29T10:51:50+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@ -12,23 +12,23 @@
} }
], ],
"support": { "support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues" "issues": "https://github.com/aws/aws-sdk-php/issues"
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=7.2.5",
"guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"guzzlehttp/psr7": "^2.4.5", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/promises": "^2.0", "guzzlehttp/promises": "^1.4.0 || ^2.0",
"mtdowling/jmespath.php": "^2.8.0", "mtdowling/jmespath.php": "^2.6",
"ext-pcre": "*", "ext-pcre": "*",
"ext-json": "*", "ext-json": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"aws/aws-crt-php": "^1.2.3", "aws/aws-crt-php": "^1.2.3",
"psr/http-message": "^2.0" "psr/http-message": "^1.0 || ^2.0"
}, },
"require-dev": { "require-dev": {
"composer/composer" : "^2.7.8", "composer/composer" : "^1.10.22",
"ext-openssl": "*", "ext-openssl": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-pcntl": "*", "ext-pcntl": "*",
@ -37,12 +37,13 @@
"behat/behat": "~3.0", "behat/behat": "~3.0",
"doctrine/cache": "~1.4", "doctrine/cache": "~1.4",
"aws/aws-php-sns-message-validator": "~1.0", "aws/aws-php-sns-message-validator": "~1.0",
"nette/neon": "^2.3",
"andrewsville/php-token-reflection": "^1.4", "andrewsville/php-token-reflection": "^1.4",
"psr/cache": "^2.0 || ^3.0", "psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/simple-cache": "^2.0 || ^3.0", "psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
"sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", "paragonie/random_compat": ">= 2",
"symfony/filesystem": "^v6.4.0 || ^v7.1.0", "sebastian/comparator": "^1.2.3 || ^4.0",
"yoast/phpunit-polyfills": "^2.0", "yoast/phpunit-polyfills": "^1.0",
"dms/phpunit-arraysubset-asserts": "^0.4.0" "dms/phpunit-arraysubset-asserts": "^0.4.0"
}, },
"suggest": { "suggest": {

View File

@ -41,8 +41,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getFindingRecommendationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getFindingRecommendationAsync(array $args = [])
* @method \Aws\Result getFindingV2(array $args = []) * @method \Aws\Result getFindingV2(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingV2Async(array $args = []) * @method \GuzzleHttp\Promise\Promise getFindingV2Async(array $args = [])
* @method \Aws\Result getFindingsStatistics(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingsStatisticsAsync(array $args = [])
* @method \Aws\Result getGeneratedPolicy(array $args = []) * @method \Aws\Result getGeneratedPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGeneratedPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getGeneratedPolicyAsync(array $args = [])
* @method \Aws\Result listAccessPreviewFindings(array $args = []) * @method \Aws\Result listAccessPreviewFindings(array $args = [])

View File

@ -300,6 +300,10 @@ class DecodingEventStreamIterator implements Iterator
private function unpackInt64($bytes) private function unpackInt64($bytes)
{ {
if (version_compare(PHP_VERSION, '5.6.3', '<')) {
$d = unpack('N2', $bytes);
return [1 => $d[1] << 32 | $d[2]];
}
return unpack('J', $bytes); return unpack('J', $bytes);
} }

View File

@ -30,9 +30,6 @@ abstract class RestSerializer
/** @var Uri */ /** @var Uri */
private $endpoint; private $endpoint;
/** @var bool */
private $isUseEndpointV2;
/** /**
* @param Service $api Service API description * @param Service $api Service API description
* @param string $endpoint Endpoint to connect to * @param string $endpoint Endpoint to connect to
@ -60,7 +57,6 @@ abstract class RestSerializer
$headers = isset($opts['headers']) ? $opts['headers'] : []; $headers = isset($opts['headers']) ? $opts['headers'] : [];
if ($endpoint instanceof RulesetEndpoint) { if ($endpoint instanceof RulesetEndpoint) {
$this->isUseEndpointV2 = true;
$this->setEndpointV2RequestOptions($endpoint, $headers); $this->setEndpointV2RequestOptions($endpoint, $headers);
} }
@ -200,6 +196,7 @@ abstract class RestSerializer
private function buildEndpoint(Operation $operation, array $args, array $opts) private function buildEndpoint(Operation $operation, array $args, array $opts)
{ {
$isModifiedModel = $this->api->isModifiedModel();
$serviceName = $this->api->getServiceName(); $serviceName = $this->api->getServiceName();
// Create an associative array of variable definitions used in expansions // Create an associative array of variable definitions used in expansions
$varDefinitions = $this->getVarDefinitions($operation, $args); $varDefinitions = $this->getVarDefinitions($operation, $args);
@ -229,7 +226,7 @@ abstract class RestSerializer
$path = $this->endpoint->getPath(); $path = $this->endpoint->getPath();
if ($this->isUseEndpointV2 && $serviceName === 's3') { if ($isModifiedModel && $serviceName === 's3') {
if (substr($path, -1) === '/' && $relative[0] === '/') { if (substr($path, -1) === '/' && $relative[0] === '/') {
$path = rtrim($path, '/'); $path = rtrim($path, '/');
} }
@ -247,7 +244,8 @@ abstract class RestSerializer
} }
if ((!empty($relative) && $relative !== '/') if ((!empty($relative) && $relative !== '/')
&& !$this->isUseEndpointV2 && !$isModifiedModel
&& $serviceName !== 's3'
) { ) {
$this->normalizePath($path); $this->normalizePath($path);
} }
@ -259,7 +257,7 @@ abstract class RestSerializer
//Append path to endpoint when leading '//...' //Append path to endpoint when leading '//...'
// present as uri cannot be properly resolved // present as uri cannot be properly resolved
if ($this->isUseEndpointV2 && strpos($relative, '//') === 0) { if ($isModifiedModel && strpos($relative, '//') === 0) {
return new Uri($this->endpoint . $relative); return new Uri($this->endpoint . $relative);
} }

View File

@ -30,9 +30,6 @@ class Service extends AbstractModel
/** @var boolean */ /** @var boolean */
private $modifiedModel = false; private $modifiedModel = false;
/** @var string */
private $protocol;
/** /**
* @param array $definition * @param array $definition
* @param callable $provider * @param callable $provider
@ -72,8 +69,6 @@ class Service extends AbstractModel
if (isset($definition['clientContextParams'])) { if (isset($definition['clientContextParams'])) {
$this->clientContextParams = $definition['clientContextParams']; $this->clientContextParams = $definition['clientContextParams'];
} }
$this->protocol = $this->selectProtocol($definition);
} }
/** /**
@ -246,7 +241,7 @@ class Service extends AbstractModel
*/ */
public function getProtocol() public function getProtocol()
{ {
return $this->protocol; return $this->definition['metadata']['protocol'];
} }
/** /**
@ -538,27 +533,4 @@ class Service extends AbstractModel
{ {
return $this->modifiedModel; return $this->modifiedModel;
} }
/**
* Accepts a list of protocols derived from the service model.
* Returns the highest priority compatible auth scheme if the `protocols` trait is present.
* Otherwise, returns the value of the `protocol` field, if set, or null.
*
* @param array $definition
*
* @return string|null
*/
private function selectProtocol(array $definition): string | null
{
$modeledProtocols = $definition['metadata']['protocols'] ?? null;
if (!empty($modeledProtocols)) {
foreach(SupportedProtocols::cases() as $protocol) {
if (in_array($protocol->value, $modeledProtocols)) {
return $protocol->value;
}
}
}
return $definition['metadata']['protocol'] ?? null;
}
} }

View File

@ -1,26 +0,0 @@
<?php
namespace Aws\Api;
/**
* Priority ordered collection of supported AWS protocols.
*/
enum SupportedProtocols: string
{
case JSON = 'json';
case REST_JSON = 'rest-json';
case REST_XML = 'rest-xml';
case QUERY = 'query';
case EC2 = 'ec2';
/**
* Check if a protocol is valid.
*
* @param string $protocol
* @return bool True if the protocol is supported, otherwise false.
*/
public static function isSupported(string $protocol): bool
{
return self::tryFrom($protocol) !== null;
}
}

View File

@ -7,8 +7,6 @@ use Aws\AwsClient;
* This client is used to interact with the **Amazon CloudWatch Application Signals** service. * This client is used to interact with the **Amazon CloudWatch Application Signals** service.
* @method \Aws\Result batchGetServiceLevelObjectiveBudgetReport(array $args = []) * @method \Aws\Result batchGetServiceLevelObjectiveBudgetReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetServiceLevelObjectiveBudgetReportAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchGetServiceLevelObjectiveBudgetReportAsync(array $args = [])
* @method \Aws\Result batchUpdateExclusionWindows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateExclusionWindowsAsync(array $args = [])
* @method \Aws\Result createServiceLevelObjective(array $args = []) * @method \Aws\Result createServiceLevelObjective(array $args = [])
* @method \GuzzleHttp\Promise\Promise createServiceLevelObjectiveAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createServiceLevelObjectiveAsync(array $args = [])
* @method \Aws\Result deleteServiceLevelObjective(array $args = []) * @method \Aws\Result deleteServiceLevelObjective(array $args = [])
@ -21,8 +19,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listServiceDependenciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listServiceDependenciesAsync(array $args = [])
* @method \Aws\Result listServiceDependents(array $args = []) * @method \Aws\Result listServiceDependents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceDependentsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listServiceDependentsAsync(array $args = [])
* @method \Aws\Result listServiceLevelObjectiveExclusionWindows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceLevelObjectiveExclusionWindowsAsync(array $args = [])
* @method \Aws\Result listServiceLevelObjectives(array $args = []) * @method \Aws\Result listServiceLevelObjectives(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceLevelObjectivesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listServiceLevelObjectivesAsync(array $args = [])
* @method \Aws\Result listServiceOperations(array $args = []) * @method \Aws\Result listServiceOperations(array $args = [])

View File

@ -3,8 +3,6 @@
namespace Aws\Auth; namespace Aws\Auth;
use Aws\Auth\Exception\UnresolvedAuthSchemeException; use Aws\Auth\Exception\UnresolvedAuthSchemeException;
use Aws\Exception\CredentialsException;
use Aws\Exception\TokenException;
use Aws\Identity\AwsCredentialIdentity; use Aws\Identity\AwsCredentialIdentity;
use Aws\Identity\BearerTokenIdentity; use Aws\Identity\BearerTokenIdentity;
use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Promise\PromiseInterface;
@ -144,12 +142,7 @@ class AuthSchemeResolver implements AuthSchemeResolverInterface
$result = $fn(); $result = $fn();
if ($result instanceof PromiseInterface) { if ($result instanceof PromiseInterface) {
try { return $result->wait() instanceof AwsCredentialIdentity;
$resolved = $result->wait();
return $resolved instanceof AwsCredentialIdentity;
} catch (CredentialsException $e) {
return false;
}
} }
return $result instanceof AwsCredentialIdentity; return $result instanceof AwsCredentialIdentity;
@ -165,12 +158,7 @@ class AuthSchemeResolver implements AuthSchemeResolverInterface
$result = $fn(); $result = $fn();
if ($result instanceof PromiseInterface) { if ($result instanceof PromiseInterface) {
try { return $result->wait() instanceof BearerTokenIdentity;
$resolved = $result->wait();
return $resolved instanceof BearerTokenIdentity;
} catch (TokenException $e) {
return false;
}
} }
return $result instanceof BearerTokenIdentity; return $result instanceof BearerTokenIdentity;

View File

@ -9,16 +9,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise cancelJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise cancelJobAsync(array $args = [])
* @method \Aws\Result createComputeEnvironment(array $args = []) * @method \Aws\Result createComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise createComputeEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result createConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise createConsumableResourceAsync(array $args = [])
* @method \Aws\Result createJobQueue(array $args = []) * @method \Aws\Result createJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = [])
* @method \Aws\Result createSchedulingPolicy(array $args = []) * @method \Aws\Result createSchedulingPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSchedulingPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createSchedulingPolicyAsync(array $args = [])
* @method \Aws\Result deleteComputeEnvironment(array $args = []) * @method \Aws\Result deleteComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteComputeEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteConsumableResourceAsync(array $args = [])
* @method \Aws\Result deleteJobQueue(array $args = []) * @method \Aws\Result deleteJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = [])
* @method \Aws\Result deleteSchedulingPolicy(array $args = []) * @method \Aws\Result deleteSchedulingPolicy(array $args = [])
@ -27,8 +23,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deregisterJobDefinitionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deregisterJobDefinitionAsync(array $args = [])
* @method \Aws\Result describeComputeEnvironments(array $args = []) * @method \Aws\Result describeComputeEnvironments(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeComputeEnvironmentsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeComputeEnvironmentsAsync(array $args = [])
* @method \Aws\Result describeConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeConsumableResourceAsync(array $args = [])
* @method \Aws\Result describeJobDefinitions(array $args = []) * @method \Aws\Result describeJobDefinitions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeJobDefinitionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeJobDefinitionsAsync(array $args = [])
* @method \Aws\Result describeJobQueues(array $args = []) * @method \Aws\Result describeJobQueues(array $args = [])
@ -39,12 +33,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = [])
* @method \Aws\Result getJobQueueSnapshot(array $args = []) * @method \Aws\Result getJobQueueSnapshot(array $args = [])
* @method \GuzzleHttp\Promise\Promise getJobQueueSnapshotAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getJobQueueSnapshotAsync(array $args = [])
* @method \Aws\Result listConsumableResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConsumableResourcesAsync(array $args = [])
* @method \Aws\Result listJobs(array $args = []) * @method \Aws\Result listJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
* @method \Aws\Result listJobsByConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsByConsumableResourceAsync(array $args = [])
* @method \Aws\Result listSchedulingPolicies(array $args = []) * @method \Aws\Result listSchedulingPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSchedulingPoliciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listSchedulingPoliciesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = []) * @method \Aws\Result listTagsForResource(array $args = [])
@ -61,8 +51,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateComputeEnvironment(array $args = []) * @method \Aws\Result updateComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateComputeEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result updateConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateConsumableResourceAsync(array $args = [])
* @method \Aws\Result updateJobQueue(array $args = []) * @method \Aws\Result updateJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = [])
* @method \Aws\Result updateSchedulingPolicy(array $args = []) * @method \Aws\Result updateSchedulingPolicy(array $args = [])

View File

@ -25,8 +25,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createModelImportJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createModelImportJobAsync(array $args = [])
* @method \Aws\Result createModelInvocationJob(array $args = []) * @method \Aws\Result createModelInvocationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelInvocationJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createModelInvocationJobAsync(array $args = [])
* @method \Aws\Result createPromptRouter(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPromptRouterAsync(array $args = [])
* @method \Aws\Result createProvisionedModelThroughput(array $args = []) * @method \Aws\Result createProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProvisionedModelThroughputAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result deleteCustomModel(array $args = []) * @method \Aws\Result deleteCustomModel(array $args = [])
@ -41,8 +39,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteMarketplaceModelEndpointAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteMarketplaceModelEndpointAsync(array $args = [])
* @method \Aws\Result deleteModelInvocationLoggingConfiguration(array $args = []) * @method \Aws\Result deleteModelInvocationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteModelInvocationLoggingConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteModelInvocationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result deletePromptRouter(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePromptRouterAsync(array $args = [])
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = []) * @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result deregisterMarketplaceModelEndpoint(array $args = []) * @method \Aws\Result deregisterMarketplaceModelEndpoint(array $args = [])

View File

@ -5,42 +5,20 @@ use Aws\AwsClient;
/** /**
* This client is used to interact with the **Agents for Amazon Bedrock Runtime** service. * This client is used to interact with the **Agents for Amazon Bedrock Runtime** service.
* @method \Aws\Result createInvocation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInvocationAsync(array $args = [])
* @method \Aws\Result createSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSessionAsync(array $args = [])
* @method \Aws\Result deleteAgentMemory(array $args = []) * @method \Aws\Result deleteAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAgentMemoryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAgentMemoryAsync(array $args = [])
* @method \Aws\Result deleteSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSessionAsync(array $args = [])
* @method \Aws\Result endSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise endSessionAsync(array $args = [])
* @method \Aws\Result generateQuery(array $args = []) * @method \Aws\Result generateQuery(array $args = [])
* @method \GuzzleHttp\Promise\Promise generateQueryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise generateQueryAsync(array $args = [])
* @method \Aws\Result getAgentMemory(array $args = []) * @method \Aws\Result getAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAgentMemoryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAgentMemoryAsync(array $args = [])
* @method \Aws\Result getInvocationStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvocationStepAsync(array $args = [])
* @method \Aws\Result getSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionAsync(array $args = [])
* @method \Aws\Result invokeAgent(array $args = []) * @method \Aws\Result invokeAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeAgentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise invokeAgentAsync(array $args = [])
* @method \Aws\Result invokeFlow(array $args = []) * @method \Aws\Result invokeFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeFlowAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise invokeFlowAsync(array $args = [])
* @method \Aws\Result invokeInlineAgent(array $args = []) * @method \Aws\Result invokeInlineAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeInlineAgentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise invokeInlineAgentAsync(array $args = [])
* @method \Aws\Result listInvocationSteps(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvocationStepsAsync(array $args = [])
* @method \Aws\Result listInvocations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvocationsAsync(array $args = [])
* @method \Aws\Result listSessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result optimizePrompt(array $args = []) * @method \Aws\Result optimizePrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise optimizePromptAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise optimizePromptAsync(array $args = [])
* @method \Aws\Result putInvocationStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise putInvocationStepAsync(array $args = [])
* @method \Aws\Result rerank(array $args = []) * @method \Aws\Result rerank(array $args = [])
* @method \GuzzleHttp\Promise\Promise rerankAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise rerankAsync(array $args = [])
* @method \Aws\Result retrieve(array $args = []) * @method \Aws\Result retrieve(array $args = [])
@ -49,11 +27,5 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise retrieveAndGenerateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise retrieveAndGenerateAsync(array $args = [])
* @method \Aws\Result retrieveAndGenerateStream(array $args = []) * @method \Aws\Result retrieveAndGenerateStream(array $args = [])
* @method \GuzzleHttp\Promise\Promise retrieveAndGenerateStreamAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise retrieveAndGenerateStreamAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSessionAsync(array $args = [])
*/ */
class BedrockAgentRuntimeClient extends AwsClient {} class BedrockAgentRuntimeClient extends AwsClient {}

View File

@ -23,12 +23,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listBlueprintsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listBlueprintsAsync(array $args = [])
* @method \Aws\Result listDataAutomationProjects(array $args = []) * @method \Aws\Result listDataAutomationProjects(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDataAutomationProjectsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listDataAutomationProjectsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateBlueprint(array $args = []) * @method \Aws\Result updateBlueprint(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBlueprintAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateBlueprintAsync(array $args = [])
* @method \Aws\Result updateDataAutomationProject(array $args = []) * @method \Aws\Result updateDataAutomationProject(array $args = [])

View File

@ -9,11 +9,5 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getDataAutomationStatusAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getDataAutomationStatusAsync(array $args = [])
* @method \Aws\Result invokeDataAutomationAsync(array $args = []) * @method \Aws\Result invokeDataAutomationAsync(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeDataAutomationAsyncAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise invokeDataAutomationAsyncAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
*/ */
class BedrockDataAutomationRuntimeClient extends AwsClient {} class BedrockDataAutomationRuntimeClient extends AwsClient {}

View File

@ -7,8 +7,16 @@ use Aws\AwsClient;
* This client is used to interact with the **Amazon Chime** service. * This client is used to interact with the **Amazon Chime** service.
* @method \Aws\Result associatePhoneNumberWithUser(array $args = []) * @method \Aws\Result associatePhoneNumberWithUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise associatePhoneNumberWithUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise associatePhoneNumberWithUserAsync(array $args = [])
* @method \Aws\Result associatePhoneNumbersWithVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise associatePhoneNumbersWithVoiceConnectorAsync(array $args = [])
* @method \Aws\Result associatePhoneNumbersWithVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise associatePhoneNumbersWithVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result associateSigninDelegateGroupsWithAccount(array $args = []) * @method \Aws\Result associateSigninDelegateGroupsWithAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateSigninDelegateGroupsWithAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise associateSigninDelegateGroupsWithAccountAsync(array $args = [])
* @method \Aws\Result batchCreateAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateAttendeeAsync(array $args = [])
* @method \Aws\Result batchCreateChannelMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateChannelMembershipAsync(array $args = [])
* @method \Aws\Result batchCreateRoomMembership(array $args = []) * @method \Aws\Result batchCreateRoomMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateRoomMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchCreateRoomMembershipAsync(array $args = [])
* @method \Aws\Result batchDeletePhoneNumber(array $args = []) * @method \Aws\Result batchDeletePhoneNumber(array $args = [])
@ -23,80 +31,288 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise batchUpdateUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchUpdateUserAsync(array $args = [])
* @method \Aws\Result createAccount(array $args = []) * @method \Aws\Result createAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createAccountAsync(array $args = [])
* @method \Aws\Result createAppInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAppInstanceAsync(array $args = [])
* @method \Aws\Result createAppInstanceAdmin(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAppInstanceAdminAsync(array $args = [])
* @method \Aws\Result createAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAppInstanceUserAsync(array $args = [])
* @method \Aws\Result createAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAttendeeAsync(array $args = [])
* @method \Aws\Result createBot(array $args = []) * @method \Aws\Result createBot(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBotAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createBotAsync(array $args = [])
* @method \Aws\Result createChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createChannelAsync(array $args = [])
* @method \Aws\Result createChannelBan(array $args = [])
* @method \GuzzleHttp\Promise\Promise createChannelBanAsync(array $args = [])
* @method \Aws\Result createChannelMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise createChannelMembershipAsync(array $args = [])
* @method \Aws\Result createChannelModerator(array $args = [])
* @method \GuzzleHttp\Promise\Promise createChannelModeratorAsync(array $args = [])
* @method \Aws\Result createMediaCapturePipeline(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMediaCapturePipelineAsync(array $args = [])
* @method \Aws\Result createMeeting(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMeetingAsync(array $args = [])
* @method \Aws\Result createMeetingDialOut(array $args = []) * @method \Aws\Result createMeetingDialOut(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMeetingDialOutAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createMeetingDialOutAsync(array $args = [])
* @method \Aws\Result createMeetingWithAttendees(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMeetingWithAttendeesAsync(array $args = [])
* @method \Aws\Result createPhoneNumberOrder(array $args = []) * @method \Aws\Result createPhoneNumberOrder(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPhoneNumberOrderAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createPhoneNumberOrderAsync(array $args = [])
* @method \Aws\Result createProxySession(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProxySessionAsync(array $args = [])
* @method \Aws\Result createRoom(array $args = []) * @method \Aws\Result createRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = [])
* @method \Aws\Result createRoomMembership(array $args = []) * @method \Aws\Result createRoomMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRoomMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createRoomMembershipAsync(array $args = [])
* @method \Aws\Result createSipMediaApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSipMediaApplicationAsync(array $args = [])
* @method \Aws\Result createSipMediaApplicationCall(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSipMediaApplicationCallAsync(array $args = [])
* @method \Aws\Result createSipRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSipRuleAsync(array $args = [])
* @method \Aws\Result createUser(array $args = []) * @method \Aws\Result createUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
* @method \Aws\Result createVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise createVoiceConnectorAsync(array $args = [])
* @method \Aws\Result createVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result deleteAccount(array $args = []) * @method \Aws\Result deleteAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAccountAsync(array $args = [])
* @method \Aws\Result deleteAppInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAppInstanceAsync(array $args = [])
* @method \Aws\Result deleteAppInstanceAdmin(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAppInstanceAdminAsync(array $args = [])
* @method \Aws\Result deleteAppInstanceStreamingConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAppInstanceStreamingConfigurationsAsync(array $args = [])
* @method \Aws\Result deleteAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAppInstanceUserAsync(array $args = [])
* @method \Aws\Result deleteAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAttendeeAsync(array $args = [])
* @method \Aws\Result deleteChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelAsync(array $args = [])
* @method \Aws\Result deleteChannelBan(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelBanAsync(array $args = [])
* @method \Aws\Result deleteChannelMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelMembershipAsync(array $args = [])
* @method \Aws\Result deleteChannelMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelMessageAsync(array $args = [])
* @method \Aws\Result deleteChannelModerator(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelModeratorAsync(array $args = [])
* @method \Aws\Result deleteEventsConfiguration(array $args = []) * @method \Aws\Result deleteEventsConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEventsConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteEventsConfigurationAsync(array $args = [])
* @method \Aws\Result deleteMediaCapturePipeline(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMediaCapturePipelineAsync(array $args = [])
* @method \Aws\Result deleteMeeting(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMeetingAsync(array $args = [])
* @method \Aws\Result deletePhoneNumber(array $args = []) * @method \Aws\Result deletePhoneNumber(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePhoneNumberAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deletePhoneNumberAsync(array $args = [])
* @method \Aws\Result deleteProxySession(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProxySessionAsync(array $args = [])
* @method \Aws\Result deleteRoom(array $args = []) * @method \Aws\Result deleteRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = [])
* @method \Aws\Result deleteRoomMembership(array $args = []) * @method \Aws\Result deleteRoomMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRoomMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteRoomMembershipAsync(array $args = [])
* @method \Aws\Result deleteSipMediaApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSipMediaApplicationAsync(array $args = [])
* @method \Aws\Result deleteSipRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSipRuleAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorEmergencyCallingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorEmergencyCallingConfigurationAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorOrigination(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorOriginationAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorProxy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorProxyAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorStreamingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorStreamingConfigurationAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorTermination(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorTerminationAsync(array $args = [])
* @method \Aws\Result deleteVoiceConnectorTerminationCredentials(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVoiceConnectorTerminationCredentialsAsync(array $args = [])
* @method \Aws\Result describeAppInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAppInstanceAsync(array $args = [])
* @method \Aws\Result describeAppInstanceAdmin(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAppInstanceAdminAsync(array $args = [])
* @method \Aws\Result describeAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAppInstanceUserAsync(array $args = [])
* @method \Aws\Result describeChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelAsync(array $args = [])
* @method \Aws\Result describeChannelBan(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelBanAsync(array $args = [])
* @method \Aws\Result describeChannelMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelMembershipAsync(array $args = [])
* @method \Aws\Result describeChannelMembershipForAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelMembershipForAppInstanceUserAsync(array $args = [])
* @method \Aws\Result describeChannelModeratedByAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelModeratedByAppInstanceUserAsync(array $args = [])
* @method \Aws\Result describeChannelModerator(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeChannelModeratorAsync(array $args = [])
* @method \Aws\Result disassociatePhoneNumberFromUser(array $args = []) * @method \Aws\Result disassociatePhoneNumberFromUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociatePhoneNumberFromUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disassociatePhoneNumberFromUserAsync(array $args = [])
* @method \Aws\Result disassociatePhoneNumbersFromVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociatePhoneNumbersFromVoiceConnectorAsync(array $args = [])
* @method \Aws\Result disassociatePhoneNumbersFromVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociatePhoneNumbersFromVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result disassociateSigninDelegateGroupsFromAccount(array $args = []) * @method \Aws\Result disassociateSigninDelegateGroupsFromAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateSigninDelegateGroupsFromAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disassociateSigninDelegateGroupsFromAccountAsync(array $args = [])
* @method \Aws\Result getAccount(array $args = []) * @method \Aws\Result getAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAccountAsync(array $args = [])
* @method \Aws\Result getAccountSettings(array $args = []) * @method \Aws\Result getAccountSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
* @method \Aws\Result getAppInstanceRetentionSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAppInstanceRetentionSettingsAsync(array $args = [])
* @method \Aws\Result getAppInstanceStreamingConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAppInstanceStreamingConfigurationsAsync(array $args = [])
* @method \Aws\Result getAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAttendeeAsync(array $args = [])
* @method \Aws\Result getBot(array $args = []) * @method \Aws\Result getBot(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBotAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getBotAsync(array $args = [])
* @method \Aws\Result getChannelMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise getChannelMessageAsync(array $args = [])
* @method \Aws\Result getEventsConfiguration(array $args = []) * @method \Aws\Result getEventsConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEventsConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getEventsConfigurationAsync(array $args = [])
* @method \Aws\Result getGlobalSettings(array $args = []) * @method \Aws\Result getGlobalSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGlobalSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getGlobalSettingsAsync(array $args = [])
* @method \Aws\Result getMediaCapturePipeline(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMediaCapturePipelineAsync(array $args = [])
* @method \Aws\Result getMeeting(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMeetingAsync(array $args = [])
* @method \Aws\Result getMessagingSessionEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMessagingSessionEndpointAsync(array $args = [])
* @method \Aws\Result getPhoneNumber(array $args = []) * @method \Aws\Result getPhoneNumber(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPhoneNumberAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getPhoneNumberAsync(array $args = [])
* @method \Aws\Result getPhoneNumberOrder(array $args = []) * @method \Aws\Result getPhoneNumberOrder(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPhoneNumberOrderAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getPhoneNumberOrderAsync(array $args = [])
* @method \Aws\Result getPhoneNumberSettings(array $args = []) * @method \Aws\Result getPhoneNumberSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPhoneNumberSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getPhoneNumberSettingsAsync(array $args = [])
* @method \Aws\Result getProxySession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProxySessionAsync(array $args = [])
* @method \Aws\Result getRetentionSettings(array $args = []) * @method \Aws\Result getRetentionSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRetentionSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getRetentionSettingsAsync(array $args = [])
* @method \Aws\Result getRoom(array $args = []) * @method \Aws\Result getRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRoomAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getRoomAsync(array $args = [])
* @method \Aws\Result getSipMediaApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSipMediaApplicationAsync(array $args = [])
* @method \Aws\Result getSipMediaApplicationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSipMediaApplicationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result getSipRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSipRuleAsync(array $args = [])
* @method \Aws\Result getUser(array $args = []) * @method \Aws\Result getUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getUserAsync(array $args = [])
* @method \Aws\Result getUserSettings(array $args = []) * @method \Aws\Result getUserSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getUserSettingsAsync(array $args = [])
* @method \Aws\Result getVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorEmergencyCallingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorEmergencyCallingConfigurationAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorOrigination(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorOriginationAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorProxy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorProxyAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorStreamingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorStreamingConfigurationAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorTermination(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorTerminationAsync(array $args = [])
* @method \Aws\Result getVoiceConnectorTerminationHealth(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVoiceConnectorTerminationHealthAsync(array $args = [])
* @method \Aws\Result inviteUsers(array $args = []) * @method \Aws\Result inviteUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise inviteUsersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise inviteUsersAsync(array $args = [])
* @method \Aws\Result listAccounts(array $args = []) * @method \Aws\Result listAccounts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAccountsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAccountsAsync(array $args = [])
* @method \Aws\Result listAppInstanceAdmins(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAppInstanceAdminsAsync(array $args = [])
* @method \Aws\Result listAppInstanceUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAppInstanceUsersAsync(array $args = [])
* @method \Aws\Result listAppInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAppInstancesAsync(array $args = [])
* @method \Aws\Result listAttendeeTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAttendeeTagsAsync(array $args = [])
* @method \Aws\Result listAttendees(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAttendeesAsync(array $args = [])
* @method \Aws\Result listBots(array $args = []) * @method \Aws\Result listBots(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBotsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listBotsAsync(array $args = [])
* @method \Aws\Result listChannelBans(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelBansAsync(array $args = [])
* @method \Aws\Result listChannelMemberships(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelMembershipsAsync(array $args = [])
* @method \Aws\Result listChannelMembershipsForAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelMembershipsForAppInstanceUserAsync(array $args = [])
* @method \Aws\Result listChannelMessages(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelMessagesAsync(array $args = [])
* @method \Aws\Result listChannelModerators(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelModeratorsAsync(array $args = [])
* @method \Aws\Result listChannels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelsAsync(array $args = [])
* @method \Aws\Result listChannelsModeratedByAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelsModeratedByAppInstanceUserAsync(array $args = [])
* @method \Aws\Result listMediaCapturePipelines(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMediaCapturePipelinesAsync(array $args = [])
* @method \Aws\Result listMeetingTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMeetingTagsAsync(array $args = [])
* @method \Aws\Result listMeetings(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMeetingsAsync(array $args = [])
* @method \Aws\Result listPhoneNumberOrders(array $args = []) * @method \Aws\Result listPhoneNumberOrders(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPhoneNumberOrdersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listPhoneNumberOrdersAsync(array $args = [])
* @method \Aws\Result listPhoneNumbers(array $args = []) * @method \Aws\Result listPhoneNumbers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPhoneNumbersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listPhoneNumbersAsync(array $args = [])
* @method \Aws\Result listProxySessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listProxySessionsAsync(array $args = [])
* @method \Aws\Result listRoomMemberships(array $args = []) * @method \Aws\Result listRoomMemberships(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRoomMembershipsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRoomMembershipsAsync(array $args = [])
* @method \Aws\Result listRooms(array $args = []) * @method \Aws\Result listRooms(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRoomsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRoomsAsync(array $args = [])
* @method \Aws\Result listSipMediaApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSipMediaApplicationsAsync(array $args = [])
* @method \Aws\Result listSipRules(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSipRulesAsync(array $args = [])
* @method \Aws\Result listSupportedPhoneNumberCountries(array $args = []) * @method \Aws\Result listSupportedPhoneNumberCountries(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSupportedPhoneNumberCountriesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listSupportedPhoneNumberCountriesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listUsers(array $args = []) * @method \Aws\Result listUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
* @method \Aws\Result listVoiceConnectorGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listVoiceConnectorGroupsAsync(array $args = [])
* @method \Aws\Result listVoiceConnectorTerminationCredentials(array $args = [])
* @method \GuzzleHttp\Promise\Promise listVoiceConnectorTerminationCredentialsAsync(array $args = [])
* @method \Aws\Result listVoiceConnectors(array $args = [])
* @method \GuzzleHttp\Promise\Promise listVoiceConnectorsAsync(array $args = [])
* @method \Aws\Result logoutUser(array $args = []) * @method \Aws\Result logoutUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise logoutUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise logoutUserAsync(array $args = [])
* @method \Aws\Result putAppInstanceRetentionSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise putAppInstanceRetentionSettingsAsync(array $args = [])
* @method \Aws\Result putAppInstanceStreamingConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise putAppInstanceStreamingConfigurationsAsync(array $args = [])
* @method \Aws\Result putEventsConfiguration(array $args = []) * @method \Aws\Result putEventsConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putEventsConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putEventsConfigurationAsync(array $args = [])
* @method \Aws\Result putRetentionSettings(array $args = []) * @method \Aws\Result putRetentionSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRetentionSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putRetentionSettingsAsync(array $args = [])
* @method \Aws\Result putSipMediaApplicationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putSipMediaApplicationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorEmergencyCallingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorEmergencyCallingConfigurationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorOrigination(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorOriginationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorProxy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorProxyAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorStreamingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorStreamingConfigurationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorTermination(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorTerminationAsync(array $args = [])
* @method \Aws\Result putVoiceConnectorTerminationCredentials(array $args = [])
* @method \GuzzleHttp\Promise\Promise putVoiceConnectorTerminationCredentialsAsync(array $args = [])
* @method \Aws\Result redactChannelMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise redactChannelMessageAsync(array $args = [])
* @method \Aws\Result redactConversationMessage(array $args = []) * @method \Aws\Result redactConversationMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise redactConversationMessageAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise redactConversationMessageAsync(array $args = [])
* @method \Aws\Result redactRoomMessage(array $args = []) * @method \Aws\Result redactRoomMessage(array $args = [])
@ -109,25 +325,67 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise restorePhoneNumberAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise restorePhoneNumberAsync(array $args = [])
* @method \Aws\Result searchAvailablePhoneNumbers(array $args = []) * @method \Aws\Result searchAvailablePhoneNumbers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = [])
* @method \Aws\Result sendChannelMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise sendChannelMessageAsync(array $args = [])
* @method \Aws\Result startMeetingTranscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise startMeetingTranscriptionAsync(array $args = [])
* @method \Aws\Result stopMeetingTranscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopMeetingTranscriptionAsync(array $args = [])
* @method \Aws\Result tagAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagAttendeeAsync(array $args = [])
* @method \Aws\Result tagMeeting(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagMeetingAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagAttendee(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagAttendeeAsync(array $args = [])
* @method \Aws\Result untagMeeting(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagMeetingAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateAccount(array $args = []) * @method \Aws\Result updateAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateAccountAsync(array $args = [])
* @method \Aws\Result updateAccountSettings(array $args = []) * @method \Aws\Result updateAccountSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAccountSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateAccountSettingsAsync(array $args = [])
* @method \Aws\Result updateAppInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAppInstanceAsync(array $args = [])
* @method \Aws\Result updateAppInstanceUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAppInstanceUserAsync(array $args = [])
* @method \Aws\Result updateBot(array $args = []) * @method \Aws\Result updateBot(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBotAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateBotAsync(array $args = [])
* @method \Aws\Result updateChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateChannelAsync(array $args = [])
* @method \Aws\Result updateChannelMessage(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateChannelMessageAsync(array $args = [])
* @method \Aws\Result updateChannelReadMarker(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateChannelReadMarkerAsync(array $args = [])
* @method \Aws\Result updateGlobalSettings(array $args = []) * @method \Aws\Result updateGlobalSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGlobalSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateGlobalSettingsAsync(array $args = [])
* @method \Aws\Result updatePhoneNumber(array $args = []) * @method \Aws\Result updatePhoneNumber(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePhoneNumberAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updatePhoneNumberAsync(array $args = [])
* @method \Aws\Result updatePhoneNumberSettings(array $args = []) * @method \Aws\Result updatePhoneNumberSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePhoneNumberSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updatePhoneNumberSettingsAsync(array $args = [])
* @method \Aws\Result updateProxySession(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProxySessionAsync(array $args = [])
* @method \Aws\Result updateRoom(array $args = []) * @method \Aws\Result updateRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = [])
* @method \Aws\Result updateRoomMembership(array $args = []) * @method \Aws\Result updateRoomMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRoomMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateRoomMembershipAsync(array $args = [])
* @method \Aws\Result updateSipMediaApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSipMediaApplicationAsync(array $args = [])
* @method \Aws\Result updateSipMediaApplicationCall(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSipMediaApplicationCallAsync(array $args = [])
* @method \Aws\Result updateSipRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSipRuleAsync(array $args = [])
* @method \Aws\Result updateUser(array $args = []) * @method \Aws\Result updateUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = [])
* @method \Aws\Result updateUserSettings(array $args = []) * @method \Aws\Result updateUserSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUserSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateUserSettingsAsync(array $args = [])
* @method \Aws\Result updateVoiceConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateVoiceConnectorAsync(array $args = [])
* @method \Aws\Result updateVoiceConnectorGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateVoiceConnectorGroupAsync(array $args = [])
* @method \Aws\Result validateE911Address(array $args = [])
* @method \GuzzleHttp\Promise\Promise validateE911AddressAsync(array $args = [])
*/ */
class ChimeClient extends AwsClient {} class ChimeClient extends AwsClient {}

View File

@ -87,8 +87,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getMembershipAsync(array $args = [])
* @method \Aws\Result getPrivacyBudgetTemplate(array $args = []) * @method \Aws\Result getPrivacyBudgetTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPrivacyBudgetTemplateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getPrivacyBudgetTemplateAsync(array $args = [])
* @method \Aws\Result getProtectedJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProtectedJobAsync(array $args = [])
* @method \Aws\Result getProtectedQuery(array $args = []) * @method \Aws\Result getProtectedQuery(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProtectedQueryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getProtectedQueryAsync(array $args = [])
* @method \Aws\Result getSchema(array $args = []) * @method \Aws\Result getSchema(array $args = [])
@ -127,8 +125,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listPrivacyBudgetTemplatesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listPrivacyBudgetTemplatesAsync(array $args = [])
* @method \Aws\Result listPrivacyBudgets(array $args = []) * @method \Aws\Result listPrivacyBudgets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPrivacyBudgetsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listPrivacyBudgetsAsync(array $args = [])
* @method \Aws\Result listProtectedJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listProtectedJobsAsync(array $args = [])
* @method \Aws\Result listProtectedQueries(array $args = []) * @method \Aws\Result listProtectedQueries(array $args = [])
* @method \GuzzleHttp\Promise\Promise listProtectedQueriesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listProtectedQueriesAsync(array $args = [])
* @method \Aws\Result listSchemas(array $args = []) * @method \Aws\Result listSchemas(array $args = [])
@ -139,8 +135,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise populateIdMappingTableAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise populateIdMappingTableAsync(array $args = [])
* @method \Aws\Result previewPrivacyImpact(array $args = []) * @method \Aws\Result previewPrivacyImpact(array $args = [])
* @method \GuzzleHttp\Promise\Promise previewPrivacyImpactAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise previewPrivacyImpactAsync(array $args = [])
* @method \Aws\Result startProtectedJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startProtectedJobAsync(array $args = [])
* @method \Aws\Result startProtectedQuery(array $args = []) * @method \Aws\Result startProtectedQuery(array $args = [])
* @method \GuzzleHttp\Promise\Promise startProtectedQueryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startProtectedQueryAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = []) * @method \Aws\Result tagResource(array $args = [])
@ -169,8 +163,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateMembershipAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateMembershipAsync(array $args = [])
* @method \Aws\Result updatePrivacyBudgetTemplate(array $args = []) * @method \Aws\Result updatePrivacyBudgetTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePrivacyBudgetTemplateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updatePrivacyBudgetTemplateAsync(array $args = [])
* @method \Aws\Result updateProtectedJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProtectedJobAsync(array $args = [])
* @method \Aws\Result updateProtectedQuery(array $args = []) * @method \Aws\Result updateProtectedQuery(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProtectedQueryAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateProtectedQueryAsync(array $args = [])
*/ */

View File

@ -182,7 +182,7 @@ class ConfigurationProvider extends AbstractConfigurationProvider
} }
// port is optional // port is optional
if (!filter_var($data[$profile]['csm_port'] ?? null, FILTER_VALIDATE_INT)) { if (empty($data[$profile]['csm_port'])) {
$data[$profile]['csm_port'] = self::DEFAULT_PORT; $data[$profile]['csm_port'] = self::DEFAULT_PORT;
} }

View File

@ -24,8 +24,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
* @method \Aws\Result createStackInstances(array $args = []) * @method \Aws\Result createStackInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStackInstancesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createStackInstancesAsync(array $args = [])
* @method \Aws\Result createStackRefactor(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStackRefactorAsync(array $args = [])
* @method \Aws\Result createStackSet(array $args = []) * @method \Aws\Result createStackSet(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStackSetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createStackSetAsync(array $args = [])
* @method \Aws\Result deactivateOrganizationsAccess(array $args = []) * @method \Aws\Result deactivateOrganizationsAccess(array $args = [])
@ -64,8 +62,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeStackEventsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeStackEventsAsync(array $args = [])
* @method \Aws\Result describeStackInstance(array $args = []) * @method \Aws\Result describeStackInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeStackInstanceAsync(array $args = [])
* @method \Aws\Result describeStackRefactor(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackRefactorAsync(array $args = [])
* @method \Aws\Result describeStackResource(array $args = []) * @method \Aws\Result describeStackResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStackResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeStackResourceAsync(array $args = [])
* @method \Aws\Result describeStackResourceDrifts(array $args = []) * @method \Aws\Result describeStackResourceDrifts(array $args = [])
@ -92,8 +88,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise estimateTemplateCostAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise estimateTemplateCostAsync(array $args = [])
* @method \Aws\Result executeChangeSet(array $args = []) * @method \Aws\Result executeChangeSet(array $args = [])
* @method \GuzzleHttp\Promise\Promise executeChangeSetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise executeChangeSetAsync(array $args = [])
* @method \Aws\Result executeStackRefactor(array $args = [])
* @method \GuzzleHttp\Promise\Promise executeStackRefactorAsync(array $args = [])
* @method \Aws\Result getGeneratedTemplate(array $args = []) * @method \Aws\Result getGeneratedTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGeneratedTemplateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getGeneratedTemplateAsync(array $args = [])
* @method \Aws\Result getStackPolicy(array $args = []) * @method \Aws\Result getStackPolicy(array $args = [])
@ -124,10 +118,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listStackInstanceResourceDriftsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listStackInstanceResourceDriftsAsync(array $args = [])
* @method \Aws\Result listStackInstances(array $args = []) * @method \Aws\Result listStackInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackInstancesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listStackInstancesAsync(array $args = [])
* @method \Aws\Result listStackRefactorActions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackRefactorActionsAsync(array $args = [])
* @method \Aws\Result listStackRefactors(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackRefactorsAsync(array $args = [])
* @method \Aws\Result listStackResources(array $args = []) * @method \Aws\Result listStackResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = [])
* @method \Aws\Result listStackSetAutoDeploymentTargets(array $args = []) * @method \Aws\Result listStackSetAutoDeploymentTargets(array $args = [])

View File

@ -94,8 +94,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise removeTagsAsync(array $args = [])
* @method \Aws\Result restoreEventDataStore(array $args = []) * @method \Aws\Result restoreEventDataStore(array $args = [])
* @method \GuzzleHttp\Promise\Promise restoreEventDataStoreAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise restoreEventDataStoreAsync(array $args = [])
* @method \Aws\Result searchSampleQueries(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchSampleQueriesAsync(array $args = [])
* @method \Aws\Result startDashboardRefresh(array $args = []) * @method \Aws\Result startDashboardRefresh(array $args = [])
* @method \GuzzleHttp\Promise\Promise startDashboardRefreshAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startDashboardRefreshAsync(array $args = [])
* @method \Aws\Result startEventDataStoreIngestion(array $args = []) * @method \Aws\Result startEventDataStoreIngestion(array $args = [])

View File

@ -15,24 +15,18 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createAppMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createAppMonitorAsync(array $args = [])
* @method \Aws\Result deleteAppMonitor(array $args = []) * @method \Aws\Result deleteAppMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAppMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAppMonitorAsync(array $args = [])
* @method \Aws\Result deleteResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
* @method \Aws\Result deleteRumMetricsDestination(array $args = []) * @method \Aws\Result deleteRumMetricsDestination(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRumMetricsDestinationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteRumMetricsDestinationAsync(array $args = [])
* @method \Aws\Result getAppMonitor(array $args = []) * @method \Aws\Result getAppMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAppMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAppMonitorAsync(array $args = [])
* @method \Aws\Result getAppMonitorData(array $args = []) * @method \Aws\Result getAppMonitorData(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAppMonitorDataAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAppMonitorDataAsync(array $args = [])
* @method \Aws\Result getResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
* @method \Aws\Result listAppMonitors(array $args = []) * @method \Aws\Result listAppMonitors(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAppMonitorsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAppMonitorsAsync(array $args = [])
* @method \Aws\Result listRumMetricsDestinations(array $args = []) * @method \Aws\Result listRumMetricsDestinations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRumMetricsDestinationsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRumMetricsDestinationsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = []) * @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
* @method \Aws\Result putRumEvents(array $args = []) * @method \Aws\Result putRumEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRumEventsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putRumEventsAsync(array $args = [])
* @method \Aws\Result putRumMetricsDestination(array $args = []) * @method \Aws\Result putRumMetricsDestination(array $args = [])

View File

@ -117,8 +117,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteContactFlowAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteContactFlowAsync(array $args = [])
* @method \Aws\Result deleteContactFlowModule(array $args = []) * @method \Aws\Result deleteContactFlowModule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteContactFlowModuleAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteContactFlowModuleAsync(array $args = [])
* @method \Aws\Result deleteContactFlowVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteContactFlowVersionAsync(array $args = [])
* @method \Aws\Result deleteEmailAddress(array $args = []) * @method \Aws\Result deleteEmailAddress(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEmailAddressAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteEmailAddressAsync(array $args = [])
* @method \Aws\Result deleteEvaluationForm(array $args = []) * @method \Aws\Result deleteEvaluationForm(array $args = [])
@ -275,8 +273,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listAgentStatusesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAgentStatusesAsync(array $args = [])
* @method \Aws\Result listAnalyticsDataAssociations(array $args = []) * @method \Aws\Result listAnalyticsDataAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAnalyticsDataAssociationsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAnalyticsDataAssociationsAsync(array $args = [])
* @method \Aws\Result listAnalyticsDataLakeDataSets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAnalyticsDataLakeDataSetsAsync(array $args = [])
* @method \Aws\Result listApprovedOrigins(array $args = []) * @method \Aws\Result listApprovedOrigins(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = [])
* @method \Aws\Result listAssociatedContacts(array $args = []) * @method \Aws\Result listAssociatedContacts(array $args = [])

View File

@ -5,16 +5,12 @@ use Aws\AwsClient;
/** /**
* This client is used to interact with the **Amazon Connect Cases** service. * This client is used to interact with the **Amazon Connect Cases** service.
* @method \Aws\Result batchGetCaseRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetCaseRuleAsync(array $args = [])
* @method \Aws\Result batchGetField(array $args = []) * @method \Aws\Result batchGetField(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetFieldAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchGetFieldAsync(array $args = [])
* @method \Aws\Result batchPutFieldOptions(array $args = []) * @method \Aws\Result batchPutFieldOptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchPutFieldOptionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchPutFieldOptionsAsync(array $args = [])
* @method \Aws\Result createCase(array $args = []) * @method \Aws\Result createCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise createCaseAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createCaseAsync(array $args = [])
* @method \Aws\Result createCaseRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise createCaseRuleAsync(array $args = [])
* @method \Aws\Result createDomain(array $args = []) * @method \Aws\Result createDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
* @method \Aws\Result createField(array $args = []) * @method \Aws\Result createField(array $args = [])
@ -25,8 +21,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createRelatedItemAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createRelatedItemAsync(array $args = [])
* @method \Aws\Result createTemplate(array $args = []) * @method \Aws\Result createTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTemplateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createTemplateAsync(array $args = [])
* @method \Aws\Result deleteCaseRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCaseRuleAsync(array $args = [])
* @method \Aws\Result deleteDomain(array $args = []) * @method \Aws\Result deleteDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
* @method \Aws\Result deleteField(array $args = []) * @method \Aws\Result deleteField(array $args = [])
@ -47,8 +41,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getLayoutAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getLayoutAsync(array $args = [])
* @method \Aws\Result getTemplate(array $args = []) * @method \Aws\Result getTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTemplateAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getTemplateAsync(array $args = [])
* @method \Aws\Result listCaseRules(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCaseRulesAsync(array $args = [])
* @method \Aws\Result listCasesForContact(array $args = []) * @method \Aws\Result listCasesForContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCasesForContactAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listCasesForContactAsync(array $args = [])
* @method \Aws\Result listDomains(array $args = []) * @method \Aws\Result listDomains(array $args = [])
@ -75,8 +67,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateCase(array $args = []) * @method \Aws\Result updateCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateCaseAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateCaseAsync(array $args = [])
* @method \Aws\Result updateCaseRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateCaseRuleAsync(array $args = [])
* @method \Aws\Result updateField(array $args = []) * @method \Aws\Result updateField(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFieldAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateFieldAsync(array $args = [])
* @method \Aws\Result updateLayout(array $args = []) * @method \Aws\Result updateLayout(array $args = [])

View File

@ -919,9 +919,7 @@ class CredentialProvider
$token->getToken(), $token->getToken(),
$config $config
); );
$expiration = $ssoCredentials['expiration'];
//Expiration value is returned in epoch milliseconds. Conversion to seconds
$expiration = intdiv($ssoCredentials['expiration'], 1000);
return Promise\Create::promiseFor( return Promise\Create::promiseFor(
new Credentials( new Credentials(
$ssoCredentials['accessKeyId'], $ssoCredentials['accessKeyId'],

View File

@ -1,7 +1,6 @@
<?php <?php
namespace Aws\Credentials; namespace Aws\Credentials;
use Aws\Arn\Arn;
use Aws\Exception\CredentialsException; use Aws\Exception\CredentialsException;
use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\GuzzleException;
@ -87,15 +86,6 @@ class EcsCredentialProvider
] ]
)->then(function (ResponseInterface $response) { )->then(function (ResponseInterface $response) {
$result = $this->decodeResult((string)$response->getBody()); $result = $this->decodeResult((string)$response->getBody());
if (!isset($result['AccountId']) && isset($result['RoleArn'])) {
try {
$parsedArn = new Arn($result['RoleArn']);
$result['AccountId'] = $parsedArn->getAccountId();
} catch (\Exception $e) {
// AccountId will be null
}
}
return new Credentials( return new Credentials(
$result['AccessKeyId'], $result['AccessKeyId'],
$result['SecretAccessKey'], $result['SecretAccessKey'],

View File

@ -5,6 +5,8 @@ use Aws\Exception\CryptoException;
use GuzzleHttp\Psr7; use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\StreamDecoratorTrait; use GuzzleHttp\Psr7\StreamDecoratorTrait;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
use Aws\Crypto\Polyfill\AesGcm;
use Aws\Crypto\Polyfill\Key;
/** /**
* @internal Represents a stream of data to be gcm decrypted. * @internal Represents a stream of data to be gcm decrypted.
@ -79,7 +81,16 @@ class AesGcmDecryptingStream implements AesStreamInterface
public function createStream() public function createStream()
{ {
if (version_compare(PHP_VERSION, '7.1', '<')) {
return Psr7\Utils::streamFor(AesGcm::decrypt(
(string) $this->cipherText,
$this->initializationVector,
new Key($this->key),
$this->aad,
$this->tag,
$this->keySize
));
} else {
$result = \openssl_decrypt( $result = \openssl_decrypt(
(string)$this->cipherText, (string)$this->cipherText,
$this->getOpenSslName(), $this->getOpenSslName(),
@ -90,11 +101,11 @@ class AesGcmDecryptingStream implements AesStreamInterface
$this->aad $this->aad
); );
if ($result === false) { if ($result === false) {
throw new CryptoException('The requested object could not be ' throw new CryptoException('The requested object could not be'
. 'decrypted due to an invalid authentication tag.'); . ' decrypted due to an invalid authentication tag.');
} }
return Psr7\Utils::streamFor($result); return Psr7\Utils::streamFor($result);
}
} }
public function isWritable(): bool public function isWritable(): bool

View File

@ -1,9 +1,12 @@
<?php <?php
namespace Aws\Crypto; namespace Aws\Crypto;
use Aws\Crypto\Polyfill\AesGcm;
use Aws\Crypto\Polyfill\Key;
use GuzzleHttp\Psr7; use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\StreamDecoratorTrait; use GuzzleHttp\Psr7\StreamDecoratorTrait;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
use \RuntimeException;
/** /**
* @internal Represents a stream of data to be gcm encrypted. * @internal Represents a stream of data to be gcm encrypted.
@ -92,6 +95,16 @@ class AesGcmEncryptingStream implements AesStreamInterface, AesStreamInterfaceV2
public function createStream() public function createStream()
{ {
if (version_compare(PHP_VERSION, '7.1', '<')) {
return Psr7\Utils::streamFor(AesGcm::encrypt(
(string) $this->plaintext,
$this->initializationVector,
new Key($this->key),
$this->aad,
$this->tag,
$this->keySize
));
} else {
return Psr7\Utils::streamFor(\openssl_encrypt( return Psr7\Utils::streamFor(\openssl_encrypt(
(string)$this->plaintext, (string)$this->plaintext,
$this->getOpenSslName(), $this->getOpenSslName(),
@ -103,6 +116,7 @@ class AesGcmEncryptingStream implements AesStreamInterface, AesStreamInterfaceV2
$this->tagLength $this->tagLength
)); ));
} }
}
/** /**
* @return string * @return string

View File

@ -0,0 +1,226 @@
<?php
namespace Aws\Crypto\Polyfill;
use Aws\Exception\CryptoPolyfillException;
use InvalidArgumentException;
use RangeException;
/**
* Class AesGcm
*
* This provides a polyfill for AES-GCM encryption/decryption, with caveats:
*
* 1. Only 96-bit nonces are supported.
* 2. Only 128-bit authentication tags are supported. (i.e. non-truncated)
*
* Supports AES key sizes of 128-bit, 192-bit, and 256-bit.
*/
class AesGcm
{
use NeedsTrait;
/** @var Key $aesKey */
private $aesKey;
/** @var int $keySize */
private $keySize;
/** @var int $blockSize */
protected $blockSize = 8192;
/**
* AesGcm constructor.
*
* @param Key $aesKey
* @param int $keySize
* @param int $blockSize
*
* @throws CryptoPolyfillException
* @throws InvalidArgumentException
* @throws RangeException
*/
public function __construct(Key $aesKey, $keySize = 256, $blockSize = 8192)
{
/* Preconditions: */
self::needs(
\in_array($keySize, [128, 192, 256], true),
"Key size must be 128, 192, or 256 bits; {$keySize} given",
InvalidArgumentException::class
);
self::needs(
\is_int($blockSize) && $blockSize > 0 && $blockSize <= PHP_INT_MAX,
'Block size must be a positive integer.',
RangeException::class
);
self::needs(
$aesKey->length() << 3 === $keySize,
'Incorrect key size; expected ' . $keySize . ' bits, got ' . ($aesKey->length() << 3) . ' bits.'
);
$this->aesKey = $aesKey;
$this->keySize = $keySize;
}
/**
* Encryption interface for AES-GCM
*
* @param string $plaintext Message to be encrypted
* @param string $nonce Number to be used ONCE
* @param Key $key AES Key
* @param string $aad Additional authenticated data
* @param string &$tag Reference to variable to hold tag
* @param int $keySize Key size (bits)
* @param int $blockSize Block size (bytes) -- How much memory to buffer
* @return string
* @throws InvalidArgumentException
*/
public static function encrypt(
$plaintext,
$nonce,
Key $key,
$aad,
&$tag,
$keySize = 256,
$blockSize = 8192
) {
self::needs(
self::strlen($nonce) === 12,
'Nonce must be exactly 12 bytes',
InvalidArgumentException::class
);
$encryptor = new AesGcm($key, $keySize, $blockSize);
list($aadLength, $gmac) = $encryptor->gmacInit($nonce, $aad);
$ciphertext = \openssl_encrypt(
$plaintext,
"aes-{$encryptor->keySize}-ctr",
$key->get(),
OPENSSL_NO_PADDING | OPENSSL_RAW_DATA,
$nonce . "\x00\x00\x00\x02"
);
/* Calculate auth tag in a streaming fashion to minimize memory usage: */
$ciphertextLength = self::strlen($ciphertext);
for ($i = 0; $i < $ciphertextLength; $i += $encryptor->blockSize) {
$cBlock = new ByteArray(self::substr($ciphertext, $i, $encryptor->blockSize));
$gmac->update($cBlock);
}
$tag = $gmac->finish($aadLength, $ciphertextLength)->toString();
return $ciphertext;
}
/**
* Decryption interface for AES-GCM
*
* @param string $ciphertext Ciphertext to decrypt
* @param string $nonce Number to be used ONCE
* @param Key $key AES key
* @param string $aad Additional authenticated data
* @param string $tag Authentication tag
* @param int $keySize Key size (bits)
* @param int $blockSize Block size (bytes) -- How much memory to buffer
* @return string Plaintext
*
* @throws CryptoPolyfillException
* @throws InvalidArgumentException
*/
public static function decrypt(
$ciphertext,
$nonce,
Key $key,
$aad,
&$tag,
$keySize = 256,
$blockSize = 8192
) {
/* Precondition: */
self::needs(
self::strlen($nonce) === 12,
'Nonce must be exactly 12 bytes',
InvalidArgumentException::class
);
$encryptor = new AesGcm($key, $keySize, $blockSize);
list($aadLength, $gmac) = $encryptor->gmacInit($nonce, $aad);
/* Calculate auth tag in a streaming fashion to minimize memory usage: */
$ciphertextLength = self::strlen($ciphertext);
for ($i = 0; $i < $ciphertextLength; $i += $encryptor->blockSize) {
$cBlock = new ByteArray(self::substr($ciphertext, $i, $encryptor->blockSize));
$gmac->update($cBlock);
}
/* Validate auth tag in constant-time: */
$calc = $gmac->finish($aadLength, $ciphertextLength);
$expected = new ByteArray($tag);
self::needs($calc->equals($expected), 'Invalid authentication tag');
/* Return plaintext if auth tag check succeeded: */
return \openssl_decrypt(
$ciphertext,
"aes-{$encryptor->keySize}-ctr",
$key->get(),
OPENSSL_NO_PADDING | OPENSSL_RAW_DATA,
$nonce . "\x00\x00\x00\x02"
);
}
/**
* Initialize a Gmac object with the nonce and this object's key.
*
* @param string $nonce Must be exactly 12 bytes long.
* @param string|null $aad
* @return array
*/
protected function gmacInit($nonce, $aad = null)
{
$gmac = new Gmac(
$this->aesKey,
$nonce . "\x00\x00\x00\x01",
$this->keySize
);
$aadBlock = new ByteArray($aad);
$aadLength = $aadBlock->count();
$gmac->update($aadBlock);
$gmac->flush();
return [$aadLength, $gmac];
}
/**
* Calculate the length of a string.
*
* Uses the appropriate PHP function without being brittle to
* mbstring.func_overload.
*
* @param string $string
* @return int
*/
protected static function strlen($string)
{
if (\is_callable('\\mb_strlen')) {
return (int) \mb_strlen($string, '8bit');
}
return (int) \strlen($string);
}
/**
* Return a substring of the provided string.
*
* Uses the appropriate PHP function without being brittle to
* mbstring.func_overload.
*
* @param string $string
* @param int $offset
* @param int|null $length
* @return string
*/
protected static function substr($string, $offset = 0, $length = null)
{
if (\is_callable('\\mb_substr')) {
return \mb_substr($string, $offset, $length, '8bit');
} elseif (!\is_null($length)) {
return \substr($string, $offset, $length);
}
return \substr($string, $offset);
}
}

View File

@ -0,0 +1,258 @@
<?php
namespace Aws\Crypto\Polyfill;
/**
* Class ByteArray
*/
class ByteArray extends \SplFixedArray
{
use NeedsTrait;
/**
* ByteArray constructor.
*
* @param int|string|int[] $size
* If you pass in an integer, it creates a ByteArray of that size.
* If you pass in a string or array, it converts it to an array of
* integers between 0 and 255.
* @throws \InvalidArgumentException
*/
public function __construct($size = 0)
{
$arr = null;
// Integer? This behaves just like SplFixedArray.
if (\is_array($size)) {
// Array? We need to pass the count to parent::__construct() then populate
$arr = $size;
$size = \count($arr);
} elseif (\is_string($size)) {
// We need to avoid mbstring.func_overload
if (\is_callable('\\mb_str_split')) {
$tmp = \mb_str_split($size, 1, '8bit');
} else {
$tmp = \str_split($size, 1);
}
// Let's convert each character to an 8-bit integer and store in $arr
$arr = [];
if (!empty($tmp)) {
foreach ($tmp as $t) {
if (strlen($t) < 1) {
continue;
}
$arr []= \unpack('C', $t)[1] & 0xff;
}
}
$size = \count($arr);
} elseif ($size instanceof ByteArray) {
$arr = $size->toArray();
$size = $size->count();
} elseif (!\is_int($size)) {
throw new \InvalidArgumentException(
'Argument must be an integer, string, or array of integers.'
);
}
parent::__construct($size);
if (!empty($arr)) {
// Populate this object with values from constructor argument
foreach ($arr as $i => $v) {
$this->offsetSet($i, $v);
}
} else {
// Initialize to zero.
for ($i = 0; $i < $size; ++$i) {
$this->offsetSet($i, 0);
}
}
}
/**
* Encode an integer into a byte array. 32-bit (unsigned), big endian byte order.
*
* @param int $num
* @return self
*/
public static function enc32be($num)
{
return new ByteArray(\pack('N', $num));
}
/**
* @param ByteArray $other
* @return bool
*/
public function equals(ByteArray $other)
{
if ($this->count() !== $other->count()) {
return false;
}
$d = 0;
for ($i = $this->count() - 1; $i >= 0; --$i) {
$d |= $this[$i] ^ $other[$i];
}
return $d === 0;
}
/**
* @param ByteArray $array
* @return ByteArray
*/
public function exclusiveOr(ByteArray $array)
{
self::needs(
$this->count() === $array->count(),
'Both ByteArrays must be equal size for exclusiveOr()'
);
$out = clone $this;
for ($i = 0; $i < $this->count(); ++$i) {
$out[$i] = $array[$i] ^ $out[$i];
}
return $out;
}
/**
* Returns a new ByteArray incremented by 1 (big endian byte order).
*
* @param int $increase
* @return self
*/
public function getIncremented($increase = 1)
{
$clone = clone $this;
$index = $clone->count();
while ($index > 0) {
--$index;
$tmp = ($clone[$index] + $increase) & PHP_INT_MAX;
$clone[$index] = $tmp & 0xff;
$increase = $tmp >> 8;
}
return $clone;
}
/**
* Sets a value. See SplFixedArray for more.
*
* @param int $index
* @param int $newval
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($index, $newval)
{
parent::offsetSet($index, $newval & 0xff);
}
/**
* Return a copy of this ByteArray, bitshifted to the right by 1.
* Used in Gmac.
*
* @return self
*/
public function rshift()
{
$out = clone $this;
for ($j = $this->count() - 1; $j > 0; --$j) {
$out[$j] = (($out[$j - 1] & 1) << 7) | ($out[$j] >> 1);
}
$out[0] >>= 1;
return $out;
}
/**
* Constant-time conditional select. This is meant to read like a ternary operator.
*
* $z = ByteArray::select(1, $x, $y); // $z is equal to $x
* $z = ByteArray::select(0, $x, $y); // $z is equal to $y
*
* @param int $select
* @param ByteArray $left
* @param ByteArray $right
* @return ByteArray
*/
public static function select($select, ByteArray $left, ByteArray $right)
{
self::needs(
$left->count() === $right->count(),
'Both ByteArrays must be equal size for select()'
);
$rightLength = $right->count();
$out = clone $right;
$mask = (-($select & 1)) & 0xff;
for ($i = 0; $i < $rightLength; $i++) {
$out[$i] = $out[$i] ^ (($left[$i] ^ $right[$i]) & $mask);
}
return $out;
}
/**
* Overwrite values of this ByteArray based on a separate ByteArray, with
* a given starting offset and length.
*
* See JavaScript's Uint8Array.set() for more information.
*
* @param ByteArray $input
* @param int $offset
* @param int|null $length
* @return self
*/
public function set(ByteArray $input, $offset = 0, $length = null)
{
self::needs(
is_int($offset) && $offset >= 0,
'Offset must be a positive integer or zero'
);
if (is_null($length)) {
$length = $input->count();
}
$i = 0; $j = $offset;
while ($i < $length && $j < $this->count()) {
$this[$j] = $input[$i];
++$i;
++$j;
}
return $this;
}
/**
* Returns a slice of this ByteArray.
*
* @param int $start
* @param null $length
* @return self
*/
public function slice($start = 0, $length = null)
{
return new ByteArray(\array_slice($this->toArray(), $start, $length));
}
/**
* Mutates the current state and sets all values to zero.
*
* @return void
*/
public function zeroize()
{
for ($i = $this->count() - 1; $i >= 0; --$i) {
$this->offsetSet($i, 0);
}
}
/**
* Converts the ByteArray to a raw binary string.
*
* @return string
*/
public function toString()
{
$count = $this->count();
if ($count === 0) {
return '';
}
$args = $this->toArray();
\array_unshift($args, \str_repeat('C', $count));
// constant-time, PHP <5.6 equivalent to pack('C*', ...$args);
return \call_user_func_array('\\pack', $args);
}
}

View File

@ -0,0 +1,221 @@
<?php
namespace Aws\Crypto\Polyfill;
/**
* Class Gmac
*/
class Gmac
{
use NeedsTrait;
const BLOCK_SIZE = 16;
/** @var ByteArray $buf */
protected $buf;
/** @var int $bufLength */
protected $bufLength = 0;
/** @var ByteArray $h */
protected $h;
/** @var ByteArray $hf */
protected $hf;
/** @var Key $key */
protected $key;
/** @var ByteArray $x */
protected $x;
/**
* Gmac constructor.
*
* @param Key $aesKey
* @param string $nonce
* @param int $keySize
*/
public function __construct(Key $aesKey, $nonce, $keySize = 256)
{
$this->buf = new ByteArray(16);
$this->h = new ByteArray(
\openssl_encrypt(
\str_repeat("\0", 16),
"aes-{$keySize}-ecb",
$aesKey->get(),
OPENSSL_RAW_DATA | OPENSSL_NO_PADDING
)
);
$this->key = $aesKey;
$this->x = new ByteArray(16);
$this->hf = new ByteArray(
\openssl_encrypt(
$nonce,
"aes-{$keySize}-ecb",
$aesKey->get(),
OPENSSL_RAW_DATA | OPENSSL_NO_PADDING
)
);
}
/**
* Update the object with some data.
*
* This method mutates this Gmac object.
*
* @param ByteArray $blocks
* @return self
*/
public function update(ByteArray $blocks)
{
if (($blocks->count() + $this->bufLength) < self::BLOCK_SIZE) {
// Write to internal buffer until we reach enough to write.
$this->buf->set($blocks, $this->bufLength);
$this->bufLength += $blocks->count();
return $this;
}
// Process internal buffer first.
if ($this->bufLength > 0) {
// 0 <= state.buf_len < BLOCK_SIZE is an invariant
$tmp = new ByteArray(self::BLOCK_SIZE);
$tmp->set($this->buf->slice(0, $this->bufLength));
$remainingBlockLength = self::BLOCK_SIZE - $this->bufLength;
$tmp->set($blocks->slice(0, $remainingBlockLength), $this->bufLength);
$blocks = $blocks->slice($remainingBlockLength);
$this->bufLength = 0;
$this->x = $this->blockMultiply($this->x->exclusiveOr($tmp), $this->h);
}
// Process full blocks.
$numBlocks = $blocks->count() >> 4;
for ($i = 0; $i < $numBlocks; ++$i) {
$tmp = $blocks->slice($i << 4, self::BLOCK_SIZE);
$this->x = $this->blockMultiply($this->x->exclusiveOr($tmp), $this->h);
}
$last = $numBlocks << 4;
// Zero-fill buffer
for ($i = 0; $i < 16; ++$i) {
$this->buf[$i] = 0;
}
// Feed leftover into buffer.
if ($last < $blocks->count()) {
$tmp = $blocks->slice($last);
$this->buf->set($tmp);
$this->bufLength += ($blocks->count() - $last);
}
return $this;
}
/**
* Finish processing the authentication tag.
*
* This method mutates this Gmac object (effectively resetting it).
*
* @param int $aadLength
* @param int $ciphertextLength
* @return ByteArray
*/
public function finish($aadLength, $ciphertextLength)
{
$lengthBlock = new ByteArray(16);
$state = $this->flush();
// AES-GCM expects bit lengths, not byte lengths.
$lengthBlock->set(ByteArray::enc32be($aadLength >> 29), 0);
$lengthBlock->set(ByteArray::enc32be($aadLength << 3), 4);
$lengthBlock->set(ByteArray::enc32be($ciphertextLength >> 29), 8);
$lengthBlock->set(ByteArray::enc32be($ciphertextLength << 3), 12);
$state->update($lengthBlock);
$output = $state->x->exclusiveOr($state->hf);
// Zeroize the internal values as a best-effort.
$state->buf->zeroize();
$state->x->zeroize();
$state->h->zeroize();
$state->hf->zeroize();
return $output;
}
/**
* Get a specific bit from the provided array, at the given index.
*
* [01234567], 8+[01234567], 16+[01234567], ...
*
* @param ByteArray $x
* @param int $i
* @return int
*/
protected function bit(ByteArray $x, $i)
{
$byte = $i >> 3;
return ($x[$byte] >> ((7 - $i) & 7)) & 1;
}
/**
* Galois Field Multiplication
*
* This function is the critical path that must be constant-time in order to
* avoid timing side-channels against AES-GCM.
*
* The contents of each are always calculated, regardless of the branching
* condition, to prevent another kind of timing leak.
*
* @param ByteArray $x
* @param ByteArray $y
* @return ByteArray
*/
protected function blockMultiply(ByteArray $x, ByteArray $y)
{
static $fieldPolynomial = null;
if (!$fieldPolynomial) {
$fieldPolynomial = new ByteArray([
0xe1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]);
}
self::needs($x->count() === 16, 'Argument 1 must be a ByteArray of exactly 16 bytes');
self::needs($y->count() === 16, 'Argument 2 must be a ByteArray of exactly 16 bytes');
$v = clone $y;
$z = new ByteArray(16);
for ($i = 0; $i < 128; ++$i) {
// if ($b) $z = $z->exclusiveOr($v);
$b = $this->bit($x, $i);
$z = ByteArray::select(
$b,
$z->exclusiveOr($v),
$z
);
// if ($b) $v = $v->exclusiveOr($fieldPolynomial);
$b = $v[15] & 1;
$v = $v->rshift();
$v = ByteArray::select(
$b,
$v->exclusiveOr($fieldPolynomial),
$v
);
}
return $z;
}
/**
* Finish processing any leftover bytes in the internal buffer.
*
* @return self
*/
public function flush()
{
if ($this->bufLength !== 0) {
$this->x = $this->blockMultiply(
$this->x->exclusiveOr($this->buf),
$this->h
);
$this->bufLength = 0;
}
return $this;
}
}

View File

@ -0,0 +1,75 @@
<?php
namespace Aws\Crypto\Polyfill;
/**
* Class Key
*
* Wraps a string to keep it hidden from stack traces.
*/
class Key
{
/**
* @var string $internalString
*/
private $internalString;
/**
* Hide contents of
*
* @return array
*/
public function __debugInfo()
{
return [];
}
/**
* Key constructor.
* @param string $str
*/
public function __construct($str)
{
$this->internalString = $str;
}
/**
* Defense in depth:
*
* PHP 7.2 includes the Sodium cryptography library, which (among other things)
* exposes a function called sodium_memzero() that we can use to zero-fill strings
* to minimize the risk of sensitive cryptographic materials persisting in memory.
*
* If this function is not available, we XOR the string in-place with itself as a
* best-effort attempt.
*/
public function __destruct()
{
if (extension_loaded('sodium') && function_exists('sodium_memzero')) {
try {
\sodium_memzero($this->internalString);
} catch (\SodiumException $ex) {
// This is a best effort, but does not provide the same guarantees as sodium_memzero():
$this->internalString ^= $this->internalString;
}
}
}
/**
* @return string
*/
public function get()
{
return $this->internalString;
}
/**
* @return int
*/
public function length()
{
if (\is_callable('\\mb_strlen')) {
return (int) \mb_strlen($this->internalString, '8bit');
}
return (int) \strlen($this->internalString);
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace Aws\Crypto\Polyfill;
use Aws\Exception\CryptoPolyfillException;
/**
* Trait NeedsTrait
*/
trait NeedsTrait
{
/**
* Preconditions, postconditions, and loop invariants are very
* useful for safe programing. They also document the specifications.
* This function is to help simplify the semantic burden of parsing
* these constructions.
*
* Instead of constructions like
* if (!(GOOD CONDITION)) {
* throw new \Exception('condition not true');
* }
*
* you can write:
* needs(GOOD CONDITION, 'condition not true');
* @param $condition
* @param $errorMessage
* @param null $exceptionClass
*/
public static function needs($condition, $errorMessage, $exceptionClass = null)
{
if (!$condition) {
if (!$exceptionClass) {
$exceptionClass = CryptoPolyfillException::class;
}
throw new $exceptionClass($errorMessage);
}
}
}

View File

@ -1,126 +0,0 @@
<?php
namespace Aws\DSQL;
use Aws\Credentials\CredentialsInterface;
use Aws\Credentials\Credentials;
use Aws\Signature\SignatureV4;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Uri;
use GuzzleHttp\Promise;
use Aws;
/**
* Generates auth tokens to connect to DSQL database clusters.
*/
class AuthTokenGenerator
{
private const DB_CONNECT = 'DbConnect';
private const DB_CONNECT_ADMIN = 'DbConnectAdmin';
private const SIGNING_NAME = 'dsql';
private const DEFAULT_EXPIRATION_TIME_SECONDS = 900;
/**
* @var Credentials|callable
*/
private $credentialProvider;
/**
* The constructor takes an instance of Credentials or a CredentialProvider
*
* @param Credentials|callable $creds
*/
public function __construct(Credentials | callable $creds)
{
if ($creds instanceof CredentialsInterface) {
$promise = new Promise\FulfilledPromise($creds);
$this->credentialProvider = Aws\constantly($promise);
} else {
$this->credentialProvider = $creds;
}
}
/**
* @param string $endpoint
* @param string $region
* @param int $expiration
*
* @return string
*/
public function generateDbConnectAuthToken(
string $endpoint,
string $region,
int $expiration = self::DEFAULT_EXPIRATION_TIME_SECONDS
): string
{
return $this->createToken($endpoint, $region, self::DB_CONNECT, $expiration);
}
/**
* @param string $endpoint
* @param string $region
* @param int $expiration
*
* @return string
*/
public function generateDbConnectAdminAuthToken(
string $endpoint,
string $region,
int $expiration = self::DEFAULT_EXPIRATION_TIME_SECONDS
): string
{
return $this->createToken($endpoint, $region, self::DB_CONNECT_ADMIN, $expiration);
}
/**
* Creates token for database connection
*
* @param string $endpoint The database hostname
* @param string $region The region where the database is located
* @param string $action Db action to perform
* @param int $expiration The expiration of the token in seconds
*
* @return string Generated token
*/
private function createToken(
string $endpoint,
string $region,
string $action,
int $expiration
): string
{
if ($expiration <= 0) {
throw new \InvalidArgumentException(
"Lifetime must be a positive number, was {$expiration}"
);
}
if (empty($region)) {
throw new \InvalidArgumentException('Region must be a non-empty string.');
}
if (empty($endpoint)) {
throw new \InvalidArgumentException('Endpoint must be a non-empty string.');
}
$uri = new Uri($endpoint);
if (empty($uri->getHost())) {
$uri = $uri->withHost($endpoint);
}
$uri = $uri->withPath('/')->withQuery('Action=' . $action);
$request = new Request('GET', $uri);
$signer = new SignatureV4(self::SIGNING_NAME, $region);
$provider = $this->credentialProvider;
$url = (string) $signer->presign(
$request,
$provider()->wait(),
'+' . $expiration . ' seconds'
)->getUri();
// Remove 2 extra slash from the presigned url result
return substr($url, 2);
}
}

View File

@ -37,8 +37,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createJobAsync(array $args = [])
* @method \Aws\Result createLicenseEndpoint(array $args = []) * @method \Aws\Result createLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLicenseEndpointAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createLicenseEndpointAsync(array $args = [])
* @method \Aws\Result createLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLimitAsync(array $args = [])
* @method \Aws\Result createMonitor(array $args = []) * @method \Aws\Result createMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createMonitorAsync(array $args = [])
* @method \Aws\Result createQueue(array $args = []) * @method \Aws\Result createQueue(array $args = [])
@ -47,8 +45,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createQueueEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result createQueueFleetAssociation(array $args = []) * @method \Aws\Result createQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueFleetAssociationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result createQueueLimitAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueLimitAssociationAsync(array $args = [])
* @method \Aws\Result createStorageProfile(array $args = []) * @method \Aws\Result createStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStorageProfileAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createStorageProfileAsync(array $args = [])
* @method \Aws\Result createWorker(array $args = []) * @method \Aws\Result createWorker(array $args = [])
@ -61,8 +57,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
* @method \Aws\Result deleteLicenseEndpoint(array $args = []) * @method \Aws\Result deleteLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLicenseEndpointAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteLicenseEndpointAsync(array $args = [])
* @method \Aws\Result deleteLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLimitAsync(array $args = [])
* @method \Aws\Result deleteMeteredProduct(array $args = []) * @method \Aws\Result deleteMeteredProduct(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMeteredProductAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteMeteredProductAsync(array $args = [])
* @method \Aws\Result deleteMonitor(array $args = []) * @method \Aws\Result deleteMonitor(array $args = [])
@ -73,8 +67,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteQueueEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteQueueFleetAssociation(array $args = []) * @method \Aws\Result deleteQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteQueueFleetAssociationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result deleteQueueLimitAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteQueueLimitAssociationAsync(array $args = [])
* @method \Aws\Result deleteStorageProfile(array $args = []) * @method \Aws\Result deleteStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStorageProfileAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteStorageProfileAsync(array $args = [])
* @method \Aws\Result deleteWorker(array $args = []) * @method \Aws\Result deleteWorker(array $args = [])
@ -97,8 +89,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getJobAsync(array $args = [])
* @method \Aws\Result getLicenseEndpoint(array $args = []) * @method \Aws\Result getLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLicenseEndpointAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getLicenseEndpointAsync(array $args = [])
* @method \Aws\Result getLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLimitAsync(array $args = [])
* @method \Aws\Result getMonitor(array $args = []) * @method \Aws\Result getMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getMonitorAsync(array $args = [])
* @method \Aws\Result getQueue(array $args = []) * @method \Aws\Result getQueue(array $args = [])
@ -107,8 +97,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getQueueEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result getQueueFleetAssociation(array $args = []) * @method \Aws\Result getQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getQueueFleetAssociationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result getQueueLimitAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getQueueLimitAssociationAsync(array $args = [])
* @method \Aws\Result getSession(array $args = []) * @method \Aws\Result getSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getSessionAsync(array $args = [])
* @method \Aws\Result getSessionAction(array $args = []) * @method \Aws\Result getSessionAction(array $args = [])
@ -145,8 +133,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
* @method \Aws\Result listLicenseEndpoints(array $args = []) * @method \Aws\Result listLicenseEndpoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLicenseEndpointsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listLicenseEndpointsAsync(array $args = [])
* @method \Aws\Result listLimits(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLimitsAsync(array $args = [])
* @method \Aws\Result listMeteredProducts(array $args = []) * @method \Aws\Result listMeteredProducts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMeteredProductsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listMeteredProductsAsync(array $args = [])
* @method \Aws\Result listMonitors(array $args = []) * @method \Aws\Result listMonitors(array $args = [])
@ -155,8 +141,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listQueueEnvironmentsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listQueueEnvironmentsAsync(array $args = [])
* @method \Aws\Result listQueueFleetAssociations(array $args = []) * @method \Aws\Result listQueueFleetAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueFleetAssociationsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listQueueFleetAssociationsAsync(array $args = [])
* @method \Aws\Result listQueueLimitAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueLimitAssociationsAsync(array $args = [])
* @method \Aws\Result listQueueMembers(array $args = []) * @method \Aws\Result listQueueMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueMembersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listQueueMembersAsync(array $args = [])
* @method \Aws\Result listQueues(array $args = []) * @method \Aws\Result listQueues(array $args = [])
@ -207,8 +191,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateFleetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateFleetAsync(array $args = [])
* @method \Aws\Result updateJob(array $args = []) * @method \Aws\Result updateJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateJobAsync(array $args = [])
* @method \Aws\Result updateLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateLimitAsync(array $args = [])
* @method \Aws\Result updateMonitor(array $args = []) * @method \Aws\Result updateMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMonitorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateMonitorAsync(array $args = [])
* @method \Aws\Result updateQueue(array $args = []) * @method \Aws\Result updateQueue(array $args = [])
@ -217,8 +199,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateQueueEnvironmentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result updateQueueFleetAssociation(array $args = []) * @method \Aws\Result updateQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateQueueFleetAssociationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result updateQueueLimitAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateQueueLimitAssociationAsync(array $args = [])
* @method \Aws\Result updateSession(array $args = []) * @method \Aws\Result updateSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSessionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateSessionAsync(array $args = [])
* @method \Aws\Result updateStep(array $args = []) * @method \Aws\Result updateStep(array $args = [])

View File

@ -0,0 +1,21 @@
<?php
namespace Aws\ElasticInference;
use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon Elastic Inference** service.
* @method \Aws\Result describeAcceleratorOfferings(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAcceleratorOfferingsAsync(array $args = [])
* @method \Aws\Result describeAcceleratorTypes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAcceleratorTypesAsync(array $args = [])
* @method \Aws\Result describeAccelerators(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAcceleratorsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
*/
class ElasticInferenceClient extends AwsClient {}

View File

@ -0,0 +1,9 @@
<?php
namespace Aws\ElasticInference\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **Amazon Elastic Inference** service.
*/
class ElasticInferenceException extends AwsException {}

View File

@ -75,8 +75,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getTrustStoreRevocationContentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getTrustStoreRevocationContentAsync(array $args = [])
* @method \Aws\Result modifyCapacityReservation(array $args = []) * @method \Aws\Result modifyCapacityReservation(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyCapacityReservationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyCapacityReservationAsync(array $args = [])
* @method \Aws\Result modifyIpPools(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyIpPoolsAsync(array $args = [])
* @method \Aws\Result modifyListener(array $args = []) * @method \Aws\Result modifyListener(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyListenerAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyListenerAsync(array $args = [])
* @method \Aws\Result modifyListenerAttributes(array $args = []) * @method \Aws\Result modifyListenerAttributes(array $args = [])

View File

@ -3,7 +3,6 @@
namespace Aws\EndpointV2; namespace Aws\EndpointV2;
use Aws\EndpointV2\Ruleset\Ruleset; use Aws\EndpointV2\Ruleset\Ruleset;
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
use Aws\Exception\UnresolvedEndpointException; use Aws\Exception\UnresolvedEndpointException;
use Aws\LruArrayCache; use Aws\LruArrayCache;

View File

@ -8,7 +8,6 @@ use Aws\CommandInterface;
use Aws\MetricsBuilder; use Aws\MetricsBuilder;
use Closure; use Closure;
use GuzzleHttp\Promise\Promise; use GuzzleHttp\Promise\Promise;
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
use function JmesPath\search; use function JmesPath\search;
/** /**
@ -100,11 +99,10 @@ class EndpointV2Middleware
$operation = $this->api->getOperation($command->getName()); $operation = $this->api->getOperation($command->getName());
$commandArgs = $command->toArray(); $commandArgs = $command->toArray();
$providerArgs = $this->resolveArgs($commandArgs, $operation); $providerArgs = $this->resolveArgs($commandArgs, $operation);
if (!empty($providerArgs[self::ACCOUNT_ID_PARAM])) {
$command->getMetricsBuilder()->append(MetricsBuilder::RESOLVED_ACCOUNT_ID);
}
$endpoint = $this->endpointProvider->resolveEndpoint($providerArgs); $endpoint = $this->endpointProvider->resolveEndpoint($providerArgs);
$this->appendEndpointMetrics($providerArgs, $endpoint, $command);
if (!empty($authSchemes = $endpoint->getProperty('authSchemes'))) { if (!empty($authSchemes = $endpoint->getProperty('authSchemes'))) {
$this->applyAuthScheme( $this->applyAuthScheme(
$authSchemes, $authSchemes,
@ -399,29 +397,4 @@ class EndpointV2Middleware
return $identity->getAccountId(); return $identity->getAccountId();
} }
private function appendEndpointMetrics(
array $providerArgs,
RulesetEndpoint $endpoint,
CommandInterface $command
): void
{
// Resolved AccountId Metric
if (!empty($providerArgs[self::ACCOUNT_ID_PARAM])) {
$command->getMetricsBuilder()->append(MetricsBuilder::RESOLVED_ACCOUNT_ID);
}
// AccountIdMode Metric
if(!empty($providerArgs[self::ACCOUNT_ID_ENDPOINT_MODE_PARAM])) {
$command->getMetricsBuilder()->identifyMetricByValueAndAppend(
'account_id_endpoint_mode',
$providerArgs[self::ACCOUNT_ID_ENDPOINT_MODE_PARAM]
);
}
// AccountId Endpoint Metric
$command->getMetricsBuilder()->identifyMetricByValueAndAppend(
'account_id_endpoint',
$endpoint->getUrl()
);
}
} }

View File

@ -1,9 +0,0 @@
<?php
namespace Aws\GameLiftStreams\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **Amazon GameLift Streams** service.
*/
class GameLiftStreamsException extends AwsException {}

View File

@ -1,57 +0,0 @@
<?php
namespace Aws\GameLiftStreams;
use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon GameLift Streams** service.
* @method \Aws\Result addStreamGroupLocations(array $args = [])
* @method \GuzzleHttp\Promise\Promise addStreamGroupLocationsAsync(array $args = [])
* @method \Aws\Result associateApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateApplicationsAsync(array $args = [])
* @method \Aws\Result createApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
* @method \Aws\Result createStreamGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStreamGroupAsync(array $args = [])
* @method \Aws\Result createStreamSessionConnection(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStreamSessionConnectionAsync(array $args = [])
* @method \Aws\Result deleteApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
* @method \Aws\Result deleteStreamGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStreamGroupAsync(array $args = [])
* @method \Aws\Result disassociateApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateApplicationsAsync(array $args = [])
* @method \Aws\Result exportStreamSessionFiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise exportStreamSessionFilesAsync(array $args = [])
* @method \Aws\Result getApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApplicationAsync(array $args = [])
* @method \Aws\Result getStreamGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStreamGroupAsync(array $args = [])
* @method \Aws\Result getStreamSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStreamSessionAsync(array $args = [])
* @method \Aws\Result listApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
* @method \Aws\Result listStreamGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStreamGroupsAsync(array $args = [])
* @method \Aws\Result listStreamSessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStreamSessionsAsync(array $args = [])
* @method \Aws\Result listStreamSessionsByAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStreamSessionsByAccountAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result removeStreamGroupLocations(array $args = [])
* @method \GuzzleHttp\Promise\Promise removeStreamGroupLocationsAsync(array $args = [])
* @method \Aws\Result startStreamSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise startStreamSessionAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result terminateStreamSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise terminateStreamSessionAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
* @method \Aws\Result updateStreamGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStreamGroupAsync(array $args = [])
*/
class GameLiftStreamsClient extends AwsClient {}

View File

@ -1,89 +0,0 @@
<?php
namespace Aws\Handler\Guzzle;
use Exception;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Utils;
use GuzzleHttp\Promise;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\TransferStats;
use Psr\Http\Message\RequestInterface as Psr7Request;
/**
* A request handler that sends PSR-7-compatible requests with Guzzle.
*/
class GuzzleHandler
{
/** @var ClientInterface */
private $client;
/**
* @param ClientInterface $client
*/
public function __construct(?ClientInterface $client = null)
{
$this->client = $client ?: new Client();
}
/**
* @param Psr7Request $request
* @param array $options
*
* @return Promise\Promise
*/
public function __invoke(Psr7Request $request, array $options = [])
{
$request = $request->withHeader(
'User-Agent',
$request->getHeaderLine('User-Agent')
. ' ' . Utils::defaultUserAgent()
);
return $this->client->sendAsync($request, $this->parseOptions($options))
->otherwise(
static function ($e) {
$error = [
'exception' => $e,
'connection_error' => $e instanceof ConnectException,
'response' => null,
];
if (
($e instanceof RequestException)
&& $e->getResponse()
) {
$error['response'] = $e->getResponse();
}
return new Promise\RejectedPromise($error);
}
);
}
private function parseOptions(array $options)
{
if (isset($options['http_stats_receiver'])) {
$fn = $options['http_stats_receiver'];
unset($options['http_stats_receiver']);
$prev = isset($options['on_stats'])
? $options['on_stats']
: null;
$options['on_stats'] = static function (
TransferStats $stats
) use ($fn, $prev) {
if (is_callable($prev)) {
$prev($stats);
}
$transferStats = ['total_time' => $stats->getTransferTime()];
$transferStats += $stats->getHandlerStats();
$fn($transferStats);
};
}
return $options;
}
}

View File

@ -0,0 +1,211 @@
<?php
namespace Aws\Handler\GuzzleV5;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Event\EndEvent;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Message\ResponseInterface as GuzzleResponse;
use GuzzleHttp\Promise;
use GuzzleHttp\Psr7\Response as Psr7Response;
use GuzzleHttp\Stream\Stream;
use Psr\Http\Message\RequestInterface as Psr7Request;
use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
/**
* A request handler that sends PSR-7-compatible requests with Guzzle 5.
*
* The handler accepts a PSR-7 Request object and an array of transfer options
* and returns a Guzzle 6 Promise. The promise is either resolved with a
* PSR-7 Response object or rejected with an array of error data.
*
* @codeCoverageIgnore
*/
class GuzzleHandler
{
private static $validOptions = [
'proxy' => true,
'expect' => true,
'cert' => true,
'verify' => true,
'timeout' => true,
'debug' => true,
'connect_timeout' => true,
'stream' => true,
'delay' => true,
'sink' => true,
];
/** @var ClientInterface */
private $client;
/**
* @param ClientInterface $client
*/
public function __construct(?ClientInterface $client = null)
{
$this->client = $client ?: new Client();
}
/**
* @param Psr7Request $request
* @param array $options
* @return Promise\Promise|Promise\PromiseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function __invoke(Psr7Request $request, array $options = [])
{
// Create and send a Guzzle 5 request
$guzzlePromise = $this->client->send(
$this->createGuzzleRequest($request, $options)
);
$promise = new Promise\Promise(
function () use ($guzzlePromise) {
try {
$guzzlePromise->wait();
} catch (\Exception $e) {
// The promise is already delivered when the exception is
// thrown, so don't rethrow it.
}
},
[$guzzlePromise, 'cancel']
);
$guzzlePromise->then([$promise, 'resolve'], [$promise, 'reject']);
return $promise->then(
function (GuzzleResponse $response) {
// Adapt the Guzzle 5 Future to a Guzzle 6 ResponsePromise.
return $this->createPsr7Response($response);
},
function (Exception $exception) use ($options) {
// If we got a 'sink' that's a path, set the response body to
// the contents of the file. This will build the resulting
// exception with more information.
if ($exception instanceof RequestException) {
if (isset($options['sink'])) {
if (!($options['sink'] instanceof Psr7StreamInterface)) {
$exception->getResponse()->setBody(
Stream::factory(
file_get_contents($options['sink'])
)
);
}
}
}
// Reject with information about the error.
return new Promise\RejectedPromise($this->prepareErrorData($exception));
}
);
}
private function createGuzzleRequest(Psr7Request $psrRequest, array $options)
{
$ringConfig = [];
$statsCallback = isset($options['http_stats_receiver'])
? $options['http_stats_receiver']
: null;
unset($options['http_stats_receiver']);
// Remove unsupported options.
foreach (array_keys($options) as $key) {
if (!isset(self::$validOptions[$key])) {
unset($options[$key]);
}
}
// Handle delay option.
if (isset($options['delay'])) {
$ringConfig['delay'] = $options['delay'];
unset($options['delay']);
}
// Prepare sink option.
if (isset($options['sink'])) {
$ringConfig['save_to'] = ($options['sink'] instanceof Psr7StreamInterface)
? new GuzzleStream($options['sink'])
: $options['sink'];
unset($options['sink']);
}
// Ensure that all requests are async and lazy like Guzzle 6.
$options['future'] = 'lazy';
// Create the Guzzle 5 request from the provided PSR7 request.
$request = $this->client->createRequest(
$psrRequest->getMethod(),
$psrRequest->getUri(),
$options
);
if (is_callable($statsCallback)) {
$request->getEmitter()->on(
'end',
function (EndEvent $event) use ($statsCallback) {
$statsCallback($event->getTransferInfo());
}
);
}
// For the request body, adapt the PSR stream to a Guzzle stream.
$body = $psrRequest->getBody();
if ($body->getSize() === 0) {
$request->setBody(null);
} else {
$request->setBody(new GuzzleStream($body));
}
$request->setHeaders($psrRequest->getHeaders());
$request->setHeader(
'User-Agent',
$request->getHeader('User-Agent')
. ' ' . Client::getDefaultUserAgent()
);
// Make sure the delay is configured, if provided.
if ($ringConfig) {
foreach ($ringConfig as $k => $v) {
$request->getConfig()->set($k, $v);
}
}
return $request;
}
private function createPsr7Response(GuzzleResponse $response)
{
if ($body = $response->getBody()) {
$body = new PsrStream($body);
}
return new Psr7Response(
$response->getStatusCode(),
$response->getHeaders(),
$body,
$response->getReasonPhrase()
);
}
private function prepareErrorData(Exception $e)
{
$error = [
'exception' => $e,
'connection_error' => false,
'response' => null,
];
if ($e instanceof ConnectException) {
$error['connection_error'] = true;
}
if ($e instanceof RequestException && $e->getResponse()) {
$error['response'] = $this->createPsr7Response($e->getResponse());
}
return $error;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace Aws\Handler\GuzzleV5;
use GuzzleHttp\Stream\StreamDecoratorTrait;
use GuzzleHttp\Stream\StreamInterface as GuzzleStreamInterface;
use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
/**
* Adapts a PSR-7 Stream to a Guzzle 5 Stream.
*
* @codeCoverageIgnore
*/
class GuzzleStream implements GuzzleStreamInterface
{
use StreamDecoratorTrait;
/** @var Psr7StreamInterface */
private $stream;
public function __construct(Psr7StreamInterface $stream)
{
$this->stream = $stream;
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace Aws\Handler\GuzzleV5;
use GuzzleHttp\Stream\StreamDecoratorTrait;
use GuzzleHttp\Stream\StreamInterface as GuzzleStreamInterface;
use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
/**
* Adapts a Guzzle 5 Stream to a PSR-7 Stream.
*
* @codeCoverageIgnore
*/
class PsrStream implements Psr7StreamInterface
{
use StreamDecoratorTrait;
/** @var GuzzleStreamInterface */
private $stream;
public function __construct(GuzzleStreamInterface $stream)
{
$this->stream = $stream;
}
public function rewind()
{
$this->stream->seek(0);
}
public function getContents()
{
return $this->stream->getContents();
}
}

View File

@ -1,11 +1,88 @@
<?php <?php
namespace Aws\Handler\GuzzleV6; namespace Aws\Handler\GuzzleV6;
trigger_error(sprintf( use Exception;
'Using the "%s" class is deprecated, use "%s" instead.', use GuzzleHttp\Exception\ConnectException;
__NAMESPACE__ . '\GuzzleHandler', use GuzzleHttp\Exception\RequestException;
\Aws\Handler\Guzzle\GuzzleHandler::class use GuzzleHttp\Promise;
), E_USER_DEPRECATED); use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\TransferStats;
use Psr\Http\Message\RequestInterface as Psr7Request;
class_alias(\Aws\Handler\Guzzle\GuzzleHandler::class, __NAMESPACE__ . '\GuzzleHandler'); /**
* A request handler that sends PSR-7-compatible requests with Guzzle 6.
*/
class GuzzleHandler
{
/** @var ClientInterface */
private $client;
/**
* @param ClientInterface $client
*/
public function __construct(?ClientInterface $client = null)
{
$this->client = $client ?: new Client();
}
/**
* @param Psr7Request $request
* @param array $options
*
* @return Promise\Promise
*/
public function __invoke(Psr7Request $request, array $options = [])
{
$request = $request->withHeader(
'User-Agent',
$request->getHeaderLine('User-Agent')
. ' ' . \GuzzleHttp\default_user_agent()
);
return $this->client->sendAsync($request, $this->parseOptions($options))
->otherwise(
static function ($e) {
$error = [
'exception' => $e,
'connection_error' => $e instanceof ConnectException,
'response' => null,
];
if (
($e instanceof RequestException)
&& $e->getResponse()
) {
$error['response'] = $e->getResponse();
}
return new Promise\RejectedPromise($error);
}
);
}
private function parseOptions(array $options)
{
if (isset($options['http_stats_receiver'])) {
$fn = $options['http_stats_receiver'];
unset($options['http_stats_receiver']);
$prev = isset($options['on_stats'])
? $options['on_stats']
: null;
$options['on_stats'] = static function (
TransferStats $stats
) use ($fn, $prev) {
if (is_callable($prev)) {
$prev($stats);
}
$transferStats = ['total_time' => $stats->getTransferTime()];
$transferStats += $stats->getHandlerStats();
$fn($transferStats);
};
}
return $options;
}
}

View File

@ -115,20 +115,6 @@ class HandlerList implements \Countable
return (bool) $this->handler; return (bool) $this->handler;
} }
/**
* Checks if a middleware exists. The middleware
* should have been added with a name in order to
* use this method.
*
* @param string $name
*
* @return bool
*/
public function hasMiddleware(string $name): bool
{
return isset($this->named[$name]);
}
/** /**
* Append a middleware to the init step. * Append a middleware to the init step.
* *

View File

@ -1,9 +0,0 @@
<?php
namespace Aws\IoTManagedIntegrations\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **Managed integrations for AWS IoT Device Management** service.
*/
class IoTManagedIntegrationsException extends AwsException {}

View File

@ -1,123 +0,0 @@
<?php
namespace Aws\IoTManagedIntegrations;
use Aws\AwsClient;
/**
* This client is used to interact with the **Managed integrations for AWS IoT Device Management** service.
* @method \Aws\Result createCredentialLocker(array $args = [])
* @method \GuzzleHttp\Promise\Promise createCredentialLockerAsync(array $args = [])
* @method \Aws\Result createDestination(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDestinationAsync(array $args = [])
* @method \Aws\Result createEventLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEventLogConfigurationAsync(array $args = [])
* @method \Aws\Result createManagedThing(array $args = [])
* @method \GuzzleHttp\Promise\Promise createManagedThingAsync(array $args = [])
* @method \Aws\Result createNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result createOtaTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise createOtaTaskAsync(array $args = [])
* @method \Aws\Result createOtaTaskConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createOtaTaskConfigurationAsync(array $args = [])
* @method \Aws\Result createProvisioningProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProvisioningProfileAsync(array $args = [])
* @method \Aws\Result deleteCredentialLocker(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCredentialLockerAsync(array $args = [])
* @method \Aws\Result deleteDestination(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDestinationAsync(array $args = [])
* @method \Aws\Result deleteEventLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEventLogConfigurationAsync(array $args = [])
* @method \Aws\Result deleteManagedThing(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteManagedThingAsync(array $args = [])
* @method \Aws\Result deleteNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result deleteOtaTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteOtaTaskAsync(array $args = [])
* @method \Aws\Result deleteOtaTaskConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteOtaTaskConfigurationAsync(array $args = [])
* @method \Aws\Result deleteProvisioningProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProvisioningProfileAsync(array $args = [])
* @method \Aws\Result getCredentialLocker(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCredentialLockerAsync(array $args = [])
* @method \Aws\Result getCustomEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCustomEndpointAsync(array $args = [])
* @method \Aws\Result getDefaultEncryptionConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDefaultEncryptionConfigurationAsync(array $args = [])
* @method \Aws\Result getDestination(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDestinationAsync(array $args = [])
* @method \Aws\Result getDeviceDiscovery(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDeviceDiscoveryAsync(array $args = [])
* @method \Aws\Result getEventLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEventLogConfigurationAsync(array $args = [])
* @method \Aws\Result getHubConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getHubConfigurationAsync(array $args = [])
* @method \Aws\Result getManagedThing(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedThingAsync(array $args = [])
* @method \Aws\Result getManagedThingCapabilities(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedThingCapabilitiesAsync(array $args = [])
* @method \Aws\Result getManagedThingConnectivityData(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedThingConnectivityDataAsync(array $args = [])
* @method \Aws\Result getManagedThingMetaData(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedThingMetaDataAsync(array $args = [])
* @method \Aws\Result getManagedThingState(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedThingStateAsync(array $args = [])
* @method \Aws\Result getNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result getOtaTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise getOtaTaskAsync(array $args = [])
* @method \Aws\Result getOtaTaskConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getOtaTaskConfigurationAsync(array $args = [])
* @method \Aws\Result getProvisioningProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProvisioningProfileAsync(array $args = [])
* @method \Aws\Result getRuntimeLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRuntimeLogConfigurationAsync(array $args = [])
* @method \Aws\Result getSchemaVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSchemaVersionAsync(array $args = [])
* @method \Aws\Result listCredentialLockers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCredentialLockersAsync(array $args = [])
* @method \Aws\Result listDestinations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDestinationsAsync(array $args = [])
* @method \Aws\Result listEventLogConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEventLogConfigurationsAsync(array $args = [])
* @method \Aws\Result listManagedThingSchemas(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedThingSchemasAsync(array $args = [])
* @method \Aws\Result listManagedThings(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedThingsAsync(array $args = [])
* @method \Aws\Result listNotificationConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listNotificationConfigurationsAsync(array $args = [])
* @method \Aws\Result listOtaTaskConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listOtaTaskConfigurationsAsync(array $args = [])
* @method \Aws\Result listOtaTaskExecutions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listOtaTaskExecutionsAsync(array $args = [])
* @method \Aws\Result listOtaTasks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listOtaTasksAsync(array $args = [])
* @method \Aws\Result listProvisioningProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise listProvisioningProfilesAsync(array $args = [])
* @method \Aws\Result listSchemaVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSchemaVersionsAsync(array $args = [])
* @method \Aws\Result putDefaultEncryptionConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putDefaultEncryptionConfigurationAsync(array $args = [])
* @method \Aws\Result putHubConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putHubConfigurationAsync(array $args = [])
* @method \Aws\Result putRuntimeLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRuntimeLogConfigurationAsync(array $args = [])
* @method \Aws\Result registerCustomEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise registerCustomEndpointAsync(array $args = [])
* @method \Aws\Result resetRuntimeLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise resetRuntimeLogConfigurationAsync(array $args = [])
* @method \Aws\Result sendManagedThingCommand(array $args = [])
* @method \GuzzleHttp\Promise\Promise sendManagedThingCommandAsync(array $args = [])
* @method \Aws\Result startDeviceDiscovery(array $args = [])
* @method \GuzzleHttp\Promise\Promise startDeviceDiscoveryAsync(array $args = [])
* @method \Aws\Result updateDestination(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDestinationAsync(array $args = [])
* @method \Aws\Result updateEventLogConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEventLogConfigurationAsync(array $args = [])
* @method \Aws\Result updateManagedThing(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateManagedThingAsync(array $args = [])
* @method \Aws\Result updateNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result updateOtaTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateOtaTaskAsync(array $args = [])
*/
class IoTManagedIntegrationsClient extends AwsClient {}

View File

@ -19,14 +19,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteWorkerConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteWorkerConfigurationAsync(array $args = [])
* @method \Aws\Result describeConnector(array $args = []) * @method \Aws\Result describeConnector(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeConnectorAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeConnectorAsync(array $args = [])
* @method \Aws\Result describeConnectorOperation(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeConnectorOperationAsync(array $args = [])
* @method \Aws\Result describeCustomPlugin(array $args = []) * @method \Aws\Result describeCustomPlugin(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeCustomPluginAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeCustomPluginAsync(array $args = [])
* @method \Aws\Result describeWorkerConfiguration(array $args = []) * @method \Aws\Result describeWorkerConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeWorkerConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeWorkerConfigurationAsync(array $args = [])
* @method \Aws\Result listConnectorOperations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConnectorOperationsAsync(array $args = [])
* @method \Aws\Result listConnectors(array $args = []) * @method \Aws\Result listConnectors(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConnectorsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listConnectorsAsync(array $args = [])
* @method \Aws\Result listCustomPlugins(array $args = []) * @method \Aws\Result listCustomPlugins(array $args = [])

View File

@ -9,10 +9,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createAddonInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createAddonInstanceAsync(array $args = [])
* @method \Aws\Result createAddonSubscription(array $args = []) * @method \Aws\Result createAddonSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAddonSubscriptionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createAddonSubscriptionAsync(array $args = [])
* @method \Aws\Result createAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAddressListAsync(array $args = [])
* @method \Aws\Result createAddressListImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAddressListImportJobAsync(array $args = [])
* @method \Aws\Result createArchive(array $args = []) * @method \Aws\Result createArchive(array $args = [])
* @method \GuzzleHttp\Promise\Promise createArchiveAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createArchiveAsync(array $args = [])
* @method \Aws\Result createIngressPoint(array $args = []) * @method \Aws\Result createIngressPoint(array $args = [])
@ -27,8 +23,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteAddonInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAddonInstanceAsync(array $args = [])
* @method \Aws\Result deleteAddonSubscription(array $args = []) * @method \Aws\Result deleteAddonSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAddonSubscriptionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAddonSubscriptionAsync(array $args = [])
* @method \Aws\Result deleteAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAddressListAsync(array $args = [])
* @method \Aws\Result deleteArchive(array $args = []) * @method \Aws\Result deleteArchive(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteArchiveAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteArchiveAsync(array $args = [])
* @method \Aws\Result deleteIngressPoint(array $args = []) * @method \Aws\Result deleteIngressPoint(array $args = [])
@ -39,16 +33,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteRuleSetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteRuleSetAsync(array $args = [])
* @method \Aws\Result deleteTrafficPolicy(array $args = []) * @method \Aws\Result deleteTrafficPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTrafficPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteTrafficPolicyAsync(array $args = [])
* @method \Aws\Result deregisterMemberFromAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise deregisterMemberFromAddressListAsync(array $args = [])
* @method \Aws\Result getAddonInstance(array $args = []) * @method \Aws\Result getAddonInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAddonInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAddonInstanceAsync(array $args = [])
* @method \Aws\Result getAddonSubscription(array $args = []) * @method \Aws\Result getAddonSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAddonSubscriptionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAddonSubscriptionAsync(array $args = [])
* @method \Aws\Result getAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAddressListAsync(array $args = [])
* @method \Aws\Result getAddressListImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAddressListImportJobAsync(array $args = [])
* @method \Aws\Result getArchive(array $args = []) * @method \Aws\Result getArchive(array $args = [])
* @method \GuzzleHttp\Promise\Promise getArchiveAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getArchiveAsync(array $args = [])
* @method \Aws\Result getArchiveExport(array $args = []) * @method \Aws\Result getArchiveExport(array $args = [])
@ -63,8 +51,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getArchiveSearchResultsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getArchiveSearchResultsAsync(array $args = [])
* @method \Aws\Result getIngressPoint(array $args = []) * @method \Aws\Result getIngressPoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIngressPointAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getIngressPointAsync(array $args = [])
* @method \Aws\Result getMemberOfAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMemberOfAddressListAsync(array $args = [])
* @method \Aws\Result getRelay(array $args = []) * @method \Aws\Result getRelay(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRelayAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getRelayAsync(array $args = [])
* @method \Aws\Result getRuleSet(array $args = []) * @method \Aws\Result getRuleSet(array $args = [])
@ -75,10 +61,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listAddonInstancesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAddonInstancesAsync(array $args = [])
* @method \Aws\Result listAddonSubscriptions(array $args = []) * @method \Aws\Result listAddonSubscriptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAddonSubscriptionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAddonSubscriptionsAsync(array $args = [])
* @method \Aws\Result listAddressListImportJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAddressListImportJobsAsync(array $args = [])
* @method \Aws\Result listAddressLists(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAddressListsAsync(array $args = [])
* @method \Aws\Result listArchiveExports(array $args = []) * @method \Aws\Result listArchiveExports(array $args = [])
* @method \GuzzleHttp\Promise\Promise listArchiveExportsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listArchiveExportsAsync(array $args = [])
* @method \Aws\Result listArchiveSearches(array $args = []) * @method \Aws\Result listArchiveSearches(array $args = [])
@ -87,8 +69,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listArchivesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listArchivesAsync(array $args = [])
* @method \Aws\Result listIngressPoints(array $args = []) * @method \Aws\Result listIngressPoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listIngressPointsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listIngressPointsAsync(array $args = [])
* @method \Aws\Result listMembersOfAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMembersOfAddressListAsync(array $args = [])
* @method \Aws\Result listRelays(array $args = []) * @method \Aws\Result listRelays(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRelaysAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRelaysAsync(array $args = [])
* @method \Aws\Result listRuleSets(array $args = []) * @method \Aws\Result listRuleSets(array $args = [])
@ -97,16 +77,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listTrafficPolicies(array $args = []) * @method \Aws\Result listTrafficPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTrafficPoliciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTrafficPoliciesAsync(array $args = [])
* @method \Aws\Result registerMemberToAddressList(array $args = [])
* @method \GuzzleHttp\Promise\Promise registerMemberToAddressListAsync(array $args = [])
* @method \Aws\Result startAddressListImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startAddressListImportJobAsync(array $args = [])
* @method \Aws\Result startArchiveExport(array $args = []) * @method \Aws\Result startArchiveExport(array $args = [])
* @method \GuzzleHttp\Promise\Promise startArchiveExportAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startArchiveExportAsync(array $args = [])
* @method \Aws\Result startArchiveSearch(array $args = []) * @method \Aws\Result startArchiveSearch(array $args = [])
* @method \GuzzleHttp\Promise\Promise startArchiveSearchAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startArchiveSearchAsync(array $args = [])
* @method \Aws\Result stopAddressListImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopAddressListImportJobAsync(array $args = [])
* @method \Aws\Result stopArchiveExport(array $args = []) * @method \Aws\Result stopArchiveExport(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopArchiveExportAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise stopArchiveExportAsync(array $args = [])
* @method \Aws\Result stopArchiveSearch(array $args = []) * @method \Aws\Result stopArchiveSearch(array $args = [])

View File

@ -51,8 +51,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listVersions(array $args = []) * @method \Aws\Result listVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listVersionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listVersionsAsync(array $args = [])
* @method \Aws\Result probe(array $args = [])
* @method \GuzzleHttp\Promise\Promise probeAsync(array $args = [])
* @method \Aws\Result putPolicy(array $args = []) * @method \Aws\Result putPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = [])
* @method \Aws\Result searchJobs(array $args = []) * @method \Aws\Result searchJobs(array $args = [])

View File

@ -51,10 +51,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise putChannelPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putChannelPolicyAsync(array $args = [])
* @method \Aws\Result putOriginEndpointPolicy(array $args = []) * @method \Aws\Result putOriginEndpointPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putOriginEndpointPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putOriginEndpointPolicyAsync(array $args = [])
* @method \Aws\Result resetChannelState(array $args = [])
* @method \GuzzleHttp\Promise\Promise resetChannelStateAsync(array $args = [])
* @method \Aws\Result resetOriginEndpointState(array $args = [])
* @method \GuzzleHttp\Promise\Promise resetOriginEndpointStateAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = []) * @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = []) * @method \Aws\Result untagResource(array $args = [])

View File

@ -34,10 +34,6 @@ final class MetricsBuilder
const FLEXIBLE_CHECKSUMS_REQ_CRC64 = "W"; const FLEXIBLE_CHECKSUMS_REQ_CRC64 = "W";
const FLEXIBLE_CHECKSUMS_REQ_SHA1 = "X"; const FLEXIBLE_CHECKSUMS_REQ_SHA1 = "X";
const FLEXIBLE_CHECKSUMS_REQ_SHA256 = "Y"; const FLEXIBLE_CHECKSUMS_REQ_SHA256 = "Y";
const FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED = "Z";
const FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED = "a";
const FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED = "b";
const FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED = "c";
const CREDENTIALS_CODE = "e"; const CREDENTIALS_CODE = "e";
const CREDENTIALS_ENV_VARS = "g"; const CREDENTIALS_ENV_VARS = "g";
const CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN = "h"; const CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN = "h";
@ -140,10 +136,7 @@ final class MetricsBuilder
'signature' => 'appendSignatureMetric', 'signature' => 'appendSignatureMetric',
'request_compression' => 'appendRequestCompressionMetric', 'request_compression' => 'appendRequestCompressionMetric',
'request_checksum' => 'appendRequestChecksumMetric', 'request_checksum' => 'appendRequestChecksumMetric',
'credentials' => 'appendCredentialsMetric', 'credentials' => 'appendCredentialsMetric'
'account_id_endpoint_mode' => 'appendAccountIdEndpointMode',
'account_id_endpoint' => 'appendAccountIdEndpoint',
'request_checksum_calculation' => 'appendRequestChecksumCalculationMetric',
]; ];
$fn = $appendMetricFns[$featureGroup]; $fn = $appendMetricFns[$featureGroup];
@ -160,9 +153,9 @@ final class MetricsBuilder
private function appendSignatureMetric(string $signature): void private function appendSignatureMetric(string $signature): void
{ {
if ($signature === 'v4-s3express') { if ($signature === 'v4-s3express') {
$this->append(self::S3_EXPRESS_BUCKET); $this->append(MetricsBuilder::S3_EXPRESS_BUCKET);
} elseif ($signature === 'v4a') { } elseif ($signature === 'v4a') {
$this->append(self::SIGV4A_SIGNING); $this->append(MetricsBuilder::SIGV4A_SIGNING);
} }
} }
@ -176,7 +169,7 @@ final class MetricsBuilder
private function appendRequestCompressionMetric(string $format): void private function appendRequestCompressionMetric(string $format): void
{ {
if ($format === 'gzip') { if ($format === 'gzip') {
$this->append(self::GZIP_REQUEST_COMPRESSION); $this->append(MetricsBuilder::GZIP_REQUEST_COMPRESSION);
} }
} }
@ -190,15 +183,15 @@ final class MetricsBuilder
private function appendRequestChecksumMetric(string $algorithm): void private function appendRequestChecksumMetric(string $algorithm): void
{ {
if ($algorithm === 'crc32') { if ($algorithm === 'crc32') {
$this->append(self::FLEXIBLE_CHECKSUMS_REQ_CRC32); $this->append(MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_CRC32);
} elseif ($algorithm === 'crc32c') { } elseif ($algorithm === 'crc32c') {
$this->append(self::FLEXIBLE_CHECKSUMS_REQ_CRC32C); $this->append(MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_CRC32C);
} elseif ($algorithm === 'crc64') { } elseif ($algorithm === 'crc64') {
$this->append(self::FLEXIBLE_CHECKSUMS_REQ_CRC64); $this->append(MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_CRC64);
} elseif ($algorithm === 'sha1') { } elseif ($algorithm === 'sha1') {
$this->append(self::FLEXIBLE_CHECKSUMS_REQ_SHA1); $this->append(MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_SHA1);
} elseif ($algorithm === 'sha256') { } elseif ($algorithm === 'sha256') {
$this->append(self::FLEXIBLE_CHECKSUMS_REQ_SHA256); $this->append(MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_SHA256);
} }
} }
@ -222,187 +215,35 @@ final class MetricsBuilder
static $credentialsMetricMapping = [ static $credentialsMetricMapping = [
CredentialSources::STATIC => CredentialSources::STATIC =>
self::CREDENTIALS_CODE, MetricsBuilder::CREDENTIALS_CODE,
CredentialSources::ENVIRONMENT => CredentialSources::ENVIRONMENT =>
self::CREDENTIALS_ENV_VARS, MetricsBuilder::CREDENTIALS_ENV_VARS,
CredentialSources::ENVIRONMENT_STS_WEB_ID_TOKEN => CredentialSources::ENVIRONMENT_STS_WEB_ID_TOKEN =>
self::CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN, MetricsBuilder::CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN,
CredentialSources::STS_ASSUME_ROLE => CredentialSources::STS_ASSUME_ROLE =>
self::CREDENTIALS_STS_ASSUME_ROLE, MetricsBuilder::CREDENTIALS_STS_ASSUME_ROLE,
CredentialSources::STS_WEB_ID_TOKEN => CredentialSources::STS_WEB_ID_TOKEN =>
self::CREDENTIALS_STS_ASSUME_ROLE_WEB_ID, MetricsBuilder::CREDENTIALS_STS_ASSUME_ROLE_WEB_ID,
CredentialSources::PROFILE => CredentialSources::PROFILE =>
self::CREDENTIALS_PROFILE, MetricsBuilder::CREDENTIALS_PROFILE,
CredentialSources::IMDS => CredentialSources::IMDS =>
self::CREDENTIALS_IMDS, MetricsBuilder::CREDENTIALS_IMDS,
CredentialSources::ECS => CredentialSources::ECS =>
self::CREDENTIALS_HTTP, MetricsBuilder::CREDENTIALS_HTTP,
CredentialSources::PROFILE_STS_WEB_ID_TOKEN => CredentialSources::PROFILE_STS_WEB_ID_TOKEN =>
self::CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN, MetricsBuilder::CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN,
CredentialSources::PROFILE_PROCESS => CredentialSources::PROFILE_PROCESS =>
self::CREDENTIALS_PROFILE_PROCESS, MetricsBuilder::CREDENTIALS_PROFILE_PROCESS,
CredentialSources::PROFILE_SSO => CredentialSources::PROFILE_SSO =>
self::CREDENTIALS_PROFILE_SSO, MetricsBuilder::CREDENTIALS_PROFILE_SSO,
CredentialSources::PROFILE_SSO_LEGACY => CredentialSources::PROFILE_SSO_LEGACY =>
self::CREDENTIALS_PROFILE_SSO_LEGACY, MetricsBuilder::CREDENTIALS_PROFILE_SSO_LEGACY,
]; ];
if (isset($credentialsMetricMapping[$source])) { if (isset($credentialsMetricMapping[$source])) {
$this->append($credentialsMetricMapping[$source]); $this->append($credentialsMetricMapping[$source]);
} }
} }
private function appendRequestChecksumCalculationMetric(
string $checkSumCalculation
): void
{
static $checksumCalculationMetricMapping = [
'when_supported' => self::FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED,
'when_required' => self::FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED,
];
if (isset($checksumCalculationMetricMapping[$checkSumCalculation])) {
$this->append($checksumCalculationMetricMapping[$checkSumCalculation]);
}
}
/**
* Appends the account_id_endpoint_mode metrics based on
* the value resolved.
*
* @param string $accountIdEndpointMode
*
* @return void
*/
private function appendAccountIdEndpointMode(
string $accountIdEndpointMode
): void
{
if (empty($accountIdEndpointMode)) {
return;
}
if ($accountIdEndpointMode === 'preferred') {
$this->append(self::ACCOUNT_ID_MODE_PREFERRED);
} elseif ($accountIdEndpointMode === 'disabled') {
$this->append(self::ACCOUNT_ID_MODE_DISABLED);
} elseif ($accountIdEndpointMode === 'required') {
$this->append(self::ACCOUNT_ID_MODE_REQUIRED);
}
}
/**
* Appends the account_id_endpoint metric whenever a resolved endpoint
* matches an account_id endpoint pattern which also defined here.
*
* @param string $endpoint
*
* @return void
*/
private function appendAccountIdEndpoint(string $endpoint): void
{
static $pattern = "/(https|http):\\/\\/\\d{12}\\.ddb/";
if (preg_match($pattern, $endpoint)) {
$this->append(self::ACCOUNT_ID_ENDPOINT);
}
}
/**
* Resolves metrics from client arguments.
*
* @param array $args
*
* @return void
*/
public function resolveAndAppendFromArgs(array $args = []): void
{
static $metricsFnList = [
'appendEndpointMetric',
'appendRetryConfigMetric',
'appendResponseChecksumValidationMetric',
];
foreach ($metricsFnList as $metricFn) {
$this->{$metricFn}($args);
}
}
/**
* Appends the endpoint metric into the metrics builder,
* just if a custom endpoint was provided at client construction.
*
* @param array $args
*
* @return void
*/
private function appendEndpointMetric(array $args): void
{
if (!empty($args['endpoint_override'])) {
$this->append(MetricsBuilder::ENDPOINT_OVERRIDE);
}
}
/**
* Appends the retry mode metric into the metrics builder,
* based on the resolved retry config mode.
*
* @param array $args
*
* @return void
*/
private function appendRetryConfigMetric(array $args): void
{
$retries = $args['retries'] ?? null;
if ($retries === null) {
return;
}
$retryMode = '';
if ($retries instanceof \Aws\Retry\Configuration) {
$retryMode = $retries->getMode();
} elseif (is_array($retries)
&& isset($retries["mode"])
) {
$retryMode = $retries["mode"];
}
if ($retryMode === 'legacy') {
$this->append(
MetricsBuilder::RETRY_MODE_LEGACY
);
} elseif ($retryMode === 'standard') {
$this->append(
MetricsBuilder::RETRY_MODE_STANDARD
);
} elseif ($retryMode === 'adaptive') {
$this->append(
MetricsBuilder::RETRY_MODE_ADAPTIVE
);
}
}
/**
* Appends the provided/resolved response checksum validation mode.
*
* @param array $args
*
* @return void
*/
private function appendResponseChecksumValidationMetric(array $args): void
{
if (empty($args['response_checksum_validation'])) {
return;
}
$checksumValidation = $args['response_checksum_validation'];
static $checksumValidationMetricMapping = [
'when_supported' => MetricsBuilder::FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED,
'when_required' => MetricsBuilder::FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED,
];
if (isset($checksumValidationMetricMapping[$checksumValidation])) {
$this->append($checksumValidationMetricMapping[$checksumValidation]);
}
}
/** /**
* Validates if a metric can be appended by ensuring the total size, * Validates if a metric can be appended by ensuring the total size,
* including the new metric and separator, does not exceed the limit. * including the new metric and separator, does not exceed the limit.
@ -463,8 +304,6 @@ final class MetricsBuilder
$metric $metric
): void ): void
{ {
$middlewareName = 'metrics-capture-'.$metric;
if (!$handlerList->hasMiddleware($middlewareName)) {
$handlerList->appendBuild( $handlerList->appendBuild(
Middleware::tap( Middleware::tap(
function (CommandInterface $command) use ($metric) { function (CommandInterface $command) use ($metric) {
@ -473,8 +312,7 @@ final class MetricsBuilder
); );
} }
), ),
$middlewareName 'metrics-capture-'.$metric
); );
} }
}
} }

View File

@ -51,28 +51,8 @@ final class Middleware
if ($source !== null if ($source !== null
&& $operation->getInput()->hasMember($bodyParameter) && $operation->getInput()->hasMember($bodyParameter)
) { ) {
$lazyOpenStream = new LazyOpenStream($source, 'r'); $command[$bodyParameter] = new LazyOpenStream($source, 'r');
$command[$bodyParameter] = $lazyOpenStream;
unset($command[$sourceParameter]); unset($command[$sourceParameter]);
$next = $handler($command, $request);
// To avoid failures in some tests cases
if ($next !== null && method_exists($next, 'then')) {
return $next->then(
function ($result) use ($lazyOpenStream) {
// To make sure the resource is closed.
$lazyOpenStream->close();
return $result;
}
)->otherwise(function (\Throwable $e) use ($lazyOpenStream) {
$lazyOpenStream->close();
throw $e;
});
}
return $next;
} }
return $handler($command, $request); return $handler($command, $request);

View File

@ -49,9 +49,6 @@ abstract class AbstractUploadManager implements Promise\PromisorInterface
/** @var UploadState State used to manage the upload. */ /** @var UploadState State used to manage the upload. */
protected $state; protected $state;
/** @var bool Configuration used to indicate if upload progress will be displayed. */
protected $displayProgress;
/** /**
* @param Client $client * @param Client $client
* @param array $config * @param array $config
@ -62,12 +59,6 @@ abstract class AbstractUploadManager implements Promise\PromisorInterface
$this->info = $this->loadUploadWorkflowInfo(); $this->info = $this->loadUploadWorkflowInfo();
$this->config = $config + self::$defaultConfig; $this->config = $config + self::$defaultConfig;
$this->state = $this->determineState(); $this->state = $this->determineState();
if (isset($config['display_progress'])
&& is_bool($config['display_progress'])
) {
$this->displayProgress = $config['display_progress'];
}
} }
/** /**
@ -247,7 +238,7 @@ abstract class AbstractUploadManager implements Promise\PromisorInterface
} }
$id[$param] = $this->config[$key]; $id[$param] = $this->config[$key];
} }
$state = new UploadState($id, $this->config); $state = new UploadState($id);
$state->setPartSize($this->determinePartSize()); $state->setPartSize($this->determinePartSize());
return $state; return $state;

View File

@ -12,9 +12,6 @@ abstract class AbstractUploader extends AbstractUploadManager
/** @var Stream Source of the data to be uploaded. */ /** @var Stream Source of the data to be uploaded. */
protected $source; protected $source;
/** @var bool Configuration used to indicate if upload progress will be displayed. */
protected $displayProgress;
/** /**
* @param Client $client * @param Client $client
* @param mixed $source * @param mixed $source

View File

@ -12,19 +12,6 @@ class UploadState
const CREATED = 0; const CREATED = 0;
const INITIATED = 1; const INITIATED = 1;
const COMPLETED = 2; const COMPLETED = 2;
const PROGRESS_THRESHOLD_SIZE = 8;
private $progressBar = [
"Transfer initiated...\n| | 0.0%\n",
"|== | 12.5%\n",
"|===== | 25.0%\n",
"|======= | 37.5%\n",
"|========== | 50.0%\n",
"|============ | 62.5%\n",
"|=============== | 75.0%\n",
"|================= | 87.5%\n",
"|====================| 100.0%\nTransfer complete!\n"
];
/** @var array Params used to identity the upload. */ /** @var array Params used to identity the upload. */
private $id; private $id;
@ -38,24 +25,12 @@ class UploadState
/** @var int Identifies the status the upload. */ /** @var int Identifies the status the upload. */
private $status = self::CREATED; private $status = self::CREATED;
/** @var array Thresholds for progress of the upload. */
private $progressThresholds = [];
/** @var boolean Determines status for tracking the upload */
private $displayProgress = false;
/** /**
* @param array $id Params used to identity the upload. * @param array $id Params used to identity the upload.
*/ */
public function __construct(array $id, array $config = []) public function __construct(array $id)
{ {
$this->id = $id; $this->id = $id;
if (isset($config['display_progress'])
&& is_bool($config['display_progress'])
) {
$this->displayProgress = $config['display_progress'];
}
} }
/** /**
@ -70,7 +45,7 @@ class UploadState
} }
/** /**
* Sets the "upload_id", or 3rd part of the upload's ID. This typically * Set's the "upload_id", or 3rd part of the upload's ID. This typically
* only needs to be done after initiating an upload. * only needs to be done after initiating an upload.
* *
* @param string $key The param key of the upload_id. * @param string $key The param key of the upload_id.
@ -101,55 +76,6 @@ class UploadState
$this->partSize = $partSize; $this->partSize = $partSize;
} }
/**
* Sets the 1/8th thresholds array. $totalSize is only sent if
* 'track_upload' is true.
*
* @param $totalSize numeric Size of object to upload.
*
* @return array
*/
public function setProgressThresholds($totalSize): array
{
if(!is_numeric($totalSize)) {
throw new \InvalidArgumentException(
'The total size of the upload must be a number.'
);
}
$this->progressThresholds[0] = 0;
for ($i = 1; $i <= self::PROGRESS_THRESHOLD_SIZE; $i++) {
$this->progressThresholds[] = round(
$totalSize * ($i / self::PROGRESS_THRESHOLD_SIZE)
);
}
return $this->progressThresholds;
}
/**
* Prints progress of upload.
*
* @param $totalUploaded numeric Size of upload so far.
*/
public function getDisplayProgress($totalUploaded): void
{
if (!is_numeric($totalUploaded)) {
throw new \InvalidArgumentException(
'The size of the bytes being uploaded must be a number.'
);
}
if ($this->displayProgress) {
while (!empty($this->progressBar)
&& $totalUploaded >= $this->progressThresholds[0]
) {
echo array_shift($this->progressBar);
array_shift($this->progressThresholds);
}
}
}
/** /**
* Marks a part as being uploaded. * Marks a part as being uploaded.
* *
@ -182,6 +108,7 @@ class UploadState
public function getUploadedParts() public function getUploadedParts()
{ {
ksort($this->uploadedParts); ksort($this->uploadedParts);
return $this->uploadedParts; return $this->uploadedParts;
} }

View File

@ -31,8 +31,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeFirewallAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeFirewallAsync(array $args = [])
* @method \Aws\Result describeFirewallPolicy(array $args = []) * @method \Aws\Result describeFirewallPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeFirewallPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeFirewallPolicyAsync(array $args = [])
* @method \Aws\Result describeFlowOperation(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeFlowOperationAsync(array $args = [])
* @method \Aws\Result describeLoggingConfiguration(array $args = []) * @method \Aws\Result describeLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLoggingConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result describeResourcePolicy(array $args = []) * @method \Aws\Result describeResourcePolicy(array $args = [])
@ -45,18 +43,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeTLSInspectionConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeTLSInspectionConfigurationAsync(array $args = [])
* @method \Aws\Result disassociateSubnets(array $args = []) * @method \Aws\Result disassociateSubnets(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateSubnetsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disassociateSubnetsAsync(array $args = [])
* @method \Aws\Result getAnalysisReportResults(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAnalysisReportResultsAsync(array $args = [])
* @method \Aws\Result listAnalysisReports(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAnalysisReportsAsync(array $args = [])
* @method \Aws\Result listFirewallPolicies(array $args = []) * @method \Aws\Result listFirewallPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFirewallPoliciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listFirewallPoliciesAsync(array $args = [])
* @method \Aws\Result listFirewalls(array $args = []) * @method \Aws\Result listFirewalls(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFirewallsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listFirewallsAsync(array $args = [])
* @method \Aws\Result listFlowOperationResults(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowOperationResultsAsync(array $args = [])
* @method \Aws\Result listFlowOperations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowOperationsAsync(array $args = [])
* @method \Aws\Result listRuleGroups(array $args = []) * @method \Aws\Result listRuleGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRuleGroupsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRuleGroupsAsync(array $args = [])
* @method \Aws\Result listTLSInspectionConfigurations(array $args = []) * @method \Aws\Result listTLSInspectionConfigurations(array $args = [])
@ -65,18 +55,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putResourcePolicy(array $args = []) * @method \Aws\Result putResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
* @method \Aws\Result startAnalysisReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise startAnalysisReportAsync(array $args = [])
* @method \Aws\Result startFlowCapture(array $args = [])
* @method \GuzzleHttp\Promise\Promise startFlowCaptureAsync(array $args = [])
* @method \Aws\Result startFlowFlush(array $args = [])
* @method \GuzzleHttp\Promise\Promise startFlowFlushAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = []) * @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = []) * @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateFirewallAnalysisSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFirewallAnalysisSettingsAsync(array $args = [])
* @method \Aws\Result updateFirewallDeleteProtection(array $args = []) * @method \Aws\Result updateFirewallDeleteProtection(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFirewallDeleteProtectionAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateFirewallDeleteProtectionAsync(array $args = [])
* @method \Aws\Result updateFirewallDescription(array $args = []) * @method \Aws\Result updateFirewallDescription(array $args = [])

View File

@ -7,10 +7,6 @@ use Aws\AwsClient;
* This client is used to interact with the **AWS User Notifications** service. * This client is used to interact with the **AWS User Notifications** service.
* @method \Aws\Result associateChannel(array $args = []) * @method \Aws\Result associateChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateChannelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise associateChannelAsync(array $args = [])
* @method \Aws\Result associateManagedNotificationAccountContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateManagedNotificationAccountContactAsync(array $args = [])
* @method \Aws\Result associateManagedNotificationAdditionalChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateManagedNotificationAdditionalChannelAsync(array $args = [])
* @method \Aws\Result createEventRule(array $args = []) * @method \Aws\Result createEventRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEventRuleAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createEventRuleAsync(array $args = [])
* @method \Aws\Result createNotificationConfiguration(array $args = []) * @method \Aws\Result createNotificationConfiguration(array $args = [])
@ -21,42 +17,18 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteNotificationConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result deregisterNotificationHub(array $args = []) * @method \Aws\Result deregisterNotificationHub(array $args = [])
* @method \GuzzleHttp\Promise\Promise deregisterNotificationHubAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deregisterNotificationHubAsync(array $args = [])
* @method \Aws\Result disableNotificationsAccessForOrganization(array $args = [])
* @method \GuzzleHttp\Promise\Promise disableNotificationsAccessForOrganizationAsync(array $args = [])
* @method \Aws\Result disassociateChannel(array $args = []) * @method \Aws\Result disassociateChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateChannelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disassociateChannelAsync(array $args = [])
* @method \Aws\Result disassociateManagedNotificationAccountContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateManagedNotificationAccountContactAsync(array $args = [])
* @method \Aws\Result disassociateManagedNotificationAdditionalChannel(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateManagedNotificationAdditionalChannelAsync(array $args = [])
* @method \Aws\Result enableNotificationsAccessForOrganization(array $args = [])
* @method \GuzzleHttp\Promise\Promise enableNotificationsAccessForOrganizationAsync(array $args = [])
* @method \Aws\Result getEventRule(array $args = []) * @method \Aws\Result getEventRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEventRuleAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getEventRuleAsync(array $args = [])
* @method \Aws\Result getManagedNotificationChildEvent(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedNotificationChildEventAsync(array $args = [])
* @method \Aws\Result getManagedNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result getManagedNotificationEvent(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedNotificationEventAsync(array $args = [])
* @method \Aws\Result getNotificationConfiguration(array $args = []) * @method \Aws\Result getNotificationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getNotificationConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getNotificationConfigurationAsync(array $args = [])
* @method \Aws\Result getNotificationEvent(array $args = []) * @method \Aws\Result getNotificationEvent(array $args = [])
* @method \GuzzleHttp\Promise\Promise getNotificationEventAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getNotificationEventAsync(array $args = [])
* @method \Aws\Result getNotificationsAccessForOrganization(array $args = [])
* @method \GuzzleHttp\Promise\Promise getNotificationsAccessForOrganizationAsync(array $args = [])
* @method \Aws\Result listChannels(array $args = []) * @method \Aws\Result listChannels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listChannelsAsync(array $args = [])
* @method \Aws\Result listEventRules(array $args = []) * @method \Aws\Result listEventRules(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEventRulesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listEventRulesAsync(array $args = [])
* @method \Aws\Result listManagedNotificationChannelAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedNotificationChannelAssociationsAsync(array $args = [])
* @method \Aws\Result listManagedNotificationChildEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedNotificationChildEventsAsync(array $args = [])
* @method \Aws\Result listManagedNotificationConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedNotificationConfigurationsAsync(array $args = [])
* @method \Aws\Result listManagedNotificationEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedNotificationEventsAsync(array $args = [])
* @method \Aws\Result listNotificationConfigurations(array $args = []) * @method \Aws\Result listNotificationConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listNotificationConfigurationsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listNotificationConfigurationsAsync(array $args = [])
* @method \Aws\Result listNotificationEvents(array $args = []) * @method \Aws\Result listNotificationEvents(array $args = [])

View File

@ -59,8 +59,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listResourceSnapshotsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listResourceSnapshotsAsync(array $args = [])
* @method \Aws\Result listSolutions(array $args = []) * @method \Aws\Result listSolutions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSolutionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listSolutionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putSellingSystemSettings(array $args = []) * @method \Aws\Result putSellingSystemSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise putSellingSystemSettingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putSellingSystemSettingsAsync(array $args = [])
* @method \Aws\Result rejectEngagementInvitation(array $args = []) * @method \Aws\Result rejectEngagementInvitation(array $args = [])
@ -75,10 +73,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise stopResourceSnapshotJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise stopResourceSnapshotJobAsync(array $args = [])
* @method \Aws\Result submitOpportunity(array $args = []) * @method \Aws\Result submitOpportunity(array $args = [])
* @method \GuzzleHttp\Promise\Promise submitOpportunityAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise submitOpportunityAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateOpportunity(array $args = []) * @method \Aws\Result updateOpportunity(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateOpportunityAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateOpportunityAsync(array $args = [])
*/ */

View File

@ -11,8 +11,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise batchDeleteDocumentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchDeleteDocumentAsync(array $args = [])
* @method \Aws\Result batchPutDocument(array $args = []) * @method \Aws\Result batchPutDocument(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchPutDocumentAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchPutDocumentAsync(array $args = [])
* @method \Aws\Result cancelSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelSubscriptionAsync(array $args = [])
* @method \Aws\Result chatSync(array $args = []) * @method \Aws\Result chatSync(array $args = [])
* @method \GuzzleHttp\Promise\Promise chatSyncAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise chatSyncAsync(array $args = [])
* @method \Aws\Result createApplication(array $args = []) * @method \Aws\Result createApplication(array $args = [])
@ -27,16 +25,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createPluginAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createPluginAsync(array $args = [])
* @method \Aws\Result createRetriever(array $args = []) * @method \Aws\Result createRetriever(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRetrieverAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createRetrieverAsync(array $args = [])
* @method \Aws\Result createSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSubscriptionAsync(array $args = [])
* @method \Aws\Result createUser(array $args = []) * @method \Aws\Result createUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
* @method \Aws\Result createWebExperience(array $args = []) * @method \Aws\Result createWebExperience(array $args = [])
* @method \GuzzleHttp\Promise\Promise createWebExperienceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createWebExperienceAsync(array $args = [])
* @method \Aws\Result deleteApplication(array $args = []) * @method \Aws\Result deleteApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
* @method \Aws\Result deleteAttachment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAttachmentAsync(array $args = [])
* @method \Aws\Result deleteChatControlsConfiguration(array $args = []) * @method \Aws\Result deleteChatControlsConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChatControlsConfigurationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteChatControlsConfigurationAsync(array $args = [])
* @method \Aws\Result deleteConversation(array $args = []) * @method \Aws\Result deleteConversation(array $args = [])
@ -113,8 +107,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listPluginsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listPluginsAsync(array $args = [])
* @method \Aws\Result listRetrievers(array $args = []) * @method \Aws\Result listRetrievers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRetrieversAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listRetrieversAsync(array $args = [])
* @method \Aws\Result listSubscriptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSubscriptionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = []) * @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listWebExperiences(array $args = []) * @method \Aws\Result listWebExperiences(array $args = [])
@ -147,8 +139,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updatePluginAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updatePluginAsync(array $args = [])
* @method \Aws\Result updateRetriever(array $args = []) * @method \Aws\Result updateRetriever(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRetrieverAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateRetrieverAsync(array $args = [])
* @method \Aws\Result updateSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSubscriptionAsync(array $args = [])
* @method \Aws\Result updateUser(array $args = []) * @method \Aws\Result updateUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = [])
* @method \Aws\Result updateWebExperience(array $args = []) * @method \Aws\Result updateWebExperience(array $args = [])

View File

@ -14,6 +14,7 @@ use Aws;
*/ */
class AuthTokenGenerator class AuthTokenGenerator
{ {
private $credentialProvider; private $credentialProvider;
/** /**

View File

@ -59,8 +59,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getSnapshotAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getSnapshotAsync(array $args = [])
* @method \Aws\Result getTableRestoreStatus(array $args = []) * @method \Aws\Result getTableRestoreStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTableRestoreStatusAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getTableRestoreStatusAsync(array $args = [])
* @method \Aws\Result getTrack(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTrackAsync(array $args = [])
* @method \Aws\Result getUsageLimit(array $args = []) * @method \Aws\Result getUsageLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUsageLimitAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getUsageLimitAsync(array $args = [])
* @method \Aws\Result getWorkgroup(array $args = []) * @method \Aws\Result getWorkgroup(array $args = [])
@ -85,8 +83,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTableRestoreStatusAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTableRestoreStatusAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = []) * @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listTracks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTracksAsync(array $args = [])
* @method \Aws\Result listUsageLimits(array $args = []) * @method \Aws\Result listUsageLimits(array $args = [])
* @method \GuzzleHttp\Promise\Promise listUsageLimitsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listUsageLimitsAsync(array $args = [])
* @method \Aws\Result listWorkgroups(array $args = []) * @method \Aws\Result listWorkgroups(array $args = [])

View File

@ -47,8 +47,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = []) * @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateClusterAsync(array $args = [])
* @method \Aws\Result updateControlPanel(array $args = []) * @method \Aws\Result updateControlPanel(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateControlPanelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateControlPanelAsync(array $args = [])
* @method \Aws\Result updateRoutingControl(array $args = []) * @method \Aws\Result updateRoutingControl(array $args = [])

View File

@ -2,7 +2,6 @@
namespace Aws\S3; namespace Aws\S3;
use Aws\Api\Service; use Aws\Api\Service;
use Aws\Api\Shape;
use Aws\CommandInterface; use Aws\CommandInterface;
use Aws\MetricsBuilder; use Aws\MetricsBuilder;
use GuzzleHttp\Psr7; use GuzzleHttp\Psr7;
@ -20,28 +19,14 @@ use Psr\Http\Message\StreamInterface;
class ApplyChecksumMiddleware class ApplyChecksumMiddleware
{ {
use CalculatesChecksumTrait; use CalculatesChecksumTrait;
private static $sha256AndMd5 = [
public const DEFAULT_CALCULATION_MODE = 'when_supported'; 'PutObject',
public const DEFAULT_ALGORITHM = 'crc32'; 'UploadPart',
/**
* @var true[]
*
* S3 Operations for which pre-calculated SHA256
* Checksums can be added to the command
*/
public static $sha256 = [
'PutObject' => true,
'UploadPart' => true,
]; ];
/** @var Service */ /** @var Service */
private $api; private $api;
/** @var array */
private $config;
/** @var callable */
private $nextHandler; private $nextHandler;
/** /**
@ -50,22 +35,17 @@ class ApplyChecksumMiddleware
* @param Service $api * @param Service $api
* @return callable * @return callable
*/ */
public static function wrap(Service $api, array $config = []) public static function wrap(Service $api)
{ {
return function (callable $handler) use ($api, $config) { return function (callable $handler) use ($api) {
return new self($handler, $api, $config); return new self($handler, $api);
}; };
} }
public function __construct( public function __construct(callable $nextHandler, Service $api)
callable $nextHandler,
Service $api,
array $config = []
)
{ {
$this->api = $api; $this->api = $api;
$this->nextHandler = $nextHandler; $this->nextHandler = $nextHandler;
$this->config = $config;
} }
public function __invoke( public function __invoke(
@ -75,51 +55,68 @@ class ApplyChecksumMiddleware
$next = $this->nextHandler; $next = $this->nextHandler;
$name = $command->getName(); $name = $command->getName();
$body = $request->getBody(); $body = $request->getBody();
$operation = $this->api->getOperation($name);
$mode = $this->config['request_checksum_calculation']
?? self::DEFAULT_CALCULATION_MODE;
$command->getMetricsBuilder()->identifyMetricByValueAndAppend( //Checks if AddContentMD5 has been specified for PutObject or UploadPart
'request_checksum_calculation', $addContentMD5 = $command['AddContentMD5'] ?? null;
$mode
);
// Trigger warning if AddContentMD5 is specified for PutObject or UploadPart $op = $this->api->getOperation($command->getName());
$this->handleDeprecatedAddContentMD5($command);
$checksumInfo = $operation['httpChecksum'] ?? []; $checksumInfo = $op['httpChecksum'] ?? [];
$checksumMemberName = $checksumInfo['requestAlgorithmMember'] ?? ''; $checksumMemberName = array_key_exists('requestAlgorithmMember', $checksumInfo)
$checksumMember = !empty($checksumMemberName) ? $checksumInfo['requestAlgorithmMember']
? $operation->getInput()->getMember($checksumMemberName) : "";
: null;
$checksumRequired = $checksumInfo['requestChecksumRequired'] ?? false;
$requestedAlgorithm = $command[$checksumMemberName] ?? null; $requestedAlgorithm = $command[$checksumMemberName] ?? null;
if (!empty($checksumMemberName) && !empty($requestedAlgorithm)) {
$shouldAddChecksum = $this->shouldAddChecksum( $requestedAlgorithm = strtolower($requestedAlgorithm);
$mode, $checksumMember = $op->getInput()->getMember($checksumMemberName);
$checksumRequired, $supportedAlgorithms = isset($checksumMember['enum'])
$checksumMember, ? array_map('strtolower', $checksumMember['enum'])
$requestedAlgorithm : null;
if (is_array($supportedAlgorithms)
&& in_array($requestedAlgorithm, $supportedAlgorithms)
) {
$request = $this->addAlgorithmHeader($requestedAlgorithm, $request, $body);
} else {
throw new InvalidArgumentException(
"Unsupported algorithm supplied for input variable {$checksumMemberName}."
. " Supported checksums for this operation include: "
. implode(", ", $supportedAlgorithms) . "."
); );
if ($shouldAddChecksum) { }
if (!$this->hasAlgorithmHeader($request)) {
$supportedAlgorithms = array_map('strtolower', $checksumMember['enum'] ?? []);
$algorithm = $this->determineChecksumAlgorithm(
$supportedAlgorithms,
$requestedAlgorithm,
$checksumMemberName
);
$request = $this->addAlgorithmHeader($algorithm, $request, $body);
$command->getMetricsBuilder()->identifyMetricByValueAndAppend( $command->getMetricsBuilder()->identifyMetricByValueAndAppend(
'request_checksum', 'request_checksum',
$algorithm $requestedAlgorithm
); );
return $next($command, $request);
}
if (!empty($checksumInfo)) {
//if the checksum member is absent, check if it's required
$checksumRequired = $checksumInfo['requestChecksumRequired'] ?? null;
if ((!empty($checksumRequired))
|| (in_array($name, self::$sha256AndMd5) && $addContentMD5)
) {
//S3Express doesn't support MD5; default to crc32 instead
if ($this->isS3Express($command)) {
$request = $this->addAlgorithmHeader('crc32', $request, $body);
$command->getMetricsBuilder()->append(
MetricsBuilder::FLEXIBLE_CHECKSUMS_REQ_CRC32
);
} elseif (!$request->hasHeader('Content-MD5')) {
// Set the content MD5 header for operations that require it.
$request = $request->withHeader(
'Content-MD5',
base64_encode(Psr7\Utils::hash($body, 'md5', true))
);
}
return $next($command, $request);
} }
} }
// Set the content hash header if ContentSHA256 is provided if (in_array($name, self::$sha256AndMd5) && $command['ContentSHA256']) {
if (isset(self::$sha256[$name]) && $command['ContentSHA256']) { // Set the content hash header if provided in the parameters.
$request = $request->withHeader( $request = $request->withHeader(
'X-Amz-Content-Sha256', 'X-Amz-Content-Sha256',
$command['ContentSHA256'] $command['ContentSHA256']
@ -132,111 +129,32 @@ class ApplyChecksumMiddleware
return $next($command, $request); return $next($command, $request);
} }
/**
* @param CommandInterface $command
*
* @return void
*/
private function handleDeprecatedAddContentMD5(CommandInterface $command): void
{
if (!empty($command['AddContentMD5'])) {
trigger_error(
'S3 no longer supports MD5 checksums. ' .
'A CRC32 checksum will be computed and applied on your behalf.',
E_USER_DEPRECATED
);
$command['ChecksumAlgorithm'] = self::DEFAULT_ALGORITHM;
}
}
/**
* @param string $mode
* @param Shape|null $checksumMember
* @param string $name
* @param bool $checksumRequired
* @param string|null $requestedAlgorithm
*
* @return bool
*/
private function shouldAddChecksum(
string $mode,
bool $checksumRequired,
?Shape $checksumMember,
?string $requestedAlgorithm
): bool
{
return ($mode === 'when_supported' && $checksumMember)
|| ($mode === 'when_required'
&& ($checksumRequired || ($checksumMember && $requestedAlgorithm)));
}
/**
* @param Shape|null $checksumMember
* @param string|null $requestedAlgorithm
* @param string|null $checksumMemberName
*
* @return string
*/
private function determineChecksumAlgorithm(
array $supportedAlgorithms,
?string $requestedAlgorithm,
?string $checksumMemberName
): string
{
$algorithm = self::DEFAULT_ALGORITHM;
if ($requestedAlgorithm) {
$requestedAlgorithm = strtolower($requestedAlgorithm);
if (!in_array($requestedAlgorithm, $supportedAlgorithms)) {
throw new InvalidArgumentException(
"Unsupported algorithm supplied for input variable {$checksumMemberName}. " .
"Supported checksums for this operation include: "
. implode(", ", $supportedAlgorithms) . "."
);
}
$algorithm = $requestedAlgorithm;
}
return $algorithm;
}
/** /**
* @param string $requestedAlgorithm * @param string $requestedAlgorithm
* @param RequestInterface $request * @param RequestInterface $request
* @param StreamInterface $body * @param StreamInterface $body
*
* @return RequestInterface * @return RequestInterface
*/ */
private function addAlgorithmHeader( private function addAlgorithmHeader(
string $requestedAlgorithm, string $requestedAlgorithm,
RequestInterface $request, RequestInterface $request,
StreamInterface $body StreamInterface $body
): RequestInterface ) {
{
$headerName = "x-amz-checksum-{$requestedAlgorithm}"; $headerName = "x-amz-checksum-{$requestedAlgorithm}";
if (!$request->hasHeader($headerName)) { if (!$request->hasHeader($headerName)) {
$encoded = self::getEncodedValue($requestedAlgorithm, $body); $encoded = $this->getEncodedValue($requestedAlgorithm, $body);
$request = $request->withHeader($headerName, $encoded); $request = $request->withHeader($headerName, $encoded);
} }
return $request; return $request;
} }
/** /**
* @param RequestInterface $request * @param CommandInterface $command
*
* @return bool * @return bool
*/ */
private function hasAlgorithmHeader(RequestInterface $request): bool private function isS3Express(CommandInterface $command): bool
{ {
$headers = $request->getHeaders(); return isset($command['@context']['signing_service'])
&& $command['@context']['signing_service'] === 's3express';
foreach ($headers as $name => $values) {
if (stripos($name, 'x-amz-checksum-') === 0) {
return true;
}
}
return false;
} }
} }

View File

@ -8,13 +8,6 @@ use InvalidArgumentException;
trait CalculatesChecksumTrait trait CalculatesChecksumTrait
{ {
private static $supportedAlgorithms = [
'crc32c' => true,
'crc32' => true,
'sha256' => true,
'sha1' => true
];
/** /**
* @param string $requestedAlgorithm the algorithm to encode with * @param string $requestedAlgorithm the algorithm to encode with
* @param string $value the value to be encoded * @param string $value the value to be encoded
@ -23,37 +16,35 @@ trait CalculatesChecksumTrait
public static function getEncodedValue($requestedAlgorithm, $value) { public static function getEncodedValue($requestedAlgorithm, $value) {
$requestedAlgorithm = strtolower($requestedAlgorithm); $requestedAlgorithm = strtolower($requestedAlgorithm);
$useCrt = extension_loaded('awscrt'); $useCrt = extension_loaded('awscrt');
if (isset(self::$supportedAlgorithms[$requestedAlgorithm])) {
if ($useCrt) { if ($useCrt) {
$crt = new Crt(); $crt = new Crt();
switch ($requestedAlgorithm) { switch ($requestedAlgorithm) {
case 'crc32c': case 'crc32c':
return base64_encode(pack('N*',($crt::crc32c($value)))); return base64_encode(pack('N*',($crt->crc32c($value))));
case 'crc32': case 'crc32':
return base64_encode(pack('N*',($crt::crc32($value)))); return base64_encode(pack('N*',($crt->crc32($value))));
case 'sha256':
case 'sha1':
return base64_encode(Psr7\Utils::hash($value, $requestedAlgorithm, true));
default: default:
break; break;
throw new InvalidArgumentException(
"Invalid checksum requested: {$requestedAlgorithm}."
. " Valid algorithms are CRC32C, CRC32, SHA256, and SHA1."
);
} }
} } else {
if ($requestedAlgorithm == 'crc32c') {
if ($requestedAlgorithm === 'crc32c') {
throw new CommonRuntimeException("crc32c is not supported for checksums " throw new CommonRuntimeException("crc32c is not supported for checksums "
. "without use of the common runtime for php. Please enable the CRT or choose " . "without use of the common runtime for php. Please enable the CRT or choose "
. "a different algorithm." . "a different algorithm."
); );
} }
if ($requestedAlgorithm == "crc32") {
if ($requestedAlgorithm === "crc32") {
$requestedAlgorithm = "crc32b"; $requestedAlgorithm = "crc32b";
} }
return base64_encode(Psr7\Utils::hash($value, $requestedAlgorithm, true)); return base64_encode(Psr7\Utils::hash($value, $requestedAlgorithm, true));
} }
$validAlgorithms = implode(', ', array_keys(self::$supportedAlgorithms));
throw new InvalidArgumentException(
"Invalid checksum requested: {$requestedAlgorithm}."
. " Valid algorithms supported by the runtime are {$validAlgorithms}."
);
} }
} }

View File

@ -52,8 +52,6 @@ class MultipartCopy extends AbstractUploadManager
* options are ignored. * options are ignored.
* - source_metadata: (Aws\ResultInterface) An object that represents the * - source_metadata: (Aws\ResultInterface) An object that represents the
* result of executing a HeadObject command on the copy source. * result of executing a HeadObject command on the copy source.
* - display_progress: (boolean) Set true to track status in 1/8th increments
* for upload.
* *
* @param S3ClientInterface $client Client used for the upload. * @param S3ClientInterface $client Client used for the upload.
* @param string|array $source Location of the data to be copied (in the * @param string|array $source Location of the data to be copied (in the
@ -77,12 +75,6 @@ class MultipartCopy extends AbstractUploadManager
$client, $client,
array_change_key_case($config) + ['source_metadata' => null] array_change_key_case($config) + ['source_metadata' => null]
); );
if ($this->displayProgress) {
$this->getState()->setProgressThresholds(
$this->sourceMetadata["ContentLength"]
);
}
} }
/** /**
@ -246,4 +238,5 @@ class MultipartCopy extends AbstractUploadManager
$sourceBuilder .= ltrim(rawurldecode($inputSource), '/'); $sourceBuilder .= ltrim(rawurldecode($inputSource), '/');
return $sourceBuilder; return $sourceBuilder;
} }
} }

View File

@ -55,8 +55,6 @@ class MultipartUploader extends AbstractUploader
* of the multipart upload and that is used to resume a previous upload. * of the multipart upload and that is used to resume a previous upload.
* When this option is provided, the `bucket`, `key`, and `part_size` * When this option is provided, the `bucket`, `key`, and `part_size`
* options are ignored. * options are ignored.
* - track_upload: (boolean) Set true to track status in 1/8th increments
* for upload.
* *
* @param S3ClientInterface $client Client used for the upload. * @param S3ClientInterface $client Client used for the upload.
* @param mixed $source Source of the data to upload. * @param mixed $source Source of the data to upload.
@ -72,10 +70,6 @@ class MultipartUploader extends AbstractUploader
'key' => null, 'key' => null,
'exception_class' => S3MultipartUploadException::class, 'exception_class' => S3MultipartUploadException::class,
]); ]);
if ($this->displayProgress) {
$this->getState()->setProgressThresholds($this->source->getSize());
}
} }
protected function loadUploadWorkflowInfo() protected function loadUploadWorkflowInfo()

View File

@ -7,8 +7,6 @@ use Aws\ResultInterface;
trait MultipartUploadingTrait trait MultipartUploadingTrait
{ {
private $uploadedBytes = 0;
/** /**
* Creates an UploadState object for a multipart upload by querying the * Creates an UploadState object for a multipart upload by querying the
* service for the specified upload's information. * service for the specified upload's information.
@ -56,24 +54,11 @@ trait MultipartUploadingTrait
$partData = []; $partData = [];
$partData['PartNumber'] = $command['PartNumber']; $partData['PartNumber'] = $command['PartNumber'];
$partData['ETag'] = $this->extractETag($result); $partData['ETag'] = $this->extractETag($result);
$commandName = $command->getName();
$checksumResult = $commandName === 'UploadPart'
? $result
: $result[$commandName . 'Result'];
if (isset($command['ChecksumAlgorithm'])) { if (isset($command['ChecksumAlgorithm'])) {
$checksumMemberName = 'Checksum' . strtoupper($command['ChecksumAlgorithm']); $checksumMemberName = 'Checksum' . strtoupper($command['ChecksumAlgorithm']);
$partData[$checksumMemberName] = $checksumResult[$checksumMemberName] ?? null; $partData[$checksumMemberName] = $result[$checksumMemberName];
} }
$this->getState()->markPartAsUploaded($command['PartNumber'], $partData); $this->getState()->markPartAsUploaded($command['PartNumber'], $partData);
// Updates counter for uploaded bytes.
$this->uploadedBytes += $command["ContentLength"];
// Sends uploaded bytes to progress tracker if getDisplayProgress set
if ($this->displayProgress) {
$this->getState()->getDisplayProgress($this->uploadedBytes);
}
} }
abstract protected function extractETag(ResultInterface $result); abstract protected function extractETag(ResultInterface $result);

View File

@ -10,6 +10,7 @@ use Aws\Api\StructureShape;
use Aws\CommandInterface; use Aws\CommandInterface;
use Aws\Exception\AwsException; use Aws\Exception\AwsException;
use Aws\ResultInterface; use Aws\ResultInterface;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface; use Psr\Http\Message\StreamInterface;
@ -100,10 +101,9 @@ final class S3Parser extends AbstractParser
{ {
// This error parsing should be just for 200 error responses // This error parsing should be just for 200 error responses
// and operations where its output shape does not have a streaming // and operations where its output shape does not have a streaming
// member and the body of the response is seekable. // member.
if (200 !== $response->getStatusCode() if (200 !== $response->getStatusCode()
|| !$this->shouldBeConsidered200Error($command->getName()) || !$this->shouldBeConsidered200Error($command->getName())) {
|| !$response->getBody()->isSeekable()) {
return; return;
} }

View File

@ -17,23 +17,15 @@ use Psr\Http\Message\ResponseInterface;
final class ValidateResponseChecksumResultMutator implements S3ResultMutator final class ValidateResponseChecksumResultMutator implements S3ResultMutator
{ {
use CalculatesChecksumTrait; use CalculatesChecksumTrait;
public const DEFAULT_VALIDATION_MODE = 'when_supported';
/** @var Service $api */ /** @var Service $api */
private $api; private $api;
/** @var array $api */
private $config;
/** /**
* @param Service $api * @param Service $api
* @param array $config
*/ */
public function __construct(Service $api, array $config = []) public function __construct(Service $api)
{ {
$this->api = $api; $this->api = $api;
$this->config = $config;
} }
/** /**
@ -50,40 +42,56 @@ final class ValidateResponseChecksumResultMutator implements S3ResultMutator
): ResultInterface ): ResultInterface
{ {
$operation = $this->api->getOperation($command->getName()); $operation = $this->api->getOperation($command->getName());
// Skip this middleware if the operation doesn't have an httpChecksum // Skip this middleware if the operation doesn't have an httpChecksum
$checksumInfo = $operation['httpChecksum'] ?? null; $checksumInfo = empty($operation['httpChecksum'])
if (is_null($checksumInfo)) { ? null
: $operation['httpChecksum'];;
if (null === $checksumInfo) {
return $result; return $result;
} }
$mode = $this->config['response_checksum_validation'] ?? self::DEFAULT_VALIDATION_MODE; // Skip this middleware if the operation doesn't send back a checksum,
// or the user doesn't opt in
$checksumModeEnabledMember = $checksumInfo['requestValidationModeMember'] ?? ""; $checksumModeEnabledMember = $checksumInfo['requestValidationModeMember'] ?? "";
$checksumModeEnabled = strtolower($command[$checksumModeEnabledMember] ?? ""); $checksumModeEnabled = $command[$checksumModeEnabledMember] ?? "";
$responseAlgorithms = $checksumInfo['responseAlgorithms'] ?? []; $responseAlgorithms = $checksumInfo['responseAlgorithms'] ?? [];
$shouldSkipValidation = $this->shouldSkipValidation( if (empty($responseAlgorithms)
$mode, || strtolower($checksumModeEnabled) !== "enabled") {
$checksumModeEnabled,
$responseAlgorithms
);
if ($shouldSkipValidation) {
return $result; return $result;
} }
$checksumPriority = $this->getChecksumPriority(); if (extension_loaded('awscrt')) {
$checksumsToCheck = array_intersect($responseAlgorithms, array_map( $checksumPriority = ['CRC32C', 'CRC32', 'SHA1', 'SHA256'];
'strtoupper', } else {
array_keys($checksumPriority)) $checksumPriority = ['CRC32', 'SHA1', 'SHA256'];
); }
$checksumValidationInfo = $this->validateChecksum($checksumsToCheck, $response);
if ($checksumValidationInfo['status'] === "SUCCEEDED") { $checksumsToCheck = array_intersect(
$responseAlgorithms,
$checksumPriority
);
$checksumValidationInfo = $this->validateChecksum(
$checksumsToCheck,
$response
);
if ($checksumValidationInfo['status'] == "SUCCEEDED") {
$result['ChecksumValidated'] = $checksumValidationInfo['checksum']; $result['ChecksumValidated'] = $checksumValidationInfo['checksum'];
} elseif ($checksumValidationInfo['status'] === "FAILED") { } elseif ($checksumValidationInfo['status'] == "FAILED") {
if ($this->isMultipartGetObject($command, $checksumValidationInfo)) { // Ignore failed validations on GetObject if it's a multipart get
// which returned a full multipart object
if ($command->getName() === "GetObject"
&& !empty($checksumValidationInfo['checksumHeaderValue'])
) {
$headerValue = $checksumValidationInfo['checksumHeaderValue'];
$lastDashPos = strrpos($headerValue, '-');
$endOfChecksum = substr($headerValue, $lastDashPos + 1);
if (is_numeric($endOfChecksum)
&& intval($endOfChecksum) > 1
&& intval($endOfChecksum) < 10000) {
return $result; return $result;
} }
}
throw new S3Exception( throw new S3Exception(
"Calculated response checksum did not match the expected value", "Calculated response checksum did not match the expected value",
$command $command
@ -111,10 +119,11 @@ final class ValidateResponseChecksumResultMutator implements S3ResultMutator
$validationStatus = "SKIPPED"; $validationStatus = "SKIPPED";
$checksumHeaderValue = null; $checksumHeaderValue = null;
if (!empty($checksumToValidate)) { if (!empty($checksumToValidate)) {
$checksumHeaderValue = $response->getHeaderLine( $checksumHeaderValue = $response->getHeader(
'x-amz-checksum-' . $checksumToValidate 'x-amz-checksum-' . $checksumToValidate
); );
if (!empty($checksumHeaderValue)) { if (isset($checksumHeaderValue)) {
$checksumHeaderValue = $checksumHeaderValue[0];
$calculatedChecksumValue = $this->getEncodedValue( $calculatedChecksumValue = $this->getEncodedValue(
$checksumToValidate, $checksumToValidate,
$response->getBody() $response->getBody()
@ -151,57 +160,4 @@ final class ValidateResponseChecksumResultMutator implements S3ResultMutator
return null; return null;
} }
/**
* @param string $mode
* @param string $checksumModeEnabled
* @param array $responseAlgorithms
*
* @return bool
*/
private function shouldSkipValidation(
string $mode,
string $checksumModeEnabled,
array $responseAlgorithms
): bool
{
return empty($responseAlgorithms)
|| ($mode === 'when_required' && $checksumModeEnabled !== 'enabled');
}
/**
* @return string[]
*/
private function getChecksumPriority(): array
{
return extension_loaded('awscrt')
? self::$supportedAlgorithms
: array_slice(self::$supportedAlgorithms, 1);
}
/**
* @param CommandInterface $command
* @param array $checksumValidationInfo
*
* @return bool
*/
private function isMultipartGetObject(
CommandInterface $command,
array $checksumValidationInfo
): bool
{
if ($command->getName() !== "GetObject"
|| empty($checksumValidationInfo['checksumHeaderValue'])
) {
return false;
}
$headerValue = $checksumValidationInfo['checksumHeaderValue'];
$lastDashPos = strrpos($headerValue, '-');
$endOfChecksum = substr($headerValue, $lastDashPos + 1);
return is_numeric($endOfChecksum)
&& (int) $endOfChecksum > 1
&& (int) $endOfChecksum < 10000;
}
} }

View File

@ -247,42 +247,13 @@ class S3Client extends AwsClient implements S3ClientInterface
/** @var array */ /** @var array */
private static $mandatoryAttributes = ['Bucket', 'Key']; private static $mandatoryAttributes = ['Bucket', 'Key'];
/** @var array */
private static $checksumOptionEnum = [
'when_supported' => true,
'when_required' => true
];
public static function getArguments() public static function getArguments()
{ {
$args = parent::getArguments(); $args = parent::getArguments();
$args['retries']['fn'] = [__CLASS__, '_applyRetryConfig']; $args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
$args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider']; $args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider'];
return return $args + [
[
'request_checksum_calculation' => [
'type' => 'config',
'valid' => ['string'],
'doc' => 'Valid values are `when_supported` and `when_required`. Default is `when_supported`.'
. ' `when_supported` results in checksum calculation when an operation has modeled checksum support.'
. ' `when_required` results in checksum calculation when an operation has modeled checksum support and'
. ' request checksums are modeled as required.',
'fn' => [__CLASS__, '_apply_request_checksum_calculation'],
'default' => [__CLASS__, '_default_request_checksum_calculation'],
],
'response_checksum_validation' => [
'type' => 'config',
'valid' => ['string'],
'doc' => 'Valid values are `when_supported` and `when_required`. Default is `when_supported`.'
. ' `when_supported` results in checksum validation when an operation has modeled checksum support.'
. ' `when_required` results in checksum validation when an operation has modeled checksum support and'
. ' `CheckSumMode` is set to `enabled`.',
'fn' => [__CLASS__, '_apply_response_checksum_validation'],
'default' => [__CLASS__, '_default_response_checksum_validation'],
]
]
+ $args + [
'bucket_endpoint' => [ 'bucket_endpoint' => [
'type' => 'config', 'type' => 'config',
'valid' => ['bool'], 'valid' => ['bool'],
@ -421,10 +392,7 @@ class S3Client extends AwsClient implements S3ClientInterface
parent::__construct($args); parent::__construct($args);
$stack = $this->getHandlerList(); $stack = $this->getHandlerList();
$stack->appendInit(SSECMiddleware::wrap($this->getEndpoint()->getScheme()), 's3.ssec'); $stack->appendInit(SSECMiddleware::wrap($this->getEndpoint()->getScheme()), 's3.ssec');
$stack->appendBuild( $stack->appendBuild(ApplyChecksumMiddleware::wrap($this->getApi()), 's3.checksum');
ApplyChecksumMiddleware::wrap($this->getApi(), $this->getConfig()),
's3.checksum'
);
$stack->appendBuild( $stack->appendBuild(
Middleware::contentType(['PutObject', 'UploadPart']), Middleware::contentType(['PutObject', 'UploadPart']),
's3.content_type' 's3.content_type'
@ -539,106 +507,11 @@ class S3Client extends AwsClient implements S3ClientInterface
} }
} }
public static function _default_request_checksum_calculation(array $args): string
{
return ConfigurationResolver::resolve(
'request_checksum_calculation',
ApplyChecksumMiddleware::DEFAULT_CALCULATION_MODE,
'string',
$args
);
}
public static function _apply_request_checksum_calculation(
string $value,
array &$args
): void
{
$value = strtolower($value);
if (array_key_exists($value, self::$checksumOptionEnum)) {
$args['request_checksum_calculation'] = $value;
} else {
$validValues = implode(' | ', array_keys(self::$checksumOptionEnum));
throw new \InvalidArgumentException(
'invalid value provided for `request_checksum_calculation`.'
. ' valid values are: ' . $validValues . '.'
);
}
}
public static function _default_response_checksum_validation(array $args): string
{
return ConfigurationResolver::resolve(
'response_checksum_validation',
ValidateResponseChecksumResultMutator::DEFAULT_VALIDATION_MODE,
'string',
$args
);
}
public static function _apply_response_checksum_validation(
$value,
array &$args
): void
{
$value = strtolower($value);
if (array_key_exists($value, self::$checksumOptionEnum)) {
$args['response_checksum_validation'] = $value;
} else {
$validValues = implode(' | ', array_keys(self::$checksumOptionEnum));
throw new \InvalidArgumentException(
'invalid value provided for `response_checksum_validation`.'
. ' valid values are: ' . $validValues . '.'
);
}
}
public static function _default_disable_express_session_auth(array &$args)
{
return ConfigurationResolver::resolve(
's3_disable_express_session_auth',
false,
'bool',
$args
);
}
public static function _default_s3_express_identity_provider(array $args)
{
if ($args['config']['disable_express_session_auth']) {
return false;
}
return new S3ExpressIdentityProvider($args['region']);
}
public function createPresignedRequest(CommandInterface $command, $expires, array $options = []) public function createPresignedRequest(CommandInterface $command, $expires, array $options = [])
{ {
$command = clone $command; $command = clone $command;
$list = $command->getHandlerList(); $command->getHandlerList()->remove('signer');
$list->remove('signer');
//Removes checksum calculation behavior by default
if (empty($command['ChecksumAlgorithm'])
&& empty($command['AddContentMD5'])
) {
$list->remove('s3.checksum');
}
$request = \Aws\serialize($command); $request = \Aws\serialize($command);
//Applies ContentSHA256 parameter, if provided and not applied
// by middleware
$commandName = $command->getName();
if (!empty($command['ContentSHA256']
&& isset(ApplyChecksumMiddleware::$sha256[$commandName])
&& !$request->hasHeader('X-Amz-Content-Sha256')
)) {
$request = $request->withHeader(
'X-Amz-Content-Sha256',
$command['ContentSHA256']
);
}
$signing_name = $command['@context']['signing_service'] $signing_name = $command['@context']['signing_service']
?? $this->getSigningName($request->getUri()->getHost()); ?? $this->getSigningName($request->getUri()->getHost());
$signature_version = $this->getSignatureVersionFromCommand($command); $signature_version = $this->getSignatureVersionFromCommand($command);
@ -890,6 +763,23 @@ class S3Client extends AwsClient implements S3ClientInterface
return $this->getConfig('signing_name'); return $this->getConfig('signing_name');
} }
public static function _default_disable_express_session_auth(array &$args) {
return ConfigurationResolver::resolve(
's3_disable_express_session_auth',
false,
'bool',
$args
);
}
public static function _default_s3_express_identity_provider(array $args)
{
if ($args['config']['disable_express_session_auth']) {
return false;
}
return new S3ExpressIdentityProvider($args['region']);
}
/** /**
* If EndpointProviderV2 is used, removes `Bucket` from request URIs. * If EndpointProviderV2 is used, removes `Bucket` from request URIs.
* This is now handled by the endpoint ruleset. * This is now handled by the endpoint ruleset.
@ -1098,10 +988,7 @@ class S3Client extends AwsClient implements S3ClientInterface
); );
$s3Parser->addS3ResultMutator( $s3Parser->addS3ResultMutator(
'validate-response-checksum', 'validate-response-checksum',
new ValidateResponseChecksumResultMutator( new ValidateResponseChecksumResultMutator($args['api'])
$args['api'],
['response_checksum_validation' => $args['response_checksum_validation']]
)
); );
$args['parser'] = $s3Parser; $args['parser'] = $s3Parser;
} }

View File

@ -581,30 +581,6 @@ class StreamWrapper
return false; return false;
} }
public function stream_set_option($option, $arg1, $arg2)
{
return false;
}
public function stream_metadata($path, $option, $value)
{
return false;
}
public function stream_lock($operation)
{
trigger_error(
'stream_lock() is not supported by the Amazon S3 stream wrapper',
E_USER_WARNING
);
return false;
}
public function stream_truncate($new_size)
{
return false;
}
/** /**
* Validates the provided stream arguments for fopen and returns an array * Validates the provided stream arguments for fopen and returns an array
* of errors. * of errors.

View File

@ -27,7 +27,6 @@ class Transfer implements PromisorInterface
private $concurrency; private $concurrency;
private $mupThreshold; private $mupThreshold;
private $before; private $before;
private $after;
private $s3Args = []; private $s3Args = [];
private $addContentMD5; private $addContentMD5;
@ -54,11 +53,6 @@ class Transfer implements PromisorInterface
* callback accepts a single argument: Aws\CommandInterface $command. * callback accepts a single argument: Aws\CommandInterface $command.
* The provided command will be either a GetObject, PutObject, * The provided command will be either a GetObject, PutObject,
* InitiateMultipartUpload, or UploadPart command. * InitiateMultipartUpload, or UploadPart command.
* - after: (callable) A callback to invoke after each transfer promise is fulfilled.
* The function is invoked with three arguments: the fulfillment value, the index
* position from the iterable list of the promise, and the aggregate
* promise that manages all the promises. The aggregate promise may
* be resolved from within the callback to short-circuit the promise.
* - mup_threshold: (int) Size in bytes in which a multipart upload should * - mup_threshold: (int) Size in bytes in which a multipart upload should
* be used instead of PutObject. Defaults to 20971520 (20 MB). * be used instead of PutObject. Defaults to 20971520 (20 MB).
* - concurrency: (int, default=5) Number of files to upload concurrently. * - concurrency: (int, default=5) Number of files to upload concurrently.
@ -133,14 +127,6 @@ class Transfer implements PromisorInterface
} }
} }
// Handle "after" callback option.
if (isset($options['after'])) {
$this->after = $options['after'];
if (!is_callable($this->after)) {
throw new \InvalidArgumentException('after must be a callable.');
}
}
// Handle "debug" option. // Handle "debug" option.
if (isset($options['debug'])) { if (isset($options['debug'])) {
if ($options['debug'] === true) { if ($options['debug'] === true) {
@ -304,7 +290,6 @@ class Transfer implements PromisorInterface
return (new Aws\CommandPool($this->client, $commands, [ return (new Aws\CommandPool($this->client, $commands, [
'concurrency' => $this->concurrency, 'concurrency' => $this->concurrency,
'before' => $this->before, 'before' => $this->before,
'fulfill' => $this->after,
'rejected' => function ($reason, $idx, Promise\PromiseInterface $p) { 'rejected' => function ($reason, $idx, Promise\PromiseInterface $p) {
$p->reject($reason); $p->reject($reason);
} }
@ -322,7 +307,7 @@ class Transfer implements PromisorInterface
// Create an EachPromise, that will concurrently handle the upload // Create an EachPromise, that will concurrently handle the upload
// operations' yielded promises from the iterator. // operations' yielded promises from the iterator.
return Promise\Each::ofLimitAll($files, $this->concurrency, $this->after); return Promise\Each::ofLimitAll($files, $this->concurrency);
} }
/** @return Iterator */ /** @return Iterator */

View File

@ -269,7 +269,7 @@ class S3ControlClient extends AwsClient
if ($this->isUseEndpointV2()) { if ($this->isUseEndpointV2()) {
$this->processEndpointV2Model(); $this->processEndpointV2Model();
} else { }
$stack = $this->getHandlerList(); $stack = $this->getHandlerList();
$stack->appendBuild( $stack->appendBuild(
EndpointArnMiddleware::wrap( EndpointArnMiddleware::wrap(
@ -289,7 +289,6 @@ class S3ControlClient extends AwsClient
's3control.endpoint_arn_middleware' 's3control.endpoint_arn_middleware'
); );
} }
}
/** /**
* Modifies API definition to remove `AccountId` * Modifies API definition to remove `AccountId`

View File

@ -671,10 +671,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateFeatureMetadataAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateFeatureMetadataAsync(array $args = [])
* @method \Aws\Result updateHub(array $args = []) * @method \Aws\Result updateHub(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateHubAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateHubAsync(array $args = [])
* @method \Aws\Result updateHubContent(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateHubContentAsync(array $args = [])
* @method \Aws\Result updateHubContentReference(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateHubContentReferenceAsync(array $args = [])
* @method \Aws\Result updateImage(array $args = []) * @method \Aws\Result updateImage(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateImageAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateImageAsync(array $args = [])
* @method \Aws\Result updateImageVersion(array $args = []) * @method \Aws\Result updateImageVersion(array $args = [])

View File

@ -284,6 +284,8 @@ namespace Aws;
* @method \Aws\MultiRegionClient createMultiRegionElastiCache(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionElastiCache(array $args = [])
* @method \Aws\ElasticBeanstalk\ElasticBeanstalkClient createElasticBeanstalk(array $args = []) * @method \Aws\ElasticBeanstalk\ElasticBeanstalkClient createElasticBeanstalk(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionElasticBeanstalk(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionElasticBeanstalk(array $args = [])
* @method \Aws\ElasticInference\ElasticInferenceClient createElasticInference(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionElasticInference(array $args = [])
* @method \Aws\ElasticLoadBalancing\ElasticLoadBalancingClient createElasticLoadBalancing(array $args = []) * @method \Aws\ElasticLoadBalancing\ElasticLoadBalancingClient createElasticLoadBalancing(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionElasticLoadBalancing(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionElasticLoadBalancing(array $args = [])
* @method \Aws\ElasticLoadBalancingV2\ElasticLoadBalancingV2Client createElasticLoadBalancingV2(array $args = []) * @method \Aws\ElasticLoadBalancingV2\ElasticLoadBalancingV2Client createElasticLoadBalancingV2(array $args = [])
@ -318,8 +320,6 @@ namespace Aws;
* @method \Aws\MultiRegionClient createMultiRegionFreeTier(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionFreeTier(array $args = [])
* @method \Aws\GameLift\GameLiftClient createGameLift(array $args = []) * @method \Aws\GameLift\GameLiftClient createGameLift(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionGameLift(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionGameLift(array $args = [])
* @method \Aws\GameLiftStreams\GameLiftStreamsClient createGameLiftStreams(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionGameLiftStreams(array $args = [])
* @method \Aws\GeoMaps\GeoMapsClient createGeoMaps(array $args = []) * @method \Aws\GeoMaps\GeoMapsClient createGeoMaps(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionGeoMaps(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionGeoMaps(array $args = [])
* @method \Aws\GeoPlaces\GeoPlacesClient createGeoPlaces(array $args = []) * @method \Aws\GeoPlaces\GeoPlacesClient createGeoPlaces(array $args = [])
@ -380,8 +380,6 @@ namespace Aws;
* @method \Aws\MultiRegionClient createMultiRegionIoTFleetWise(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionIoTFleetWise(array $args = [])
* @method \Aws\IoTJobsDataPlane\IoTJobsDataPlaneClient createIoTJobsDataPlane(array $args = []) * @method \Aws\IoTJobsDataPlane\IoTJobsDataPlaneClient createIoTJobsDataPlane(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionIoTJobsDataPlane(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionIoTJobsDataPlane(array $args = [])
* @method \Aws\IoTManagedIntegrations\IoTManagedIntegrationsClient createIoTManagedIntegrations(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionIoTManagedIntegrations(array $args = [])
* @method \Aws\IoTSecureTunneling\IoTSecureTunnelingClient createIoTSecureTunneling(array $args = []) * @method \Aws\IoTSecureTunneling\IoTSecureTunnelingClient createIoTSecureTunneling(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionIoTSecureTunneling(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionIoTSecureTunneling(array $args = [])
* @method \Aws\IoTSiteWise\IoTSiteWiseClient createIoTSiteWise(array $args = []) * @method \Aws\IoTSiteWise\IoTSiteWiseClient createIoTSiteWise(array $args = [])
@ -813,7 +811,7 @@ namespace Aws;
*/ */
class Sdk class Sdk
{ {
const VERSION = '3.342.15'; const VERSION = '3.336.13';
/** @var array Arguments for creating clients */ /** @var array Arguments for creating clients */
private $args; private $args;

View File

@ -141,8 +141,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise putAccountSuppressionAttributesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putAccountSuppressionAttributesAsync(array $args = [])
* @method \Aws\Result putAccountVdmAttributes(array $args = []) * @method \Aws\Result putAccountVdmAttributes(array $args = [])
* @method \GuzzleHttp\Promise\Promise putAccountVdmAttributesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putAccountVdmAttributesAsync(array $args = [])
* @method \Aws\Result putConfigurationSetArchivingOptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise putConfigurationSetArchivingOptionsAsync(array $args = [])
* @method \Aws\Result putConfigurationSetDeliveryOptions(array $args = []) * @method \Aws\Result putConfigurationSetDeliveryOptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise putConfigurationSetDeliveryOptionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise putConfigurationSetDeliveryOptionsAsync(array $args = [])
* @method \Aws\Result putConfigurationSetReputationOptions(array $args = []) * @method \Aws\Result putConfigurationSetReputationOptions(array $args = [])

View File

@ -94,7 +94,6 @@ class S3SignatureV4 extends SignatureV4
$this->getPresignedPayload($request) $this->getPresignedPayload($request)
); );
} }
if (strpos($request->getUri()->getHost(), "accesspoint.s3-global")) { if (strpos($request->getUri()->getHost(), "accesspoint.s3-global")) {
$request = $request->withHeader("x-amz-region-set", "*"); $request = $request->withHeader("x-amz-region-set", "*");
} }

View File

@ -469,17 +469,16 @@ class SignatureV4 implements SignatureInterface
private function removeIllegalV4aHeaders(&$request) private function removeIllegalV4aHeaders(&$request)
{ {
static $illegalV4aHeaders = [ $illegalV4aHeaders = [
self::AMZ_CONTENT_SHA256_HEADER, self::AMZ_CONTENT_SHA256_HEADER,
'aws-sdk-invocation-id', "aws-sdk-invocation-id",
'aws-sdk-retry', "aws-sdk-retry",
'x-amz-region-set', 'x-amz-region-set',
'transfer-encoding'
]; ];
$storedHeaders = []; $storedHeaders = [];
foreach ($illegalV4aHeaders as $header) { foreach ($illegalV4aHeaders as $header) {
if ($request->hasHeader($header)) { if ($request->hasHeader($header)){
$storedHeaders[$header] = $request->getHeader($header); $storedHeaders[$header] = $request->getHeader($header);
$request = $request->withoutHeader($header); $request = $request->withoutHeader($header);
} }

View File

@ -24,8 +24,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise attachVolumeAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise attachVolumeAsync(array $args = [])
* @method \Aws\Result cancelArchival(array $args = []) * @method \Aws\Result cancelArchival(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelArchivalAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise cancelArchivalAsync(array $args = [])
* @method \Aws\Result cancelCacheReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelCacheReportAsync(array $args = [])
* @method \Aws\Result cancelRetrieval(array $args = []) * @method \Aws\Result cancelRetrieval(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelRetrievalAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise cancelRetrievalAsync(array $args = [])
* @method \Aws\Result createCachediSCSIVolume(array $args = []) * @method \Aws\Result createCachediSCSIVolume(array $args = [])
@ -50,8 +48,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteAutomaticTapeCreationPolicyAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteAutomaticTapeCreationPolicyAsync(array $args = [])
* @method \Aws\Result deleteBandwidthRateLimit(array $args = []) * @method \Aws\Result deleteBandwidthRateLimit(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBandwidthRateLimitAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteBandwidthRateLimitAsync(array $args = [])
* @method \Aws\Result deleteCacheReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCacheReportAsync(array $args = [])
* @method \Aws\Result deleteChapCredentials(array $args = []) * @method \Aws\Result deleteChapCredentials(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChapCredentialsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteChapCredentialsAsync(array $args = [])
* @method \Aws\Result deleteFileShare(array $args = []) * @method \Aws\Result deleteFileShare(array $args = [])
@ -76,8 +72,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeBandwidthRateLimitScheduleAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeBandwidthRateLimitScheduleAsync(array $args = [])
* @method \Aws\Result describeCache(array $args = []) * @method \Aws\Result describeCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeCacheAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeCacheAsync(array $args = [])
* @method \Aws\Result describeCacheReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeCacheReportAsync(array $args = [])
* @method \Aws\Result describeCachediSCSIVolumes(array $args = []) * @method \Aws\Result describeCachediSCSIVolumes(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeCachediSCSIVolumesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeCachediSCSIVolumesAsync(array $args = [])
* @method \Aws\Result describeChapCredentials(array $args = []) * @method \Aws\Result describeChapCredentials(array $args = [])
@ -116,14 +110,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise disableGatewayAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disableGatewayAsync(array $args = [])
* @method \Aws\Result disassociateFileSystem(array $args = []) * @method \Aws\Result disassociateFileSystem(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateFileSystemAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise disassociateFileSystemAsync(array $args = [])
* @method \Aws\Result evictFilesFailingUpload(array $args = [])
* @method \GuzzleHttp\Promise\Promise evictFilesFailingUploadAsync(array $args = [])
* @method \Aws\Result joinDomain(array $args = []) * @method \Aws\Result joinDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise joinDomainAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise joinDomainAsync(array $args = [])
* @method \Aws\Result listAutomaticTapeCreationPolicies(array $args = []) * @method \Aws\Result listAutomaticTapeCreationPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAutomaticTapeCreationPoliciesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listAutomaticTapeCreationPoliciesAsync(array $args = [])
* @method \Aws\Result listCacheReports(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCacheReportsAsync(array $args = [])
* @method \Aws\Result listFileShares(array $args = []) * @method \Aws\Result listFileShares(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFileSharesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listFileSharesAsync(array $args = [])
* @method \Aws\Result listFileSystemAssociations(array $args = []) * @method \Aws\Result listFileSystemAssociations(array $args = [])
@ -164,8 +154,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise shutdownGatewayAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise shutdownGatewayAsync(array $args = [])
* @method \Aws\Result startAvailabilityMonitorTest(array $args = []) * @method \Aws\Result startAvailabilityMonitorTest(array $args = [])
* @method \GuzzleHttp\Promise\Promise startAvailabilityMonitorTestAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startAvailabilityMonitorTestAsync(array $args = [])
* @method \Aws\Result startCacheReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise startCacheReportAsync(array $args = [])
* @method \Aws\Result startGateway(array $args = []) * @method \Aws\Result startGateway(array $args = [])
* @method \GuzzleHttp\Promise\Promise startGatewayAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise startGatewayAsync(array $args = [])
* @method \Aws\Result updateAutomaticTapeCreationPolicy(array $args = []) * @method \Aws\Result updateAutomaticTapeCreationPolicy(array $args = [])

View File

@ -5,28 +5,18 @@ use Aws\AwsClient;
/** /**
* This client is used to interact with the **Timestream InfluxDB** service. * This client is used to interact with the **Timestream InfluxDB** service.
* @method \Aws\Result createDbCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDbClusterAsync(array $args = [])
* @method \Aws\Result createDbInstance(array $args = []) * @method \Aws\Result createDbInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDbInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createDbInstanceAsync(array $args = [])
* @method \Aws\Result createDbParameterGroup(array $args = []) * @method \Aws\Result createDbParameterGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDbParameterGroupAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createDbParameterGroupAsync(array $args = [])
* @method \Aws\Result deleteDbCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDbClusterAsync(array $args = [])
* @method \Aws\Result deleteDbInstance(array $args = []) * @method \Aws\Result deleteDbInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDbInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDbInstanceAsync(array $args = [])
* @method \Aws\Result getDbCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDbClusterAsync(array $args = [])
* @method \Aws\Result getDbInstance(array $args = []) * @method \Aws\Result getDbInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDbInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getDbInstanceAsync(array $args = [])
* @method \Aws\Result getDbParameterGroup(array $args = []) * @method \Aws\Result getDbParameterGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDbParameterGroupAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getDbParameterGroupAsync(array $args = [])
* @method \Aws\Result listDbClusters(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDbClustersAsync(array $args = [])
* @method \Aws\Result listDbInstances(array $args = []) * @method \Aws\Result listDbInstances(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDbInstancesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listDbInstancesAsync(array $args = [])
* @method \Aws\Result listDbInstancesForCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDbInstancesForClusterAsync(array $args = [])
* @method \Aws\Result listDbParameterGroups(array $args = []) * @method \Aws\Result listDbParameterGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDbParameterGroupsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listDbParameterGroupsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = []) * @method \Aws\Result listTagsForResource(array $args = [])
@ -35,8 +25,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = []) * @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateDbCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDbClusterAsync(array $args = [])
* @method \Aws\Result updateDbInstance(array $args = []) * @method \Aws\Result updateDbInstance(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDbInstanceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateDbInstanceAsync(array $args = [])
*/ */

View File

@ -28,6 +28,12 @@ class UserAgentMiddleware
'getMetrics' 'getMetrics'
]; ];
static $metricsFnList = [
'appendEndpointMetric',
'appendAccountIdModeMetric',
'appendRetryConfigMetric',
];
/** @var callable */ /** @var callable */
private $nextHandler; private $nextHandler;
@ -252,9 +258,10 @@ class UserAgentMiddleware
*/ */
private function getMetrics(): string private function getMetrics(): string
{ {
// Resolve first metrics related to client arguments. foreach (self::$metricsFnList as $fn) {
$this->metricsBuilder->resolveAndAppendFromArgs($this->args); $this->{$fn}();
// Build the metrics. }
$metricsEncoded = $this->metricsBuilder->build(); $metricsEncoded = $this->metricsBuilder->build();
if (empty($metricsEncoded)) { if (empty($metricsEncoded)) {
return ""; return "";
@ -262,4 +269,70 @@ class UserAgentMiddleware
return "m/" . $metricsEncoded; return "m/" . $metricsEncoded;
} }
/**
* Appends the endpoint metric into the metrics builder,
* just if a custom endpoint was provided at client construction.
*/
private function appendEndpointMetric(): void
{
if (!empty($this->args['endpoint_override'])) {
$this->metricsBuilder->append(MetricsBuilder::ENDPOINT_OVERRIDE);
}
}
/**
* Appends the account id endpoint mode metric into the metrics builder,
* based on the account id endpoint mode provide as client argument.
*/
private function appendAccountIdModeMetric(): void
{
$accountIdMode = $this->args['account_id_endpoint_mode'] ?? null;
if ($accountIdMode === null) {
return;
}
if ($accountIdMode === 'preferred') {
$this->metricsBuilder->append(MetricsBuilder::ACCOUNT_ID_MODE_PREFERRED);
} elseif ($accountIdMode === 'disabled') {
$this->metricsBuilder->append(MetricsBuilder::ACCOUNT_ID_MODE_DISABLED);
} elseif ($accountIdMode === 'required') {
$this->metricsBuilder->append(MetricsBuilder::ACCOUNT_ID_MODE_REQUIRED);
}
}
/**
* Appends the retry mode metric into the metrics builder,
* based on the resolved retry config mode.
*/
private function appendRetryConfigMetric(): void
{
$retries = $this->args['retries'] ?? null;
if ($retries === null) {
return;
}
$retryMode = '';
if ($retries instanceof \Aws\Retry\Configuration) {
$retryMode = $retries->getMode();
} elseif (is_array($retries)
&& isset($retries["mode"])
) {
$retryMode = $retries["mode"];
}
if ($retryMode === 'legacy') {
$this->metricsBuilder->append(
MetricsBuilder::RETRY_MODE_LEGACY
);
} elseif ($retryMode === 'standard') {
$this->metricsBuilder->append(
MetricsBuilder::RETRY_MODE_STANDARD
);
} elseif ($retryMode === 'adaptive') {
$this->metricsBuilder->append(
MetricsBuilder::RETRY_MODE_ADAPTIVE
);
}
}
} }

View File

@ -190,8 +190,9 @@ class Waiter implements PromisorInterface
*/ */
private function matchesPath($result, array $acceptor) private function matchesPath($result, array $acceptor)
{ {
return $result instanceof ResultInterface return !($result instanceof ResultInterface)
&& $acceptor['expected'] === $result->search($acceptor['argument']); ? false
: $acceptor['expected'] == $result->search($acceptor['argument']);
} }
/** /**
@ -207,11 +208,6 @@ class Waiter implements PromisorInterface
} }
$actuals = $result->search($acceptor['argument']) ?: []; $actuals = $result->search($acceptor['argument']) ?: [];
// If is empty or not evaluates to an array it must return false.
if (empty($actuals) || !is_array($actuals)) {
return false;
}
foreach ($actuals as $actual) { foreach ($actuals as $actual) {
if ($actual != $acceptor['expected']) { if ($actual != $acceptor['expected']) {
return false; return false;
@ -234,11 +230,6 @@ class Waiter implements PromisorInterface
} }
$actuals = $result->search($acceptor['argument']) ?: []; $actuals = $result->search($acceptor['argument']) ?: [];
// If is empty or not evaluates to an array it must return false.
if (empty($actuals) || !is_array($actuals)) {
return false;
}
return in_array($acceptor['expected'], $actuals); return in_array($acceptor['expected'], $actuals);
} }

View File

@ -130,8 +130,6 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise modifyCertificateBasedAuthPropertiesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyCertificateBasedAuthPropertiesAsync(array $args = [])
* @method \Aws\Result modifyClientProperties(array $args = []) * @method \Aws\Result modifyClientProperties(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyClientPropertiesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise modifyClientPropertiesAsync(array $args = [])
* @method \Aws\Result modifyEndpointEncryptionMode(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyEndpointEncryptionModeAsync(array $args = [])
* @method \Aws\Result modifySamlProperties(array $args = []) * @method \Aws\Result modifySamlProperties(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifySamlPropertiesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise modifySamlPropertiesAsync(array $args = [])
* @method \Aws\Result modifySelfservicePermissions(array $args = []) * @method \Aws\Result modifySelfservicePermissions(array $args = [])

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<?php <?php
// This file was auto-generated from sdk-root/src/data/acm-pca/2017-08-22/waiters-2.json // This file was auto-generated from sdk-root/src/data/acm-pca/2017-08-22/waiters-2.json
return [ 'version' => 2, 'waiters' => [ 'AuditReportCreated' => [ 'description' => 'Wait until a Audit Report is created', 'delay' => 3, 'maxAttempts' => 60, 'operation' => 'DescribeCertificateAuthorityAuditReport', 'acceptors' => [ [ 'matcher' => 'path', 'argument' => 'AuditReportStatus', 'state' => 'success', 'expected' => 'SUCCESS', ], [ 'matcher' => 'path', 'argument' => 'AuditReportStatus', 'state' => 'failure', 'expected' => 'FAILED', ], [ 'matcher' => 'error', 'state' => 'failure', 'expected' => 'AccessDeniedException', ], ], ], 'CertificateAuthorityCSRCreated' => [ 'description' => 'Wait until a Certificate Authority CSR is created', 'delay' => 3, 'maxAttempts' => 60, 'operation' => 'GetCertificateAuthorityCsr', 'acceptors' => [ [ 'matcher' => 'error', 'state' => 'success', 'expected' => false, ], [ 'matcher' => 'error', 'state' => 'retry', 'expected' => 'RequestInProgressException', ], [ 'matcher' => 'error', 'state' => 'failure', 'expected' => 'AccessDeniedException', ], ], ], 'CertificateIssued' => [ 'description' => 'Wait until a certificate is issued', 'delay' => 1, 'maxAttempts' => 60, 'operation' => 'GetCertificate', 'acceptors' => [ [ 'matcher' => 'error', 'state' => 'success', 'expected' => false, ], [ 'matcher' => 'error', 'state' => 'retry', 'expected' => 'RequestInProgressException', ], [ 'matcher' => 'error', 'state' => 'failure', 'expected' => 'AccessDeniedException', ], ], ], ],]; return [ 'version' => 2, 'waiters' => [ 'CertificateAuthorityCSRCreated' => [ 'description' => 'Wait until a Certificate Authority CSR is created', 'operation' => 'GetCertificateAuthorityCsr', 'delay' => 3, 'maxAttempts' => 60, 'acceptors' => [ [ 'state' => 'success', 'matcher' => 'status', 'expected' => 200, ], [ 'state' => 'retry', 'matcher' => 'error', 'expected' => 'RequestInProgressException', ], [ 'state' => 'failure', 'matcher' => 'error', 'expected' => 'AccessDeniedException', ], ], ], 'CertificateIssued' => [ 'description' => 'Wait until a certificate is issued', 'operation' => 'GetCertificate', 'delay' => 1, 'maxAttempts' => 60, 'acceptors' => [ [ 'state' => 'success', 'matcher' => 'status', 'expected' => 200, ], [ 'state' => 'retry', 'matcher' => 'error', 'expected' => 'RequestInProgressException', ], [ 'state' => 'failure', 'matcher' => 'error', 'expected' => 'AccessDeniedException', ], ], ], 'AuditReportCreated' => [ 'description' => 'Wait until a Audit Report is created', 'operation' => 'DescribeCertificateAuthorityAuditReport', 'delay' => 3, 'maxAttempts' => 60, 'acceptors' => [ [ 'state' => 'success', 'matcher' => 'path', 'argument' => 'AuditReportStatus', 'expected' => 'SUCCESS', ], [ 'state' => 'failure', 'matcher' => 'path', 'argument' => 'AuditReportStatus', 'expected' => 'FAILED', ], [ 'state' => 'failure', 'matcher' => 'error', 'expected' => 'AccessDeniedException', ], ], ], ],];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<?php <?php
// This file was auto-generated from sdk-root/src/data/apigatewayv2/2018-11-29/endpoint-rule-set-1.json // This file was auto-generated from sdk-root/src/data/apigatewayv2/2018-11-29/endpoint-rule-set-1.json
return [ 'version' => '1.0', 'parameters' => [ 'Region' => [ 'builtIn' => 'AWS::Region', 'required' => false, 'documentation' => 'The AWS region used to dispatch the request.', 'type' => 'String', ], 'UseDualStack' => [ 'builtIn' => 'AWS::UseDualStack', 'required' => true, 'default' => false, 'documentation' => 'When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.', 'type' => 'Boolean', ], 'UseFIPS' => [ 'builtIn' => 'AWS::UseFIPS', 'required' => true, 'default' => false, 'documentation' => 'When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.', 'type' => 'Boolean', ], 'Endpoint' => [ 'builtIn' => 'SDK::Endpoint', 'required' => false, 'documentation' => 'Override the endpoint used to send this request', 'type' => 'String', ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'isSet', 'argv' => [ [ 'ref' => 'Endpoint', ], ], ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], ], 'error' => 'Invalid Configuration: FIPS and custom endpoint are not supported', 'type' => 'error', ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'error' => 'Invalid Configuration: Dualstack and custom endpoint are not supported', 'type' => 'error', ], [ 'conditions' => [], 'endpoint' => [ 'url' => [ 'ref' => 'Endpoint', ], 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], 'type' => 'tree', ], [ 'conditions' => [ [ 'fn' => 'isSet', 'argv' => [ [ 'ref' => 'Region', ], ], ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'aws.partition', 'argv' => [ [ 'ref' => 'Region', ], ], 'assign' => 'PartitionResult', ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsFIPS', ], ], ], ], [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsDualStack', ], ], ], ], ], 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], 'type' => 'tree', ], [ 'conditions' => [], 'error' => 'FIPS and DualStack are enabled, but this partition does not support one or both', 'type' => 'error', ], ], 'type' => 'tree', ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsFIPS', ], ], true, ], ], ], 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway-fips.{Region}.{PartitionResult#dnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], 'type' => 'tree', ], [ 'conditions' => [], 'error' => 'FIPS is enabled but this partition does not support FIPS', 'type' => 'error', ], ], 'type' => 'tree', ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsDualStack', ], ], ], ], ], 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway.{Region}.{PartitionResult#dualStackDnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], 'type' => 'tree', ], [ 'conditions' => [], 'error' => 'DualStack is enabled but this partition does not support DualStack', 'type' => 'error', ], ], 'type' => 'tree', ], [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway.{Region}.{PartitionResult#dnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], 'type' => 'tree', ], ], 'type' => 'tree', ], [ 'conditions' => [], 'error' => 'Invalid Configuration: Missing Region', 'type' => 'error', ], ],]; return [ 'version' => '1.0', 'parameters' => [ 'Region' => [ 'builtIn' => 'AWS::Region', 'required' => false, 'documentation' => 'The AWS region used to dispatch the request.', 'type' => 'String', ], 'UseDualStack' => [ 'builtIn' => 'AWS::UseDualStack', 'required' => true, 'default' => false, 'documentation' => 'When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.', 'type' => 'Boolean', ], 'UseFIPS' => [ 'builtIn' => 'AWS::UseFIPS', 'required' => true, 'default' => false, 'documentation' => 'When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.', 'type' => 'Boolean', ], 'Endpoint' => [ 'builtIn' => 'SDK::Endpoint', 'required' => false, 'documentation' => 'Override the endpoint used to send this request', 'type' => 'String', ], ], 'rules' => [ [ 'conditions' => [ [ 'fn' => 'isSet', 'argv' => [ [ 'ref' => 'Endpoint', ], ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], ], 'error' => 'Invalid Configuration: FIPS and custom endpoint are not supported', 'type' => 'error', ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'error' => 'Invalid Configuration: Dualstack and custom endpoint are not supported', 'type' => 'error', ], [ 'conditions' => [], 'endpoint' => [ 'url' => [ 'ref' => 'Endpoint', ], 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], ], [ 'conditions' => [ [ 'fn' => 'isSet', 'argv' => [ [ 'ref' => 'Region', ], ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'aws.partition', 'argv' => [ [ 'ref' => 'Region', ], ], 'assign' => 'PartitionResult', ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsFIPS', ], ], ], ], [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsDualStack', ], ], ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], ], [ 'conditions' => [], 'error' => 'FIPS and DualStack are enabled, but this partition does not support one or both', 'type' => 'error', ], ], ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseFIPS', ], true, ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsFIPS', ], ], ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway-fips.{Region}.{PartitionResult#dnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], ], [ 'conditions' => [], 'error' => 'FIPS is enabled but this partition does not support FIPS', 'type' => 'error', ], ], ], [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ [ 'ref' => 'UseDualStack', ], true, ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [ [ 'fn' => 'booleanEquals', 'argv' => [ true, [ 'fn' => 'getAttr', 'argv' => [ [ 'ref' => 'PartitionResult', ], 'supportsDualStack', ], ], ], ], ], 'type' => 'tree', 'rules' => [ [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway.{Region}.{PartitionResult#dualStackDnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], ], [ 'conditions' => [], 'error' => 'DualStack is enabled but this partition does not support DualStack', 'type' => 'error', ], ], ], [ 'conditions' => [], 'endpoint' => [ 'url' => 'https://apigateway.{Region}.{PartitionResult#dnsSuffix}', 'properties' => [], 'headers' => [], ], 'type' => 'endpoint', ], ], ], ], ], [ 'conditions' => [], 'error' => 'Invalid Configuration: Missing Region', 'type' => 'error', ], ],];

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<?php <?php
// This file was auto-generated from sdk-root/src/data/application-signals/2024-04-15/paginators-1.json // This file was auto-generated from sdk-root/src/data/application-signals/2024-04-15/paginators-1.json
return [ 'pagination' => [ 'ListServiceDependencies' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceDependencies', ], 'ListServiceDependents' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceDependents', ], 'ListServiceLevelObjectiveExclusionWindows' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ExclusionWindows', ], 'ListServiceLevelObjectives' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'SloSummaries', ], 'ListServiceOperations' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceOperations', ], 'ListServices' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceSummaries', ], ],]; return [ 'pagination' => [ 'ListServiceDependencies' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceDependencies', ], 'ListServiceDependents' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceDependents', ], 'ListServiceLevelObjectives' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'SloSummaries', ], 'ListServiceOperations' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceOperations', ], 'ListServices' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'ServiceSummaries', ], ],];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More