Skip to content

Commit e728afb

Browse files
Update generated code (#1338)
* update generated code * Update src/Service/CloudWatch/CHANGELOG.md Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
1 parent ce6be4e commit e728afb

Some content is hidden

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

42 files changed

+335
-46
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- AWS api-change: Restrict the list of available regions.
88
- AWS api-change: Added `eu-central-2`, `eu-south-2` and `ap-south-2` regions
99
- AWS api-change: Add Node 18 (nodejs18.x) support to AWS Lambda.
10+
- AWS api-change: Adds support for Lambda SnapStart, which helps improve the startup performance of functions. Customers can now manage SnapStart based functions via CreateFunction and UpdateFunctionConfiguration APIs
1011

1112
## 1.7.0
1213

src/Enum/InvocationType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
/**
66
* Choose from the following options.
77
*
8-
* - `RequestResponse` (default) - Invoke the function synchronously. Keep the connection open until the function
8+
* - `RequestResponse` (default) Invoke the function synchronously. Keep the connection open until the function
99
* returns a response or times out. The API response includes the function response and additional data.
10-
* - `Event` - Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter
11-
* queue (if it's configured). The API response only includes a status code.
12-
* - `DryRun` - Validate parameter values and verify that the user or role has permission to invoke the function.
10+
* - `Event` Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter
11+
* queue (if one is configured). The API response only includes a status code.
12+
* - `DryRun` Validate parameter values and verify that the user or role has permission to invoke the function.
1313
*/
1414
final class InvocationType
1515
{

src/Enum/LastUpdateStatusReasonCode.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,51 @@
77
*/
88
final class LastUpdateStatusReasonCode
99
{
10+
public const DISABLED_KMSKEY = 'DisabledKMSKey';
11+
public const EFSIOERROR = 'EFSIOError';
12+
public const EFSMOUNT_CONNECTIVITY_ERROR = 'EFSMountConnectivityError';
13+
public const EFSMOUNT_FAILURE = 'EFSMountFailure';
14+
public const EFSMOUNT_TIMEOUT = 'EFSMountTimeout';
1015
public const ENI_LIMIT_EXCEEDED = 'EniLimitExceeded';
16+
public const FUNCTION_ERROR = 'FunctionError';
1117
public const IMAGE_ACCESS_DENIED = 'ImageAccessDenied';
1218
public const IMAGE_DELETED = 'ImageDeleted';
1319
public const INSUFFICIENT_ROLE_PERMISSIONS = 'InsufficientRolePermissions';
1420
public const INTERNAL_ERROR = 'InternalError';
1521
public const INVALID_CONFIGURATION = 'InvalidConfiguration';
1622
public const INVALID_IMAGE = 'InvalidImage';
23+
public const INVALID_RUNTIME = 'InvalidRuntime';
1724
public const INVALID_SECURITY_GROUP = 'InvalidSecurityGroup';
25+
public const INVALID_STATE_KMSKEY = 'InvalidStateKMSKey';
1826
public const INVALID_SUBNET = 'InvalidSubnet';
27+
public const INVALID_ZIP_FILE_EXCEPTION = 'InvalidZipFileException';
28+
public const KMSKEY_ACCESS_DENIED = 'KMSKeyAccessDenied';
29+
public const KMSKEY_NOT_FOUND = 'KMSKeyNotFound';
1930
public const SUBNET_OUT_OF_IPADDRESSES = 'SubnetOutOfIPAddresses';
2031

2132
public static function exists(string $value): bool
2233
{
2334
return isset([
35+
self::DISABLED_KMSKEY => true,
36+
self::EFSIOERROR => true,
37+
self::EFSMOUNT_CONNECTIVITY_ERROR => true,
38+
self::EFSMOUNT_FAILURE => true,
39+
self::EFSMOUNT_TIMEOUT => true,
2440
self::ENI_LIMIT_EXCEEDED => true,
41+
self::FUNCTION_ERROR => true,
2542
self::IMAGE_ACCESS_DENIED => true,
2643
self::IMAGE_DELETED => true,
2744
self::INSUFFICIENT_ROLE_PERMISSIONS => true,
2845
self::INTERNAL_ERROR => true,
2946
self::INVALID_CONFIGURATION => true,
3047
self::INVALID_IMAGE => true,
48+
self::INVALID_RUNTIME => true,
3149
self::INVALID_SECURITY_GROUP => true,
50+
self::INVALID_STATE_KMSKEY => true,
3251
self::INVALID_SUBNET => true,
52+
self::INVALID_ZIP_FILE_EXCEPTION => true,
53+
self::KMSKEY_ACCESS_DENIED => true,
54+
self::KMSKEY_NOT_FOUND => true,
3355
self::SUBNET_OUT_OF_IPADDRESSES => true,
3456
][$value]);
3557
}

src/Enum/SnapStartApplyOn.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\Enum;
4+
5+
/**
6+
* When set to `PublishedVersions`, Lambda creates a snapshot of the execution environment when you publish a function
7+
* version.
8+
*/
9+
final class SnapStartApplyOn
10+
{
11+
public const NONE = 'None';
12+
public const PUBLISHED_VERSIONS = 'PublishedVersions';
13+
14+
public static function exists(string $value): bool
15+
{
16+
return isset([
17+
self::NONE => true,
18+
self::PUBLISHED_VERSIONS => true,
19+
][$value]);
20+
}
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\Enum;
4+
5+
/**
6+
* When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is
7+
* activated for the specified function version.
8+
*
9+
* @see https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using
10+
*/
11+
final class SnapStartOptimizationStatus
12+
{
13+
public const OFF = 'Off';
14+
public const ON = 'On';
15+
16+
public static function exists(string $value): bool
17+
{
18+
return isset([
19+
self::OFF => true,
20+
self::ON => true,
21+
][$value]);
22+
}
23+
}

src/Enum/StateReasonCode.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,55 @@
99
final class StateReasonCode
1010
{
1111
public const CREATING = 'Creating';
12+
public const DISABLED_KMSKEY = 'DisabledKMSKey';
13+
public const EFSIOERROR = 'EFSIOError';
14+
public const EFSMOUNT_CONNECTIVITY_ERROR = 'EFSMountConnectivityError';
15+
public const EFSMOUNT_FAILURE = 'EFSMountFailure';
16+
public const EFSMOUNT_TIMEOUT = 'EFSMountTimeout';
1217
public const ENI_LIMIT_EXCEEDED = 'EniLimitExceeded';
18+
public const FUNCTION_ERROR = 'FunctionError';
1319
public const IDLE = 'Idle';
1420
public const IMAGE_ACCESS_DENIED = 'ImageAccessDenied';
1521
public const IMAGE_DELETED = 'ImageDeleted';
1622
public const INSUFFICIENT_ROLE_PERMISSIONS = 'InsufficientRolePermissions';
1723
public const INTERNAL_ERROR = 'InternalError';
1824
public const INVALID_CONFIGURATION = 'InvalidConfiguration';
1925
public const INVALID_IMAGE = 'InvalidImage';
26+
public const INVALID_RUNTIME = 'InvalidRuntime';
2027
public const INVALID_SECURITY_GROUP = 'InvalidSecurityGroup';
28+
public const INVALID_STATE_KMSKEY = 'InvalidStateKMSKey';
2129
public const INVALID_SUBNET = 'InvalidSubnet';
30+
public const INVALID_ZIP_FILE_EXCEPTION = 'InvalidZipFileException';
31+
public const KMSKEY_ACCESS_DENIED = 'KMSKeyAccessDenied';
32+
public const KMSKEY_NOT_FOUND = 'KMSKeyNotFound';
2233
public const RESTORING = 'Restoring';
2334
public const SUBNET_OUT_OF_IPADDRESSES = 'SubnetOutOfIPAddresses';
2435

2536
public static function exists(string $value): bool
2637
{
2738
return isset([
2839
self::CREATING => true,
40+
self::DISABLED_KMSKEY => true,
41+
self::EFSIOERROR => true,
42+
self::EFSMOUNT_CONNECTIVITY_ERROR => true,
43+
self::EFSMOUNT_FAILURE => true,
44+
self::EFSMOUNT_TIMEOUT => true,
2945
self::ENI_LIMIT_EXCEEDED => true,
46+
self::FUNCTION_ERROR => true,
3047
self::IDLE => true,
3148
self::IMAGE_ACCESS_DENIED => true,
3249
self::IMAGE_DELETED => true,
3350
self::INSUFFICIENT_ROLE_PERMISSIONS => true,
3451
self::INTERNAL_ERROR => true,
3552
self::INVALID_CONFIGURATION => true,
3653
self::INVALID_IMAGE => true,
54+
self::INVALID_RUNTIME => true,
3755
self::INVALID_SECURITY_GROUP => true,
56+
self::INVALID_STATE_KMSKEY => true,
3857
self::INVALID_SUBNET => true,
58+
self::INVALID_ZIP_FILE_EXCEPTION => true,
59+
self::KMSKEY_ACCESS_DENIED => true,
60+
self::KMSKEY_NOT_FOUND => true,
3961
self::RESTORING => true,
4062
self::SUBNET_OUT_OF_IPADDRESSES => true,
4163
][$value]);

src/Enum/ThrottleReason.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ final class ThrottleReason
66
{
77
public const CALLER_RATE_LIMIT_EXCEEDED = 'CallerRateLimitExceeded';
88
public const CONCURRENT_INVOCATION_LIMIT_EXCEEDED = 'ConcurrentInvocationLimitExceeded';
9+
public const CONCURRENT_SNAPSHOT_CREATE_LIMIT_EXCEEDED = 'ConcurrentSnapshotCreateLimitExceeded';
910
public const FUNCTION_INVOCATION_RATE_LIMIT_EXCEEDED = 'FunctionInvocationRateLimitExceeded';
1011
public const RESERVED_FUNCTION_CONCURRENT_INVOCATION_LIMIT_EXCEEDED = 'ReservedFunctionConcurrentInvocationLimitExceeded';
1112
public const RESERVED_FUNCTION_INVOCATION_RATE_LIMIT_EXCEEDED = 'ReservedFunctionInvocationRateLimitExceeded';
@@ -15,6 +16,7 @@ public static function exists(string $value): bool
1516
return isset([
1617
self::CALLER_RATE_LIMIT_EXCEEDED => true,
1718
self::CONCURRENT_INVOCATION_LIMIT_EXCEEDED => true,
19+
self::CONCURRENT_SNAPSHOT_CREATE_LIMIT_EXCEEDED => true,
1820
self::FUNCTION_INVOCATION_RATE_LIMIT_EXCEEDED => true,
1921
self::RESERVED_FUNCTION_CONCURRENT_INVOCATION_LIMIT_EXCEEDED => true,
2022
self::RESERVED_FUNCTION_INVOCATION_RATE_LIMIT_EXCEEDED => true,

src/Exception/CodeStorageExceededException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* You have exceeded your maximum total code size per account. Learn more.
9+
* Your Amazon Web Services account has exceeded its maximum total code size. For more information, see Lambda quotas.
1010
*
11-
* @see https://docs.aws.amazon.com/lambda/latest/dg/limits.html
11+
* @see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
1212
*/
1313
final class CodeStorageExceededException extends ClientException
1414
{

src/Exception/EC2ThrottledException.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was throttled by Amazon EC2 during Lambda function initialization using the execution role provided for the
10-
* Lambda function.
9+
* Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.
1110
*/
1211
final class EC2ThrottledException extends ServerException
1312
{

src/Exception/EC2UnexpectedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda received an unexpected EC2 client exception while setting up for the Lambda function.
9+
* Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.
1010
*/
1111
final class EC2UnexpectedException extends ServerException
1212
{

src/Exception/EFSMountConnectivityException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The function couldn't make a network connection to the configured file system.
9+
* The Lambda function couldn't make a network connection to the configured file system.
1010
*/
1111
final class EFSMountConnectivityException extends ClientException
1212
{

src/Exception/EFSMountFailureException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The function couldn't mount the configured file system due to a permission or configuration issue.
9+
* The Lambda function couldn't mount the configured file system due to a permission or configuration issue.
1010
*/
1111
final class EFSMountFailureException extends ClientException
1212
{

src/Exception/EFSMountTimeoutException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The function was able to make a network connection to the configured file system, but the mount operation timed out.
9+
* The Lambda function made a network connection to the configured file system, but the mount operation timed out.
1010
*/
1111
final class EFSMountTimeoutException extends ClientException
1212
{

src/Exception/ENILimitReachedException.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was not able to create an elastic network interface in the VPC, specified as part of Lambda function
10-
* configuration, because the limit for network interfaces has been reached.
9+
* Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration,
10+
* because the limit for network interfaces has been reached. For more information, see Lambda quotas.
11+
*
12+
* @see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
1113
*/
1214
final class ENILimitReachedException extends ServerException
1315
{

src/Exception/InvalidParameterValueException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* One of the parameters in the request is invalid.
9+
* One of the parameters in the request is not valid.
1010
*/
1111
final class InvalidParameterValueException extends ClientException
1212
{

src/Exception/InvalidSecurityGroupIDException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The Security Group ID provided in the Lambda function VPC configuration is invalid.
9+
* The security group ID provided in the Lambda function VPC configuration is not valid.
1010
*/
1111
final class InvalidSecurityGroupIDException extends ServerException
1212
{

src/Exception/InvalidSubnetIDException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The Subnet ID provided in the Lambda function VPC configuration is invalid.
9+
* The subnet ID provided in the Lambda function VPC configuration is not valid.
1010
*/
1111
final class InvalidSubnetIDException extends ServerException
1212
{

src/Exception/KMSAccessDeniedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was unable to decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS
9+
* Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS
1010
* permissions.
1111
*/
1212
final class KMSAccessDeniedException extends ServerException

src/Exception/KMSDisabledException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was unable to decrypt the environment variables because the KMS key used is disabled. Check the Lambda
10-
* function's KMS key settings.
9+
* Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's
10+
* KMS key settings.
1111
*/
1212
final class KMSDisabledException extends ServerException
1313
{

src/Exception/KMSInvalidStateException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was unable to decrypt the environment variables because the KMS key used is in an invalid state for Decrypt.
9+
* Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt.
1010
* Check the function's KMS key settings.
1111
*/
1212
final class KMSInvalidStateException extends ServerException

src/Exception/KMSNotFoundException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* Lambda was unable to decrypt the environment variables because the KMS key was not found. Check the function's KMS
10-
* key settings.
9+
* Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key
10+
* settings.
1111
*/
1212
final class KMSNotFoundException extends ServerException
1313
{

src/Exception/PolicyLengthExceededException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The permissions policy for the resource is too large. Learn more.
9+
* The permissions policy for the resource is too large. For more information, see Lambda quotas.
1010
*
11-
* @see https://docs.aws.amazon.com/lambda/latest/dg/limits.html
11+
* @see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
1212
*/
1313
final class PolicyLengthExceededException extends ClientException
1414
{

src/Exception/PreconditionFailedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/**
99
* The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the `GetFunction`
10-
* or the `GetAlias` API to retrieve the latest RevisionId for your resource.
10+
* or the `GetAlias` API operation to retrieve the latest RevisionId for your resource.
1111
*/
1212
final class PreconditionFailedException extends ClientException
1313
{

src/Exception/RequestTooLargeException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use Symfony\Contracts\HttpClient\ResponseInterface;
77

88
/**
9-
* The request payload exceeded the `Invoke` request body JSON input limit. For more information, see Limits.
9+
* The request payload exceeded the `Invoke` request body JSON input quota. For more information, see Lambda quotas.
1010
*
11-
* @see https://docs.aws.amazon.com/lambda/latest/dg/limits.html
11+
* @see https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
1212
*/
1313
final class RequestTooLargeException extends ClientException
1414
{

src/Exception/SnapStartException.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
use Symfony\Contracts\HttpClient\ResponseInterface;
7+
8+
/**
9+
* The runtime restore hook encountered an error. For more information, check the Amazon CloudWatch logs.
10+
*/
11+
final class SnapStartException extends ClientException
12+
{
13+
private $type;
14+
15+
public function getType(): ?string
16+
{
17+
return $this->type;
18+
}
19+
20+
protected function populateResult(ResponseInterface $response): void
21+
{
22+
$data = $response->toArray(false);
23+
24+
$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
25+
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
26+
$this->message = $v;
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)