Skip to content

Commit a9530bf

Browse files
committed
update generated code
1 parent 0a136cf commit a9530bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+697
-264
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.284.1"
3+
"${LATEST}": "3.285.2"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/Lambda/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: Adds support for Lambda functions to access Dual-Stack subnets over IPv6, via an opt-in flag in CreateFunction and UpdateFunctionConfiguration APIs
8+
- AWS api-change: Add Node 20 (nodejs20.x) support to AWS Lambda.
89

910
## 2.1.0
1011

src/Service/Lambda/src/Enum/Runtime.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ final class Runtime
2020
public const NODEJS_14_X = 'nodejs14.x';
2121
public const NODEJS_16_X = 'nodejs16.x';
2222
public const NODEJS_18_X = 'nodejs18.x';
23+
public const NODEJS_20_X = 'nodejs20.x';
2324
public const NODEJS_4_3 = 'nodejs4.3';
2425
public const NODEJS_4_3_EDGE = 'nodejs4.3-edge';
2526
public const NODEJS_6_10 = 'nodejs6.10';
@@ -56,6 +57,7 @@ public static function exists(string $value): bool
5657
self::NODEJS_14_X => true,
5758
self::NODEJS_16_X => true,
5859
self::NODEJS_18_X => true,
60+
self::NODEJS_20_X => true,
5961
self::NODEJS_4_3 => true,
6062
self::NODEJS_4_3_EDGE => true,
6163
self::NODEJS_6_10 => true,

src/Service/Lambda/src/Input/UpdateFunctionConfigurationRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ final class UpdateFunctionConfigurationRequest extends Input
181181

182182
/**
183183
* The size of the function's `/tmp` directory in MB. The default value is 512, but can be any whole number between 512
184-
* and 10,240 MB.
184+
* and 10,240 MB. For more information, see Configuring ephemeral storage (console) [^1].
185+
*
186+
* [^1]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
185187
*
186188
* @var EphemeralStorage|null
187189
*/

src/Service/Lambda/src/LambdaClient.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ public function getFunctionConfiguration($input): FunctionConfiguration
196196
}
197197

198198
/**
199-
* Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To
200-
* invoke a function asynchronously, set `InvocationType` to `Event`.
199+
* Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. By
200+
* default, Lambda invokes your function synchronously (i.e. the`InvocationType` is `RequestResponse`). To invoke a
201+
* function asynchronously, set `InvocationType` to `Event`. Lambda passes the `ClientContext` object to your function
202+
* for synchronous invocations only.
201203
*
202204
* For synchronous invocation [^1], details about the function response, including errors, are included in the response
203205
* body and headers. For either invocation type, you can find more information in the execution log [^2] and trace [^3].

src/Service/Lambda/src/Result/FunctionConfiguration.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,10 @@ class FunctionConfiguration extends Result
277277
private $architectures;
278278

279279
/**
280-
* The size of the function’s `/tmp` directory in MB. The default value is 512, but it can be any whole number between
281-
* 512 and 10,240 MB.
280+
* The size of the function's `/tmp` directory in MB. The default value is 512, but can be any whole number between 512
281+
* and 10,240 MB. For more information, see Configuring ephemeral storage (console) [^1].
282+
*
283+
* [^1]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
282284
*
283285
* @var EphemeralStorage|null
284286
*/

src/Service/Lambda/src/ValueObject/EphemeralStorage.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
use AsyncAws\Core\Exception\InvalidArgument;
66

77
/**
8-
* The size of the function's `/tmp` directory in MB. The default value is 512, but it can be any whole number between
9-
* 512 and 10,240 MB.
8+
* The size of the function's `/tmp` directory in MB. The default value is 512, but can be any whole number between 512
9+
* and 10,240 MB. For more information, see Configuring ephemeral storage (console) [^1].
10+
*
11+
* [^1]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
1012
*/
1113
final class EphemeralStorage
1214
{

src/Service/Lambda/src/ValueObject/FunctionConfiguration.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ final class FunctionConfiguration
261261
private $architectures;
262262

263263
/**
264-
* The size of the function’s `/tmp` directory in MB. The default value is 512, but it can be any whole number between
265-
* 512 and 10,240 MB.
264+
* The size of the function's `/tmp` directory in MB. The default value is 512, but can be any whole number between 512
265+
* and 10,240 MB. For more information, see Configuring ephemeral storage (console) [^1].
266+
*
267+
* [^1]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
266268
*
267269
* @var EphemeralStorage|null
268270
*/

src/Service/Sqs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: This release enables customers to call SQS using AWS JSON-1.0 protocol and bug fix.
8+
- AWS api-change: This release enables customers to call SQS using AWS JSON-1.0 protocol.
9+
510
### Changed
611

712
- Allow passing explicit null values for optional fields of input objects

src/Service/Sqs/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
],
1313
"require": {
1414
"php": "^7.2.5 || ^8.0",
15-
"ext-SimpleXML": "*",
1615
"ext-filter": "*",
16+
"ext-json": "*",
1717
"async-aws/core": "^1.9"
1818
},
1919
"autoload": {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The `accountId` is invalid.
9+
*/
10+
final class InvalidAddressException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* A queue attribute value is invalid.
9+
*/
10+
final class InvalidAttributeValueException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* When the request to a queue is not HTTPS and SigV4.
9+
*/
10+
final class InvalidSecurityException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The caller doesn't have the required KMS access.
9+
*/
10+
final class KmsAccessDeniedException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was denied due to request throttling.
9+
*/
10+
final class KmsDisabledException extends ClientException
11+
{
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was rejected for one of the following reasons:.
9+
*
10+
* - The KeyUsage value of the KMS key is incompatible with the API operation.
11+
* - The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key
12+
* material in the KMS key (KeySpec).
13+
*/
14+
final class KmsInvalidKeyUsageException extends ClientException
15+
{
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was rejected because the state of the specified resource is not valid for this request.
9+
*/
10+
final class KmsInvalidStateException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was rejected because the specified entity or resource could not be found.
9+
*/
10+
final class KmsNotFoundException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was rejected because the specified key policy isn't syntactically or semantically correct.
9+
*/
10+
final class KmsOptInRequiredException extends ClientException
11+
{
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* Amazon Web Services KMS throttles requests for the following conditions.
9+
*/
10+
final class KmsThrottledException extends ClientException
11+
{
12+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace AsyncAws\Sqs\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
7+
/**
8+
* The request was denied due to request throttling.
9+
*
10+
* - The rate of requests per second exceeds the Amazon Web Services KMS request quota for an account and Region.
11+
* - A burst or sustained high rate of requests to change the state of the same KMS key. This condition is often known
12+
* as a "hot key."
13+
* - Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store might be throttled at a
14+
* lower-than-expected rate when the Amazon Web Services CloudHSM cluster associated with the Amazon Web Services
15+
* CloudHSM key store is processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM
16+
* key store.
17+
*/
18+
final class RequestThrottledException extends ClientException
19+
{
20+
}

src/Service/Sqs/src/Input/ChangeMessageVisibilityBatchRequest.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ public function getQueueUrl(): ?string
7575
public function request(): Request
7676
{
7777
// Prepare headers
78-
$headers = ['content-type' => 'application/x-www-form-urlencoded'];
78+
$headers = [
79+
'Content-Type' => 'application/x-amz-json-1.0',
80+
'X-Amz-Target' => 'AmazonSQS.ChangeMessageVisibilityBatch',
81+
];
7982

8083
// Prepare query
8184
$query = [];
@@ -84,7 +87,8 @@ public function request(): Request
8487
$uriString = '/';
8588

8689
// Prepare Body
87-
$body = http_build_query(['Action' => 'ChangeMessageVisibilityBatch', 'Version' => '2012-11-05'] + $this->requestBody(), '', '&', \PHP_QUERY_RFC1738);
90+
$bodyPayload = $this->requestBody();
91+
$body = empty($bodyPayload) ? '{}' : json_encode($bodyPayload, 4194304);
8892

8993
// Return the Request
9094
return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body));
@@ -118,12 +122,11 @@ private function requestBody(): array
118122
throw new InvalidArgument(sprintf('Missing parameter "Entries" for "%s". The value cannot be null.', __CLASS__));
119123
}
120124

121-
$index = 0;
122-
foreach ($v as $mapValue) {
125+
$index = -1;
126+
$payload['Entries'] = [];
127+
foreach ($v as $listValue) {
123128
++$index;
124-
foreach ($mapValue->requestBody() as $bodyKey => $bodyValue) {
125-
$payload["ChangeMessageVisibilityBatchRequestEntry.$index.$bodyKey"] = $bodyValue;
126-
}
129+
$payload['Entries'][$index] = $listValue->requestBody();
127130
}
128131

129132
return $payload;

src/Service/Sqs/src/Input/ChangeMessageVisibilityRequest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ public function getVisibilityTimeout(): ?int
8989
public function request(): Request
9090
{
9191
// Prepare headers
92-
$headers = ['content-type' => 'application/x-www-form-urlencoded'];
92+
$headers = [
93+
'Content-Type' => 'application/x-amz-json-1.0',
94+
'X-Amz-Target' => 'AmazonSQS.ChangeMessageVisibility',
95+
];
9396

9497
// Prepare query
9598
$query = [];
@@ -98,7 +101,8 @@ public function request(): Request
98101
$uriString = '/';
99102

100103
// Prepare Body
101-
$body = http_build_query(['Action' => 'ChangeMessageVisibility', 'Version' => '2012-11-05'] + $this->requestBody(), '', '&', \PHP_QUERY_RFC1738);
104+
$bodyPayload = $this->requestBody();
105+
$body = empty($bodyPayload) ? '{}' : json_encode($bodyPayload, 4194304);
102106

103107
// Return the Request
104108
return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body));

src/Service/Sqs/src/Input/CreateQueueRequest.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,10 @@ public function getTags(): array
244244
public function request(): Request
245245
{
246246
// Prepare headers
247-
$headers = ['content-type' => 'application/x-www-form-urlencoded'];
247+
$headers = [
248+
'Content-Type' => 'application/x-amz-json-1.0',
249+
'X-Amz-Target' => 'AmazonSQS.CreateQueue',
250+
];
248251

249252
// Prepare query
250253
$query = [];
@@ -253,7 +256,8 @@ public function request(): Request
253256
$uriString = '/';
254257

255258
// Prepare Body
256-
$body = http_build_query(['Action' => 'CreateQueue', 'Version' => '2012-11-05'] + $this->requestBody(), '', '&', \PHP_QUERY_RFC1738);
259+
$bodyPayload = $this->requestBody();
260+
$body = empty($bodyPayload) ? '{}' : json_encode($bodyPayload, 4194304);
257261

258262
// Return the Request
259263
return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body));
@@ -294,22 +298,26 @@ private function requestBody(): array
294298
}
295299
$payload['QueueName'] = $v;
296300
if (null !== $v = $this->attributes) {
297-
$index = 0;
298-
foreach ($v as $mapKey => $mapValue) {
299-
if (!QueueAttributeName::exists($mapKey)) {
300-
throw new InvalidArgument(sprintf('Invalid key for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $mapKey));
301+
if (empty($v)) {
302+
$payload['Attributes'] = new \stdClass();
303+
} else {
304+
$payload['Attributes'] = [];
305+
foreach ($v as $name => $mv) {
306+
if (!QueueAttributeName::exists($mapKey)) {
307+
throw new InvalidArgument(sprintf('Invalid key for "%s". The value "%s" is not a valid "QueueAttributeName".', __CLASS__, $mapKey));
308+
}
309+
$payload['Attributes'][$name] = $mv;
301310
}
302-
++$index;
303-
$payload["Attribute.$index.Name"] = $mapKey;
304-
$payload["Attribute.$index.Value"] = $mapValue;
305311
}
306312
}
307313
if (null !== $v = $this->tags) {
308-
$index = 0;
309-
foreach ($v as $mapKey => $mapValue) {
310-
++$index;
311-
$payload["Tag.$index.Key"] = $mapKey;
312-
$payload["Tag.$index.Value"] = $mapValue;
314+
if (empty($v)) {
315+
$payload['tags'] = new \stdClass();
316+
} else {
317+
$payload['tags'] = [];
318+
foreach ($v as $name => $mv) {
319+
$payload['tags'][$name] = $mv;
320+
}
313321
}
314322
}
315323

0 commit comments

Comments
 (0)