Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump aws/aws-sdk-php from 3.133.27 to 3.171.21 #605

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bin
**/.github

aws/aws-sdk-php/.changes
aws/aws-sdk-php/CODE_OF_CONDUCT.md

bantu/ini-get-wrapper/tests

Expand Down
1 change: 1 addition & 0 deletions aws/aws-sdk-php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"andrewsville/php-token-reflection": "^1.4",
"psr/cache": "^1.0",
"psr/simple-cache": "^1.0",
"paragonie/random_compat": ">= 2",
"sebastian/comparator": "^1.2.3"
},
"suggest": {
Expand Down
6 changes: 6 additions & 0 deletions aws/aws-sdk-php/src/ACMPCA/ACMPCAClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* @method \GuzzleHttp\Promise\Promise deleteCertificateAuthorityAsync(array $args = [])
* @method \Aws\Result deletePermission(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePermissionAsync(array $args = [])
* @method \Aws\Result deletePolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
* @method \Aws\Result describeCertificateAuthority(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAsync(array $args = [])
* @method \Aws\Result describeCertificateAuthorityAuditReport(array $args = [])
Expand All @@ -25,6 +27,8 @@
* @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCertificateAsync(array $args = [])
* @method \Aws\Result getCertificateAuthorityCsr(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCsrAsync(array $args = [])
* @method \Aws\Result getPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
* @method \Aws\Result importCertificateAuthorityCertificate(array $args = [])
* @method \GuzzleHttp\Promise\Promise importCertificateAuthorityCertificateAsync(array $args = [])
* @method \Aws\Result issueCertificate(array $args = [])
Expand All @@ -35,6 +39,8 @@
* @method \GuzzleHttp\Promise\Promise listPermissionsAsync(array $args = [])
* @method \Aws\Result listTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
* @method \Aws\Result putPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = [])
* @method \Aws\Result restoreCertificateAuthority(array $args = [])
* @method \GuzzleHttp\Promise\Promise restoreCertificateAuthorityAsync(array $args = [])
* @method \Aws\Result revokeCertificate(array $args = [])
Expand Down
2 changes: 2 additions & 0 deletions aws/aws-sdk-php/src/AccessAnalyzer/AccessAnalyzerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

/**
* This client is used to interact with the **Access Analyzer** service.
* @method \Aws\Result applyArchiveRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise applyArchiveRuleAsync(array $args = [])
* @method \Aws\Result createAnalyzer(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAnalyzerAsync(array $args = [])
* @method \Aws\Result createArchiveRule(array $args = [])
Expand Down
57 changes: 57 additions & 0 deletions aws/aws-sdk-php/src/AmplifyBackend/AmplifyBackendClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
namespace Aws\AmplifyBackend;

use Aws\AwsClient;

/**
* This client is used to interact with the **AmplifyBackend** service.
* @method \Aws\Result cloneBackend(array $args = [])
* @method \GuzzleHttp\Promise\Promise cloneBackendAsync(array $args = [])
* @method \Aws\Result createBackend(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBackendAsync(array $args = [])
* @method \Aws\Result createBackendAPI(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBackendAPIAsync(array $args = [])
* @method \Aws\Result createBackendAuth(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBackendAuthAsync(array $args = [])
* @method \Aws\Result createBackendConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBackendConfigAsync(array $args = [])
* @method \Aws\Result createToken(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTokenAsync(array $args = [])
* @method \Aws\Result deleteBackend(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBackendAsync(array $args = [])
* @method \Aws\Result deleteBackendAPI(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBackendAPIAsync(array $args = [])
* @method \Aws\Result deleteBackendAuth(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBackendAuthAsync(array $args = [])
* @method \Aws\Result deleteToken(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTokenAsync(array $args = [])
* @method \Aws\Result generateBackendAPIModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise generateBackendAPIModelsAsync(array $args = [])
* @method \Aws\Result getBackend(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBackendAsync(array $args = [])
* @method \Aws\Result getBackendAPI(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBackendAPIAsync(array $args = [])
* @method \Aws\Result getBackendAPIModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBackendAPIModelsAsync(array $args = [])
* @method \Aws\Result getBackendAuth(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBackendAuthAsync(array $args = [])
* @method \Aws\Result getBackendJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBackendJobAsync(array $args = [])
* @method \Aws\Result getToken(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTokenAsync(array $args = [])
* @method \Aws\Result listBackendJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBackendJobsAsync(array $args = [])
* @method \Aws\Result removeAllBackends(array $args = [])
* @method \GuzzleHttp\Promise\Promise removeAllBackendsAsync(array $args = [])
* @method \Aws\Result removeBackendConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise removeBackendConfigAsync(array $args = [])
* @method \Aws\Result updateBackendAPI(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBackendAPIAsync(array $args = [])
* @method \Aws\Result updateBackendAuth(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBackendAuthAsync(array $args = [])
* @method \Aws\Result updateBackendConfig(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBackendConfigAsync(array $args = [])
* @method \Aws\Result updateBackendJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBackendJobAsync(array $args = [])
*/
class AmplifyBackendClient extends AwsClient {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
namespace Aws\AmplifyBackend\Exception;

use Aws\Exception\AwsException;

/**
* Represents an error interacting with the **AmplifyBackend** service.
*/
class AmplifyBackendException extends AwsException {}
63 changes: 62 additions & 1 deletion aws/aws-sdk-php/src/Api/DateTimeResult.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php

namespace Aws\Api;

use Aws\Api\Parser\Exception\ParserException;
use Exception;

/**
* DateTime overrides that make DateTime work more seamlessly as a string,
* with JSON documents, and with JMESPath.
Expand All @@ -9,16 +13,72 @@ class DateTimeResult extends \DateTime implements \JsonSerializable
{
/**
* Create a new DateTimeResult from a unix timestamp.
*
* The Unix epoch (or Unix time or POSIX time or Unix
* timestamp) is the number of seconds that have elapsed since
* January 1, 1970 (midnight UTC/GMT).
* @param $unixTimestamp
*
* @return DateTimeResult
* @throws Exception
*/
public static function fromEpoch($unixTimestamp)
{
return new self(gmdate('c', $unixTimestamp));
}

/**
* @param $iso8601Timestamp
*
* @return DateTimeResult
*/
public static function fromISO8601($iso8601Timestamp)
{
if (is_numeric($iso8601Timestamp) || !is_string($iso8601Timestamp)) {
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromISO8601');
}
return new DateTimeResult($iso8601Timestamp);
}

/**
* Create a new DateTimeResult from an unknown timestamp.
*
* @param $timestamp
*
* @return DateTimeResult
* @throws ParserException|Exception
*/
public static function fromTimestamp($timestamp, $expectedFormat = null)
{
if (empty($timestamp)) {
return self::fromEpoch(0);
}

if (!(is_string($timestamp) || is_numeric($timestamp))) {
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromTimestamp');
}

try {
if ($expectedFormat == 'iso8601') {
try {
return self::fromISO8601($timestamp);
} catch (Exception $exception) {
return self::fromEpoch($timestamp);
}
} else if ($expectedFormat == 'unixTimestamp') {
try {
return self::fromEpoch($timestamp);
} catch (Exception $exception) {
return self::fromISO8601($timestamp);
}
} else if (\Aws\is_valid_epoch($timestamp)) {
return self::fromEpoch($timestamp);
}
return self::fromISO8601($timestamp);
} catch (Exception $exception) {
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromTimestamp');
}
}

/**
* Serialize the DateTimeResult as an ISO 8601 date string.
*
Expand All @@ -39,3 +99,4 @@ public function jsonSerialize()
return (string) $this;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ protected function populateShape(
$modeledError,
$response
);
$data['error_shape'] = $modeledError;

foreach ($error->getMembers() as $name => $member) {
switch ($member['location']) {
Expand Down
9 changes: 4 additions & 5 deletions aws/aws-sdk-php/src/Api/Parser/AbstractRestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ private function extractHeader(
break;
case 'timestamp':
try {
if (!empty($shape['timestampFormat'])
&& $shape['timestampFormat'] === 'unixTimestamp') {
$value = DateTimeResult::fromEpoch($value);
}
$value = new DateTimeResult($value);
$value = DateTimeResult::fromTimestamp(
$value,
!empty($shape['timestampFormat']) ? $shape['timestampFormat'] : null
);
break;
} catch (\Exception $e) {
// If the value cannot be parsed, then do not add it to the
Expand Down
13 changes: 5 additions & 8 deletions aws/aws-sdk-php/src/Api/Parser/JsonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ public function parse(Shape $shape, $value)
return $target;

case 'timestamp':
if (!empty($shape['timestampFormat'])
&& $shape['timestampFormat'] !== 'unixTimestamp') {
return new DateTimeResult($value);
}
// The Unix epoch (or Unix time or POSIX time or Unix
// timestamp) is the number of seconds that have elapsed since
// January 1, 1970 (midnight UTC/GMT).
return DateTimeResult::fromEpoch($value);
return DateTimeResult::fromTimestamp(
$value,
!empty($shape['timestampFormat']) ? $shape['timestampFormat'] : null
);

case 'blob':
return base64_decode($value);
Expand All @@ -60,3 +56,4 @@ public function parse(Shape $shape, $value)
}
}
}

9 changes: 4 additions & 5 deletions aws/aws-sdk-php/src/Api/Parser/MetadataParserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ protected function extractHeader(
break;
case 'timestamp':
try {
if (!empty($shape['timestampFormat'])
&& $shape['timestampFormat'] === 'unixTimestamp') {
$value = DateTimeResult::fromEpoch($value);
}
$value = new DateTimeResult($value);
$value = DateTimeResult::fromTimestamp(
$value,
!empty($shape['timestampFormat']) ? $shape['timestampFormat'] : null
);
break;
} catch (\Exception $e) {
// If the value cannot be parsed, then do not add it to the
Expand Down
15 changes: 11 additions & 4 deletions aws/aws-sdk-php/src/Api/Parser/XmlParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Aws\Api\DateTimeResult;
use Aws\Api\ListShape;
use Aws\Api\MapShape;
use Aws\Api\Parser\Exception\ParserException;
use Aws\Api\Shape;
use Aws\Api\StructureShape;

Expand Down Expand Up @@ -138,11 +139,17 @@ private function parse_boolean(Shape $shape, $value)

private function parse_timestamp(Shape $shape, $value)
{
if (!empty($shape['timestampFormat'])
&& $shape['timestampFormat'] === 'unixTimestamp') {
return DateTimeResult::fromEpoch((string) $value);
if (is_string($value)
|| is_int($value)
|| (is_object($value)
&& method_exists($value, '__toString'))
) {
return DateTimeResult::fromTimestamp(
(string) $value,
!empty($shape['timestampFormat']) ? $shape['timestampFormat'] : null
);
}
return new DateTimeResult($value);
throw new ParserException('Invalid timestamp value passed to XmlParser::parse_timestamp');
}

private function parse_xml_attribute(Shape $shape, Shape $memberShape, $value)
Expand Down
18 changes: 18 additions & 0 deletions aws/aws-sdk-php/src/ApiGatewayV2/ApiGatewayV2Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
* @method \GuzzleHttp\Promise\Promise createRouteResponseAsync(array $args = [])
* @method \Aws\Result createStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStageAsync(array $args = [])
* @method \Aws\Result createVpcLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise createVpcLinkAsync(array $args = [])
* @method \Aws\Result deleteAccessLogSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAccessLogSettingsAsync(array $args = [])
* @method \Aws\Result deleteApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApiAsync(array $args = [])
* @method \Aws\Result deleteApiMapping(array $args = [])
Expand All @@ -47,12 +51,20 @@
* @method \GuzzleHttp\Promise\Promise deleteModelAsync(array $args = [])
* @method \Aws\Result deleteRoute(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRouteAsync(array $args = [])
* @method \Aws\Result deleteRouteRequestParameter(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRouteRequestParameterAsync(array $args = [])
* @method \Aws\Result deleteRouteResponse(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRouteResponseAsync(array $args = [])
* @method \Aws\Result deleteRouteSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRouteSettingsAsync(array $args = [])
* @method \Aws\Result deleteStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStageAsync(array $args = [])
* @method \Aws\Result deleteVpcLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteVpcLinkAsync(array $args = [])
* @method \Aws\Result exportApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise exportApiAsync(array $args = [])
* @method \Aws\Result resetAuthorizersCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise resetAuthorizersCacheAsync(array $args = [])
* @method \Aws\Result getApiResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApiResourceAsync(array $args = [])
* @method \Aws\Result getApiMapping(array $args = [])
Expand Down Expand Up @@ -101,6 +113,10 @@
* @method \GuzzleHttp\Promise\Promise getStagesAsync(array $args = [])
* @method \Aws\Result getTags(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTagsAsync(array $args = [])
* @method \Aws\Result getVpcLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVpcLinkAsync(array $args = [])
* @method \Aws\Result getVpcLinks(array $args = [])
* @method \GuzzleHttp\Promise\Promise getVpcLinksAsync(array $args = [])
* @method \Aws\Result importApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise importApiAsync(array $args = [])
* @method \Aws\Result reimportApi(array $args = [])
Expand Down Expand Up @@ -131,5 +147,7 @@
* @method \GuzzleHttp\Promise\Promise updateRouteResponseAsync(array $args = [])
* @method \Aws\Result updateStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStageAsync(array $args = [])
* @method \Aws\Result updateVpcLink(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateVpcLinkAsync(array $args = [])
*/
class ApiGatewayV2Client extends AwsClient {}
8 changes: 8 additions & 0 deletions aws/aws-sdk-php/src/AppConfig/AppConfigClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* @method \GuzzleHttp\Promise\Promise createDeploymentStrategyAsync(array $args = [])
* @method \Aws\Result createEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEnvironmentAsync(array $args = [])
* @method \Aws\Result createHostedConfigurationVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise createHostedConfigurationVersionAsync(array $args = [])
* @method \Aws\Result deleteApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
* @method \Aws\Result deleteConfigurationProfile(array $args = [])
Expand All @@ -21,6 +23,8 @@
* @method \GuzzleHttp\Promise\Promise deleteDeploymentStrategyAsync(array $args = [])
* @method \Aws\Result deleteEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteHostedConfigurationVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHostedConfigurationVersionAsync(array $args = [])
* @method \Aws\Result getApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApplicationAsync(array $args = [])
* @method \Aws\Result getConfiguration(array $args = [])
Expand All @@ -33,6 +37,8 @@
* @method \GuzzleHttp\Promise\Promise getDeploymentStrategyAsync(array $args = [])
* @method \Aws\Result getEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise getEnvironmentAsync(array $args = [])
* @method \Aws\Result getHostedConfigurationVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise getHostedConfigurationVersionAsync(array $args = [])
* @method \Aws\Result listApplications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
* @method \Aws\Result listConfigurationProfiles(array $args = [])
Expand All @@ -43,6 +49,8 @@
* @method \GuzzleHttp\Promise\Promise listDeploymentsAsync(array $args = [])
* @method \Aws\Result listEnvironments(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnvironmentsAsync(array $args = [])
* @method \Aws\Result listHostedConfigurationVersions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listHostedConfigurationVersionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result startDeployment(array $args = [])
Expand Down
Loading