@reventlessdev/rescript-aws-sdk 3.0.0-alpha.3 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/package.json +3 -2
- package/src/Lambda.res +150 -0
- package/src/Lambda.res.mjs +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.5 (2026-08-09)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **seed-aws:** hold and recycle a stack's runtimes so a reset stays empty ([4baaa38](https://github.com/ReventlessDev/reventless-core/commit/4baaa3827ef30a0adccdef5d2bccc688e7b6686f))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# 3.0.0-alpha.4 (2026-08-05)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package @reventlessdev/rescript-aws-sdk
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 3.0.0-alpha.3 (2026-08-03)
|
|
7
22
|
|
|
8
23
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-aws-sdk",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.5",
|
|
4
4
|
"description": "ReScript bindings for aws-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"@aws-sdk/client-dynamodb": "^3.1033.0",
|
|
10
10
|
"@aws-sdk/client-ecs": "^3.1033.0",
|
|
11
11
|
"@aws-sdk/client-kinesis": "^3.1033.0",
|
|
12
|
+
"@aws-sdk/client-lambda": "^3.1033.0",
|
|
12
13
|
"@aws-sdk/client-location": "^3.970.0",
|
|
13
14
|
"@aws-sdk/client-resource-groups-tagging-api": "^3.1033.0",
|
|
14
15
|
"@aws-sdk/client-s3": "^3.1033.0",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"@aws-sdk/lib-dynamodb": "^3.1033.0",
|
|
20
21
|
"@aws-sdk/lib-storage": "^3.1033.0",
|
|
21
22
|
"@smithy/node-http-handler": "^4.5.3",
|
|
22
|
-
"@reventlessdev/rescript-node": "2.0.0-alpha.
|
|
23
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.2"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"rescript": "12.3.0"
|
package/src/Lambda.res
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*** @aws-sdk/client-lambda
|
|
2
|
+
see: https://docs.aws.amazon.com/lambda/latest/api/Welcome.html
|
|
3
|
+
|
|
4
|
+
Control-plane bindings only — enough to take a function out of service and put
|
|
5
|
+
it back. The seed reset uses them to quiesce a stack's runtimes for the length
|
|
6
|
+
of a wipe: a live runtime that holds state across invocations will write that
|
|
7
|
+
state back over a truncated table, so the wipe has to remove the contention
|
|
8
|
+
rather than race it.
|
|
9
|
+
|
|
10
|
+
Two distinct powers, deliberately kept apart:
|
|
11
|
+
|
|
12
|
+
- `PutFunctionConcurrency`/`DeleteFunctionConcurrency` stop *new* invocations.
|
|
13
|
+
Reserving 0 does not consume account concurrency, and it does not terminate
|
|
14
|
+
an execution environment that already exists — it only stops it being
|
|
15
|
+
invoked again.
|
|
16
|
+
- `UpdateFunctionConfiguration` is what actually discards existing execution
|
|
17
|
+
environments: after a configuration change, later invocations run in new
|
|
18
|
+
ones. That is the documented way to drop whatever a warm container was
|
|
19
|
+
holding; a concurrency change is not.
|
|
20
|
+
|
|
21
|
+
Like `ResourceGroupsTaggingApi` and unlike the memoised clients here, the
|
|
22
|
+
caller passes a client so the region is explicit.
|
|
23
|
+
*/
|
|
24
|
+
type client
|
|
25
|
+
|
|
26
|
+
module Raw = {
|
|
27
|
+
type options = {region?: string}
|
|
28
|
+
@module("@aws-sdk/client-lambda") @new
|
|
29
|
+
external client: (~options: options=?, unit) => client = "LambdaClient"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let client = (~region: option<string>=?, ()): client => Raw.client(~options={region: ?region}, ())
|
|
33
|
+
|
|
34
|
+
/** A function's environment variables, in the shape both the get and the update
|
|
35
|
+
use. `variables` absent and `variables` empty are different: sending an empty
|
|
36
|
+
map on an update CLEARS every variable. */
|
|
37
|
+
type environment = {@as("Variables") variables?: dict<string>}
|
|
38
|
+
|
|
39
|
+
module GetFunctionConfigurationCommand = {
|
|
40
|
+
/*** see: https://docs.aws.amazon.com/lambda/latest/api/API_GetFunctionConfiguration.html */
|
|
41
|
+
|
|
42
|
+
type t
|
|
43
|
+
|
|
44
|
+
type input = {@as("FunctionName") functionName: string}
|
|
45
|
+
|
|
46
|
+
type output = {
|
|
47
|
+
@as("$metadata") metadata: Metadata.t,
|
|
48
|
+
@as("FunctionName") functionName?: string,
|
|
49
|
+
@as("Environment") environment?: environment,
|
|
50
|
+
/** "Successful" | "Failed" | "InProgress" — absent on a function that has
|
|
51
|
+
never been updated. A second update while this reads "InProgress" is
|
|
52
|
+
rejected with ResourceConflictException, so callers poll it. */
|
|
53
|
+
@as("LastUpdateStatus")
|
|
54
|
+
lastUpdateStatus?: string,
|
|
55
|
+
@as("LastUpdateStatusReason") lastUpdateStatusReason?: string,
|
|
56
|
+
@as("State") state?: string,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@new @module("@aws-sdk/client-lambda")
|
|
60
|
+
external make: input => t = "GetFunctionConfigurationCommand"
|
|
61
|
+
|
|
62
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module UpdateFunctionConfigurationCommand = {
|
|
66
|
+
/*** see: https://docs.aws.amazon.com/lambda/latest/api/API_UpdateFunctionConfiguration.html
|
|
67
|
+
|
|
68
|
+
Only the fields a caller sends are changed. Sending `environment` replaces
|
|
69
|
+
the whole variable map, so an update that means to add one variable must
|
|
70
|
+
send the existing ones alongside it. */
|
|
71
|
+
|
|
72
|
+
type t
|
|
73
|
+
|
|
74
|
+
type input = {
|
|
75
|
+
@as("FunctionName") functionName: string,
|
|
76
|
+
@as("Environment") environment?: environment,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type output = {
|
|
80
|
+
@as("$metadata") metadata: Metadata.t,
|
|
81
|
+
@as("FunctionName") functionName?: string,
|
|
82
|
+
@as("LastUpdateStatus") lastUpdateStatus?: string,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@new @module("@aws-sdk/client-lambda")
|
|
86
|
+
external make: input => t = "UpdateFunctionConfigurationCommand"
|
|
87
|
+
|
|
88
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
module GetFunctionConcurrencyCommand = {
|
|
92
|
+
/*** see: https://docs.aws.amazon.com/lambda/latest/api/API_GetFunctionConcurrency.html
|
|
93
|
+
|
|
94
|
+
`reservedConcurrentExecutions` is absent when the function has no reservation
|
|
95
|
+
at all — which is a different state from a reservation of 0, and the one a
|
|
96
|
+
restore has to be able to put back. */
|
|
97
|
+
|
|
98
|
+
type t
|
|
99
|
+
|
|
100
|
+
type input = {@as("FunctionName") functionName: string}
|
|
101
|
+
|
|
102
|
+
type output = {
|
|
103
|
+
@as("$metadata") metadata: Metadata.t,
|
|
104
|
+
@as("ReservedConcurrentExecutions") reservedConcurrentExecutions?: int,
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@new @module("@aws-sdk/client-lambda")
|
|
108
|
+
external make: input => t = "GetFunctionConcurrencyCommand"
|
|
109
|
+
|
|
110
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
module PutFunctionConcurrencyCommand = {
|
|
114
|
+
/*** see: https://docs.aws.amazon.com/lambda/latest/api/API_PutFunctionConcurrency.html */
|
|
115
|
+
|
|
116
|
+
type t
|
|
117
|
+
|
|
118
|
+
type input = {
|
|
119
|
+
@as("FunctionName") functionName: string,
|
|
120
|
+
@as("ReservedConcurrentExecutions") reservedConcurrentExecutions: int,
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type output = {
|
|
124
|
+
@as("$metadata") metadata: Metadata.t,
|
|
125
|
+
@as("ReservedConcurrentExecutions") reservedConcurrentExecutions?: int,
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@new @module("@aws-sdk/client-lambda")
|
|
129
|
+
external make: input => t = "PutFunctionConcurrencyCommand"
|
|
130
|
+
|
|
131
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
module DeleteFunctionConcurrencyCommand = {
|
|
135
|
+
/*** see: https://docs.aws.amazon.com/lambda/latest/api/API_DeleteFunctionConcurrency.html
|
|
136
|
+
|
|
137
|
+
Removes the reservation entirely, returning the function to the account's
|
|
138
|
+
unreserved pool — the restore for a function that had no reservation before. */
|
|
139
|
+
|
|
140
|
+
type t
|
|
141
|
+
|
|
142
|
+
type input = {@as("FunctionName") functionName: string}
|
|
143
|
+
|
|
144
|
+
type output = {@as("$metadata") metadata: Metadata.t}
|
|
145
|
+
|
|
146
|
+
@new @module("@aws-sdk/client-lambda")
|
|
147
|
+
external make: input => t = "DeleteFunctionConcurrencyCommand"
|
|
148
|
+
|
|
149
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
150
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as ClientLambda from "@aws-sdk/client-lambda";
|
|
4
|
+
|
|
5
|
+
let Raw = {};
|
|
6
|
+
|
|
7
|
+
function client(region, param) {
|
|
8
|
+
return new ClientLambda.LambdaClient({
|
|
9
|
+
region: region
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let GetFunctionConfigurationCommand = {};
|
|
14
|
+
|
|
15
|
+
let UpdateFunctionConfigurationCommand = {};
|
|
16
|
+
|
|
17
|
+
let GetFunctionConcurrencyCommand = {};
|
|
18
|
+
|
|
19
|
+
let PutFunctionConcurrencyCommand = {};
|
|
20
|
+
|
|
21
|
+
let DeleteFunctionConcurrencyCommand = {};
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
Raw,
|
|
25
|
+
client,
|
|
26
|
+
GetFunctionConfigurationCommand,
|
|
27
|
+
UpdateFunctionConfigurationCommand,
|
|
28
|
+
GetFunctionConcurrencyCommand,
|
|
29
|
+
PutFunctionConcurrencyCommand,
|
|
30
|
+
DeleteFunctionConcurrencyCommand,
|
|
31
|
+
}
|
|
32
|
+
/* @aws-sdk/client-lambda Not a pure module */
|