Skip to content

Commit edbee27

Browse files
Update generated code (#2003)
* update generated code * Fix tests --------- Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
1 parent 2ad33ab commit edbee27

20 files changed

+707
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
- AWS api-change: Added SerializedRequestEntityTooLargeException to Lambda Invoke API
1010
- AWS api-change: Add Python3.14 (python3.14) and Java 25 (java25) support to AWS Lambda
1111
- AWS api-change: Added support for creating and invoking Tenant Isolated functions in AWS Lambda APIs.
12+
- AWS api-change: Launching Lambda durable functions - a new feature to build reliable multi-step applications and AI workflows natively within the Lambda developer experience.
13+
- AWS api-change: Launching Lambda Managed Instances - a new feature to run Lambda on EC2.
1214

1315
### Dependency bumped
1416

src/Enum/LastUpdateStatusReasonCode.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@
44

55
final class LastUpdateStatusReasonCode
66
{
7+
public const CAPACITY_PROVIDER_SCALING_LIMIT_EXCEEDED = 'CapacityProviderScalingLimitExceeded';
78
public const DISABLED_KMSKEY = 'DisabledKMSKey';
9+
public const EC2REQUEST_LIMIT_EXCEEDED = 'EC2RequestLimitExceeded';
810
public const EFSIOERROR = 'EFSIOError';
911
public const EFSMOUNT_CONNECTIVITY_ERROR = 'EFSMountConnectivityError';
1012
public const EFSMOUNT_FAILURE = 'EFSMountFailure';
1113
public const EFSMOUNT_TIMEOUT = 'EFSMountTimeout';
1214
public const ENI_LIMIT_EXCEEDED = 'EniLimitExceeded';
1315
public const FUNCTION_ERROR = 'FunctionError';
16+
public const FUNCTION_ERROR_EXTENSION_INIT_ERROR = 'FunctionError.ExtensionInitError';
17+
public const FUNCTION_ERROR_INIT_RESOURCE_EXHAUSTED = 'FunctionError.InitResourceExhausted';
18+
public const FUNCTION_ERROR_INIT_TIMEOUT = 'FunctionError.InitTimeout';
19+
public const FUNCTION_ERROR_INVALID_ENTRY_POINT = 'FunctionError.InvalidEntryPoint';
20+
public const FUNCTION_ERROR_INVALID_WORKING_DIRECTORY = 'FunctionError.InvalidWorkingDirectory';
21+
public const FUNCTION_ERROR_PERMISSION_DENIED = 'FunctionError.PermissionDenied';
22+
public const FUNCTION_ERROR_RUNTIME_INIT_ERROR = 'FunctionError.RuntimeInitError';
23+
public const FUNCTION_ERROR_TOO_MANY_EXTENSIONS = 'FunctionError.TooManyExtensions';
1424
public const IMAGE_ACCESS_DENIED = 'ImageAccessDenied';
1525
public const IMAGE_DELETED = 'ImageDeleted';
26+
public const INSUFFICIENT_CAPACITY = 'InsufficientCapacity';
1627
public const INSUFFICIENT_ROLE_PERMISSIONS = 'InsufficientRolePermissions';
1728
public const INTERNAL_ERROR = 'InternalError';
1829
public const INVALID_CONFIGURATION = 'InvalidConfiguration';
@@ -25,19 +36,31 @@ final class LastUpdateStatusReasonCode
2536
public const KMSKEY_ACCESS_DENIED = 'KMSKeyAccessDenied';
2637
public const KMSKEY_NOT_FOUND = 'KMSKeyNotFound';
2738
public const SUBNET_OUT_OF_IPADDRESSES = 'SubnetOutOfIPAddresses';
39+
public const VCPU_LIMIT_EXCEEDED = 'VcpuLimitExceeded';
2840

2941
public static function exists(string $value): bool
3042
{
3143
return isset([
44+
self::CAPACITY_PROVIDER_SCALING_LIMIT_EXCEEDED => true,
3245
self::DISABLED_KMSKEY => true,
46+
self::EC2REQUEST_LIMIT_EXCEEDED => true,
3347
self::EFSIOERROR => true,
3448
self::EFSMOUNT_CONNECTIVITY_ERROR => true,
3549
self::EFSMOUNT_FAILURE => true,
3650
self::EFSMOUNT_TIMEOUT => true,
3751
self::ENI_LIMIT_EXCEEDED => true,
3852
self::FUNCTION_ERROR => true,
53+
self::FUNCTION_ERROR_EXTENSION_INIT_ERROR => true,
54+
self::FUNCTION_ERROR_INIT_RESOURCE_EXHAUSTED => true,
55+
self::FUNCTION_ERROR_INIT_TIMEOUT => true,
56+
self::FUNCTION_ERROR_INVALID_ENTRY_POINT => true,
57+
self::FUNCTION_ERROR_INVALID_WORKING_DIRECTORY => true,
58+
self::FUNCTION_ERROR_PERMISSION_DENIED => true,
59+
self::FUNCTION_ERROR_RUNTIME_INIT_ERROR => true,
60+
self::FUNCTION_ERROR_TOO_MANY_EXTENSIONS => true,
3961
self::IMAGE_ACCESS_DENIED => true,
4062
self::IMAGE_DELETED => true,
63+
self::INSUFFICIENT_CAPACITY => true,
4164
self::INSUFFICIENT_ROLE_PERMISSIONS => true,
4265
self::INTERNAL_ERROR => true,
4366
self::INVALID_CONFIGURATION => true,
@@ -50,6 +73,7 @@ public static function exists(string $value): bool
5073
self::KMSKEY_ACCESS_DENIED => true,
5174
self::KMSKEY_NOT_FOUND => true,
5275
self::SUBNET_OUT_OF_IPADDRESSES => true,
76+
self::VCPU_LIMIT_EXCEEDED => true,
5377
][$value]);
5478
}
5579
}

src/Enum/State.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
final class State
66
{
77
public const ACTIVE = 'Active';
8+
public const ACTIVE_NON_INVOCABLE = 'ActiveNonInvocable';
9+
public const DEACTIVATED = 'Deactivated';
10+
public const DEACTIVATING = 'Deactivating';
11+
public const DELETING = 'Deleting';
812
public const FAILED = 'Failed';
913
public const INACTIVE = 'Inactive';
1014
public const PENDING = 'Pending';
@@ -13,6 +17,10 @@ public static function exists(string $value): bool
1317
{
1418
return isset([
1519
self::ACTIVE => true,
20+
self::ACTIVE_NON_INVOCABLE => true,
21+
self::DEACTIVATED => true,
22+
self::DEACTIVATING => true,
23+
self::DELETING => true,
1624
self::FAILED => true,
1725
self::INACTIVE => true,
1826
self::PENDING => true,

src/Enum/StateReasonCode.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,29 @@
44

55
final class StateReasonCode
66
{
7+
public const CAPACITY_PROVIDER_SCALING_LIMIT_EXCEEDED = 'CapacityProviderScalingLimitExceeded';
78
public const CREATING = 'Creating';
89
public const DISABLED_KMSKEY = 'DisabledKMSKey';
10+
public const DRAINING_DURABLE_EXECUTIONS = 'DrainingDurableExecutions';
11+
public const EC2REQUEST_LIMIT_EXCEEDED = 'EC2RequestLimitExceeded';
912
public const EFSIOERROR = 'EFSIOError';
1013
public const EFSMOUNT_CONNECTIVITY_ERROR = 'EFSMountConnectivityError';
1114
public const EFSMOUNT_FAILURE = 'EFSMountFailure';
1215
public const EFSMOUNT_TIMEOUT = 'EFSMountTimeout';
1316
public const ENI_LIMIT_EXCEEDED = 'EniLimitExceeded';
1417
public const FUNCTION_ERROR = 'FunctionError';
18+
public const FUNCTION_ERROR_EXTENSION_INIT_ERROR = 'FunctionError.ExtensionInitError';
19+
public const FUNCTION_ERROR_INIT_RESOURCE_EXHAUSTED = 'FunctionError.InitResourceExhausted';
20+
public const FUNCTION_ERROR_INIT_TIMEOUT = 'FunctionError.InitTimeout';
21+
public const FUNCTION_ERROR_INVALID_ENTRY_POINT = 'FunctionError.InvalidEntryPoint';
22+
public const FUNCTION_ERROR_INVALID_WORKING_DIRECTORY = 'FunctionError.InvalidWorkingDirectory';
23+
public const FUNCTION_ERROR_PERMISSION_DENIED = 'FunctionError.PermissionDenied';
24+
public const FUNCTION_ERROR_RUNTIME_INIT_ERROR = 'FunctionError.RuntimeInitError';
25+
public const FUNCTION_ERROR_TOO_MANY_EXTENSIONS = 'FunctionError.TooManyExtensions';
1526
public const IDLE = 'Idle';
1627
public const IMAGE_ACCESS_DENIED = 'ImageAccessDenied';
1728
public const IMAGE_DELETED = 'ImageDeleted';
29+
public const INSUFFICIENT_CAPACITY = 'InsufficientCapacity';
1830
public const INSUFFICIENT_ROLE_PERMISSIONS = 'InsufficientRolePermissions';
1931
public const INTERNAL_ERROR = 'InternalError';
2032
public const INVALID_CONFIGURATION = 'InvalidConfiguration';
@@ -28,21 +40,34 @@ final class StateReasonCode
2840
public const KMSKEY_NOT_FOUND = 'KMSKeyNotFound';
2941
public const RESTORING = 'Restoring';
3042
public const SUBNET_OUT_OF_IPADDRESSES = 'SubnetOutOfIPAddresses';
43+
public const VCPU_LIMIT_EXCEEDED = 'VcpuLimitExceeded';
3144

3245
public static function exists(string $value): bool
3346
{
3447
return isset([
48+
self::CAPACITY_PROVIDER_SCALING_LIMIT_EXCEEDED => true,
3549
self::CREATING => true,
3650
self::DISABLED_KMSKEY => true,
51+
self::DRAINING_DURABLE_EXECUTIONS => true,
52+
self::EC2REQUEST_LIMIT_EXCEEDED => true,
3753
self::EFSIOERROR => true,
3854
self::EFSMOUNT_CONNECTIVITY_ERROR => true,
3955
self::EFSMOUNT_FAILURE => true,
4056
self::EFSMOUNT_TIMEOUT => true,
4157
self::ENI_LIMIT_EXCEEDED => true,
4258
self::FUNCTION_ERROR => true,
59+
self::FUNCTION_ERROR_EXTENSION_INIT_ERROR => true,
60+
self::FUNCTION_ERROR_INIT_RESOURCE_EXHAUSTED => true,
61+
self::FUNCTION_ERROR_INIT_TIMEOUT => true,
62+
self::FUNCTION_ERROR_INVALID_ENTRY_POINT => true,
63+
self::FUNCTION_ERROR_INVALID_WORKING_DIRECTORY => true,
64+
self::FUNCTION_ERROR_PERMISSION_DENIED => true,
65+
self::FUNCTION_ERROR_RUNTIME_INIT_ERROR => true,
66+
self::FUNCTION_ERROR_TOO_MANY_EXTENSIONS => true,
4367
self::IDLE => true,
4468
self::IMAGE_ACCESS_DENIED => true,
4569
self::IMAGE_DELETED => true,
70+
self::INSUFFICIENT_CAPACITY => true,
4671
self::INSUFFICIENT_ROLE_PERMISSIONS => true,
4772
self::INTERNAL_ERROR => true,
4873
self::INVALID_CONFIGURATION => true,
@@ -56,6 +81,7 @@ public static function exists(string $value): bool
5681
self::KMSKEY_NOT_FOUND => true,
5782
self::RESTORING => true,
5883
self::SUBNET_OUT_OF_IPADDRESSES => true,
84+
self::VCPU_LIMIT_EXCEEDED => true,
5985
][$value]);
6086
}
6187
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 durable execution with the specified name has already been started. Each durable execution name must be unique
10+
* within the function. Use a different name or check the status of the existing execution.
11+
*/
12+
final class DurableExecutionAlreadyStartedException extends ClientException
13+
{
14+
/**
15+
* The exception type.
16+
*
17+
* @var string|null
18+
*/
19+
private $type;
20+
21+
public function getType(): ?string
22+
{
23+
return $this->type;
24+
}
25+
26+
protected function populateResult(ResponseInterface $response): void
27+
{
28+
$data = $response->toArray(false);
29+
30+
$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
31+
}
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 function has no published versions available.
10+
*/
11+
final class NoPublishedVersionException extends ClientException
12+
{
13+
/**
14+
* The exception type.
15+
*
16+
* @var string|null
17+
*/
18+
private $type;
19+
20+
public function getType(): ?string
21+
{
22+
return $this->type;
23+
}
24+
25+
protected function populateResult(ResponseInterface $response): void
26+
{
27+
$data = $response->toArray(false);
28+
29+
$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
30+
}
31+
}

src/Exception/SerializedRequestEntityTooLargeException.php

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

88
/**
9-
* The processed request payload exceeded the `Invoke` request body size limit for asynchronous invocations. While the
10-
* event payload may be under 1 MB, the size after internal serialization exceeds the maximum allowed size for
11-
* asynchronous invocations.
9+
* The request payload exceeded the maximum allowed size for serialized request entities.
1210
*/
1311
final class SerializedRequestEntityTooLargeException extends ClientException
1412
{

src/Input/InvocationRequest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ final class InvocationRequest extends Input
5757
*/
5858
private $clientContext;
5959

60+
/**
61+
* Optional unique name for the durable execution. When you start your special function, you can give it a unique name
62+
* to identify this specific execution. It's like giving a nickname to a task.
63+
*
64+
* @var string|null
65+
*/
66+
private $durableExecutionName;
67+
6068
/**
6169
* The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous
6270
* invocations and 1 MB for asynchronous invocations.
@@ -88,6 +96,7 @@ final class InvocationRequest extends Input
8896
* InvocationType?: InvocationType::*|null,
8997
* LogType?: LogType::*|null,
9098
* ClientContext?: string|null,
99+
* DurableExecutionName?: string|null,
91100
* Payload?: string|null,
92101
* Qualifier?: string|null,
93102
* TenantId?: string|null,
@@ -100,6 +109,7 @@ public function __construct(array $input = [])
100109
$this->invocationType = $input['InvocationType'] ?? null;
101110
$this->logType = $input['LogType'] ?? null;
102111
$this->clientContext = $input['ClientContext'] ?? null;
112+
$this->durableExecutionName = $input['DurableExecutionName'] ?? null;
103113
$this->payload = $input['Payload'] ?? null;
104114
$this->qualifier = $input['Qualifier'] ?? null;
105115
$this->tenantId = $input['TenantId'] ?? null;
@@ -112,6 +122,7 @@ public function __construct(array $input = [])
112122
* InvocationType?: InvocationType::*|null,
113123
* LogType?: LogType::*|null,
114124
* ClientContext?: string|null,
125+
* DurableExecutionName?: string|null,
115126
* Payload?: string|null,
116127
* Qualifier?: string|null,
117128
* TenantId?: string|null,
@@ -128,6 +139,11 @@ public function getClientContext(): ?string
128139
return $this->clientContext;
129140
}
130141

142+
public function getDurableExecutionName(): ?string
143+
{
144+
return $this->durableExecutionName;
145+
}
146+
131147
public function getFunctionName(): ?string
132148
{
133149
return $this->functionName;
@@ -189,6 +205,9 @@ public function request(): Request
189205
if (null !== $this->clientContext) {
190206
$headers['X-Amz-Client-Context'] = $this->clientContext;
191207
}
208+
if (null !== $this->durableExecutionName) {
209+
$headers['X-Amz-Durable-Execution-Name'] = $this->durableExecutionName;
210+
}
192211
if (null !== $this->tenantId) {
193212
$headers['X-Amz-Tenant-Id'] = $this->tenantId;
194213
}
@@ -221,6 +240,13 @@ public function setClientContext(?string $value): self
221240
return $this;
222241
}
223242

243+
public function setDurableExecutionName(?string $value): self
244+
{
245+
$this->durableExecutionName = $value;
246+
247+
return $this;
248+
}
249+
224250
public function setFunctionName(?string $value): self
225251
{
226252
$this->functionName = $value;

0 commit comments

Comments
 (0)