@reventlessdev/rescript-pulumi-aws 2.4.0-alpha.80 → 3.0.0-alpha.0
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
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.0 (2026-08-18)
|
|
7
|
+
|
|
8
|
+
* feat(sury)!: migrate to sury 11.0.0-rc.1 ([2cf8969](https://github.com/ReventlessDev/reventless-core/commit/2cf8969a222ce1b775563668a4126cb20611966c))
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **pulumi-aws:** expose recovery actions and M-of-N on metric alarms ([0062155](https://github.com/ReventlessDev/reventless-core/commit/00621553ffc56f29a2395d444e898175ec409cbc))
|
|
12
|
+
|
|
13
|
+
### BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* sury is a direct dependency of the published packages and
|
|
16
|
+
its schema and serialization surface changed; consumers must migrate to
|
|
17
|
+
sury 11.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
6
21
|
# 2.4.0-alpha.80 (2026-08-18)
|
|
7
22
|
|
|
8
23
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-pulumi-aws",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
4
|
"description": "ReScript bindings for @pulumi/aws",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@pulumi/aws": "~7.19.0",
|
|
23
23
|
"@pulumi/aws-native": "^1.62.0",
|
|
24
|
-
"sury": "11.0.0-
|
|
25
|
-
"@reventlessdev/rescript-
|
|
26
|
-
"@reventlessdev/rescript-
|
|
24
|
+
"sury": "11.0.0-rc.1",
|
|
25
|
+
"@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.12",
|
|
26
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"esbuild": "^0.25.12",
|
|
30
30
|
"rescript": "12.3.0",
|
|
31
|
-
"sury-ppx": "11.0.0-
|
|
31
|
+
"sury-ppx": "11.0.0-rc.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"rescript": "12.3.0"
|
|
@@ -13,6 +13,11 @@ type args = {
|
|
|
13
13
|
name?: Pulumi.Input.t<string>,
|
|
14
14
|
comparisonOperator: Pulumi.Input.t<string>,
|
|
15
15
|
evaluationPeriods: Pulumi.Input.t<int>,
|
|
16
|
+
/** How many of the last `evaluationPeriods` datapoints must breach to alarm
|
|
17
|
+
("M out of N"). Defaults to `evaluationPeriods` when omitted, which is the
|
|
18
|
+
all-or-nothing behaviour. Setting it below `evaluationPeriods` is how an
|
|
19
|
+
alarm rides out an isolated blip without going blind to a sustained one. */
|
|
20
|
+
datapointsToAlarm?: Pulumi.Input.t<int>,
|
|
16
21
|
metricName: Pulumi.Input.t<string>,
|
|
17
22
|
namespace: Pulumi.Input.t<string>,
|
|
18
23
|
/** Metric period in seconds. */
|
|
@@ -23,6 +28,12 @@ type args = {
|
|
|
23
28
|
dimensions?: Pulumi.Input.t<Dict.t<string>>,
|
|
24
29
|
treatMissingData?: Pulumi.Input.t<string>,
|
|
25
30
|
alarmActions?: Pulumi.Input.t<array<Pulumi.Input.t<string>>>,
|
|
31
|
+
/** ARNs fired when the alarm returns to OK. Without these a notification
|
|
32
|
+
channel reports every incident and no recovery, so a reader of an ALARM
|
|
33
|
+
message cannot tell an ongoing outage from one that cleared minutes later. */
|
|
34
|
+
okActions?: Pulumi.Input.t<array<Pulumi.Input.t<string>>>,
|
|
35
|
+
/** ARNs fired when the alarm enters INSUFFICIENT_DATA. */
|
|
36
|
+
insufficientDataActions?: Pulumi.Input.t<array<Pulumi.Input.t<string>>>,
|
|
26
37
|
alarmDescription?: Pulumi.Input.t<string>,
|
|
27
38
|
tags?: Pulumi.Input.t<Aws.tags>,
|
|
28
39
|
}
|
|
@@ -124,12 +124,12 @@ type t = policy
|
|
|
124
124
|
|
|
125
125
|
let toJsonString: t => string = t => {
|
|
126
126
|
t
|
|
127
|
-
->S.
|
|
127
|
+
->S.decodeOrThrow(~from=policySchema, ~to=S.json)
|
|
128
128
|
->JSON.stringify(~space=1)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
let fromJsonString: string => t = (policyString: string) =>
|
|
132
|
-
policyString->S.
|
|
132
|
+
policyString->S.decodeOrThrow(~from=S.jsonString, ~to=policySchema)
|
|
133
133
|
|
|
134
134
|
let make = (~version=Version2012, ~id=?, ~statements) => {
|
|
135
135
|
version,
|
|
@@ -1,130 +1,131 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
3
|
import * as S from "sury/src/S.res.mjs";
|
|
4
|
+
import * as Sury from "sury";
|
|
4
5
|
import * as Aws from "@pulumi/aws";
|
|
5
6
|
|
|
6
|
-
let versionSchema =
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
let versionSchema = Sury.union([
|
|
8
|
+
Sury.literal("2008-10-17"),
|
|
9
|
+
Sury.literal("2012-10-17")
|
|
9
10
|
]);
|
|
10
11
|
|
|
11
|
-
let effectSchema =
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
let effectSchema = Sury.union([
|
|
13
|
+
Sury.literal("Allow"),
|
|
14
|
+
Sury.literal("Deny")
|
|
14
15
|
]);
|
|
15
16
|
|
|
16
|
-
let principalEntrySchema =
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
let principalEntrySchema = Sury.union([
|
|
18
|
+
Sury.$schema(s => (s.m(Sury.string))),
|
|
19
|
+
Sury.$schema(s => (s.m(Sury.array(Sury.string))))
|
|
19
20
|
]);
|
|
20
21
|
|
|
21
|
-
let principalSchema =
|
|
22
|
-
AWS: s.m(
|
|
23
|
-
Federated: s.m(
|
|
24
|
-
Service: s.m(
|
|
25
|
-
CanonicalUser: s.m(
|
|
22
|
+
let principalSchema = Sury.$schema(s => ({
|
|
23
|
+
AWS: s.m(Sury.$option(principalEntrySchema)),
|
|
24
|
+
Federated: s.m(Sury.$option(principalEntrySchema)),
|
|
25
|
+
Service: s.m(Sury.$option(principalEntrySchema)),
|
|
26
|
+
CanonicalUser: s.m(Sury.$option(principalEntrySchema))
|
|
26
27
|
}));
|
|
27
28
|
|
|
28
|
-
let principalsSchema =
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
let principalsSchema = Sury.union([
|
|
30
|
+
Sury.literal("*"),
|
|
31
|
+
Sury.$schema(s => (s.m(principalSchema)))
|
|
31
32
|
]);
|
|
32
33
|
|
|
33
|
-
let actionsSchema =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
let actionsSchema = Sury.union([
|
|
35
|
+
Sury.literal("*"),
|
|
36
|
+
Sury.$schema(s => (s.m(Sury.string))),
|
|
37
|
+
Sury.$schema(s => (s.m(Sury.array(Sury.string))))
|
|
37
38
|
]);
|
|
38
39
|
|
|
39
|
-
let resourcesSchema =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
let resourcesSchema = Sury.union([
|
|
41
|
+
Sury.literal("*"),
|
|
42
|
+
Sury.$schema(s => (s.m(Sury.string))),
|
|
43
|
+
Sury.$schema(s => (s.m(Sury.array(Sury.string))))
|
|
43
44
|
]);
|
|
44
45
|
|
|
45
|
-
let conditionEntrySchema =
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
let conditionEntrySchema = Sury.union([
|
|
47
|
+
Sury.$schema(s => (s.m(Sury.string))),
|
|
48
|
+
Sury.$schema(s => (s.m(Sury.array(Sury.string))))
|
|
48
49
|
]);
|
|
49
50
|
|
|
50
|
-
let conditionMapSchema =
|
|
51
|
-
|
|
52
|
-
let conditionSchema =
|
|
53
|
-
StringEquals: s.m(
|
|
54
|
-
StringNotEquals: s.m(
|
|
55
|
-
StringEqualsIgnoreCase: s.m(
|
|
56
|
-
StringNotEqualsIgnoreCase: s.m(
|
|
57
|
-
StringLike: s.m(
|
|
58
|
-
StringNotLike: s.m(
|
|
59
|
-
NumericEquals: s.m(
|
|
60
|
-
NumericNotEquals: s.m(
|
|
61
|
-
NumericLessThan: s.m(
|
|
62
|
-
NumericLessThanEquals: s.m(
|
|
63
|
-
NumericGreaterThan: s.m(
|
|
64
|
-
NumericGreaterThanEquals: s.m(
|
|
65
|
-
DateEquals: s.m(
|
|
66
|
-
DateNotEquals: s.m(
|
|
67
|
-
DateLessThan: s.m(
|
|
68
|
-
DateLessThanEquals: s.m(
|
|
69
|
-
DateGreaterThan: s.m(
|
|
70
|
-
DateGreaterThanEquals: s.m(
|
|
71
|
-
Bool: s.m(
|
|
72
|
-
Binary: s.m(
|
|
73
|
-
ArnEquals: s.m(
|
|
74
|
-
ArnLike: s.m(
|
|
75
|
-
ArnNotEquals: s.m(
|
|
76
|
-
ArnNotLike: s.m(
|
|
77
|
-
StringEqualsIfExists: s.m(
|
|
78
|
-
StringNotEqualsIfExists: s.m(
|
|
79
|
-
StringEqualsIgnoreCaseIfExists: s.m(
|
|
80
|
-
StringNotEqualsIgnoreCaseIfExists: s.m(
|
|
81
|
-
StringLikeIfExists: s.m(
|
|
82
|
-
StringNotLikeIfExists: s.m(
|
|
83
|
-
NumericEqualsIfExists: s.m(
|
|
84
|
-
NumericNotEqualsIfExists: s.m(
|
|
85
|
-
NumericLessThanIfExists: s.m(
|
|
86
|
-
NumericLessThanEqualsIfExists: s.m(
|
|
87
|
-
NumericGreaterThanIfExists: s.m(
|
|
88
|
-
NumericGreaterThanEqualsIfExists: s.m(
|
|
89
|
-
DateEqualsIfExists: s.m(
|
|
90
|
-
DateNotEqualsIfExists: s.m(
|
|
91
|
-
DateLessThanIfExists: s.m(
|
|
92
|
-
DateLessThanEqualsIfExists: s.m(
|
|
93
|
-
DateGreaterThanIfExists: s.m(
|
|
94
|
-
DateGreaterThanEqualsIfExists: s.m(
|
|
95
|
-
BoolIfExists: s.m(
|
|
96
|
-
BinaryIfExists: s.m(
|
|
97
|
-
ArnEqualsIfExists: s.m(
|
|
98
|
-
ArnLikeIfExists: s.m(
|
|
99
|
-
ArnNotEqualsIfExists: s.m(
|
|
100
|
-
ArnNotLikeIfExists: s.m(
|
|
101
|
-
Null: s.m(
|
|
51
|
+
let conditionMapSchema = Sury.dict(conditionEntrySchema);
|
|
52
|
+
|
|
53
|
+
let conditionSchema = Sury.$schema(s => ({
|
|
54
|
+
StringEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
55
|
+
StringNotEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
56
|
+
StringEqualsIgnoreCase: s.m(Sury.$option(conditionMapSchema)),
|
|
57
|
+
StringNotEqualsIgnoreCase: s.m(Sury.$option(conditionMapSchema)),
|
|
58
|
+
StringLike: s.m(Sury.$option(conditionMapSchema)),
|
|
59
|
+
StringNotLike: s.m(Sury.$option(conditionMapSchema)),
|
|
60
|
+
NumericEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
61
|
+
NumericNotEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
62
|
+
NumericLessThan: s.m(Sury.$option(conditionMapSchema)),
|
|
63
|
+
NumericLessThanEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
64
|
+
NumericGreaterThan: s.m(Sury.$option(conditionMapSchema)),
|
|
65
|
+
NumericGreaterThanEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
66
|
+
DateEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
67
|
+
DateNotEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
68
|
+
DateLessThan: s.m(Sury.$option(conditionMapSchema)),
|
|
69
|
+
DateLessThanEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
70
|
+
DateGreaterThan: s.m(Sury.$option(conditionMapSchema)),
|
|
71
|
+
DateGreaterThanEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
72
|
+
Bool: s.m(Sury.$option(conditionMapSchema)),
|
|
73
|
+
Binary: s.m(Sury.$option(conditionMapSchema)),
|
|
74
|
+
ArnEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
75
|
+
ArnLike: s.m(Sury.$option(conditionMapSchema)),
|
|
76
|
+
ArnNotEquals: s.m(Sury.$option(conditionMapSchema)),
|
|
77
|
+
ArnNotLike: s.m(Sury.$option(conditionMapSchema)),
|
|
78
|
+
StringEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
79
|
+
StringNotEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
80
|
+
StringEqualsIgnoreCaseIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
81
|
+
StringNotEqualsIgnoreCaseIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
82
|
+
StringLikeIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
83
|
+
StringNotLikeIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
84
|
+
NumericEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
85
|
+
NumericNotEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
86
|
+
NumericLessThanIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
87
|
+
NumericLessThanEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
88
|
+
NumericGreaterThanIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
89
|
+
NumericGreaterThanEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
90
|
+
DateEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
91
|
+
DateNotEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
92
|
+
DateLessThanIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
93
|
+
DateLessThanEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
94
|
+
DateGreaterThanIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
95
|
+
DateGreaterThanEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
96
|
+
BoolIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
97
|
+
BinaryIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
98
|
+
ArnEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
99
|
+
ArnLikeIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
100
|
+
ArnNotEqualsIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
101
|
+
ArnNotLikeIfExists: s.m(Sury.$option(conditionMapSchema)),
|
|
102
|
+
Null: s.m(Sury.$option(conditionMapSchema))
|
|
102
103
|
}));
|
|
103
104
|
|
|
104
|
-
let statementSchema =
|
|
105
|
-
Sid: s.m(
|
|
106
|
-
Principal: s.m(
|
|
107
|
-
NotPrincipal: s.m(
|
|
105
|
+
let statementSchema = Sury.$schema(s => ({
|
|
106
|
+
Sid: s.m(Sury.$option(Sury.string)),
|
|
107
|
+
Principal: s.m(Sury.$option(principalsSchema)),
|
|
108
|
+
NotPrincipal: s.m(Sury.$option(principalsSchema)),
|
|
108
109
|
Effect: s.m(effectSchema),
|
|
109
|
-
Action: s.m(
|
|
110
|
-
NotAction: s.m(
|
|
111
|
-
Resource: s.m(
|
|
112
|
-
NotResource: s.m(
|
|
113
|
-
Condition: s.m(
|
|
110
|
+
Action: s.m(Sury.$option(actionsSchema)),
|
|
111
|
+
NotAction: s.m(Sury.$option(actionsSchema)),
|
|
112
|
+
Resource: s.m(Sury.$option(resourcesSchema)),
|
|
113
|
+
NotResource: s.m(Sury.$option(resourcesSchema)),
|
|
114
|
+
Condition: s.m(Sury.$option(conditionSchema))
|
|
114
115
|
}));
|
|
115
116
|
|
|
116
|
-
let policySchema =
|
|
117
|
+
let policySchema = Sury.$schema(s => ({
|
|
117
118
|
Version: s.m(versionSchema),
|
|
118
|
-
Id: s.m(
|
|
119
|
-
Statement: s.m(
|
|
119
|
+
Id: s.m(Sury.$option(Sury.string)),
|
|
120
|
+
Statement: s.m(Sury.array(statementSchema))
|
|
120
121
|
}));
|
|
121
122
|
|
|
122
123
|
function toJsonString(t) {
|
|
123
|
-
return JSON.stringify(S.
|
|
124
|
+
return JSON.stringify(S.decodeOrThrow(t, policySchema, Sury.json), undefined, 1);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
function fromJsonString(policyString) {
|
|
127
|
-
return S.
|
|
128
|
+
return S.decodeOrThrow(policyString, Sury.jsonString, policySchema);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
function make(versionOpt, id, statements) {
|