1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Composer update

This commit is contained in:
Daniel Neto 2024-07-22 22:18:13 -03:00
parent 2a8fb3aa24
commit 631ea19041
6530 changed files with 205098 additions and 319448 deletions

View file

@ -47,6 +47,7 @@
"scssphp/scssphp": "^1.11",
"vimeo/vimeo-api": "^3.0",
"phpseclib/phpseclib": "^3.0",
"bunnycdn/storage": "^3.0"
"bunnycdn/storage": "^3.0",
"chillerlan/php-qrcode": "^5.0"
}
}

165
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f3a417c049064f492f083aaf0a6d0bcf",
"content-hash": "418a46bb5dde14a1c57f749acfbd8982",
"packages": [
{
"name": "abraham/twitteroauth",
@ -612,6 +612,167 @@
},
"time": "2021-12-14T00:20:41+00:00"
},
{
"name": "chillerlan/php-qrcode",
"version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-qrcode.git",
"reference": "da5bdb82c8755f54de112b271b402aaa8df53269"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/da5bdb82c8755f54de112b271b402aaa8df53269",
"reference": "da5bdb82c8755f54de112b271b402aaa8df53269",
"shasum": ""
},
"require": {
"chillerlan/php-settings-container": "^2.1.4 || ^3.1",
"ext-mbstring": "*",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"chillerlan/php-authenticator": "^4.1 || ^5.1",
"phan/phan": "^5.4",
"phpmd/phpmd": "^2.15",
"phpunit/phpunit": "^9.6",
"setasign/fpdf": "^1.8.2",
"squizlabs/php_codesniffer": "^3.8"
},
"suggest": {
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.",
"setasign/fpdf": "Required to use the QR FPDF output.",
"simple-icons/simple-icons": "SVG icons that you can use to embed as logos in the QR Code"
},
"type": "library",
"autoload": {
"psr-4": {
"chillerlan\\QRCode\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT",
"Apache-2.0"
],
"authors": [
{
"name": "Kazuhiko Arase",
"homepage": "https://github.com/kazuhikoarase/qrcode-generator"
},
{
"name": "ZXing Authors",
"homepage": "https://github.com/zxing/zxing"
},
{
"name": "Ashot Khanamiryan",
"homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder"
},
{
"name": "Smiley",
"email": "smiley@chillerlan.net",
"homepage": "https://github.com/codemasher"
},
{
"name": "Contributors",
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors"
}
],
"description": "A QR code generator and reader with a user friendly API. PHP 7.4+",
"homepage": "https://github.com/chillerlan/php-qrcode",
"keywords": [
"phpqrcode",
"qr",
"qr code",
"qr-reader",
"qrcode",
"qrcode-generator",
"qrcode-reader"
],
"support": {
"docs": "https://php-qrcode.readthedocs.io",
"issues": "https://github.com/chillerlan/php-qrcode/issues",
"source": "https://github.com/chillerlan/php-qrcode"
},
"funding": [
{
"url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4",
"type": "custom"
},
{
"url": "https://ko-fi.com/codemasher",
"type": "ko_fi"
}
],
"time": "2024-02-27T14:37:26+00:00"
},
{
"name": "chillerlan/php-settings-container",
"version": "2.1.6",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-settings-container.git",
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/5553558bd381fce5108c6d0343c12e488cfec6bb",
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.10"
},
"type": "library",
"autoload": {
"psr-4": {
"chillerlan\\Settings\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Smiley",
"email": "smiley@chillerlan.net",
"homepage": "https://github.com/codemasher"
}
],
"description": "A container class for immutable settings objects. Not a DI container. PHP 7.4+",
"homepage": "https://github.com/chillerlan/php-settings-container",
"keywords": [
"PHP7",
"Settings",
"configuration",
"container",
"helper"
],
"support": {
"issues": "https://github.com/chillerlan/php-settings-container/issues",
"source": "https://github.com/chillerlan/php-settings-container"
},
"funding": [
{
"url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4",
"type": "custom"
},
{
"url": "https://ko-fi.com/codemasher",
"type": "ko_fi"
}
],
"time": "2024-07-17T01:04:28+00:00"
},
{
"name": "chrisjean/php-ico",
"version": "1.0.4",
@ -6055,5 +6216,5 @@
"platform-overrides": {
"php": "8"
},
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.3.0"
}

View file

@ -2219,3 +2219,4 @@ $t['site config'] = 'configuração do site';
$t['subscribed to your channel'] = 'inscrito no seu canal';
$t['unchecked'] = 'desmarcado';
$t['you can find on the menu-point. But there are more settings avaible; go to the'] = 'você pode encontrar no ponto de menu. Mas há mais configurações disponíveis; vou ao';
$t['Signature'] = 'Assinatura';

View file

@ -26,26 +26,23 @@
"issues": "https://github.com/abraham/twitteroauth/issues"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/morozov/php-vcr"
},
{
"type": "git",
"url": "https://github.com/abraham/phpunit-testlistener-vcr"
}
],
"require": {
"php": "^7.4 || ^8.0 || ^8.1",
"php": "8.*",
"ext-curl": "*",
"composer/ca-bundle": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^8 || ^9",
"phpunit/phpunit": "^9",
"squizlabs/php_codesniffer": "^3",
"phpmd/phpmd": "^2",
"php-vcr/php-vcr": "^1",
"php-vcr/phpunit-testlistener-vcr": "dev-php-8"
"php-vcr/phpunit-testlistener-vcr": "dev-php8",
"rector/rector": "^0.15.7"
},
"autoload": {
"psr-4": {

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ class Config
/** @var int Delay in seconds before we retry the request */
protected $retriesDelay = 1;
/** @var string Version of the Twitter API requests should target */
protected $apiVersion = '1.1';
protected $apiVersion = '2';
/**
* Decode JSON Response as associative Array

View file

@ -26,7 +26,7 @@ class Consumer
public function __construct(
?string $key,
?string $secret,
?string $callbackUrl = null
?string $callbackUrl = null,
) {
$this->key = $key;
$this->secret = $secret;

View file

@ -32,7 +32,7 @@ class HmacSha1 extends SignatureMethod
public function buildSignature(
Request $request,
Consumer $consumer,
Token $token = null
Token $token = null,
): string {
$signatureBase = $request->getSignatureBaseString();

View file

@ -14,7 +14,6 @@ class Request
protected $parameters;
protected $httpMethod;
protected $httpUrl;
protected $json;
public static $version = '1.0';
/**
@ -22,12 +21,12 @@ class Request
*
* @param string $httpMethod
* @param string $httpUrl
* @param array|null $parameters
* @param ?array $parameters
*/
public function __construct(
string $httpMethod,
string $httpUrl,
?array $parameters = []
?array $parameters = [],
) {
$parameters = array_merge(
Util::parseParameters(parse_url($httpUrl, PHP_URL_QUERY)),
@ -55,7 +54,7 @@ class Request
string $httpMethod,
string $httpUrl,
array $parameters = [],
$json = false
array $options = [],
) {
$defaults = [
'oauth_version' => Request::$version,
@ -69,7 +68,7 @@ class Request
// The json payload is not included in the signature on json requests,
// therefore it shouldn't be included in the parameters array.
if ($json) {
if ($options['jsonPayload'] ?? false) {
$parameters = $defaults;
} else {
$parameters = array_merge($defaults, $parameters);
@ -94,9 +93,7 @@ class Request
*/
public function getParameter(string $name): ?string
{
return isset($this->parameters[$name])
? $this->parameters[$name]
: null;
return $this->parameters[$name] ?? null;
}
/**
@ -254,7 +251,7 @@ class Request
public function signRequest(
SignatureMethod $signatureMethod,
Consumer $consumer,
Token $token = null
Token $token = null,
) {
$this->setParameter(
'oauth_signature_method',
@ -274,7 +271,7 @@ class Request
public function buildSignature(
SignatureMethod $signatureMethod,
Consumer $consumer,
Token $token = null
Token $token = null,
): string {
return $signatureMethod->buildSignature($this, $consumer, $token);
}
@ -284,6 +281,6 @@ class Request
*/
public static function generateNonce(): string
{
return md5(microtime() . mt_rand());
return md5(microtime() . random_int(PHP_INT_MIN, PHP_INT_MAX));
}
}

View file

@ -12,15 +12,15 @@ namespace Abraham\TwitterOAuth;
class Response
{
/** @var string|null API path from the most recent request */
private $apiPath;
private ?string $apiPath = null;
/** @var int HTTP status code from the most recent request */
private $httpCode = 0;
private int $httpCode = 0;
/** @var array HTTP headers from the most recent request */
private $headers = [];
/** @var array|object Response body from the most recent request */
private $body = [];
private array $headers = [];
/** @var array|object|null Response body from the most recent request */
private array|object|null $body = [];
/** @var array HTTP headers from the most recent request that start with X */
private $xHeaders = [];
private array $xHeaders = [];
/**
* @param string $apiPath

View file

@ -37,7 +37,7 @@ abstract class SignatureMethod
abstract public function buildSignature(
Request $request,
Consumer $consumer,
Token $token = null
Token $token = null,
);
/**
@ -54,7 +54,7 @@ abstract class SignatureMethod
Request $request,
Consumer $consumer,
Token $token,
string $signature
string $signature,
): bool {
$built = $this->buildSignature($request, $consumer, $token);

View file

@ -10,7 +10,13 @@ declare(strict_types=1);
namespace Abraham\TwitterOAuth;
use Abraham\TwitterOAuth\Util\JsonDecoder;
use Abraham\TwitterOAuth\{
Consumer,
HmacSha1,
Response,
Token,
Util\JsonDecoder,
};
use Composer\CaBundle\CaBundle;
/**
@ -24,31 +30,31 @@ class TwitterOAuth extends Config
private const UPLOAD_HOST = 'https://upload.twitter.com';
/** @var Response details about the result of the last request */
private $response;
private ?Response $response = null;
/** @var string|null Application bearer token */
private $bearer;
private ?string $bearer = null;
/** @var Consumer Twitter application details */
private $consumer;
private Consumer $consumer;
/** @var Token|null User access token details */
private $token;
private ?Token $token = null;
/** @var HmacSha1 OAuth 1 signature type used by Twitter */
private $signatureMethod;
private HmacSha1 $signatureMethod;
/** @var int Number of attempts we made for the request */
private $attempts = 0;
private int $attempts = 0;
/**
* Constructor
*
* @param string $consumerKey The Application Consumer Key
* @param string $consumerSecret The Application Consumer Secret
* @param string|null $oauthToken The Client Token (optional)
* @param string|null $oauthTokenSecret The Client Token Secret (optional)
* @param string $consumerKey The Application Consumer Key
* @param string $consumerSecret The Application Consumer Secret
* @param ?string $oauthToken The Client Token (optional)
* @param ?string $oauthTokenSecret The Client Token Secret (optional)
*/
public function __construct(
string $consumerKey,
string $consumerSecret,
?string $oauthToken = null,
?string $oauthTokenSecret = null
?string $oauthTokenSecret = null,
) {
$this->resetLastResponse();
$this->signatureMethod = new HmacSha1();
@ -67,7 +73,7 @@ class TwitterOAuth extends Config
*/
public function setOauthToken(
string $oauthToken,
string $oauthTokenSecret
string $oauthTokenSecret,
): void {
$this->token = new Token($oauthToken, $oauthTokenSecret);
$this->bearer = null;
@ -228,7 +234,9 @@ class TwitterOAuth extends Config
*/
public function get(string $path, array $parameters = [])
{
return $this->http('GET', self::API_HOST, $path, $parameters, false);
return $this->http('GET', self::API_HOST, $path, $parameters, [
'jsonPayload' => false,
]);
}
/**
@ -236,16 +244,26 @@ class TwitterOAuth extends Config
*
* @param string $path
* @param array $parameters
* @param bool $json
* @param array $options
*
* @return array|object
*/
public function post(
string $path,
array $parameters = [],
bool $json = false
array $options = [],
) {
return $this->http('POST', self::API_HOST, $path, $parameters, $json);
if (!isset($options['jsonPayload'])) {
$options['jsonPayload'] = $this->useJsonBody();
}
return $this->http(
'POST',
self::API_HOST,
$path,
$parameters,
$options,
);
}
/**
@ -258,7 +276,9 @@ class TwitterOAuth extends Config
*/
public function delete(string $path, array $parameters = [])
{
return $this->http('DELETE', self::API_HOST, $path, $parameters, false);
return $this->http('DELETE', self::API_HOST, $path, $parameters, [
'jsonPayload' => false,
]);
}
/**
@ -266,16 +286,20 @@ class TwitterOAuth extends Config
*
* @param string $path
* @param array $parameters
* @param bool $json
* @param array $options
*
* @return array|object
*/
public function put(
string $path,
array $parameters = [],
bool $json = false
array $options = [],
) {
return $this->http('PUT', self::API_HOST, $path, $parameters, $json);
if (!isset($options['jsonPayload'])) {
$options['jsonPayload'] = $this->useJsonBody();
}
return $this->http('PUT', self::API_HOST, $path, $parameters, $options);
}
/**
@ -283,16 +307,16 @@ class TwitterOAuth extends Config
*
* @param string $path
* @param array $parameters
* @param boolean $chunked
* @param array $options
*
* @return array|object
*/
public function upload(
string $path,
array $parameters = [],
bool $chunked = false
array $options = [],
) {
if ($chunked) {
if ($options['chunkedUpload'] ?? false) {
return $this->uploadMediaChunked($path, $parameters);
} else {
return $this->uploadMediaNotChunked($path, $parameters);
@ -316,7 +340,7 @@ class TwitterOAuth extends Config
'command' => 'STATUS',
'media_id' => $media_id,
],
false,
['jsonPayload' => false],
);
}
@ -339,13 +363,9 @@ class TwitterOAuth extends Config
);
}
$parameters['media'] = base64_encode($file);
return $this->http(
'POST',
self::UPLOAD_HOST,
$path,
$parameters,
false,
);
return $this->http('POST', self::UPLOAD_HOST, $path, $parameters, [
'jsonPayload' => false,
]);
}
/**
@ -358,13 +378,17 @@ class TwitterOAuth extends Config
*/
private function uploadMediaChunked(string $path, array $parameters)
{
/** @var object $init */
$init = $this->http(
'POST',
self::UPLOAD_HOST,
$path,
$this->mediaInitParameters($parameters),
false,
['jsonPayload' => false],
);
if (!property_exists($init, 'media_id_string')) {
throw new TwitterOAuthException('Missing "media_id_string"');
}
// Append
$segmentIndex = 0;
$media = fopen($parameters['media'], 'rb');
@ -381,7 +405,7 @@ class TwitterOAuth extends Config
fread($media, $this->chunkSize),
),
],
false,
['jsonPayload' => false],
);
}
fclose($media);
@ -394,7 +418,7 @@ class TwitterOAuth extends Config
'command' => 'FINALIZE',
'media_id' => $init->media_id_string,
],
false,
['jsonPayload' => false],
);
return $finalize;
}
@ -457,12 +481,25 @@ class TwitterOAuth extends Config
][$this->apiVersion];
}
/**
* Default content type for sending data.
*
* @return bool
*/
private function useJsonBody()
{
return [
'1.1' => false,
'2' => true,
][$this->apiVersion];
}
/**
* @param string $method
* @param string $host
* @param string $path
* @param array $parameters
* @param bool $json
* @param array $options
*
* @return array|object
*/
@ -471,19 +508,19 @@ class TwitterOAuth extends Config
string $host,
string $path,
array $parameters,
bool $json
array $options,
) {
$this->resetLastResponse();
$this->resetAttemptsNumber();
$this->response->setApiPath($path);
if (!$json) {
if (!$options['jsonPayload']) {
$parameters = $this->cleanUpParameters($parameters);
}
return $this->makeRequests(
$this->apiUrl($host, $path),
$method,
$parameters,
$json,
$options,
);
}
@ -516,7 +553,7 @@ class TwitterOAuth extends Config
* @param string $url
* @param string $method
* @param array $parameters
* @param bool $json
* @param array $options
*
* @return array|object
*/
@ -524,11 +561,11 @@ class TwitterOAuth extends Config
string $url,
string $method,
array $parameters,
bool $json
array $options,
) {
do {
$this->sleepIfNeeded();
$result = $this->oAuthRequest($url, $method, $parameters, $json);
$result = $this->oAuthRequest($url, $method, $parameters, $options);
$response = JsonDecoder::decode($result, $this->decodeJsonAsArray);
$this->response->setBody($response);
$this->attempts++;
@ -556,7 +593,7 @@ class TwitterOAuth extends Config
* @param string $url
* @param string $method
* @param array $parameters
* @param bool $json
* @param array $options
*
* @return string
* @throws TwitterOAuthException
@ -565,7 +602,7 @@ class TwitterOAuth extends Config
string $url,
string $method,
array $parameters,
bool $json = false
array $options = [],
) {
$request = Request::fromConsumerAndToken(
$this->consumer,
@ -573,7 +610,7 @@ class TwitterOAuth extends Config
$method,
$url,
$parameters,
$json,
$options,
);
if (array_key_exists('oauth_callback', $parameters)) {
// Twitter doesn't like oauth_callback as a parameter.
@ -599,7 +636,7 @@ class TwitterOAuth extends Config
$method,
$authorization,
$parameters,
$json,
$options,
);
}
@ -645,8 +682,8 @@ class TwitterOAuth extends Config
* @param string $url
* @param string $method
* @param string $authorization
* @param array $postfields
* @param bool $json
* @param array $postfields
* @param ?array $options
*
* @return string
* @throws TwitterOAuthException
@ -656,11 +693,11 @@ class TwitterOAuth extends Config
string $method,
string $authorization,
array $postfields,
bool $json = false
?array $options = [],
): string {
$options = $this->curlOptions();
$options[CURLOPT_URL] = $url;
$options[CURLOPT_HTTPHEADER] = [
$curlOptions = $this->curlOptions();
$curlOptions[CURLOPT_URL] = $url;
$curlOptions[CURLOPT_HTTPHEADER] = [
'Accept: application/json',
$authorization,
'Expect:',
@ -670,22 +707,22 @@ class TwitterOAuth extends Config
case 'GET':
break;
case 'POST':
$options[CURLOPT_POST] = true;
$options = $this->setPostfieldsOptions(
$options,
$curlOptions[CURLOPT_POST] = true;
$curlOptions = $this->setPostfieldsOptions(
$curlOptions,
$postfields,
$json,
$options,
);
break;
case 'DELETE':
$options[CURLOPT_CUSTOMREQUEST] = 'DELETE';
$curlOptions[CURLOPT_CUSTOMREQUEST] = 'DELETE';
break;
case 'PUT':
$options[CURLOPT_CUSTOMREQUEST] = 'PUT';
$options = $this->setPostfieldsOptions(
$options,
$curlOptions[CURLOPT_CUSTOMREQUEST] = 'PUT';
$curlOptions = $this->setPostfieldsOptions(
$curlOptions,
$postfields,
$json,
$options,
);
break;
}
@ -694,11 +731,12 @@ class TwitterOAuth extends Config
in_array($method, ['GET', 'PUT', 'DELETE']) &&
!empty($postfields)
) {
$options[CURLOPT_URL] .= '?' . Util::buildHttpQuery($postfields);
$curlOptions[CURLOPT_URL] .=
'?' . Util::buildHttpQuery($postfields);
}
$curlHandle = curl_init();
curl_setopt_array($curlHandle, $options);
curl_setopt_array($curlHandle, $curlOptions);
$response = curl_exec($curlHandle);
// Throw exceptions on cURL errors.
@ -772,22 +810,28 @@ class TwitterOAuth extends Config
*
* @param array $options
* @param array $postfields
* @param bool $json
* @param array $options
*
* @return array
*/
private function setPostfieldsOptions(
array $options,
array $curlOptions,
array $postfields,
bool $json
array $options,
): array {
if ($json) {
$options[CURLOPT_HTTPHEADER][] = 'Content-type: application/json';
$options[CURLOPT_POSTFIELDS] = json_encode($postfields);
if ($options['jsonPayload'] ?? false) {
$curlOptions[CURLOPT_HTTPHEADER][] =
'Content-type: application/json';
$curlOptions[CURLOPT_POSTFIELDS] = json_encode(
$postfields,
JSON_THROW_ON_ERROR,
);
} else {
$options[CURLOPT_POSTFIELDS] = Util::buildHttpQuery($postfields);
$curlOptions[CURLOPT_POSTFIELDS] = Util::buildHttpQuery(
$postfields,
);
}
return $options;
return $curlOptions;
}
}

View file

@ -24,6 +24,6 @@ class JsonDecoder
return json_decode($string, $asArray, 512, JSON_BIGINT_AS_STRING);
}
return json_decode($string, $asArray);
return json_decode($string, $asArray, 512, JSON_THROW_ON_ERROR);
}
}

View file

@ -41,7 +41,7 @@
"amphp/php-cs-fixer-config": "dev-master",
"react/promise": "^2",
"phpunit/phpunit": "^7 | ^8 | ^9",
"psalm/phar": "^3.11@dev",
"vimeo/psalm": "^3.12",
"jetbrains/phpstorm-stubs": "^2019.3"
},
"autoload": {

View file

@ -150,7 +150,7 @@ final class CancellationTokenSource
*
* @return void
*/
public function cancel(\Throwable $previous = null)
public function cancel(?\Throwable $previous = null)
{
if ($this->onCancel === null) {
return;

View file

@ -10,7 +10,7 @@ namespace Amp;
*/
class CancelledException extends \Exception
{
public function __construct(\Throwable $previous = null)
public function __construct(?\Throwable $previous = null)
{
parent::__construct("The operation was cancelled", 0, $previous);
}

View file

@ -88,7 +88,7 @@ final class Coroutine implements Promise
* @psalm-suppress MissingClosureParamType
* @psalm-suppress MissingClosureReturnType
*/
$onResolve = function (\Throwable $e = null, $v) use ($generator, &$onResolve) {
$onResolve = function (?\Throwable $e, $v) use ($generator, &$onResolve) {
/** @var bool $immediate Used to control iterative coroutine continuation. */
static $immediate = true;

View file

@ -27,7 +27,7 @@ class ResolutionQueue
* Promise|\React\Promise\PromiseInterface|array<array-key, Promise|\React\Promise\PromiseInterface>, mixed,
* mixed>|null) | callable(\Throwable|null, mixed): void $callback
*/
public function __construct(callable $callback = null)
public function __construct(?callable $callback = null)
{
if ($callback !== null) {
$this->push($callback);

View file

@ -9,7 +9,7 @@ class InvalidYieldError extends \Error
* @param string $prefix
* @param \Throwable|null $previous
*/
public function __construct(\Generator $generator, string $prefix, \Throwable $previous = null)
public function __construct(\Generator $generator, string $prefix, ?\Throwable $previous = null)
{
$yielded = $generator->current();
$prefix .= \sprintf(

View file

@ -86,7 +86,7 @@ final class Loop
*
* @return void
*/
public static function run(callable $callback = null)
public static function run(?callable $callback = null)
{
if ($callback) {
self::$driver->defer($callback);
@ -406,7 +406,7 @@ final class Loop
*
* @return callable(\Throwable $error)|null The previous handler, `null` if there was none.
*/
public static function setErrorHandler(callable $callback = null)
public static function setErrorHandler(?callable $callback = null)
{
return self::$driver->setErrorHandler($callback);
}

View file

@ -593,7 +593,7 @@ abstract class Driver
*
* @return callable(\Throwable $error):void|null The previous handler, `null` if there was none.
*/
public function setErrorHandler(callable $callback = null)
public function setErrorHandler(?callable $callback = null)
{
$previous = $this->errorHandler;
$this->errorHandler = $callback;

View file

@ -147,7 +147,7 @@ final class TracingDriver extends Driver
$this->unreferencedWatchers[$watcherId] = true;
}
public function setErrorHandler(callable $callback = null)
public function setErrorHandler(?callable $callback = null)
{
return $this->driver->setErrorHandler($callback);
}

View file

@ -11,7 +11,7 @@ class MultiReasonException extends \Exception
* @param \Throwable[] $reasons Array of exceptions rejecting the promise.
* @param string|null $message
*/
public function __construct(array $reasons, string $message = null)
public function __construct(array $reasons, ?string $message = null)
{
parent::__construct($message ?: "Multiple errors encountered; use "
. self::class . "::getReasons() to retrieve the array of exceptions thrown");

View file

@ -570,7 +570,7 @@ namespace Amp\Promise
$deferred = new Deferred();
$promise->onResolve(static function (\Throwable $exception = null, $result) use ($deferred, $callback) {
$promise->onResolve(static function (?\Throwable $exception, $result) use ($deferred, $callback) {
try {
$result = $callback($exception, $result);
} catch (\Throwable $exception) {

View file

@ -17,8 +17,8 @@
},
"require": {
"php": ">=7.2.5",
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5 <7.9.0",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5 <2.7.0",
"guzzlehttp/promises": "^1.4.0 || ^2.0",
"mtdowling/jmespath.php": "^2.6",
"ext-pcre": "*",

View file

@ -11,6 +11,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createPracticeRunConfigurationAsync(array $args = [])
* @method \Aws\Result deletePracticeRunConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePracticeRunConfigurationAsync(array $args = [])
* @method \Aws\Result getAutoshiftObserverNotificationStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAutoshiftObserverNotificationStatusAsync(array $args = [])
* @method \Aws\Result getManagedResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise getManagedResourceAsync(array $args = [])
* @method \Aws\Result listAutoshifts(array $args = [])
@ -21,6 +23,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listZonalShiftsAsync(array $args = [])
* @method \Aws\Result startZonalShift(array $args = [])
* @method \GuzzleHttp\Promise\Promise startZonalShiftAsync(array $args = [])
* @method \Aws\Result updateAutoshiftObserverNotificationStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAutoshiftObserverNotificationStatusAsync(array $args = [])
* @method \Aws\Result updatePracticeRunConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePracticeRunConfigurationAsync(array $args = [])
* @method \Aws\Result updateZonalAutoshiftConfiguration(array $args = [])

View file

@ -13,6 +13,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise checkAccessNotGrantedAsync(array $args = [])
* @method \Aws\Result checkNoNewAccess(array $args = [])
* @method \GuzzleHttp\Promise\Promise checkNoNewAccessAsync(array $args = [])
* @method \Aws\Result checkNoPublicAccess(array $args = [])
* @method \GuzzleHttp\Promise\Promise checkNoPublicAccessAsync(array $args = [])
* @method \Aws\Result createAccessPreview(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAccessPreviewAsync(array $args = [])
* @method \Aws\Result createAnalyzer(array $args = [])
@ -23,6 +25,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
* @method \Aws\Result deleteArchiveRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
* @method \Aws\Result generateFindingRecommendation(array $args = [])
* @method \GuzzleHttp\Promise\Promise generateFindingRecommendationAsync(array $args = [])
* @method \Aws\Result getAccessPreview(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAccessPreviewAsync(array $args = [])
* @method \Aws\Result getAnalyzedResource(array $args = [])
@ -33,6 +37,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getArchiveRuleAsync(array $args = [])
* @method \Aws\Result getFinding(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingAsync(array $args = [])
* @method \Aws\Result getFindingRecommendation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingRecommendationAsync(array $args = [])
* @method \Aws\Result getFindingV2(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingV2Async(array $args = [])
* @method \Aws\Result getGeneratedPolicy(array $args = [])

View file

@ -5,6 +5,8 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Account** service.
* @method \Aws\Result acceptPrimaryEmailUpdate(array $args = [])
* @method \GuzzleHttp\Promise\Promise acceptPrimaryEmailUpdateAsync(array $args = [])
* @method \Aws\Result deleteAlternateContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAlternateContactAsync(array $args = [])
* @method \Aws\Result disableRegion(array $args = [])
@ -15,6 +17,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getAlternateContactAsync(array $args = [])
* @method \Aws\Result getContactInformation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getContactInformationAsync(array $args = [])
* @method \Aws\Result getPrimaryEmail(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPrimaryEmailAsync(array $args = [])
* @method \Aws\Result getRegionOptStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRegionOptStatusAsync(array $args = [])
* @method \Aws\Result listRegions(array $args = [])
@ -23,5 +27,7 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise putAlternateContactAsync(array $args = [])
* @method \Aws\Result putContactInformation(array $args = [])
* @method \GuzzleHttp\Promise\Promise putContactInformationAsync(array $args = [])
* @method \Aws\Result startPrimaryEmailUpdate(array $args = [])
* @method \GuzzleHttp\Promise\Promise startPrimaryEmailUpdateAsync(array $args = [])
*/
class AccountClient extends AwsClient {}

View file

@ -1,195 +0,0 @@
<?php
namespace Aws\AlexaForBusiness;
use Aws\AwsClient;
/**
* This client is used to interact with the **Alexa For Business** service.
* @method \Aws\Result approveSkill(array $args = [])
* @method \GuzzleHttp\Promise\Promise approveSkillAsync(array $args = [])
* @method \Aws\Result associateContactWithAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateContactWithAddressBookAsync(array $args = [])
* @method \Aws\Result associateDeviceWithNetworkProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateDeviceWithNetworkProfileAsync(array $args = [])
* @method \Aws\Result associateDeviceWithRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateDeviceWithRoomAsync(array $args = [])
* @method \Aws\Result associateSkillGroupWithRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateSkillGroupWithRoomAsync(array $args = [])
* @method \Aws\Result associateSkillWithSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateSkillWithSkillGroupAsync(array $args = [])
* @method \Aws\Result associateSkillWithUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateSkillWithUsersAsync(array $args = [])
* @method \Aws\Result createAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAddressBookAsync(array $args = [])
* @method \Aws\Result createBusinessReportSchedule(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBusinessReportScheduleAsync(array $args = [])
* @method \Aws\Result createConferenceProvider(array $args = [])
* @method \GuzzleHttp\Promise\Promise createConferenceProviderAsync(array $args = [])
* @method \Aws\Result createContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise createContactAsync(array $args = [])
* @method \Aws\Result createGatewayGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createGatewayGroupAsync(array $args = [])
* @method \Aws\Result createNetworkProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createNetworkProfileAsync(array $args = [])
* @method \Aws\Result createProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
* @method \Aws\Result createRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = [])
* @method \Aws\Result createSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSkillGroupAsync(array $args = [])
* @method \Aws\Result createUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
* @method \Aws\Result deleteAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAddressBookAsync(array $args = [])
* @method \Aws\Result deleteBusinessReportSchedule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBusinessReportScheduleAsync(array $args = [])
* @method \Aws\Result deleteConferenceProvider(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteConferenceProviderAsync(array $args = [])
* @method \Aws\Result deleteContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteContactAsync(array $args = [])
* @method \Aws\Result deleteDevice(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDeviceAsync(array $args = [])
* @method \Aws\Result deleteDeviceUsageData(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDeviceUsageDataAsync(array $args = [])
* @method \Aws\Result deleteGatewayGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGatewayGroupAsync(array $args = [])
* @method \Aws\Result deleteNetworkProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteNetworkProfileAsync(array $args = [])
* @method \Aws\Result deleteProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
* @method \Aws\Result deleteRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = [])
* @method \Aws\Result deleteRoomSkillParameter(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRoomSkillParameterAsync(array $args = [])
* @method \Aws\Result deleteSkillAuthorization(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSkillAuthorizationAsync(array $args = [])
* @method \Aws\Result deleteSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSkillGroupAsync(array $args = [])
* @method \Aws\Result deleteUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
* @method \Aws\Result disassociateContactFromAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateContactFromAddressBookAsync(array $args = [])
* @method \Aws\Result disassociateDeviceFromRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateDeviceFromRoomAsync(array $args = [])
* @method \Aws\Result disassociateSkillFromSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateSkillFromSkillGroupAsync(array $args = [])
* @method \Aws\Result disassociateSkillFromUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateSkillFromUsersAsync(array $args = [])
* @method \Aws\Result disassociateSkillGroupFromRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateSkillGroupFromRoomAsync(array $args = [])
* @method \Aws\Result forgetSmartHomeAppliances(array $args = [])
* @method \GuzzleHttp\Promise\Promise forgetSmartHomeAppliancesAsync(array $args = [])
* @method \Aws\Result getAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAddressBookAsync(array $args = [])
* @method \Aws\Result getConferencePreference(array $args = [])
* @method \GuzzleHttp\Promise\Promise getConferencePreferenceAsync(array $args = [])
* @method \Aws\Result getConferenceProvider(array $args = [])
* @method \GuzzleHttp\Promise\Promise getConferenceProviderAsync(array $args = [])
* @method \Aws\Result getContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise getContactAsync(array $args = [])
* @method \Aws\Result getDevice(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDeviceAsync(array $args = [])
* @method \Aws\Result getGateway(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGatewayAsync(array $args = [])
* @method \Aws\Result getGatewayGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGatewayGroupAsync(array $args = [])
* @method \Aws\Result getInvitationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvitationConfigurationAsync(array $args = [])
* @method \Aws\Result getNetworkProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getNetworkProfileAsync(array $args = [])
* @method \Aws\Result getProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProfileAsync(array $args = [])
* @method \Aws\Result getRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRoomAsync(array $args = [])
* @method \Aws\Result getRoomSkillParameter(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRoomSkillParameterAsync(array $args = [])
* @method \Aws\Result getSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSkillGroupAsync(array $args = [])
* @method \Aws\Result listBusinessReportSchedules(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBusinessReportSchedulesAsync(array $args = [])
* @method \Aws\Result listConferenceProviders(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConferenceProvidersAsync(array $args = [])
* @method \Aws\Result listDeviceEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDeviceEventsAsync(array $args = [])
* @method \Aws\Result listGatewayGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGatewayGroupsAsync(array $args = [])
* @method \Aws\Result listGateways(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGatewaysAsync(array $args = [])
* @method \Aws\Result listSkills(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSkillsAsync(array $args = [])
* @method \Aws\Result listSkillsStoreCategories(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSkillsStoreCategoriesAsync(array $args = [])
* @method \Aws\Result listSkillsStoreSkillsByCategory(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSkillsStoreSkillsByCategoryAsync(array $args = [])
* @method \Aws\Result listSmartHomeAppliances(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSmartHomeAppliancesAsync(array $args = [])
* @method \Aws\Result listTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
* @method \Aws\Result putConferencePreference(array $args = [])
* @method \GuzzleHttp\Promise\Promise putConferencePreferenceAsync(array $args = [])
* @method \Aws\Result putInvitationConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putInvitationConfigurationAsync(array $args = [])
* @method \Aws\Result putRoomSkillParameter(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRoomSkillParameterAsync(array $args = [])
* @method \Aws\Result putSkillAuthorization(array $args = [])
* @method \GuzzleHttp\Promise\Promise putSkillAuthorizationAsync(array $args = [])
* @method \Aws\Result registerAVSDevice(array $args = [])
* @method \GuzzleHttp\Promise\Promise registerAVSDeviceAsync(array $args = [])
* @method \Aws\Result rejectSkill(array $args = [])
* @method \GuzzleHttp\Promise\Promise rejectSkillAsync(array $args = [])
* @method \Aws\Result resolveRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise resolveRoomAsync(array $args = [])
* @method \Aws\Result revokeInvitation(array $args = [])
* @method \GuzzleHttp\Promise\Promise revokeInvitationAsync(array $args = [])
* @method \Aws\Result searchAddressBooks(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchAddressBooksAsync(array $args = [])
* @method \Aws\Result searchContacts(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchContactsAsync(array $args = [])
* @method \Aws\Result searchDevices(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchDevicesAsync(array $args = [])
* @method \Aws\Result searchNetworkProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchNetworkProfilesAsync(array $args = [])
* @method \Aws\Result searchProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchProfilesAsync(array $args = [])
* @method \Aws\Result searchRooms(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchRoomsAsync(array $args = [])
* @method \Aws\Result searchSkillGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchSkillGroupsAsync(array $args = [])
* @method \Aws\Result searchUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchUsersAsync(array $args = [])
* @method \Aws\Result sendAnnouncement(array $args = [])
* @method \GuzzleHttp\Promise\Promise sendAnnouncementAsync(array $args = [])
* @method \Aws\Result sendInvitation(array $args = [])
* @method \GuzzleHttp\Promise\Promise sendInvitationAsync(array $args = [])
* @method \Aws\Result startDeviceSync(array $args = [])
* @method \GuzzleHttp\Promise\Promise startDeviceSyncAsync(array $args = [])
* @method \Aws\Result startSmartHomeApplianceDiscovery(array $args = [])
* @method \GuzzleHttp\Promise\Promise startSmartHomeApplianceDiscoveryAsync(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 updateAddressBook(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAddressBookAsync(array $args = [])
* @method \Aws\Result updateBusinessReportSchedule(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBusinessReportScheduleAsync(array $args = [])
* @method \Aws\Result updateConferenceProvider(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateConferenceProviderAsync(array $args = [])
* @method \Aws\Result updateContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateContactAsync(array $args = [])
* @method \Aws\Result updateDevice(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDeviceAsync(array $args = [])
* @method \Aws\Result updateGateway(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGatewayAsync(array $args = [])
* @method \Aws\Result updateGatewayGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGatewayGroupAsync(array $args = [])
* @method \Aws\Result updateNetworkProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateNetworkProfileAsync(array $args = [])
* @method \Aws\Result updateProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProfileAsync(array $args = [])
* @method \Aws\Result updateRoom(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = [])
* @method \Aws\Result updateSkillGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSkillGroupAsync(array $args = [])
*/
class AlexaForBusinessClient extends AwsClient {}

View file

@ -1,9 +0,0 @@
<?php
namespace Aws\AlexaForBusiness\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **Alexa For Business** service.
*/
class AlexaForBusinessException extends AwsException {}

View file

@ -113,6 +113,7 @@ class DocModel
return $this->clean($result);
}
private function clean($content)
{
if (!$content) {
@ -126,7 +127,7 @@ class DocModel
'output-html' => true,
'show-body-only' => true,
'drop-empty-paras' => true,
'drop-font-tags' => true,
'clean' => true,
'drop-proprietary-attributes' => true,
'hide-comments' => true,
'logical-emphasis' => true

View file

@ -52,19 +52,19 @@ class DecodingEventStreamIterator implements Iterator
];
/** @var StreamInterface Stream of eventstream shape to parse. */
private $stream;
protected $stream;
/** @var array Currently parsed event. */
private $currentEvent;
protected $currentEvent;
/** @var int Current in-order event key. */
private $key;
protected $key;
/** @var resource|\HashContext CRC32 hash context for event validation */
private $hashContext;
protected $hashContext;
/** @var int $currentPosition */
private $currentPosition;
protected $currentPosition;
/**
* DecodingEventStreamIterator constructor.
@ -77,7 +77,7 @@ class DecodingEventStreamIterator implements Iterator
$this->rewind();
}
private function parseHeaders($headerBytes)
protected function parseHeaders($headerBytes)
{
$headers = [];
$bytesRead = 0;
@ -102,7 +102,7 @@ class DecodingEventStreamIterator implements Iterator
return [$headers, $bytesRead];
}
private function parsePrelude()
protected function parsePrelude()
{
$prelude = [];
$bytesRead = 0;
@ -127,7 +127,12 @@ class DecodingEventStreamIterator implements Iterator
return [$prelude, $bytesRead];
}
private function parseEvent()
/**
* This method decodes an event from the stream.
*
* @return array
*/
protected function parseEvent()
{
$event = [];
@ -217,7 +222,7 @@ class DecodingEventStreamIterator implements Iterator
// Decoding Utilities
private function readAndHashBytes($num)
protected function readAndHashBytes($num)
{
$bytes = $this->stream->read($num);
hash_update($this->hashContext, $bytes);

View file

@ -28,11 +28,28 @@ class EventParsingIterator implements Iterator
StructureShape $shape,
AbstractParser $parser
) {
$this->decodingIterator = new DecodingEventStreamIterator($stream);
$this->decodingIterator = $this->chooseDecodingIterator($stream);
$this->shape = $shape;
$this->parser = $parser;
}
/**
* This method choose a decoding iterator implementation based on if the stream
* is seekable or not.
*
* @param $stream
*
* @return Iterator
*/
private function chooseDecodingIterator($stream)
{
if ($stream->isSeekable()) {
return new DecodingEventStreamIterator($stream);
} else {
return new NonSeekableStreamDecodingEventStreamIterator($stream);
}
}
#[\ReturnTypeWillChange]
public function current()
{
@ -80,8 +97,12 @@ class EventParsingIterator implements Iterator
throw new ParserException('Failed to parse without event type.');
}
$eventShape = $this->shape->getMember($eventType);
$eventPayload = $event['payload'];
if ($eventType === 'initial-response') {
return $this->parseInitialResponseEvent($eventPayload);
}
$eventShape = $this->shape->getMember($eventType);
return [
$eventType => array_merge(
@ -153,4 +174,9 @@ class EventParsingIterator implements Iterator
$event['headers'][':error-message']
);
}
private function parseInitialResponseEvent($payload): array
{
return ['initial-response' => json_decode($payload, true)];
}
}

View file

@ -1,6 +1,7 @@
<?php
namespace Aws\Api\Parser;
use Aws\Api\Operation;
use Aws\Api\StructureShape;
use Aws\Api\Service;
use Aws\Result;
@ -30,15 +31,45 @@ class JsonRpcParser extends AbstractParser
ResponseInterface $response
) {
$operation = $this->api->getOperation($command->getName());
$result = null === $operation['output']
? null
: $this->parseMemberFromStream(
return $this->parseResponse($response, $operation);
}
/**
* This method parses a response based on JSON RPC protocol.
*
* @param ResponseInterface $response the response to parse.
* @param Operation $operation the operation which holds information for
* parsing the response.
*
* @return Result
*/
private function parseResponse(ResponseInterface $response, Operation $operation)
{
if (null === $operation['output']) {
return new Result([]);
}
$outputShape = $operation->getOutput();
foreach ($outputShape->getMembers() as $memberName => $memberProps) {
if (!empty($memberProps['eventstream'])) {
return new Result([
$memberName => new EventParsingIterator(
$response->getBody(),
$outputShape->getMember($memberName),
$this
)
]);
}
}
$result = $this->parseMemberFromStream(
$response->getBody(),
$operation->getOutput(),
$response
);
return new Result($result ?: []);
return new Result(is_null($result) ? [] : $result);
}
public function parseMemberFromStream(

View file

@ -0,0 +1,101 @@
<?php
namespace Aws\Api\Parser;
use GuzzleHttp\Psr7;
use Psr\Http\Message\StreamInterface;
use Aws\Api\Parser\Exception\ParserException;
/**
* @inheritDoc
*/
class NonSeekableStreamDecodingEventStreamIterator extends DecodingEventStreamIterator
{
/** @var array $tempBuffer */
private $tempBuffer;
/**
* NonSeekableStreamDecodingEventStreamIterator constructor.
*
* @param StreamInterface $stream
*/
public function __construct(StreamInterface $stream)
{
$this->stream = $stream;
if ($this->stream->isSeekable()) {
throw new \InvalidArgumentException('The stream provided must be not seekable.');
}
$this->tempBuffer = [];
}
/**
* @inheritDoc
*
* @return array
*/
protected function parseEvent(): array
{
$event = [];
$this->hashContext = hash_init('crc32b');
$prelude = $this->parsePrelude()[0];
list(
$event[self::HEADERS],
$numBytes
) = $this->parseHeaders($prelude[self::LENGTH_HEADERS]);
$event[self::PAYLOAD] = Psr7\Utils::streamFor(
$this->readAndHashBytes(
$prelude[self::LENGTH_TOTAL] - self::BYTES_PRELUDE
- $numBytes - self::BYTES_TRAILING
)
);
$calculatedCrc = hash_final($this->hashContext, true);
$messageCrc = $this->stream->read(4);
if ($calculatedCrc !== $messageCrc) {
throw new ParserException('Message checksum mismatch.');
}
return $event;
}
protected function readAndHashBytes($num): string
{
$bytes = '';
while (!empty($this->tempBuffer) && $num > 0) {
$byte = array_shift($this->tempBuffer);
$bytes .= $byte;
$num = $num - 1;
}
$bytes = $bytes . $this->stream->read($num);
hash_update($this->hashContext, $bytes);
return $bytes;
}
// Iterator Functionality
#[\ReturnTypeWillChange]
public function rewind()
{
$this->currentEvent = $this->parseEvent();
}
public function next()
{
$this->tempBuffer[] = $this->stream->read(1);
if ($this->valid()) {
$this->key++;
$this->currentEvent = $this->parseEvent();
}
}
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
return !$this->stream->eof();
}
}

View file

@ -28,9 +28,7 @@ class Ec2ParamBuilder extends QueryParamBuilder
&$query
) {
// Handle empty list serialization
if (!$value) {
$query[$prefix] = false;
} else {
if (!empty($value)) {
$items = $shape->getMember();
foreach ($value as $k => $v) {
$this->format($items, $v, $prefix . '.' . ($k + 1), $query);

View file

@ -0,0 +1,57 @@
<?php
namespace Aws\AppTest;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Mainframe Modernization Application Testing** service.
* @method \Aws\Result createTestCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTestCaseAsync(array $args = [])
* @method \Aws\Result createTestConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTestConfigurationAsync(array $args = [])
* @method \Aws\Result createTestSuite(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTestSuiteAsync(array $args = [])
* @method \Aws\Result deleteTestCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTestCaseAsync(array $args = [])
* @method \Aws\Result deleteTestConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTestConfigurationAsync(array $args = [])
* @method \Aws\Result deleteTestRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTestRunAsync(array $args = [])
* @method \Aws\Result deleteTestSuite(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTestSuiteAsync(array $args = [])
* @method \Aws\Result getTestCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTestCaseAsync(array $args = [])
* @method \Aws\Result getTestConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTestConfigurationAsync(array $args = [])
* @method \Aws\Result getTestRunStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTestRunStepAsync(array $args = [])
* @method \Aws\Result getTestSuite(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTestSuiteAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listTestCases(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestCasesAsync(array $args = [])
* @method \Aws\Result listTestConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestConfigurationsAsync(array $args = [])
* @method \Aws\Result listTestRunSteps(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestRunStepsAsync(array $args = [])
* @method \Aws\Result listTestRunTestCases(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestRunTestCasesAsync(array $args = [])
* @method \Aws\Result listTestRuns(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestRunsAsync(array $args = [])
* @method \Aws\Result listTestSuites(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTestSuitesAsync(array $args = [])
* @method \Aws\Result startTestRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise startTestRunAsync(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 updateTestCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateTestCaseAsync(array $args = [])
* @method \Aws\Result updateTestConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateTestConfigurationAsync(array $args = [])
* @method \Aws\Result updateTestSuite(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateTestSuiteAsync(array $args = [])
*/
class AppTestClient extends AwsClient {}

View file

@ -0,0 +1,9 @@
<?php
namespace Aws\AppTest\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Mainframe Modernization Application Testing** service.
*/
class AppTestException extends AwsException {}

View file

@ -0,0 +1,39 @@
<?php
namespace Aws\ApplicationSignals;
use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon CloudWatch Application Signals** service.
* @method \Aws\Result batchGetServiceLevelObjectiveBudgetReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetServiceLevelObjectiveBudgetReportAsync(array $args = [])
* @method \Aws\Result createServiceLevelObjective(array $args = [])
* @method \GuzzleHttp\Promise\Promise createServiceLevelObjectiveAsync(array $args = [])
* @method \Aws\Result deleteServiceLevelObjective(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteServiceLevelObjectiveAsync(array $args = [])
* @method \Aws\Result getService(array $args = [])
* @method \GuzzleHttp\Promise\Promise getServiceAsync(array $args = [])
* @method \Aws\Result getServiceLevelObjective(array $args = [])
* @method \GuzzleHttp\Promise\Promise getServiceLevelObjectiveAsync(array $args = [])
* @method \Aws\Result listServiceDependencies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceDependenciesAsync(array $args = [])
* @method \Aws\Result listServiceDependents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceDependentsAsync(array $args = [])
* @method \Aws\Result listServiceLevelObjectives(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceLevelObjectivesAsync(array $args = [])
* @method \Aws\Result listServiceOperations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceOperationsAsync(array $args = [])
* @method \Aws\Result listServices(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServicesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result startDiscovery(array $args = [])
* @method \GuzzleHttp\Promise\Promise startDiscoveryAsync(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 updateServiceLevelObjective(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateServiceLevelObjectiveAsync(array $args = [])
*/
class ApplicationSignalsClient extends AwsClient {}

View file

@ -0,0 +1,9 @@
<?php
namespace Aws\ApplicationSignals\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **Amazon CloudWatch Application Signals** service.
*/
class ApplicationSignalsException extends AwsException {}

View file

@ -0,0 +1,169 @@
<?php
namespace Aws\Auth;
use Aws\Auth\Exception\UnresolvedAuthSchemeException;
use Aws\Identity\AwsCredentialIdentity;
use Aws\Identity\BearerTokenIdentity;
use GuzzleHttp\Promise\PromiseInterface;
/**
* Houses logic for selecting an auth scheme modeled in a service's `auth` trait.
* The `auth` trait can be modeled either in a service's metadata, or at the operation level.
*/
class AuthSchemeResolver implements AuthSchemeResolverInterface
{
const UNSIGNED_BODY = '-unsigned-body';
/**
* @var string[] Default mapping of modeled auth trait auth schemes
* to the SDK's supported signature versions.
*/
private static $defaultAuthSchemeMap = [
'aws.auth#sigv4' => 'v4',
'aws.auth#sigv4a' => 'v4a',
'smithy.api#httpBearerAuth' => 'bearer',
'smithy.api#noAuth' => 'anonymous'
];
/**
* @var array Mapping of auth schemes to signature versions used in
* resolving a signature version.
*/
private $authSchemeMap;
private $tokenProvider;
private $credentialProvider;
public function __construct(
callable $credentialProvider,
callable $tokenProvider = null,
array $authSchemeMap = []
){
$this->credentialProvider = $credentialProvider;
$this->tokenProvider = $tokenProvider;
$this->authSchemeMap = empty($authSchemeMap)
? self::$defaultAuthSchemeMap
: $authSchemeMap;
}
/**
* Accepts a priority-ordered list of auth schemes and an Identity
* and selects the first compatible auth schemes, returning a normalized
* signature version. For example, based on the default auth scheme mapping,
* if `aws.auth#sigv4` is selected, `v4` will be returned.
*
* @param array $authSchemes
* @param $identity
*
* @return string
* @throws UnresolvedAuthSchemeException
*/
public function selectAuthScheme(
array $authSchemes,
array $args = []
): string
{
$failureReasons = [];
foreach($authSchemes as $authScheme) {
$normalizedAuthScheme = $this->authSchemeMap[$authScheme] ?? $authScheme;
if ($this->isCompatibleAuthScheme($normalizedAuthScheme)) {
if ($normalizedAuthScheme === 'v4' && !empty($args['unsigned_payload'])) {
return $normalizedAuthScheme . self::UNSIGNED_BODY;
}
return $normalizedAuthScheme;
} else {
$failureReasons[] = $this->getIncompatibilityMessage($normalizedAuthScheme);
}
}
throw new UnresolvedAuthSchemeException(
'Could not resolve an authentication scheme: '
. implode('; ', $failureReasons)
);
}
/**
* Determines compatibility based on either Identity or the availability
* of the CRT extension.
*
* @param $authScheme
*
* @return bool
*/
private function isCompatibleAuthScheme($authScheme): bool
{
switch ($authScheme) {
case 'v4':
case 'anonymous':
return $this->hasAwsCredentialIdentity();
case 'v4a':
return extension_loaded('awscrt') && $this->hasAwsCredentialIdentity();
case 'bearer':
return $this->hasBearerTokenIdentity();
default:
return false;
}
}
/**
* Provides incompatibility messages in the event an incompatible auth scheme
* is encountered.
*
* @param $authScheme
*
* @return string
*/
private function getIncompatibilityMessage($authScheme): string
{
switch ($authScheme) {
case 'v4':
return 'Signature V4 requires AWS credentials for request signing';
case 'anonymous':
return 'Anonymous signatures require AWS credentials for request signing';
case 'v4a':
return 'The aws-crt-php extension and AWS credentials are required to use Signature V4A';
case 'bearer':
return 'Bearer token credentials must be provided to use Bearer authentication';
default:
return "The service does not support `{$authScheme}` authentication.";
}
}
/**
* @return bool
*/
private function hasAwsCredentialIdentity(): bool
{
$fn = $this->credentialProvider;
$result = $fn();
if ($result instanceof PromiseInterface) {
return $result->wait() instanceof AwsCredentialIdentity;
}
return $result instanceof AwsCredentialIdentity;
}
/**
* @return bool
*/
private function hasBearerTokenIdentity(): bool
{
if ($this->tokenProvider) {
$fn = $this->tokenProvider;
$result = $fn();
if ($result instanceof PromiseInterface) {
return $result->wait() instanceof BearerTokenIdentity;
}
return $result instanceof BearerTokenIdentity;
}
return false;
}
}

View file

@ -0,0 +1,24 @@
<?php
namespace Aws\Auth;
use Aws\Identity\IdentityInterface;
/**
* An AuthSchemeResolver object determines which auth scheme will be used for request signing.
*/
interface AuthSchemeResolverInterface
{
/**
* Selects an auth scheme for request signing.
*
* @param array $authSchemes a priority-ordered list of authentication schemes.
* @param IdentityInterface $identity Credentials to be used in request signing.
*
* @return string
*/
public function selectAuthScheme(
array $authSchemes,
array $args
): ?string;
}

View file

@ -0,0 +1,99 @@
<?php
namespace Aws\Auth;
use Aws\Api\Service;
use Aws\CommandInterface;
use Closure;
use GuzzleHttp\Promise\Promise;
/**
* Handles auth scheme resolution. If a service models and auth scheme using
* the `auth` trait and the operation or metadata levels, this middleware will
* attempt to select the first compatible auth scheme it encounters and apply its
* signature version to the command's `@context` property bag.
*
* IMPORTANT: this middleware must be added to the "build" step.
*
* @internal
*/
class AuthSelectionMiddleware
{
/** @var callable */
private $nextHandler;
/** @var AuthSchemeResolverInterface */
private $authResolver;
/** @var Service */
private $api;
/**
* Create a middleware wrapper function
*
* @param AuthSchemeResolverInterface $authResolver
* @param Service $api
* @return Closure
*/
public static function wrap(
AuthSchemeResolverInterface $authResolver,
Service $api
): Closure
{
return function (callable $handler) use ($authResolver, $api) {
return new self($handler, $authResolver, $api);
};
}
/**
* @param callable $nextHandler
* @param $authResolver
* @param callable $identityProvider
* @param Service $api
*/
public function __construct(
callable $nextHandler,
AuthSchemeResolverInterface $authResolver,
Service $api
)
{
$this->nextHandler = $nextHandler;
$this->authResolver = $authResolver;
$this->api = $api;
}
/**
* @param CommandInterface $command
*
* @return Promise
*/
public function __invoke(CommandInterface $command)
{
$nextHandler = $this->nextHandler;
$serviceAuth = $this->api->getMetadata('auth') ?: [];
$operation = $this->api->getOperation($command->getName());
$operationAuth = $operation['auth'] ?? [];
$unsignedPayload = $operation['unsignedpayload'] ?? false;
$resolvableAuth = $operationAuth ?: $serviceAuth;
if (!empty($resolvableAuth)) {
if (isset($command['@context']['auth_scheme_resolver'])
&& $command['@context']['auth_scheme_resolver'] instanceof AuthSchemeResolverInterface
){
$resolver = $command['@context']['auth_scheme_resolver'];
} else {
$resolver = $this->authResolver;
}
$selectedAuthScheme = $resolver->selectAuthScheme(
$resolvableAuth,
['unsigned_payload' => $unsignedPayload]
);
if (!empty($selectedAuthScheme)) {
$command['@context']['signature_version'] = $selectedAuthScheme;
}
}
return $nextHandler($command);
}
}

View file

@ -0,0 +1,15 @@
<?php
namespace Aws\Auth\Exception;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
/**
* Represents an error when attempting to resolve authentication.
*/
class UnresolvedAuthSchemeException extends \RuntimeException implements
MonitoringEventsInterface
{
use HasMonitoringEventsTrait;
}

View file

@ -4,6 +4,8 @@ namespace Aws;
use Aws\Api\ApiProvider;
use Aws\Api\DocModel;
use Aws\Api\Service;
use Aws\Auth\AuthSelectionMiddleware;
use Aws\Auth\AuthSchemeResolverInterface;
use Aws\EndpointDiscovery\EndpointDiscoveryMiddleware;
use Aws\EndpointV2\EndpointProviderV2;
use Aws\EndpointV2\EndpointV2Middleware;
@ -36,6 +38,9 @@ class AwsClient implements AwsClientInterface
/** @var callable */
private $signatureProvider;
/** @var AuthSchemeResolverInterface */
private $authSchemeResolver;
/** @var callable */
private $credentialProvider;
@ -203,6 +208,13 @@ class AwsClient implements AwsClientInterface
* client-side parameter validation.
* - version: (string, required) The version of the webservice to
* utilize (e.g., 2006-03-01).
* - ua_append: (string, array) To pass custom user agent parameters.
* - app_id: (string) an optional application specific identifier that can be set.
* When set it will be appended to the User-Agent header of every request
* in the form of App/{AppId}. This variable is sourced from environment
* variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
* See https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for
* more information on environment variables and shared config settings.
*
* @param array $args Client configuration arguments.
*
@ -223,17 +235,18 @@ class AwsClient implements AwsClientInterface
$config = $resolver->resolve($args, $this->handlerList);
$this->api = $config['api'];
$this->signatureProvider = $config['signature_provider'];
$this->authSchemeResolver = $config['auth_scheme_resolver'];
$this->endpoint = new Uri($config['endpoint']);
$this->credentialProvider = $config['credentials'];
$this->tokenProvider = $config['token'];
$this->region = isset($config['region']) ? $config['region'] : null;
$this->region = $config['region'] ?? null;
$this->config = $config['config'];
$this->setClientBuiltIns($args);
$this->clientContextParams = $this->setClientContextParams($args);
$this->defaultRequestOptions = $config['http'];
$this->endpointProvider = $config['endpoint_provider'];
$this->serializer = $config['serializer'];
$this->addSignatureMiddleware();
$this->addSignatureMiddleware($args);
$this->addInvocationId();
$this->addEndpointParameterMiddleware($args);
$this->addEndpointDiscoveryMiddleware($config, $args);
@ -244,6 +257,7 @@ class AwsClient implements AwsClientInterface
if ($this->isUseEndpointV2()) {
$this->addEndpointV2Middleware();
}
$this->addAuthSelectionMiddleware();
if (!is_null($this->api->getMetadata('awsQueryCompatible'))) {
$this->addQueryCompatibleInputMiddleware($this->api);
@ -263,9 +277,7 @@ class AwsClient implements AwsClientInterface
{
return $option === null
? $this->config
: (isset($this->config[$option])
? $this->config[$option]
: null);
: $this->config[$option] ?? null;
}
public function getCredentials()
@ -403,49 +415,51 @@ class AwsClient implements AwsClientInterface
}
}
private function addSignatureMiddleware()
private function addSignatureMiddleware(array $args)
{
$api = $this->getApi();
$provider = $this->signatureProvider;
$version = $this->config['signature_version'];
$signatureVersion = $this->config['signature_version'];
$name = $this->config['signing_name'];
$region = $this->config['signing_region'];
if (isset($args['signature_version'])
|| isset($this->config['configured_signature_version'])
) {
$configuredSignatureVersion = true;
} else {
$configuredSignatureVersion = false;
}
$resolver = static function (
CommandInterface $c
) use ($api, $provider, $name, $region, $version) {
if (!empty($c['@context']['signing_region'])) {
$region = $c['@context']['signing_region'];
}
if (!empty($c['@context']['signing_service'])) {
$name = $c['@context']['signing_service'];
}
) use ($api, $provider, $name, $region, $signatureVersion, $configuredSignatureVersion) {
if (!$configuredSignatureVersion) {
if (!empty($c['@context']['signing_region'])) {
$region = $c['@context']['signing_region'];
}
if (!empty($c['@context']['signing_service'])) {
$name = $c['@context']['signing_service'];
}
if (!empty($c['@context']['signature_version'])) {
$signatureVersion = $c['@context']['signature_version'];
}
$authType = $api->getOperation($c->getName())['authtype'];
switch ($authType){
case 'none':
$version = 'anonymous';
break;
case 'v4-unsigned-body':
$version = 'v4-unsigned-body';
break;
case 'bearer':
$version = 'bearer';
break;
}
if (isset($c['@context']['signature_version'])) {
if ($c['@context']['signature_version'] == 'v4a') {
$version = 'v4a';
$authType = $api->getOperation($c->getName())['authtype'];
switch ($authType){
case 'none':
$signatureVersion = 'anonymous';
break;
case 'v4-unsigned-body':
$signatureVersion = 'v4-unsigned-body';
break;
case 'bearer':
$signatureVersion = 'bearer';
break;
}
}
if (!empty($endpointAuthSchemes = $c->getAuthSchemes())) {
$version = $endpointAuthSchemes['version'];
$name = isset($endpointAuthSchemes['name']) ?
$endpointAuthSchemes['name'] : $name;
$region = isset($endpointAuthSchemes['region']) ?
$endpointAuthSchemes['region'] : $region;
}
return SignatureProvider::resolve($provider, $version, $name, $region);
return SignatureProvider::resolve($provider, $signatureVersion, $name, $region);
};
$this->handlerList->appendSign(
Middleware::signer($this->credentialProvider,
@ -519,6 +533,19 @@ class AwsClient implements AwsClientInterface
);
}
private function addAuthSelectionMiddleware()
{
$list = $this->getHandlerList();
$list->prependBuild(
AuthSelectionMiddleware::wrap(
$this->authSchemeResolver,
$this->getApi()
),
'auth-selection'
);
}
private function addEndpointV2Middleware()
{
$list = $this->getHandlerList();
@ -654,7 +681,7 @@ class AwsClient implements AwsClientInterface
public static function applyDocFilters(array $api, array $docs)
{
$aliases = \Aws\load_compiled_json(__DIR__ . '/data/aliases.json');
$serviceId = $api['metadata']['serviceId'];
$serviceId = $api['metadata']['serviceId'] ?? '';
$version = $api['metadata']['apiVersion'];
// Replace names for any operations with SDK aliases

View file

@ -1,27 +0,0 @@
<?php
namespace Aws\BackupStorage;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Backup Storage** service.
* @method \Aws\Result deleteObject(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteObjectAsync(array $args = [])
* @method \Aws\Result getChunk(array $args = [])
* @method \GuzzleHttp\Promise\Promise getChunkAsync(array $args = [])
* @method \Aws\Result getObjectMetadata(array $args = [])
* @method \GuzzleHttp\Promise\Promise getObjectMetadataAsync(array $args = [])
* @method \Aws\Result listChunks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChunksAsync(array $args = [])
* @method \Aws\Result listObjects(array $args = [])
* @method \GuzzleHttp\Promise\Promise listObjectsAsync(array $args = [])
* @method \Aws\Result notifyObjectComplete(array $args = [])
* @method \GuzzleHttp\Promise\Promise notifyObjectCompleteAsync(array $args = [])
* @method \Aws\Result putChunk(array $args = [])
* @method \GuzzleHttp\Promise\Promise putChunkAsync(array $args = [])
* @method \Aws\Result putObject(array $args = [])
* @method \GuzzleHttp\Promise\Promise putObjectAsync(array $args = [])
* @method \Aws\Result startObject(array $args = [])
* @method \GuzzleHttp\Promise\Promise startObjectAsync(array $args = [])
*/
class BackupStorageClient extends AwsClient {}

View file

@ -1,9 +0,0 @@
<?php
namespace Aws\BackupStorage\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Backup Storage** service.
*/
class BackupStorageException extends AwsException {}

View file

@ -31,6 +31,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeJobsAsync(array $args = [])
* @method \Aws\Result describeSchedulingPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = [])
* @method \Aws\Result getJobQueueSnapshot(array $args = [])
* @method \GuzzleHttp\Promise\Promise getJobQueueSnapshotAsync(array $args = [])
* @method \Aws\Result listJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
* @method \Aws\Result listSchedulingPolicies(array $args = [])

View file

@ -5,20 +5,32 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon Bedrock** service.
* @method \Aws\Result createEvaluationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEvaluationJobAsync(array $args = [])
* @method \Aws\Result createGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise createGuardrailAsync(array $args = [])
* @method \Aws\Result createGuardrailVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise createGuardrailVersionAsync(array $args = [])
* @method \Aws\Result createModelCustomizationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelCustomizationJobAsync(array $args = [])
* @method \Aws\Result createProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result deleteCustomModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCustomModelAsync(array $args = [])
* @method \Aws\Result deleteGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGuardrailAsync(array $args = [])
* @method \Aws\Result deleteModelInvocationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteModelInvocationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result getCustomModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCustomModelAsync(array $args = [])
* @method \Aws\Result getEvaluationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEvaluationJobAsync(array $args = [])
* @method \Aws\Result getFoundationModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFoundationModelAsync(array $args = [])
* @method \Aws\Result getGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGuardrailAsync(array $args = [])
* @method \Aws\Result getModelCustomizationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getModelCustomizationJobAsync(array $args = [])
* @method \Aws\Result getModelInvocationLoggingConfiguration(array $args = [])
@ -27,8 +39,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result listCustomModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCustomModelsAsync(array $args = [])
* @method \Aws\Result listEvaluationJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEvaluationJobsAsync(array $args = [])
* @method \Aws\Result listFoundationModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFoundationModelsAsync(array $args = [])
* @method \Aws\Result listGuardrails(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGuardrailsAsync(array $args = [])
* @method \Aws\Result listModelCustomizationJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listModelCustomizationJobsAsync(array $args = [])
* @method \Aws\Result listProvisionedModelThroughputs(array $args = [])
@ -37,12 +53,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putModelInvocationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putModelInvocationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result stopEvaluationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopEvaluationJobAsync(array $args = [])
* @method \Aws\Result stopModelCustomizationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopModelCustomizationJobAsync(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 updateGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGuardrailAsync(array $args = [])
* @method \Aws\Result updateProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProvisionedModelThroughputAsync(array $args = [])
*/

View file

@ -15,8 +15,18 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createAgentAliasAsync(array $args = [])
* @method \Aws\Result createDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataSourceAsync(array $args = [])
* @method \Aws\Result createFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFlowAsync(array $args = [])
* @method \Aws\Result createFlowAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFlowAliasAsync(array $args = [])
* @method \Aws\Result createFlowVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFlowVersionAsync(array $args = [])
* @method \Aws\Result createKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise createKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result createPrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPromptAsync(array $args = [])
* @method \Aws\Result createPromptVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPromptVersionAsync(array $args = [])
* @method \Aws\Result deleteAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAgentAsync(array $args = [])
* @method \Aws\Result deleteAgentActionGroup(array $args = [])
@ -27,8 +37,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteAgentVersionAsync(array $args = [])
* @method \Aws\Result deleteDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDataSourceAsync(array $args = [])
* @method \Aws\Result deleteFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFlowAsync(array $args = [])
* @method \Aws\Result deleteFlowAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFlowAliasAsync(array $args = [])
* @method \Aws\Result deleteFlowVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFlowVersionAsync(array $args = [])
* @method \Aws\Result deleteKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result deletePrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePromptAsync(array $args = [])
* @method \Aws\Result disassociateAgentKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateAgentKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result getAgent(array $args = [])
@ -43,10 +61,18 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getAgentVersionAsync(array $args = [])
* @method \Aws\Result getDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
* @method \Aws\Result getFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFlowAsync(array $args = [])
* @method \Aws\Result getFlowAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFlowAliasAsync(array $args = [])
* @method \Aws\Result getFlowVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFlowVersionAsync(array $args = [])
* @method \Aws\Result getIngestionJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIngestionJobAsync(array $args = [])
* @method \Aws\Result getKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise getKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result getPrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPromptAsync(array $args = [])
* @method \Aws\Result listAgentActionGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAgentActionGroupsAsync(array $args = [])
* @method \Aws\Result listAgentAliases(array $args = [])
@ -59,14 +85,24 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listAgentsAsync(array $args = [])
* @method \Aws\Result listDataSources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDataSourcesAsync(array $args = [])
* @method \Aws\Result listFlowAliases(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowAliasesAsync(array $args = [])
* @method \Aws\Result listFlowVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowVersionsAsync(array $args = [])
* @method \Aws\Result listFlows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowsAsync(array $args = [])
* @method \Aws\Result listIngestionJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listIngestionJobsAsync(array $args = [])
* @method \Aws\Result listKnowledgeBases(array $args = [])
* @method \GuzzleHttp\Promise\Promise listKnowledgeBasesAsync(array $args = [])
* @method \Aws\Result listPrompts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPromptsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result prepareAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise prepareAgentAsync(array $args = [])
* @method \Aws\Result prepareFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise prepareFlowAsync(array $args = [])
* @method \Aws\Result startIngestionJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startIngestionJobAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
@ -83,7 +119,13 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateAgentKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result updateDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
* @method \Aws\Result updateFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFlowAsync(array $args = [])
* @method \Aws\Result updateFlowAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFlowAliasAsync(array $args = [])
* @method \Aws\Result updateKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result updatePrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePromptAsync(array $args = [])
*/
class BedrockAgentClient extends AwsClient {}

View file

@ -5,8 +5,14 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Agents for Amazon Bedrock Runtime** service.
* @method \Aws\Result deleteAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAgentMemoryAsync(array $args = [])
* @method \Aws\Result getAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAgentMemoryAsync(array $args = [])
* @method \Aws\Result invokeAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeAgentAsync(array $args = [])
* @method \Aws\Result invokeFlow(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeFlowAsync(array $args = [])
* @method \Aws\Result retrieve(array $args = [])
* @method \GuzzleHttp\Promise\Promise retrieveAsync(array $args = [])
* @method \Aws\Result retrieveAndGenerate(array $args = [])

View file

@ -5,6 +5,12 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon Bedrock Runtime** service.
* @method \Aws\Result applyGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise applyGuardrailAsync(array $args = [])
* @method \Aws\Result converse(array $args = [])
* @method \GuzzleHttp\Promise\Promise converseAsync(array $args = [])
* @method \Aws\Result converseStream(array $args = [])
* @method \GuzzleHttp\Promise\Promise converseStreamAsync(array $args = [])
* @method \Aws\Result invokeModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeModelAsync(array $args = [])
* @method \Aws\Result invokeModelWithResponseStream(array $args = [])

View file

@ -43,6 +43,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeSubscribersForNotificationAsync(array $args = [])
* @method \Aws\Result executeBudgetAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise executeBudgetActionAsync(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 updateBudget(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBudgetAsync(array $args = [])
* @method \Aws\Result updateBudgetAction(array $args = [])

View file

@ -43,6 +43,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listMicrosoftTeamsConfiguredTeamsAsync(array $args = [])
* @method \Aws\Result listMicrosoftTeamsUserIdentities(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMicrosoftTeamsUserIdentitiesAsync(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 updateAccountPreferences(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAccountPreferencesAsync(array $args = [])
* @method \Aws\Result updateChimeWebhookConfiguration(array $args = [])

View file

@ -9,6 +9,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise batchGetCollaborationAnalysisTemplateAsync(array $args = [])
* @method \Aws\Result batchGetSchema(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetSchemaAsync(array $args = [])
* @method \Aws\Result batchGetSchemaAnalysisRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetSchemaAnalysisRuleAsync(array $args = [])
* @method \Aws\Result createAnalysisTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAnalysisTemplateAsync(array $args = [])
* @method \Aws\Result createCollaboration(array $args = [])

View file

@ -4,6 +4,9 @@ namespace Aws;
use Aws\Api\ApiProvider;
use Aws\Api\Service;
use Aws\Api\Validator;
use Aws\Auth\AuthResolver;
use Aws\Auth\AuthSchemeResolver;
use Aws\Auth\AuthSchemeResolverInterface;
use Aws\ClientSideMonitoring\ApiCallAttemptMonitoringMiddleware;
use Aws\ClientSideMonitoring\ApiCallMonitoringMiddleware;
use Aws\ClientSideMonitoring\Configuration;
@ -196,6 +199,12 @@ class ClientResolver
'fn' => [__CLASS__, '_apply_token'],
'default' => [__CLASS__, '_default_token_provider'],
],
'auth_scheme_resolver' => [
'type' => 'value',
'valid' => [AuthSchemeResolverInterface::class],
'doc' => 'An instance of Aws\Auth\AuthSchemeResolverInterface which selects a modeled auth scheme and returns a signature version',
'default' => [__CLASS__, '_default_auth_scheme_resolver'],
],
'endpoint_discovery' => [
'type' => 'value',
'valid' => [ConfigurationInterface::class, CacheInterface::class, 'array', 'callable'],
@ -270,6 +279,15 @@ class ClientResolver
'fn' => [__CLASS__, '_apply_handler'],
'default' => [__CLASS__, '_default_handler']
],
'app_id' => [
'type' => 'value',
'valid' => ['string'],
'doc' => 'app_id(AppId) is an optional application specific identifier that can be set.
When set it will be appended to the User-Agent header of every request in the form of App/{AppId}.
This value is also sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.',
'fn' => [__CLASS__, '_apply_app_id'],
'default' => [__CLASS__, '_default_app_id']
],
'ua_append' => [
'type' => 'value',
'valid' => ['string', 'array'],
@ -599,8 +617,8 @@ class ClientResolver
new Credentials(
$value['key'],
$value['secret'],
isset($value['token']) ? $value['token'] : null,
isset($value['expires']) ? $value['expires'] : null
$value['token'] ?? null,
$value['expires'] ?? null
)
);
} elseif ($value === false) {
@ -608,6 +626,7 @@ class ClientResolver
new Credentials('', '')
);
$args['config']['signature_version'] = 'anonymous';
$args['config']['configured_signature_version'] = true;
} elseif ($value instanceof CacheInterface) {
$args['credentials'] = CredentialProvider::defaultProvider($args);
} else {
@ -637,7 +656,7 @@ class ClientResolver
$args['token'] = TokenProvider::fromToken(
new Token(
$value['token'],
isset($value['expires']) ? $value['expires'] : null
$value['expires'] ?? null
)
);
} elseif ($value instanceof CacheInterface) {
@ -721,9 +740,7 @@ class ClientResolver
->getPartition($args['region'], $args['service']);
}
$endpointPrefix = isset($args['api']['metadata']['endpointPrefix'])
? $args['api']['metadata']['endpointPrefix']
: $args['service'];
$endpointPrefix = $args['api']['metadata']['endpointPrefix'] ?? $args['service'];
// Check region is a valid host label when it is being used to
// generate an endpoint
@ -916,17 +933,43 @@ class ClientResolver
);
}
public static function _apply_app_id($value, array &$args)
{
// AppId should not be longer than 50 chars
static $MAX_APP_ID_LENGTH = 50;
if (strlen($value) > $MAX_APP_ID_LENGTH) {
trigger_error("The provided or configured value for `AppId`, "
."which is an user agent parameter, exceeds the maximum length of "
."$MAX_APP_ID_LENGTH characters.", E_USER_WARNING);
}
$args['app_id'] = $value;
}
public static function _default_app_id(array $args)
{
return ConfigurationResolver::resolve(
'sdk_ua_app_id',
'',
'string',
$args
);
}
public static function _apply_user_agent($inputUserAgent, array &$args, HandlerList $list)
{
//Add SDK version
// Add SDK version
$userAgent = ['aws-sdk-php/' . Sdk::VERSION];
//If on HHVM add the HHVM version
// User Agent Metadata
$userAgent[] = 'ua/2.0';
// If on HHVM add the HHVM version
if (defined('HHVM_VERSION')) {
$userAgent []= 'HHVM/' . HHVM_VERSION;
}
//Add OS version
// Add OS version
$disabledFunctions = explode(',', ini_get('disable_functions'));
if (function_exists('php_uname')
&& !in_array('php_uname', $disabledFunctions, true)
@ -937,15 +980,15 @@ class ClientResolver
}
}
//Add the language version
// Add the language version
$userAgent []= 'lang/php#' . phpversion();
//Add exec environment if present
// Add exec environment if present
if ($executionEnvironment = getenv('AWS_EXECUTION_ENV')) {
$userAgent []= $executionEnvironment;
}
//Add endpoint discovery if set
// Add endpoint discovery if set
if (isset($args['endpoint_discovery'])) {
if (($args['endpoint_discovery'] instanceof \Aws\EndpointDiscovery\Configuration
&& $args['endpoint_discovery']->isEnabled())
@ -959,7 +1002,7 @@ class ClientResolver
}
}
//Add retry mode if set
// Add retry mode if set
if (isset($args['retries'])) {
if ($args['retries'] instanceof \Aws\Retry\Configuration) {
$userAgent []= 'cfg/retry-mode#' . $args["retries"]->getMode();
@ -969,7 +1012,13 @@ class ClientResolver
$userAgent []= 'cfg/retry-mode#' . $args["retries"]["mode"];
}
}
//Add the input to the end
// AppID Metadata
if (!empty($args['app_id'])) {
$userAgent[] = 'app/' . $args['app_id'];
}
// Add the input to the end
if ($inputUserAgent){
if (!is_array($inputUserAgent)) {
$inputUserAgent = [$inputUserAgent];
@ -1041,7 +1090,7 @@ class ClientResolver
public static function _default_endpoint_provider(array $args)
{
$service = isset($args['api']) ? $args['api'] : null;
$service = $args['api'] ?? null;
$serviceName = isset($service) ? $service->getServiceName() : null;
$apiVersion = isset($service) ? $service->getApiVersion() : null;
@ -1075,6 +1124,11 @@ class ClientResolver
return SignatureProvider::defaultProvider();
}
public static function _default_auth_scheme_resolver(array $args)
{
return new AuthSchemeResolver($args['credentials'], $args['token']);
}
public static function _default_signature_version(array &$args)
{
if (isset($args['config']['signature_version'])) {
@ -1130,9 +1184,7 @@ class ClientResolver
'region' => $args['region'],
]);
return isset($args['__partition_result']['signingRegion'])
? $args['__partition_result']['signingRegion']
: $args['region'];
return $args['__partition_result']['signingRegion'] ?? $args['region'];
}
public static function _apply_ignore_configured_endpoint_urls($value, array &$args)
@ -1187,7 +1239,7 @@ class ClientResolver
return $value;
}
public static function _apply_region($value, array &$args)
{
if (empty($value)) {
@ -1203,7 +1255,7 @@ class ClientResolver
public static function _missing_region(array $args)
{
$service = isset($args['service']) ? $args['service'] : '';
$service = $args['service'] ?? '';
$msg = <<<EOT
Missing required client configuration options:
@ -1268,8 +1320,7 @@ EOT;
$definition = [
'type' => 'value',
'valid' => [$paramDefinition['type']],
'doc' => isset($paramDefinition['documentation']) ?
$paramDefinition['documentation'] : null
'doc' => $paramDefinition['documentation'] ?? null
];
$this->argDefinitions[$paramName] = $definition;

View file

@ -118,6 +118,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listStackInstancesAsync(array $args = [])
* @method \Aws\Result listStackResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = [])
* @method \Aws\Result listStackSetAutoDeploymentTargets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackSetAutoDeploymentTargetsAsync(array $args = [])
* @method \Aws\Result listStackSetOperationResults(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStackSetOperationResultsAsync(array $args = [])
* @method \Aws\Result listStackSetOperations(array $args = [])

View file

@ -17,10 +17,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
* @method \Aws\Result deleteHsm(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
* @method \Aws\Result deleteResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
* @method \Aws\Result describeBackups(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeBackupsAsync(array $args = [])
* @method \Aws\Result describeClusters(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
* @method \Aws\Result getResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
* @method \Aws\Result initializeCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise initializeClusterAsync(array $args = [])
* @method \Aws\Result listTags(array $args = [])
@ -29,6 +33,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise modifyBackupAttributesAsync(array $args = [])
* @method \Aws\Result modifyCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise modifyClusterAsync(array $args = [])
* @method \Aws\Result putResourcePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
* @method \Aws\Result restoreBackup(array $args = [])
* @method \GuzzleHttp\Promise\Promise restoreBackupAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])

View file

@ -2,6 +2,8 @@
namespace Aws\CloudWatchLogs;
use Aws\AwsClient;
use Aws\CommandInterface;
use Generator;
/**
* This client is used to interact with the **Amazon CloudWatch Logs** service.
@ -155,4 +157,64 @@ use Aws\AwsClient;
* @method \Aws\Result updateLogAnomalyDetector(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateLogAnomalyDetectorAsync(array $args = [])
*/
class CloudWatchLogsClient extends AwsClient {}
class CloudWatchLogsClient extends AwsClient {
static $streamingCommands = [
'StartLiveTail' => true
];
public function __construct(array $args)
{
parent::__construct($args);
$this->addStreamingFlagMiddleware();
}
private function addStreamingFlagMiddleware()
{
$this->getHandlerList()
-> appendInit(
$this->getStreamingFlagMiddleware(),
'streaming-flag-middleware'
);
}
private function getStreamingFlagMiddleware(): callable
{
return function (callable $handler) {
return function (CommandInterface $command, $request = null) use ($handler) {
if (!empty(self::$streamingCommands[$command->getName()])) {
$command['@http']['stream'] = true;
}
return $handler($command, $request);
};
};
}
/**
* Helper method for 'startLiveTail' operation that checks for results.
*
* Initiates 'startLiveTail' operation with given arguments, and continuously
* checks response stream for session updates or results, yielding each
* stream chunk when results are not empty. This method abstracts from users
* the need of checking if there are logs entry available to be watched, which means
* that users will always get a next item to be iterated when more log entries are
* available.
*
* @param array $args Command arguments.
*
* @return Generator Yields session update or result stream chunks.
*/
public function startLiveTailCheckingForResults(array $args): Generator
{
$response = $this->startLiveTail($args);
foreach ($response['responseStream'] as $streamChunk) {
if (isset($streamChunk['sessionUpdate'])) {
if (!empty($streamChunk['sessionUpdate']['sessionResults'])) {
yield $streamChunk;
}
} else {
yield $streamChunk;
}
}
}
}

View file

@ -11,6 +11,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise copyPackageVersionsAsync(array $args = [])
* @method \Aws\Result createDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
* @method \Aws\Result createPackageGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPackageGroupAsync(array $args = [])
* @method \Aws\Result createRepository(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRepositoryAsync(array $args = [])
* @method \Aws\Result deleteDomain(array $args = [])
@ -19,6 +21,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteDomainPermissionsPolicyAsync(array $args = [])
* @method \Aws\Result deletePackage(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePackageAsync(array $args = [])
* @method \Aws\Result deletePackageGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePackageGroupAsync(array $args = [])
* @method \Aws\Result deletePackageVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePackageVersionsAsync(array $args = [])
* @method \Aws\Result deleteRepository(array $args = [])
@ -29,6 +33,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeDomainAsync(array $args = [])
* @method \Aws\Result describePackage(array $args = [])
* @method \GuzzleHttp\Promise\Promise describePackageAsync(array $args = [])
* @method \Aws\Result describePackageGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise describePackageGroupAsync(array $args = [])
* @method \Aws\Result describePackageVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise describePackageVersionAsync(array $args = [])
* @method \Aws\Result describeRepository(array $args = [])
@ -37,6 +43,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise disassociateExternalConnectionAsync(array $args = [])
* @method \Aws\Result disposePackageVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise disposePackageVersionsAsync(array $args = [])
* @method \Aws\Result getAssociatedPackageGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAssociatedPackageGroupAsync(array $args = [])
* @method \Aws\Result getAuthorizationToken(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAuthorizationTokenAsync(array $args = [])
* @method \Aws\Result getDomainPermissionsPolicy(array $args = [])
@ -49,8 +57,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getRepositoryEndpointAsync(array $args = [])
* @method \Aws\Result getRepositoryPermissionsPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRepositoryPermissionsPolicyAsync(array $args = [])
* @method \Aws\Result listAllowedRepositoriesForGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAllowedRepositoriesForGroupAsync(array $args = [])
* @method \Aws\Result listAssociatedPackages(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAssociatedPackagesAsync(array $args = [])
* @method \Aws\Result listDomains(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
* @method \Aws\Result listPackageGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPackageGroupsAsync(array $args = [])
* @method \Aws\Result listPackageVersionAssets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPackageVersionAssetsAsync(array $args = [])
* @method \Aws\Result listPackageVersionDependencies(array $args = [])
@ -63,6 +77,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listRepositoriesAsync(array $args = [])
* @method \Aws\Result listRepositoriesInDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRepositoriesInDomainAsync(array $args = [])
* @method \Aws\Result listSubPackageGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSubPackageGroupsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result publishPackageVersion(array $args = [])
@ -77,6 +93,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updatePackageGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePackageGroupAsync(array $args = [])
* @method \Aws\Result updatePackageGroupOriginConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePackageGroupOriginConfigurationAsync(array $args = [])
* @method \Aws\Result updatePackageVersionsStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePackageVersionsStatusAsync(array $args = [])
* @method \Aws\Result updateRepository(array $args = [])

View file

@ -0,0 +1,63 @@
<?php
namespace Aws\CodeConnections;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS CodeConnections** service.
* @method \Aws\Result createConnection(array $args = [])
* @method \GuzzleHttp\Promise\Promise createConnectionAsync(array $args = [])
* @method \Aws\Result createHost(array $args = [])
* @method \GuzzleHttp\Promise\Promise createHostAsync(array $args = [])
* @method \Aws\Result createRepositoryLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRepositoryLinkAsync(array $args = [])
* @method \Aws\Result createSyncConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSyncConfigurationAsync(array $args = [])
* @method \Aws\Result deleteConnection(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteConnectionAsync(array $args = [])
* @method \Aws\Result deleteHost(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHostAsync(array $args = [])
* @method \Aws\Result deleteRepositoryLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRepositoryLinkAsync(array $args = [])
* @method \Aws\Result deleteSyncConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSyncConfigurationAsync(array $args = [])
* @method \Aws\Result getConnection(array $args = [])
* @method \GuzzleHttp\Promise\Promise getConnectionAsync(array $args = [])
* @method \Aws\Result getHost(array $args = [])
* @method \GuzzleHttp\Promise\Promise getHostAsync(array $args = [])
* @method \Aws\Result getRepositoryLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRepositoryLinkAsync(array $args = [])
* @method \Aws\Result getRepositorySyncStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRepositorySyncStatusAsync(array $args = [])
* @method \Aws\Result getResourceSyncStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise getResourceSyncStatusAsync(array $args = [])
* @method \Aws\Result getSyncBlockerSummary(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSyncBlockerSummaryAsync(array $args = [])
* @method \Aws\Result getSyncConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSyncConfigurationAsync(array $args = [])
* @method \Aws\Result listConnections(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConnectionsAsync(array $args = [])
* @method \Aws\Result listHosts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listHostsAsync(array $args = [])
* @method \Aws\Result listRepositoryLinks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRepositoryLinksAsync(array $args = [])
* @method \Aws\Result listRepositorySyncDefinitions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRepositorySyncDefinitionsAsync(array $args = [])
* @method \Aws\Result listSyncConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSyncConfigurationsAsync(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 updateHost(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateHostAsync(array $args = [])
* @method \Aws\Result updateRepositoryLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRepositoryLinkAsync(array $args = [])
* @method \Aws\Result updateSyncBlocker(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSyncBlockerAsync(array $args = [])
* @method \Aws\Result updateSyncConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSyncConfigurationAsync(array $args = [])
*/
class CodeConnectionsClient extends AwsClient {}

View file

@ -0,0 +1,9 @@
<?php
namespace Aws\CodeConnections\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS CodeConnections** service.
*/
class CodeConnectionsException extends AwsException {}

View file

@ -72,6 +72,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise registerWebhookWithThirdPartyAsync(array $args = [])
* @method \Aws\Result retryStageExecution(array $args = [])
* @method \GuzzleHttp\Promise\Promise retryStageExecutionAsync(array $args = [])
* @method \Aws\Result rollbackStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise rollbackStageAsync(array $args = [])
* @method \Aws\Result startPipelineExecution(array $args = [])
* @method \GuzzleHttp\Promise\Promise startPipelineExecutionAsync(array $args = [])
* @method \Aws\Result stopPipelineExecution(array $args = [])

View file

@ -66,10 +66,21 @@ class Command implements CommandInterface
*
* @param array $authSchemes
*
* @deprecated In favor of using the @context property bag.
* Auth Schemes are now accessible via the `signature_version` key
* in a Command's context, if applicable. Auth Schemes set using
* This method are no longer consumed.
*
* @internal
*/
public function setAuthSchemes(array $authSchemes)
{
trigger_error(__METHOD__ . ' is deprecated. Auth schemes '
. 'resolved using the service `auth` trait or via endpoint resolution '
. 'are now set in the command `@context` property.`'
, E_USER_WARNING
);
$this->authSchemes = $authSchemes;
}
@ -78,9 +89,19 @@ class Command implements CommandInterface
* for endpoint resolution
*
* @returns array
*
* @deprecated In favor of using the @context property bag.
* Auth schemes are now accessible via the `signature_version` key
* in a Command's context, if applicable.
*/
public function getAuthSchemes()
{
trigger_error(__METHOD__ . ' is deprecated. Auth schemes '
. 'resolved using the service `auth` trait or via endpoint resolution '
. 'can now be found in the command `@context` property.`'
, E_USER_WARNING
);
return $this->authSchemes ?: [];
}

View file

@ -21,6 +21,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise exportLambdaFunctionRecommendationsAsync(array $args = [])
* @method \Aws\Result exportLicenseRecommendations(array $args = [])
* @method \GuzzleHttp\Promise\Promise exportLicenseRecommendationsAsync(array $args = [])
* @method \Aws\Result exportRDSDatabaseRecommendations(array $args = [])
* @method \GuzzleHttp\Promise\Promise exportRDSDatabaseRecommendationsAsync(array $args = [])
* @method \Aws\Result getAutoScalingGroupRecommendations(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAutoScalingGroupRecommendationsAsync(array $args = [])
* @method \Aws\Result getEBSVolumeRecommendations(array $args = [])
@ -43,6 +45,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getLambdaFunctionRecommendationsAsync(array $args = [])
* @method \Aws\Result getLicenseRecommendations(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLicenseRecommendationsAsync(array $args = [])
* @method \Aws\Result getRDSDatabaseRecommendationProjectedMetrics(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRDSDatabaseRecommendationProjectedMetricsAsync(array $args = [])
* @method \Aws\Result getRDSDatabaseRecommendations(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRDSDatabaseRecommendationsAsync(array $args = [])
* @method \Aws\Result getRecommendationPreferences(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRecommendationPreferencesAsync(array $args = [])
* @method \Aws\Result getRecommendationSummaries(array $args = [])

View file

@ -39,12 +39,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise batchAssociateAnalyticsDataSetAsync(array $args = [])
* @method \Aws\Result batchDisassociateAnalyticsDataSet(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDisassociateAnalyticsDataSetAsync(array $args = [])
* @method \Aws\Result batchGetAttachedFileMetadata(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetAttachedFileMetadataAsync(array $args = [])
* @method \Aws\Result batchGetFlowAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetFlowAssociationAsync(array $args = [])
* @method \Aws\Result batchPutContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchPutContactAsync(array $args = [])
* @method \Aws\Result claimPhoneNumber(array $args = [])
* @method \GuzzleHttp\Promise\Promise claimPhoneNumberAsync(array $args = [])
* @method \Aws\Result completeAttachedFileUpload(array $args = [])
* @method \GuzzleHttp\Promise\Promise completeAttachedFileUploadAsync(array $args = [])
* @method \Aws\Result createAgentStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAgentStatusAsync(array $args = [])
* @method \Aws\Result createContactFlow(array $args = [])
@ -95,6 +99,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createVocabularyAsync(array $args = [])
* @method \Aws\Result deactivateEvaluationForm(array $args = [])
* @method \GuzzleHttp\Promise\Promise deactivateEvaluationFormAsync(array $args = [])
* @method \Aws\Result deleteAttachedFile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAttachedFileAsync(array $args = [])
* @method \Aws\Result deleteContactEvaluation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteContactEvaluationAsync(array $args = [])
* @method \Aws\Result deleteContactFlow(array $args = [])
@ -141,6 +147,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteVocabularyAsync(array $args = [])
* @method \Aws\Result describeAgentStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAgentStatusAsync(array $args = [])
* @method \Aws\Result describeAuthenticationProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeAuthenticationProfileAsync(array $args = [])
* @method \Aws\Result describeContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeContactAsync(array $args = [])
* @method \Aws\Result describeContactEvaluation(array $args = [])
@ -215,6 +223,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise disassociateUserProficienciesAsync(array $args = [])
* @method \Aws\Result dismissUserContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise dismissUserContactAsync(array $args = [])
* @method \Aws\Result getAttachedFile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAttachedFileAsync(array $args = [])
* @method \Aws\Result getContactAttributes(array $args = [])
* @method \GuzzleHttp\Promise\Promise getContactAttributesAsync(array $args = [])
* @method \Aws\Result getCurrentMetricData(array $args = [])
@ -243,6 +253,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listAnalyticsDataAssociationsAsync(array $args = [])
* @method \Aws\Result listApprovedOrigins(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = [])
* @method \Aws\Result listAuthenticationProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAuthenticationProfilesAsync(array $args = [])
* @method \Aws\Result listBots(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBotsAsync(array $args = [])
* @method \Aws\Result listContactEvaluations(array $args = [])
@ -339,8 +351,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise resumeContactAsync(array $args = [])
* @method \Aws\Result resumeContactRecording(array $args = [])
* @method \GuzzleHttp\Promise\Promise resumeContactRecordingAsync(array $args = [])
* @method \Aws\Result searchAgentStatuses(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchAgentStatusesAsync(array $args = [])
* @method \Aws\Result searchAvailablePhoneNumbers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = [])
* @method \Aws\Result searchContactFlowModules(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchContactFlowModulesAsync(array $args = [])
* @method \Aws\Result searchContactFlows(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchContactFlowsAsync(array $args = [])
* @method \Aws\Result searchContacts(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchContactsAsync(array $args = [])
* @method \Aws\Result searchHoursOfOperations(array $args = [])
@ -359,12 +377,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise searchRoutingProfilesAsync(array $args = [])
* @method \Aws\Result searchSecurityProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchSecurityProfilesAsync(array $args = [])
* @method \Aws\Result searchUserHierarchyGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchUserHierarchyGroupsAsync(array $args = [])
* @method \Aws\Result searchUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchUsersAsync(array $args = [])
* @method \Aws\Result searchVocabularies(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchVocabulariesAsync(array $args = [])
* @method \Aws\Result sendChatIntegrationEvent(array $args = [])
* @method \GuzzleHttp\Promise\Promise sendChatIntegrationEventAsync(array $args = [])
* @method \Aws\Result startAttachedFileUpload(array $args = [])
* @method \GuzzleHttp\Promise\Promise startAttachedFileUploadAsync(array $args = [])
* @method \Aws\Result startChatContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise startChatContactAsync(array $args = [])
* @method \Aws\Result startContactEvaluation(array $args = [])
@ -401,6 +423,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateAgentStatus(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAgentStatusAsync(array $args = [])
* @method \Aws\Result updateAuthenticationProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAuthenticationProfileAsync(array $args = [])
* @method \Aws\Result updateContact(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateContactAsync(array $args = [])
* @method \Aws\Result updateContactAttributes(array $args = [])

View file

@ -23,6 +23,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createTemplateAsync(array $args = [])
* @method \Aws\Result deleteDomain(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
* @method \Aws\Result deleteField(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFieldAsync(array $args = [])
* @method \Aws\Result deleteLayout(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLayoutAsync(array $args = [])
* @method \Aws\Result deleteTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTemplateAsync(array $args = [])
* @method \Aws\Result getCase(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCaseAsync(array $args = [])
* @method \Aws\Result getCaseAuditEvents(array $args = [])

View file

@ -0,0 +1,15 @@
<?php
namespace Aws\ControlCatalog;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Control Catalog** service.
* @method \Aws\Result listCommonControls(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCommonControlsAsync(array $args = [])
* @method \Aws\Result listDomains(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
* @method \Aws\Result listObjectives(array $args = [])
* @method \GuzzleHttp\Promise\Promise listObjectivesAsync(array $args = [])
*/
class ControlCatalogClient extends AwsClient {}

View file

@ -0,0 +1,9 @@
<?php
namespace Aws\ControlCatalog\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Control Catalog** service.
*/
class ControlCatalogException extends AwsException {}

View file

@ -33,10 +33,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getLandingZoneOperationAsync(array $args = [])
* @method \Aws\Result listBaselines(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBaselinesAsync(array $args = [])
* @method \Aws\Result listControlOperations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listControlOperationsAsync(array $args = [])
* @method \Aws\Result listEnabledBaselines(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnabledBaselinesAsync(array $args = [])
* @method \Aws\Result listEnabledControls(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnabledControlsAsync(array $args = [])
* @method \Aws\Result listLandingZoneOperations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLandingZoneOperationsAsync(array $args = [])
* @method \Aws\Result listLandingZones(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLandingZonesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])

View file

@ -59,6 +59,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getTagsAsync(array $args = [])
* @method \Aws\Result getUsageForecast(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUsageForecastAsync(array $args = [])
* @method \Aws\Result listCostAllocationTagBackfillHistory(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCostAllocationTagBackfillHistoryAsync(array $args = [])
* @method \Aws\Result listCostAllocationTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCostAllocationTagsAsync(array $args = [])
* @method \Aws\Result listCostCategoryDefinitions(array $args = [])
@ -69,6 +71,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result provideAnomalyFeedback(array $args = [])
* @method \GuzzleHttp\Promise\Promise provideAnomalyFeedbackAsync(array $args = [])
* @method \Aws\Result startCostAllocationTagBackfill(array $args = [])
* @method \GuzzleHttp\Promise\Promise startCostAllocationTagBackfillAsync(array $args = [])
* @method \Aws\Result startSavingsPlansPurchaseRecommendationGeneration(array $args = [])
* @method \GuzzleHttp\Promise\Promise startSavingsPlansPurchaseRecommendationGenerationAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])

View file

@ -1,11 +1,15 @@
<?php
namespace Aws\Credentials;
use Aws\Identity\AwsCredentialIdentity;
/**
* Basic implementation of the AWS Credentials interface that allows callers to
* pass in the AWS Access Key and AWS Secret Access Key in the constructor.
*/
class Credentials implements CredentialsInterface, \Serializable
class Credentials extends AwsCredentialIdentity implements
CredentialsInterface,
\Serializable
{
private $key;
private $secret;
@ -23,8 +27,8 @@ class Credentials implements CredentialsInterface, \Serializable
*/
public function __construct($key, $secret, $token = null, $expires = null)
{
$this->key = trim($key);
$this->secret = trim($secret);
$this->key = trim((string) $key);
$this->secret = trim((string) $secret);
$this->token = $token;
$this->expires = $expires;
}

View file

@ -2,8 +2,10 @@
namespace Aws\Credentials;
use Aws\Exception\CredentialsException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Promise;
use GuzzleHttp\Promise\PromiseInterface;
use Psr\Http\Message\ResponseInterface;
@ -21,6 +23,10 @@ class EcsCredentialProvider
const ENV_TIMEOUT = 'AWS_METADATA_SERVICE_TIMEOUT';
const EKS_SERVER_HOST_IPV4 = '169.254.170.23';
const EKS_SERVER_HOST_IPV6 = 'fd00:ec2::23';
const ENV_RETRIES = 'AWS_METADATA_SERVICE_NUM_ATTEMPTS';
const DEFAULT_ENV_TIMEOUT = 1.0;
const DEFAULT_ENV_RETRIES = 3;
/** @var callable */
private $client;
@ -28,22 +34,29 @@ class EcsCredentialProvider
/** @var float|mixed */
private $timeout;
/** @var int */
private $retries;
/** @var int */
private $attempts;
/**
* The constructor accepts following options:
* - timeout: (optional) Connection timeout, in seconds, default 1.0
* - retries: Optional number of retries to be attempted, default 3.
* - client: An EcsClient to make request from
*
* @param array $config Configuration options
*/
public function __construct(array $config = [])
{
$timeout = getenv(self::ENV_TIMEOUT);
$this->timeout = (float) isset($config['timeout'])
? $config['timeout']
: (getenv(self::ENV_TIMEOUT) ?: self::DEFAULT_ENV_TIMEOUT);
$this->retries = (int) isset($config['retries'])
? $config['retries']
: ((int) getenv(self::ENV_RETRIES) ?: self::DEFAULT_ENV_RETRIES);
if (!$timeout) {
$timeout = $_SERVER[self::ENV_TIMEOUT] ?? ($config['timeout'] ?? 1.0);
}
$this->timeout = (float) $timeout;
$this->client = $config['client'] ?? \Aws\default_http_handler();
}
@ -55,40 +68,68 @@ class EcsCredentialProvider
*/
public function __invoke()
{
$client = $this->client;
$uri = self::getEcsUri();
$this->attempts = 0;
$uri = $this->getEcsUri();
if ($this->isCompatibleUri($uri)) {
$request = new Request('GET', $uri);
return Promise\Coroutine::of(function () {
$client = $this->client;
$request = new Request('GET', $this->getEcsUri());
$headers = $this->getHeadersForAuthToken();
return $client(
$request,
[
'timeout' => $this->timeout,
'proxy' => '',
'headers' => $headers
]
)->then(function (ResponseInterface $response) {
$result = $this->decodeResult((string) $response->getBody());
return new Credentials(
$result['AccessKeyId'],
$result['SecretAccessKey'],
$result['Token'],
strtotime($result['Expiration'])
);
})->otherwise(function ($reason) {
$reason = is_array($reason) ? $reason['exception'] : $reason;
$msg = $reason->getMessage();
throw new CredentialsException(
"Error retrieving credentials from container metadata ($msg)"
);
$headers = $this->getHeadersForAuthToken();
$credentials = null;
while ($credentials === null) {
$credentials = (yield $client(
$request,
[
'timeout' => $this->timeout,
'proxy' => '',
'headers' => $headers,
]
)->then(function (ResponseInterface $response) {
$result = $this->decodeResult((string)$response->getBody());
return new Credentials(
$result['AccessKeyId'],
$result['SecretAccessKey'],
$result['Token'],
strtotime($result['Expiration'])
);
})->otherwise(function ($reason) {
$reason = is_array($reason) ? $reason['exception'] : $reason;
$isRetryable = $reason instanceof ConnectException;
if ($isRetryable && ($this->attempts < $this->retries)) {
sleep((int)pow(1.2, $this->attempts));
} else {
$msg = $reason->getMessage();
throw new CredentialsException(
sprintf('Error retrieving credentials from container metadata after attempt %d/%d (%s)', $this->attempts, $this->retries, $msg)
);
}
}));
$this->attempts++;
}
yield $credentials;
});
}
throw new CredentialsException("Uri '{$uri}' contains an unsupported host.");
}
/**
* Returns the number of attempts that have been done.
*
* @return int
*/
public function getAttempts(): int
{
return $this->attempts;
}
/**
* Retrieves authorization token.
*
@ -97,13 +138,24 @@ class EcsCredentialProvider
private function getEcsAuthToken()
{
if (!empty($path = getenv(self::ENV_AUTH_TOKEN_FILE))) {
if (is_readable($path)) {
return file_get_contents($path);
$token = @file_get_contents($path);
if (false === $token) {
clearstatcache(true, dirname($path) . DIRECTORY_SEPARATOR . @readlink($path));
clearstatcache(true, dirname($path) . DIRECTORY_SEPARATOR . dirname(@readlink($path)));
clearstatcache(true, $path);
}
throw new CredentialsException(
"Failed to read authorization token from '{$path}': no such file or directory."
);
if (!is_readable($path)) {
throw new CredentialsException("Failed to read authorization token from '{$path}': no such file or directory.");
}
$token = @file_get_contents($path);
if (empty($token)) {
throw new CredentialsException("Invalid authorization token read from `$path`. Token file is empty!");
}
return $token;
}
return getenv(self::ENV_AUTH_TOKEN);

View file

@ -60,6 +60,9 @@ class InstanceProfileProvider
/** @var string */
private $endpointMode;
/** @var array */
private $config;
/**
* The constructor accepts the following options:
*
@ -68,10 +71,12 @@ class InstanceProfileProvider
* - retries: Optional number of retries to be attempted.
* - ec2_metadata_v1_disabled: Optional for disabling the fallback to IMDSv1.
* - endpoint: Optional for overriding the default endpoint to be used for fetching credentials.
* The value must contain a valid URI scheme. If the URI scheme is not https, it must
* resolve to a loopback address.
* The value must contain a valid URI scheme. If the URI scheme is not https, it must
* resolve to a loopback address.
* - endpoint_mode: Optional for overriding the default endpoint mode (IPv4|IPv6) to be used for
* resolving the default endpoint.
* - use_aws_shared_config_files: Decides whether the shared config file should be considered when
* using the ConfigurationResolver::resolve method.
*
* @param array $config Configuration options.
*/
@ -88,6 +93,7 @@ class InstanceProfileProvider
}
$this->endpointMode = $config[self::CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE] ?? null;
$this->config = $config;
}
/**
@ -344,7 +350,7 @@ class InstanceProfileProvider
self::CFG_EC2_METADATA_V1_DISABLED,
self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED,
'bool',
['use_aws_shared_config_files' => true]
$this->config
)
)
?? self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED;
@ -369,7 +375,7 @@ class InstanceProfileProvider
self::CFG_EC2_METADATA_SERVICE_ENDPOINT,
$this->getDefaultEndpoint(),
'string',
['use_aws_shared_config_files' => true]
$this->config
);
}
@ -420,7 +426,7 @@ class InstanceProfileProvider
self::CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE,
self::ENDPOINT_MODE_IPv4,
'string',
['use_aws_shared_config_files' => true]
$this->config
);
}

View file

@ -137,7 +137,7 @@ trait EncryptionTrait
* @param array $cipherOptions Options for use in determining the cipher to
* be used for encrypting data.
*
* @return [AesStreamInterface, string]
* @return array returns an array with two elements as follows: [string, AesStreamInterface]
*
* @internal
*/

View file

@ -152,7 +152,7 @@ trait EncryptionTraitV2
* @param array $cipherOptions Options for use in determining the cipher to
* be used for encrypting data.
*
* @return [AesStreamInterface, string]
* @return array returns an array with two elements as follows: [string, AesStreamInterface]
*
* @internal
*/

View file

@ -14,8 +14,6 @@ use RangeException;
* 2. Only 128-bit authentication tags are supported. (i.e. non-truncated)
*
* Supports AES key sizes of 128-bit, 192-bit, and 256-bit.
*
* @package Aws\Crypto\Polyfill
*/
class AesGcm
{

View file

@ -3,7 +3,6 @@ namespace Aws\Crypto\Polyfill;
/**
* Class ByteArray
* @package Aws\Crypto\Polyfill
*/
class ByteArray extends \SplFixedArray
{

View file

@ -3,8 +3,6 @@ namespace Aws\Crypto\Polyfill;
/**
* Class Gmac
*
* @package Aws\Crypto\Polyfill
*/
class Gmac
{

View file

@ -5,8 +5,6 @@ namespace Aws\Crypto\Polyfill;
* Class Key
*
* Wraps a string to keep it hidden from stack traces.
*
* @package Aws\Crypto\Polyfill
*/
class Key
{

View file

@ -5,7 +5,6 @@ use Aws\Exception\CryptoPolyfillException;
/**
* Trait NeedsTrait
* @package Aws\Crypto\Polyfill
*/
trait NeedsTrait
{

View file

@ -9,6 +9,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise acceptPredictionsAsync(array $args = [])
* @method \Aws\Result acceptSubscriptionRequest(array $args = [])
* @method \GuzzleHttp\Promise\Promise acceptSubscriptionRequestAsync(array $args = [])
* @method \Aws\Result associateEnvironmentRole(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateEnvironmentRoleAsync(array $args = [])
* @method \Aws\Result cancelMetadataGenerationRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelMetadataGenerationRunAsync(array $args = [])
* @method \Aws\Result cancelSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelSubscriptionAsync(array $args = [])
* @method \Aws\Result createAsset(array $args = [])
@ -23,6 +27,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
* @method \Aws\Result createEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEnvironmentAsync(array $args = [])
* @method \Aws\Result createEnvironmentAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEnvironmentActionAsync(array $args = [])
* @method \Aws\Result createEnvironmentProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEnvironmentProfileAsync(array $args = [])
* @method \Aws\Result createFormType(array $args = [])
@ -57,6 +63,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
* @method \Aws\Result deleteEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteEnvironmentAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEnvironmentActionAsync(array $args = [])
* @method \Aws\Result deleteEnvironmentBlueprintConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEnvironmentBlueprintConfigurationAsync(array $args = [])
* @method \Aws\Result deleteEnvironmentProfile(array $args = [])
@ -79,6 +87,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteSubscriptionRequestAsync(array $args = [])
* @method \Aws\Result deleteSubscriptionTarget(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSubscriptionTargetAsync(array $args = [])
* @method \Aws\Result deleteTimeSeriesDataPoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTimeSeriesDataPointsAsync(array $args = [])
* @method \Aws\Result disassociateEnvironmentRole(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateEnvironmentRoleAsync(array $args = [])
* @method \Aws\Result getAsset(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAssetAsync(array $args = [])
* @method \Aws\Result getAssetType(array $args = [])
@ -91,6 +103,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getDomainAsync(array $args = [])
* @method \Aws\Result getEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEnvironmentAsync(array $args = [])
* @method \Aws\Result getEnvironmentAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEnvironmentActionAsync(array $args = [])
* @method \Aws\Result getEnvironmentBlueprint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEnvironmentBlueprintAsync(array $args = [])
* @method \Aws\Result getEnvironmentBlueprintConfiguration(array $args = [])
@ -107,8 +121,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getGroupProfileAsync(array $args = [])
* @method \Aws\Result getIamPortalLoginUrl(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIamPortalLoginUrlAsync(array $args = [])
* @method \Aws\Result getLineageNode(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLineageNodeAsync(array $args = [])
* @method \Aws\Result getListing(array $args = [])
* @method \GuzzleHttp\Promise\Promise getListingAsync(array $args = [])
* @method \Aws\Result getMetadataGenerationRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMetadataGenerationRunAsync(array $args = [])
* @method \Aws\Result getProject(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProjectAsync(array $args = [])
* @method \Aws\Result getSubscription(array $args = [])
@ -119,6 +137,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getSubscriptionRequestDetailsAsync(array $args = [])
* @method \Aws\Result getSubscriptionTarget(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSubscriptionTargetAsync(array $args = [])
* @method \Aws\Result getTimeSeriesDataPoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTimeSeriesDataPointAsync(array $args = [])
* @method \Aws\Result getUserProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserProfileAsync(array $args = [])
* @method \Aws\Result listAssetRevisions(array $args = [])
@ -131,6 +151,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listDataSourcesAsync(array $args = [])
* @method \Aws\Result listDomains(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
* @method \Aws\Result listEnvironmentActions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnvironmentActionsAsync(array $args = [])
* @method \Aws\Result listEnvironmentBlueprintConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnvironmentBlueprintConfigurationsAsync(array $args = [])
* @method \Aws\Result listEnvironmentBlueprints(array $args = [])
@ -139,6 +161,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listEnvironmentProfilesAsync(array $args = [])
* @method \Aws\Result listEnvironments(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnvironmentsAsync(array $args = [])
* @method \Aws\Result listLineageNodeHistory(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLineageNodeHistoryAsync(array $args = [])
* @method \Aws\Result listMetadataGenerationRuns(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMetadataGenerationRunsAsync(array $args = [])
* @method \Aws\Result listNotifications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listNotificationsAsync(array $args = [])
* @method \Aws\Result listProjectMemberships(array $args = [])
@ -155,6 +181,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listSubscriptionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listTimeSeriesDataPoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTimeSeriesDataPointsAsync(array $args = [])
* @method \Aws\Result postLineageEvent(array $args = [])
* @method \GuzzleHttp\Promise\Promise postLineageEventAsync(array $args = [])
* @method \Aws\Result postTimeSeriesDataPoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise postTimeSeriesDataPointsAsync(array $args = [])
* @method \Aws\Result putEnvironmentBlueprintConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise putEnvironmentBlueprintConfigurationAsync(array $args = [])
* @method \Aws\Result rejectPredictions(array $args = [])
@ -175,6 +207,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise searchUserProfilesAsync(array $args = [])
* @method \Aws\Result startDataSourceRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise startDataSourceRunAsync(array $args = [])
* @method \Aws\Result startMetadataGenerationRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise startMetadataGenerationRunAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
@ -185,6 +219,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateDomainAsync(array $args = [])
* @method \Aws\Result updateEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEnvironmentAsync(array $args = [])
* @method \Aws\Result updateEnvironmentAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEnvironmentActionAsync(array $args = [])
* @method \Aws\Result updateEnvironmentProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEnvironmentProfileAsync(array $args = [])
* @method \Aws\Result updateGlossary(array $args = [])

View file

@ -0,0 +1,213 @@
<?php
namespace Aws\Deadline;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWSDeadlineCloud** service.
* @method \Aws\Result associateMemberToFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateMemberToFarmAsync(array $args = [])
* @method \Aws\Result associateMemberToFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateMemberToFleetAsync(array $args = [])
* @method \Aws\Result associateMemberToJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateMemberToJobAsync(array $args = [])
* @method \Aws\Result associateMemberToQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateMemberToQueueAsync(array $args = [])
* @method \Aws\Result assumeFleetRoleForRead(array $args = [])
* @method \GuzzleHttp\Promise\Promise assumeFleetRoleForReadAsync(array $args = [])
* @method \Aws\Result assumeFleetRoleForWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise assumeFleetRoleForWorkerAsync(array $args = [])
* @method \Aws\Result assumeQueueRoleForRead(array $args = [])
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForReadAsync(array $args = [])
* @method \Aws\Result assumeQueueRoleForUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForUserAsync(array $args = [])
* @method \Aws\Result assumeQueueRoleForWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForWorkerAsync(array $args = [])
* @method \Aws\Result batchGetJobEntity(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetJobEntityAsync(array $args = [])
* @method \Aws\Result copyJobTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise copyJobTemplateAsync(array $args = [])
* @method \Aws\Result createBudget(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBudgetAsync(array $args = [])
* @method \Aws\Result createFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFarmAsync(array $args = [])
* @method \Aws\Result createFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
* @method \Aws\Result createJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createJobAsync(array $args = [])
* @method \Aws\Result createLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLicenseEndpointAsync(array $args = [])
* @method \Aws\Result createMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMonitorAsync(array $args = [])
* @method \Aws\Result createQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueAsync(array $args = [])
* @method \Aws\Result createQueueEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result createQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result createStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStorageProfileAsync(array $args = [])
* @method \Aws\Result createWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise createWorkerAsync(array $args = [])
* @method \Aws\Result deleteBudget(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBudgetAsync(array $args = [])
* @method \Aws\Result deleteFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFarmAsync(array $args = [])
* @method \Aws\Result deleteFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
* @method \Aws\Result deleteLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLicenseEndpointAsync(array $args = [])
* @method \Aws\Result deleteMeteredProduct(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMeteredProductAsync(array $args = [])
* @method \Aws\Result deleteMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMonitorAsync(array $args = [])
* @method \Aws\Result deleteQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteQueueAsync(array $args = [])
* @method \Aws\Result deleteQueueEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result deleteStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStorageProfileAsync(array $args = [])
* @method \Aws\Result deleteWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteWorkerAsync(array $args = [])
* @method \Aws\Result disassociateMemberFromFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateMemberFromFarmAsync(array $args = [])
* @method \Aws\Result disassociateMemberFromFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateMemberFromFleetAsync(array $args = [])
* @method \Aws\Result disassociateMemberFromJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateMemberFromJobAsync(array $args = [])
* @method \Aws\Result disassociateMemberFromQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateMemberFromQueueAsync(array $args = [])
* @method \Aws\Result getBudget(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBudgetAsync(array $args = [])
* @method \Aws\Result getFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFarmAsync(array $args = [])
* @method \Aws\Result getFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFleetAsync(array $args = [])
* @method \Aws\Result getJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getJobAsync(array $args = [])
* @method \Aws\Result getLicenseEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLicenseEndpointAsync(array $args = [])
* @method \Aws\Result getMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMonitorAsync(array $args = [])
* @method \Aws\Result getQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise getQueueAsync(array $args = [])
* @method \Aws\Result getQueueEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise getQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result getQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result getSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionAsync(array $args = [])
* @method \Aws\Result getSessionAction(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionActionAsync(array $args = [])
* @method \Aws\Result getSessionsStatisticsAggregation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionsStatisticsAggregationAsync(array $args = [])
* @method \Aws\Result getStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStepAsync(array $args = [])
* @method \Aws\Result getStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStorageProfileAsync(array $args = [])
* @method \Aws\Result getStorageProfileForQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStorageProfileForQueueAsync(array $args = [])
* @method \Aws\Result getTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTaskAsync(array $args = [])
* @method \Aws\Result getWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise getWorkerAsync(array $args = [])
* @method \Aws\Result listAvailableMeteredProducts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAvailableMeteredProductsAsync(array $args = [])
* @method \Aws\Result listBudgets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBudgetsAsync(array $args = [])
* @method \Aws\Result listFarmMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFarmMembersAsync(array $args = [])
* @method \Aws\Result listFarms(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFarmsAsync(array $args = [])
* @method \Aws\Result listFleetMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFleetMembersAsync(array $args = [])
* @method \Aws\Result listFleets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFleetsAsync(array $args = [])
* @method \Aws\Result listJobMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobMembersAsync(array $args = [])
* @method \Aws\Result listJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
* @method \Aws\Result listLicenseEndpoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLicenseEndpointsAsync(array $args = [])
* @method \Aws\Result listMeteredProducts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMeteredProductsAsync(array $args = [])
* @method \Aws\Result listMonitors(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMonitorsAsync(array $args = [])
* @method \Aws\Result listQueueEnvironments(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueEnvironmentsAsync(array $args = [])
* @method \Aws\Result listQueueFleetAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueFleetAssociationsAsync(array $args = [])
* @method \Aws\Result listQueueMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueueMembersAsync(array $args = [])
* @method \Aws\Result listQueues(array $args = [])
* @method \GuzzleHttp\Promise\Promise listQueuesAsync(array $args = [])
* @method \Aws\Result listSessionActions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSessionActionsAsync(array $args = [])
* @method \Aws\Result listSessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
* @method \Aws\Result listSessionsForWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSessionsForWorkerAsync(array $args = [])
* @method \Aws\Result listStepConsumers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStepConsumersAsync(array $args = [])
* @method \Aws\Result listStepDependencies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStepDependenciesAsync(array $args = [])
* @method \Aws\Result listSteps(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStepsAsync(array $args = [])
* @method \Aws\Result listStorageProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStorageProfilesAsync(array $args = [])
* @method \Aws\Result listStorageProfilesForQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStorageProfilesForQueueAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listTasks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTasksAsync(array $args = [])
* @method \Aws\Result listWorkers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listWorkersAsync(array $args = [])
* @method \Aws\Result putMeteredProduct(array $args = [])
* @method \GuzzleHttp\Promise\Promise putMeteredProductAsync(array $args = [])
* @method \Aws\Result searchJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchJobsAsync(array $args = [])
* @method \Aws\Result searchSteps(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchStepsAsync(array $args = [])
* @method \Aws\Result searchTasks(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchTasksAsync(array $args = [])
* @method \Aws\Result searchWorkers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchWorkersAsync(array $args = [])
* @method \Aws\Result startSessionsStatisticsAggregation(array $args = [])
* @method \GuzzleHttp\Promise\Promise startSessionsStatisticsAggregationAsync(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 updateBudget(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBudgetAsync(array $args = [])
* @method \Aws\Result updateFarm(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFarmAsync(array $args = [])
* @method \Aws\Result updateFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateFleetAsync(array $args = [])
* @method \Aws\Result updateJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateJobAsync(array $args = [])
* @method \Aws\Result updateMonitor(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMonitorAsync(array $args = [])
* @method \Aws\Result updateQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateQueueAsync(array $args = [])
* @method \Aws\Result updateQueueEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateQueueEnvironmentAsync(array $args = [])
* @method \Aws\Result updateQueueFleetAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateQueueFleetAssociationAsync(array $args = [])
* @method \Aws\Result updateSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSessionAsync(array $args = [])
* @method \Aws\Result updateStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStepAsync(array $args = [])
* @method \Aws\Result updateStorageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStorageProfileAsync(array $args = [])
* @method \Aws\Result updateTask(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateTaskAsync(array $args = [])
* @method \Aws\Result updateWorker(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateWorkerAsync(array $args = [])
* @method \Aws\Result updateWorkerSchedule(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateWorkerScheduleAsync(array $args = [])
*/
class DeadlineClient extends AwsClient {}

View file

@ -0,0 +1,9 @@
<?php
namespace Aws\Deadline\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWSDeadlineCloud** service.
*/
class DeadlineException extends AwsException {}

View file

@ -112,6 +112,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise startDBClusterAsync(array $args = [])
* @method \Aws\Result stopDBCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopDBClusterAsync(array $args = [])
* @method \Aws\Result switchoverGlobalCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise switchoverGlobalClusterAsync(array $args = [])
*/
class DocDBClient extends AwsClient {
public function __construct(array $args)

View file

@ -47,6 +47,8 @@ use Aws\RetryMiddlewareV2;
* @method \GuzzleHttp\Promise\Promise createGlobalTableAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result deleteBackup(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise deleteBackupAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result deleteResourcePolicy(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result describeBackup(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise describeBackupAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result describeContinuousBackups(array $args = []) (supported in versions 2012-08-10)
@ -81,6 +83,8 @@ use Aws\RetryMiddlewareV2;
* @method \GuzzleHttp\Promise\Promise executeTransactionAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result exportTableToPointInTime(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise exportTableToPointInTimeAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result getResourcePolicy(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result importTable(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise importTableAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result listBackups(array $args = []) (supported in versions 2012-08-10)
@ -95,6 +99,8 @@ use Aws\RetryMiddlewareV2;
* @method \GuzzleHttp\Promise\Promise listImportsAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result listTagsOfResource(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise listTagsOfResourceAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result putResourcePolicy(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result restoreTableFromBackup(array $args = []) (supported in versions 2012-08-10)
* @method \GuzzleHttp\Promise\Promise restoreTableFromBackupAsync(array $args = []) (supported in versions 2012-08-10)
* @method \Aws\Result restoreTableToPointInTime(array $args = []) (supported in versions 2012-08-10)

View file

@ -11,6 +11,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createJobTemplateAsync(array $args = [])
* @method \Aws\Result createManagedEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise createManagedEndpointAsync(array $args = [])
* @method \Aws\Result createSecurityConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSecurityConfigurationAsync(array $args = [])
* @method \Aws\Result createVirtualCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise createVirtualClusterAsync(array $args = [])
* @method \Aws\Result deleteJobTemplate(array $args = [])
@ -25,6 +27,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeJobTemplateAsync(array $args = [])
* @method \Aws\Result describeManagedEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeManagedEndpointAsync(array $args = [])
* @method \Aws\Result describeSecurityConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeSecurityConfigurationAsync(array $args = [])
* @method \Aws\Result describeVirtualCluster(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeVirtualClusterAsync(array $args = [])
* @method \Aws\Result getManagedEndpointSessionCredentials(array $args = [])
@ -35,6 +39,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listJobTemplatesAsync(array $args = [])
* @method \Aws\Result listManagedEndpoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listManagedEndpointsAsync(array $args = [])
* @method \Aws\Result listSecurityConfigurations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSecurityConfigurationsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listVirtualClusters(array $args = [])

View file

@ -19,6 +19,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getJobRunAsync(array $args = [])
* @method \Aws\Result listApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
* @method \Aws\Result listJobRunAttempts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobRunAttemptsAsync(array $args = [])
* @method \Aws\Result listJobRuns(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobRunsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])

View file

@ -522,6 +522,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise createInstanceEventWindowAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result createIpam(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise createIpamAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result createIpamExternalResourceVerificationToken(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise createIpamExternalResourceVerificationTokenAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result createIpamPool(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise createIpamPoolAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result createIpamResourceDiscovery(array $args = []) (supported in versions 2016-11-15)
@ -624,6 +626,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise deleteInstanceEventWindowAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result deleteIpam(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise deleteIpamAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result deleteIpamExternalResourceVerificationToken(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise deleteIpamExternalResourceVerificationTokenAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result deleteIpamPool(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise deleteIpamPoolAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result deleteIpamResourceDiscovery(array $args = []) (supported in versions 2016-11-15)
@ -784,6 +788,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise describeInstanceTypesAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeIpamByoasn(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeIpamByoasnAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeIpamExternalResourceVerificationTokens(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeIpamExternalResourceVerificationTokensAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeIpamPools(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeIpamPoolsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeIpamResourceDiscoveries(array $args = []) (supported in versions 2016-11-15)
@ -814,6 +820,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise describeLocalGatewaysAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeLockedSnapshots(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeLockedSnapshotsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeMacHosts(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeMacHostsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeManagedPrefixLists(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeManagedPrefixListsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeNetworkInsightsAccessScopeAnalyses(array $args = []) (supported in versions 2016-11-15)
@ -838,6 +846,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise describeSnapshotTierStatusAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeStoreImageTasks(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeStoreImageTasksAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeTrafficMirrorFilterRules(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeTrafficMirrorFilterRulesAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeTrafficMirrorFilters(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise describeTrafficMirrorFiltersAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result describeTrafficMirrorSessions(array $args = []) (supported in versions 2016-11-15)
@ -904,6 +914,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise disableImageBlockPublicAccessAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result disableImageDeprecation(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise disableImageDeprecationAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result disableImageDeregistrationProtection(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise disableImageDeregistrationProtectionAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result disableIpamOrganizationAdminAccount(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise disableIpamOrganizationAdminAccountAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result disableSerialConsoleAccess(array $args = []) (supported in versions 2016-11-15)
@ -954,6 +966,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise enableImageBlockPublicAccessAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result enableImageDeprecation(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise enableImageDeprecationAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result enableImageDeregistrationProtection(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise enableImageDeregistrationProtectionAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result enableIpamOrganizationAdminAccount(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise enableIpamOrganizationAdminAccountAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result enableReachabilityAnalyzerOrganizationSharing(array $args = []) (supported in versions 2016-11-15)
@ -994,6 +1008,10 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise getGroupsForCapacityReservationAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result getImageBlockPublicAccessState(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise getImageBlockPublicAccessStateAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result getInstanceMetadataDefaults(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise getInstanceMetadataDefaultsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result getInstanceTpmEkPub(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise getInstanceTpmEkPubAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result getInstanceTypesFromInstanceRequirements(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise getInstanceTypesFromInstanceRequirementsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result getInstanceUefiData(array $args = []) (supported in versions 2016-11-15)
@ -1092,6 +1110,8 @@ use Aws\PresignUrlMiddleware;
* @method \GuzzleHttp\Promise\Promise modifyInstanceEventWindowAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result modifyInstanceMaintenanceOptions(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise modifyInstanceMaintenanceOptionsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result modifyInstanceMetadataDefaults(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise modifyInstanceMetadataDefaultsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result modifyInstanceMetadataOptions(array $args = []) (supported in versions 2016-11-15)
* @method \GuzzleHttp\Promise\Promise modifyInstanceMetadataOptionsAsync(array $args = []) (supported in versions 2016-11-15)
* @method \Aws\Result modifyIpam(array $args = []) (supported in versions 2016-11-15)

View file

@ -3,6 +3,7 @@ namespace Aws\EndpointV2;
use Aws\Api\Operation;
use Aws\Api\Service;
use Aws\Auth\Exception\UnresolvedAuthSchemeException;
use Aws\CommandInterface;
use Closure;
use GuzzleHttp\Promise\Promise;
@ -18,11 +19,11 @@ use GuzzleHttp\Promise\Promise;
class EndpointV2Middleware
{
private static $validAuthSchemes = [
'sigv4' => true,
'sigv4a' => true,
'none' => true,
'bearer' => true,
'sigv4-s3express' => true
'sigv4' => 'v4',
'sigv4a' => 'v4a',
'none' => 'anonymous',
'bearer' => 'bearer',
'sigv4-s3express' => 'v4-s3express'
];
/** @var callable */
@ -50,7 +51,7 @@ class EndpointV2Middleware
EndpointProviderV2 $endpointProvider,
Service $api,
array $args
) : Closure
): Closure
{
return function (callable $handler) use ($endpointProvider, $api, $args) {
return new self($handler, $endpointProvider, $api, $args);
@ -109,7 +110,7 @@ class EndpointV2Middleware
*
* @return array
*/
private function resolveArgs(array $commandArgs, Operation $operation) : array
private function resolveArgs(array $commandArgs, Operation $operation): array
{
$rulesetParams = $this->endpointProvider->getRuleset()->getParameters();
$endpointCommandArgs = $this->filterEndpointCommandArgs(
@ -143,7 +144,7 @@ class EndpointV2Middleware
private function filterEndpointCommandArgs(
array $rulesetParams,
array $commandArgs
) : array
): array
{
$endpointMiddlewareOpts = [
'@use_dual_stack_endpoint' => 'UseDualStack',
@ -180,7 +181,7 @@ class EndpointV2Middleware
*
* @return array
*/
private function bindStaticContextParams($staticContextParams) : array
private function bindStaticContextParams($staticContextParams): array
{
$scopedParams = [];
@ -203,7 +204,7 @@ class EndpointV2Middleware
private function bindContextParams(
array $commandArgs,
array $contextParams
) : array
): array
{
$scopedParams = [];
@ -227,10 +228,21 @@ class EndpointV2Middleware
private function applyAuthScheme(
array $authSchemes,
CommandInterface $command
) : void
): void
{
$authScheme = $this->resolveAuthScheme($authSchemes);
$command->setAuthSchemes($authScheme);
$command['@context']['signature_version'] = $authScheme['version'];
if (isset($authScheme['name'])) {
$command['@context']['signing_service'] = $authScheme['name'];
}
if (isset($authScheme['region'])) {
$command['@context']['signing_region'] = $authScheme['region'];
} elseif (isset($authScheme['signingRegionSet'])) {
$command['@context']['signing_region_set'] = $authScheme['signingRegionSet'];
}
}
/**
@ -241,25 +253,29 @@ class EndpointV2Middleware
*
* @return array
*/
private function resolveAuthScheme(array $authSchemes) : array
private function resolveAuthScheme(array $authSchemes): array
{
$invalidAuthSchemes = [];
foreach($authSchemes as $authScheme) {
if (isset(self::$validAuthSchemes[$authScheme['name']])) {
if ($this->isValidAuthScheme($authScheme['name'])) {
return $this->normalizeAuthScheme($authScheme);
} else {
$invalidAuthSchemes[] = "`{$authScheme['name']}`";
}
$invalidAuthSchemes[$authScheme['name']] = false;
}
$invalidAuthSchemesString = implode(', ', $invalidAuthSchemes);
$validAuthSchemesString = '`'
. implode('`, `', array_keys(self::$validAuthSchemes))
$invalidAuthSchemesString = '`' . implode(
'`, `',
array_keys($invalidAuthSchemes))
. '`';
throw new \InvalidArgumentException(
$validAuthSchemesString = '`'
. implode('`, `', array_keys(
array_diff_key(self::$validAuthSchemes, $invalidAuthSchemes))
)
. '`';
throw new UnresolvedAuthSchemeException(
"This operation requests {$invalidAuthSchemesString}"
. " auth schemes, but the client only supports {$validAuthSchemesString}."
. " auth schemes, but the client currently supports {$validAuthSchemesString}."
);
}
@ -270,7 +286,7 @@ class EndpointV2Middleware
* @param array $authScheme
* @return array
*/
private function normalizeAuthScheme(array $authScheme) : array
private function normalizeAuthScheme(array $authScheme): array
{
/*
sigv4a will contain a regionSet property. which is guaranteed to be `*`
@ -285,22 +301,25 @@ class EndpointV2Middleware
&& $authScheme['name'] !== 'sigv4-s3express'
) {
$normalizedAuthScheme['version'] = 's3v4';
} elseif ($authScheme['name'] === 'none') {
$normalizedAuthScheme['version'] = 'anonymous';
}
else {
$normalizedAuthScheme['version'] = str_replace(
'sig', '', $authScheme['name']
);
} else {
$normalizedAuthScheme['version'] = self::$validAuthSchemes[$authScheme['name']];
}
$normalizedAuthScheme['name'] = isset($authScheme['signingName']) ?
$authScheme['signingName'] : null;
$normalizedAuthScheme['region'] = isset($authScheme['signingRegion']) ?
$authScheme['signingRegion'] : null;
$normalizedAuthScheme['signingRegionSet'] = isset($authScheme['signingRegionSet']) ?
$authScheme['signingRegionSet'] : null;
$normalizedAuthScheme['name'] = $authScheme['signingName'] ?? null;
$normalizedAuthScheme['region'] = $authScheme['signingRegion'] ?? null;
$normalizedAuthScheme['signingRegionSet'] = $authScheme['signingRegionSet'] ?? null;
return $normalizedAuthScheme;
}
private function isValidAuthScheme($signatureVersion): bool
{
if (isset(self::$validAuthSchemes[$signatureVersion])) {
if ($signatureVersion === 'sigv4a') {
return extension_loaded('awscrt');
}
return true;
}
return false;
}
}

View file

@ -5,28 +5,42 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **AWS EntityResolution** service.
* @method \Aws\Result addPolicyStatement(array $args = [])
* @method \GuzzleHttp\Promise\Promise addPolicyStatementAsync(array $args = [])
* @method \Aws\Result batchDeleteUniqueId(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteUniqueIdAsync(array $args = [])
* @method \Aws\Result createIdMappingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise createIdMappingWorkflowAsync(array $args = [])
* @method \Aws\Result createIdNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise createIdNamespaceAsync(array $args = [])
* @method \Aws\Result createMatchingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMatchingWorkflowAsync(array $args = [])
* @method \Aws\Result createSchemaMapping(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSchemaMappingAsync(array $args = [])
* @method \Aws\Result deleteIdMappingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteIdMappingWorkflowAsync(array $args = [])
* @method \Aws\Result deleteIdNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteIdNamespaceAsync(array $args = [])
* @method \Aws\Result deleteMatchingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMatchingWorkflowAsync(array $args = [])
* @method \Aws\Result deletePolicyStatement(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePolicyStatementAsync(array $args = [])
* @method \Aws\Result deleteSchemaMapping(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSchemaMappingAsync(array $args = [])
* @method \Aws\Result getIdMappingJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIdMappingJobAsync(array $args = [])
* @method \Aws\Result getIdMappingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIdMappingWorkflowAsync(array $args = [])
* @method \Aws\Result getIdNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise getIdNamespaceAsync(array $args = [])
* @method \Aws\Result getMatchId(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMatchIdAsync(array $args = [])
* @method \Aws\Result getMatchingJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMatchingJobAsync(array $args = [])
* @method \Aws\Result getMatchingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMatchingWorkflowAsync(array $args = [])
* @method \Aws\Result getPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
* @method \Aws\Result getProviderService(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProviderServiceAsync(array $args = [])
* @method \Aws\Result getSchemaMapping(array $args = [])
@ -35,6 +49,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listIdMappingJobsAsync(array $args = [])
* @method \Aws\Result listIdMappingWorkflows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listIdMappingWorkflowsAsync(array $args = [])
* @method \Aws\Result listIdNamespaces(array $args = [])
* @method \GuzzleHttp\Promise\Promise listIdNamespacesAsync(array $args = [])
* @method \Aws\Result listMatchingJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMatchingJobsAsync(array $args = [])
* @method \Aws\Result listMatchingWorkflows(array $args = [])
@ -45,6 +61,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listSchemaMappingsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = [])
* @method \Aws\Result startIdMappingJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startIdMappingJobAsync(array $args = [])
* @method \Aws\Result startMatchingJob(array $args = [])
@ -55,6 +73,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateIdMappingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateIdMappingWorkflowAsync(array $args = [])
* @method \Aws\Result updateIdNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateIdNamespaceAsync(array $args = [])
* @method \Aws\Result updateMatchingWorkflow(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMatchingWorkflowAsync(array $args = [])
* @method \Aws\Result updateSchemaMapping(array $args = [])

View file

@ -117,6 +117,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateConnectionAsync(array $args = [])
* @method \Aws\Result updateEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEndpointAsync(array $args = [])
* @method \Aws\Result updateEventBus(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEventBusAsync(array $args = [])
*/
class EventBridgeClient extends AwsClient {
public function __construct(array $args)

View file

@ -3,7 +3,6 @@ namespace Aws\Exception;
/**
* Class CryptoPolyfillException
* @package Aws\Exception
*/
class CryptoPolyfillException extends \RuntimeException
{

View file

@ -14,6 +14,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createAliasAsync(array $args = [])
* @method \Aws\Result createBuild(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBuildAsync(array $args = [])
* @method \Aws\Result createContainerGroupDefinition(array $args = [])
* @method \GuzzleHttp\Promise\Promise createContainerGroupDefinitionAsync(array $args = [])
* @method \Aws\Result createFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
* @method \Aws\Result createFleetLocations(array $args = [])
@ -44,6 +46,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteAliasAsync(array $args = [])
* @method \Aws\Result deleteBuild(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBuildAsync(array $args = [])
* @method \Aws\Result deleteContainerGroupDefinition(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteContainerGroupDefinitionAsync(array $args = [])
* @method \Aws\Result deleteFleet(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
* @method \Aws\Result deleteFleetLocations(array $args = [])
@ -76,6 +80,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeBuildAsync(array $args = [])
* @method \Aws\Result describeCompute(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeComputeAsync(array $args = [])
* @method \Aws\Result describeContainerGroupDefinition(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeContainerGroupDefinitionAsync(array $args = [])
* @method \Aws\Result describeEC2InstanceLimits(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeEC2InstanceLimitsAsync(array $args = [])
* @method \Aws\Result describeFleetAttributes(array $args = [])
@ -142,6 +148,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listBuildsAsync(array $args = [])
* @method \Aws\Result listCompute(array $args = [])
* @method \GuzzleHttp\Promise\Promise listComputeAsync(array $args = [])
* @method \Aws\Result listContainerGroupDefinitions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listContainerGroupDefinitionsAsync(array $args = [])
* @method \Aws\Result listFleets(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFleetsAsync(array $args = [])
* @method \Aws\Result listGameServerGroups(array $args = [])

View file

@ -89,6 +89,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createTableOptimizerAsync(array $args = [])
* @method \Aws\Result createTrigger(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTriggerAsync(array $args = [])
* @method \Aws\Result createUsageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUsageProfileAsync(array $args = [])
* @method \Aws\Result createUserDefinedFunction(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUserDefinedFunctionAsync(array $args = [])
* @method \Aws\Result createWorkflow(array $args = [])
@ -141,6 +143,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteTableVersionAsync(array $args = [])
* @method \Aws\Result deleteTrigger(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTriggerAsync(array $args = [])
* @method \Aws\Result deleteUsageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteUsageProfileAsync(array $args = [])
* @method \Aws\Result deleteUserDefinedFunction(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteUserDefinedFunctionAsync(array $args = [])
* @method \Aws\Result deleteWorkflow(array $args = [])
@ -269,6 +273,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getUnfilteredPartitionsMetadataAsync(array $args = [])
* @method \Aws\Result getUnfilteredTableMetadata(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUnfilteredTableMetadataAsync(array $args = [])
* @method \Aws\Result getUsageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUsageProfileAsync(array $args = [])
* @method \Aws\Result getUserDefinedFunction(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserDefinedFunctionAsync(array $args = [])
* @method \Aws\Result getUserDefinedFunctions(array $args = [])
@ -321,6 +327,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listTableOptimizerRunsAsync(array $args = [])
* @method \Aws\Result listTriggers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTriggersAsync(array $args = [])
* @method \Aws\Result listUsageProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise listUsageProfilesAsync(array $args = [])
* @method \Aws\Result listWorkflows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listWorkflowsAsync(array $args = [])
* @method \Aws\Result putDataCatalogEncryptionSettings(array $args = [])
@ -427,6 +435,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateTableOptimizerAsync(array $args = [])
* @method \Aws\Result updateTrigger(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateTriggerAsync(array $args = [])
* @method \Aws\Result updateUsageProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUsageProfileAsync(array $args = [])
* @method \Aws\Result updateUserDefinedFunction(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUserDefinedFunctionAsync(array $args = [])
* @method \Aws\Result updateWorkflow(array $args = [])

View file

@ -17,6 +17,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createFilterAsync(array $args = [])
* @method \Aws\Result createIPSet(array $args = [])
* @method \GuzzleHttp\Promise\Promise createIPSetAsync(array $args = [])
* @method \Aws\Result createMalwareProtectionPlan(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMalwareProtectionPlanAsync(array $args = [])
* @method \Aws\Result createMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMembersAsync(array $args = [])
* @method \Aws\Result createPublishingDestination(array $args = [])
@ -35,6 +37,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteIPSetAsync(array $args = [])
* @method \Aws\Result deleteInvitations(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteInvitationsAsync(array $args = [])
* @method \Aws\Result deleteMalwareProtectionPlan(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMalwareProtectionPlanAsync(array $args = [])
* @method \Aws\Result deleteMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMembersAsync(array $args = [])
* @method \Aws\Result deletePublishingDestination(array $args = [])
@ -73,6 +77,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getIPSetAsync(array $args = [])
* @method \Aws\Result getInvitationsCount(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvitationsCountAsync(array $args = [])
* @method \Aws\Result getMalwareProtectionPlan(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMalwareProtectionPlanAsync(array $args = [])
* @method \Aws\Result getMalwareScanSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMalwareScanSettingsAsync(array $args = [])
* @method \Aws\Result getMasterAccount(array $args = [])
@ -103,6 +109,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listIPSetsAsync(array $args = [])
* @method \Aws\Result listInvitations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvitationsAsync(array $args = [])
* @method \Aws\Result listMalwareProtectionPlans(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMalwareProtectionPlansAsync(array $args = [])
* @method \Aws\Result listMembers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMembersAsync(array $args = [])
* @method \Aws\Result listOrganizationAdminAccounts(array $args = [])
@ -133,6 +141,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateFindingsFeedbackAsync(array $args = [])
* @method \Aws\Result updateIPSet(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateIPSetAsync(array $args = [])
* @method \Aws\Result updateMalwareProtectionPlan(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMalwareProtectionPlanAsync(array $args = [])
* @method \Aws\Result updateMalwareScanSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMalwareScanSettingsAsync(array $args = [])
* @method \Aws\Result updateMemberDetectors(array $args = [])

View file

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

View file

@ -1,39 +0,0 @@
<?php
namespace Aws\Honeycode;
use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon Honeycode** service.
* @method \Aws\Result batchCreateTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateTableRowsAsync(array $args = [])
* @method \Aws\Result batchDeleteTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteTableRowsAsync(array $args = [])
* @method \Aws\Result batchUpdateTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateTableRowsAsync(array $args = [])
* @method \Aws\Result batchUpsertTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpsertTableRowsAsync(array $args = [])
* @method \Aws\Result describeTableDataImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeTableDataImportJobAsync(array $args = [])
* @method \Aws\Result getScreenData(array $args = [])
* @method \GuzzleHttp\Promise\Promise getScreenDataAsync(array $args = [])
* @method \Aws\Result invokeScreenAutomation(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeScreenAutomationAsync(array $args = [])
* @method \Aws\Result listTableColumns(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTableColumnsAsync(array $args = [])
* @method \Aws\Result listTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTableRowsAsync(array $args = [])
* @method \Aws\Result listTables(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTablesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result queryTableRows(array $args = [])
* @method \GuzzleHttp\Promise\Promise queryTableRowsAsync(array $args = [])
* @method \Aws\Result startTableDataImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startTableDataImportJobAsync(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 HoneycodeClient extends AwsClient {}

View file

@ -15,6 +15,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createStorageConfigurationAsync(array $args = [])
* @method \Aws\Result deleteEncoderConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEncoderConfigurationAsync(array $args = [])
* @method \Aws\Result deletePublicKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePublicKeyAsync(array $args = [])
* @method \Aws\Result deleteStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStageAsync(array $args = [])
* @method \Aws\Result deleteStorageConfiguration(array $args = [])
@ -27,12 +29,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getEncoderConfigurationAsync(array $args = [])
* @method \Aws\Result getParticipant(array $args = [])
* @method \GuzzleHttp\Promise\Promise getParticipantAsync(array $args = [])
* @method \Aws\Result getPublicKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPublicKeyAsync(array $args = [])
* @method \Aws\Result getStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStageAsync(array $args = [])
* @method \Aws\Result getStageSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStageSessionAsync(array $args = [])
* @method \Aws\Result getStorageConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStorageConfigurationAsync(array $args = [])
* @method \Aws\Result importPublicKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise importPublicKeyAsync(array $args = [])
* @method \Aws\Result listCompositions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCompositionsAsync(array $args = [])
* @method \Aws\Result listEncoderConfigurations(array $args = [])
@ -41,6 +47,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listParticipantEventsAsync(array $args = [])
* @method \Aws\Result listParticipants(array $args = [])
* @method \GuzzleHttp\Promise\Promise listParticipantsAsync(array $args = [])
* @method \Aws\Result listPublicKeys(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPublicKeysAsync(array $args = [])
* @method \Aws\Result listStageSessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listStageSessionsAsync(array $args = [])
* @method \Aws\Result listStages(array $args = [])

View file

@ -0,0 +1,19 @@
<?php
namespace Aws\Identity;
/**
* Denotes the use of standard AWS credentials.
*
* @internal
*/
abstract class AwsCredentialIdentity implements IdentityInterface
{
/**
* Returns a UNIX timestamp, if available, representing the expiration
* time of the AWS Credential object. Returns null if no expiration is provided.
*
* @return int|null
*/
abstract public function getExpiration();
}

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