nomoss 0.0.3 → 0.0.4
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 +27 -0
- package/README.md +5 -15
- package/ROADMAP.md +2 -0
- package/docs/README.md +1 -1
- package/docs/application/aws-resource-coverage.md +26 -0
- package/docs/application/aws-resource-lifecycle-management.md +13 -23
- package/docs/application/cli-workflow.md +1 -1
- package/docs/application/engine-design.md +2 -2
- package/docs/application/generation-architecture.md +10 -45
- package/docs/application/resource-command-policy-stage.md +2 -2
- package/docs/application/resource-graph.md +1 -1
- package/docs/application/resource-lifecycle-tracker.md +1 -9
- package/docs/application/resource-mapping.md +4 -9
- package/docs/application/resource-operations.md +4 -2
- package/docs/application/tracing.md +2 -6
- package/docs/development/code-documentation.md +2 -0
- package/docs/development/effect-native-development.md +44 -0
- package/docs/development/linting.md +1 -1
- package/docs/development/review-code.md +22 -6
- package/docs/development/review-remediation-spec.md +28 -37
- package/docs/development/spec-writing.md +1 -1
- package/docs/development/testing.md +23 -9
- package/docs/operations/observability-sop.md +11 -17
- package/docs/operations/releasing.md +3 -1
- package/examples/README.md +3 -26
- package/examples/commands.ts +2 -36
- package/examples/queue/application.ts +8 -2
- package/examples/state-machine/application.ts +3 -1
- package/package.json +40 -46
- package/providers/aws/README.md +21 -0
- package/providers/aws/awsEnvironment.ts +114 -0
- package/providers/aws/generated/managementRegistry.ts +136 -0
- package/{src/providers/aws/resources/generated/native/apigatewayv2/api/index.ts → providers/aws/generated/resources/apigatewayv2/api.ts} +13 -50
- package/{src/providers/aws/resources/generated/native/apigatewayv2/integration/index.ts → providers/aws/generated/resources/apigatewayv2/integration.ts} +13 -37
- package/{src/providers/aws/resources/generated/native/apigatewayv2/route/index.ts → providers/aws/generated/resources/apigatewayv2/route.ts} +23 -40
- package/{src/providers/aws/resources/generated/native/apigatewayv2/stage/index.ts → providers/aws/generated/resources/apigatewayv2/stage.ts} +13 -38
- package/providers/aws/generated/resources/iam/accesskey.ts +184 -0
- package/{src/providers/aws/resources/generated/native/iam/group/index.ts → providers/aws/generated/resources/iam/group.ts} +13 -38
- package/{src/providers/aws/resources/generated/native/iam/grouppolicy/index.ts → providers/aws/generated/resources/iam/grouppolicy.ts} +29 -59
- package/{src/providers/aws/resources/generated/native/iam/instanceprofile/index.ts → providers/aws/generated/resources/iam/instanceprofile.ts} +13 -41
- package/{src/providers/aws/resources/generated/native/iam/managedpolicy/index.ts → providers/aws/generated/resources/iam/managedpolicy.ts} +13 -95
- package/providers/aws/generated/resources/iam/oidcprovider.ts +314 -0
- package/{src/providers/aws/resources/generated/native/iam/policy/index.ts → providers/aws/generated/resources/iam/policy.ts} +13 -28
- package/{src/providers/aws/resources/generated/native/iam/role/index.ts → providers/aws/generated/resources/iam/role.ts} +13 -47
- package/{src/providers/aws/resources/generated/native/iam/rolepolicy/index.ts → providers/aws/generated/resources/iam/rolepolicy.ts} +29 -59
- package/providers/aws/generated/resources/iam/samlprovider.ts +463 -0
- package/providers/aws/generated/resources/iam/servercertificate.ts +465 -0
- package/providers/aws/generated/resources/iam/servicelinkedrole.ts +187 -0
- package/{src/providers/aws/resources/generated/native/iam/user/index.ts → providers/aws/generated/resources/iam/user.ts} +13 -38
- package/{src/providers/aws/resources/generated/native/iam/userpolicy/index.ts → providers/aws/generated/resources/iam/userpolicy.ts} +29 -59
- package/{src/providers/aws/resources/generated/native/iam/usertogroupaddition/index.ts → providers/aws/generated/resources/iam/usertogroupaddition.ts} +13 -27
- package/providers/aws/generated/resources/iam/virtualmfadevice.ts +298 -0
- package/{src/providers/aws/resources/generated/native/kms/key/index.ts → providers/aws/generated/resources/kms/key.ts} +13 -41
- package/{src/providers/aws/resources/generated/native/lambda/function/index.ts → providers/aws/generated/resources/lambda/function.ts} +13 -63
- package/{src/providers/aws/resources/generated/native/lambda/permission/index.ts → providers/aws/generated/resources/lambda/permission.ts} +13 -55
- package/{src/providers/aws/resources/generated/native/s3/bucket/index.ts → providers/aws/generated/resources/s3/bucket.ts} +14 -104
- package/{src/providers/aws/resources/generated/native/sns/topic/index.ts → providers/aws/generated/resources/sns/topic.ts} +14 -29
- package/{src/providers/aws/resources/generated/native/sqs/queue/index.ts → providers/aws/generated/resources/sqs/queue.ts} +14 -38
- package/{src/providers/aws/resources/generated/native/stepfunctions/statemachine/index.ts → providers/aws/generated/resources/stepfunctions/statemachine.ts} +15 -58
- package/providers/aws/management/mappings/iam/group.ts +63 -0
- package/providers/aws/management/mappings/iam/iamIdentity.ts +41 -0
- package/providers/aws/management/mappings/iam/iamLifecycleSettings.ts +8 -0
- package/providers/aws/management/mappings/iam/inlinePolicies.ts +159 -0
- package/providers/aws/management/mappings/iam/instanceProfile.ts +77 -0
- package/providers/aws/management/mappings/iam/oidcProvider.ts +94 -0
- package/providers/aws/management/mappings/iam/role.ts +74 -0
- package/providers/aws/management/mappings/iam/samlProvider.ts +98 -0
- package/providers/aws/management/mappings/iam/serverCertificate.ts +72 -0
- package/providers/aws/management/mappings/iam/user.ts +61 -0
- package/providers/aws/management/mappings/iam/userToGroupAddition.ts +75 -0
- package/providers/aws/management/operations/iam/accessKey.ts +206 -0
- package/providers/aws/management/operations/iam/managedPolicy.ts +491 -0
- package/providers/aws/management/operations/iam/policy.ts +476 -0
- package/providers/aws/management/operations/iam/serviceLinkedRole.ts +172 -0
- package/providers/aws/management/operations/iam/virtualMfaDevice.ts +253 -0
- package/providers/aws/management/resourceAssociationConfiguration.ts +112 -0
- package/providers/aws/management/resourceAssociationRegistration.ts +349 -0
- package/providers/aws/management/resourceAssociations.ts +168 -0
- package/{src/providers → providers}/aws/management/resourceConfiguration.ts +24 -26
- package/providers/aws/management/resourceLifecycleRegistration.ts +540 -0
- package/providers/aws/management/resourceManagementModule.ts +31 -0
- package/providers/aws/management/resourceManagementRegistry.ts +62 -0
- package/providers/aws/management/resourceMapping.ts +84 -0
- package/providers/aws/management/resourceOperation.ts +134 -0
- package/providers/aws/management/resourceTagOperations.ts +108 -0
- package/providers/aws/management/resourceTiming.ts +4 -0
- package/providers/aws/runtime.ts +52 -0
- package/src/core/resource/resourceCommandPolicy.ts +20 -0
- package/src/core/resource/resourceLifecycle.ts +644 -0
- package/src/core/resource/resourceStabilization.ts +120 -0
- package/src/core/resource/resourceVersions.ts +102 -0
- package/src/core/stack/planner.ts +9 -0
- package/src/core/stack/resourceStackLifecycle.ts +36 -3
- package/src/core/state/resourceState.ts +6 -4
- package/src/core/state/stateStore.ts +57 -10
- package/src/providers/file/resourcePolicy.ts +13 -12
- package/src/providers/providerRuntimeLayer.ts +5 -2
- package/src/providers/resourceCommandPolicyLayer.ts +117 -37
- package/src/providers/stripe/management/resourcePolicy.ts +22 -11
- package/examples/http-echo/application.ts +0 -87
- package/src/providers/aws/client/awsClient.ts +0 -418
- package/src/providers/aws/client/awsClientConfig.ts +0 -133
- package/src/providers/aws/client/awsClientModel.ts +0 -119
- package/src/providers/aws/client/awsHttpOperation.ts +0 -153
- package/src/providers/aws/client/awsQueryOperation.ts +0 -149
- package/src/providers/aws/client/awsRequestSigner.ts +0 -115
- package/src/providers/aws/client/awsResponseDecoder.ts +0 -135
- package/src/providers/aws/client/awsRetryPolicy.ts +0 -62
- package/src/providers/aws/client/generated/apiGatewayV2.ts +0 -3025
- package/src/providers/aws/client/generated/cloudControl.ts +0 -5746
- package/src/providers/aws/client/generated/iam.ts +0 -10892
- package/src/providers/aws/client/generated/lambda.ts +0 -5403
- package/src/providers/aws/client/generated/sqs.ts +0 -3769
- package/src/providers/aws/client/generated/stepFunctions.ts +0 -1726
- package/src/providers/aws/client/openapi/cloudControl/CancelResourceRequest.json +0 -579
- package/src/providers/aws/client/openapi/cloudControl/CreateResource.json +0 -1019
- package/src/providers/aws/client/openapi/cloudControl/DeleteResource.json +0 -1018
- package/src/providers/aws/client/openapi/cloudControl/GetResource.json +0 -883
- package/src/providers/aws/client/openapi/cloudControl/GetResourceRequestStatus.json +0 -655
- package/src/providers/aws/client/openapi/cloudControl/ListResourceRequests.json +0 -566
- package/src/providers/aws/client/openapi/cloudControl/ListResources.json +0 -913
- package/src/providers/aws/client/openapi/cloudControl/UpdateResource.json +0 -1027
- package/src/providers/aws/cloudControl/client.ts +0 -69
- package/src/providers/aws/cloudControl/requestTracker.ts +0 -138
- package/src/providers/aws/cloudControl/resourceCommandPolicyLayer.ts +0 -63
- package/src/providers/aws/cloudControl/resourceLifecycle.ts +0 -479
- package/src/providers/aws/cloudControl/resources/generated/certificatemanager/certificate/index.ts +0 -179
- package/src/providers/aws/cloudControl/resources/generated/kms/key/index.ts +0 -362
- package/src/providers/aws/cloudControl/resources/generated/s3/bucket/index.ts +0 -2364
- package/src/providers/aws/cloudControl/resources/generated/sns/topic/index.ts +0 -326
- package/src/providers/aws/cloudControl/resources/generated/sqs/queue/index.ts +0 -307
- package/src/providers/aws/cloudControl/resources/generated/sqs/queueinlinepolicy/index.ts +0 -108
- package/src/providers/aws/cloudControl/runtime.ts +0 -127
- package/src/providers/aws/management/resourceMapping.ts +0 -343
- package/src/providers/aws/management/resourceOperation.ts +0 -57
- package/src/providers/aws/management/resourcePolicy.ts +0 -549
- package/src/providers/aws/management/resourceRegistration.ts +0 -294
- package/src/providers/aws/resources/apiGatewayV2/httpApi.ts +0 -327
- package/src/providers/aws/resources/generated/native/resourceCommands.ts +0 -152
- package/src/providers/aws/resources/iam/grant.ts +0 -150
- package/src/providers/aws/resources/iam/grantCommands.ts +0 -283
- package/src/providers/aws/resources/iam/policyDocument.ts +0 -30
- package/src/providers/aws/resources/iam/policyStatement.ts +0 -59
- package/src/providers/aws/resources/iam/role.ts +0 -426
- package/src/providers/aws/resources/iam/roleDeclaration.ts +0 -105
- package/src/providers/aws/resources/lambda/function.ts +0 -403
- package/src/providers/aws/resources/lambda/functionDeclaration.ts +0 -234
- package/src/providers/aws/resources/lambda/permission.ts +0 -363
- package/src/providers/aws/resources/stepFunctions/stateMachine.ts +0 -95
- package/src/providers/aws/runtime.ts +0 -70
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
// Generated from the CloudFormation Registry resource schema. Do not edit.
|
|
2
|
+
// biome-ignore-all lint/complexity/useRegexLiterals: Preserve Effect's generated regular expressions.
|
|
3
|
+
import { Effect, Schema } from "effect";
|
|
4
|
+
import {
|
|
5
|
+
annotateResourceSchema,
|
|
6
|
+
ResourceEntity,
|
|
7
|
+
ResourceGraphBuilder,
|
|
8
|
+
type ResourceKey,
|
|
9
|
+
ResourceSchemaAnnotationSchema,
|
|
10
|
+
} from "nomoss/core";
|
|
11
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
12
|
+
|
|
13
|
+
interface Tag {
|
|
14
|
+
readonly Value: string;
|
|
15
|
+
readonly Key: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const Tag = Schema.Struct({
|
|
19
|
+
Value: Schema.String.annotate({
|
|
20
|
+
description:
|
|
21
|
+
"The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
|
|
22
|
+
})
|
|
23
|
+
.check(
|
|
24
|
+
Schema.isMinLength(1).annotate({
|
|
25
|
+
expected: "a value with a length of at least 1",
|
|
26
|
+
}),
|
|
27
|
+
)
|
|
28
|
+
.check(
|
|
29
|
+
Schema.isMaxCodePoints(256).annotate({
|
|
30
|
+
expected: "a string with at most 256 code points",
|
|
31
|
+
}),
|
|
32
|
+
),
|
|
33
|
+
Key: Schema.String.annotate({
|
|
34
|
+
description:
|
|
35
|
+
"The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
|
|
36
|
+
})
|
|
37
|
+
.check(
|
|
38
|
+
Schema.isMinLength(1).annotate({
|
|
39
|
+
expected: "a value with a length of at least 1",
|
|
40
|
+
}),
|
|
41
|
+
)
|
|
42
|
+
.check(
|
|
43
|
+
Schema.isMaxCodePoints(128).annotate({
|
|
44
|
+
expected: "a string with at most 128 code points",
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
}).annotate({
|
|
48
|
+
description: "A key-value pair to associate with a resource.",
|
|
49
|
+
identifier: "Tag",
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export interface AWSServerCertificateProps {
|
|
53
|
+
readonly CertificateBody?: string;
|
|
54
|
+
readonly CertificateChain?: string;
|
|
55
|
+
readonly ServerCertificateName?: string;
|
|
56
|
+
readonly Path?: string;
|
|
57
|
+
readonly PrivateKey?: string;
|
|
58
|
+
readonly Tags?: ReadonlyArray<Tag>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const AWSServerCertificateResourceSchema =
|
|
62
|
+
ResourceSchemaAnnotationSchema.make({
|
|
63
|
+
provider: "aws",
|
|
64
|
+
service: "iam",
|
|
65
|
+
resource: "servercertificate",
|
|
66
|
+
operation: "create",
|
|
67
|
+
stateSecretOutputKeys: [],
|
|
68
|
+
replacement: {
|
|
69
|
+
order: "createBeforeDestroy",
|
|
70
|
+
properties: [
|
|
71
|
+
["ServerCertificateName"],
|
|
72
|
+
["PrivateKey"],
|
|
73
|
+
["CertificateBody"],
|
|
74
|
+
["CertificateChain"],
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
primaryIdentifier: ["/properties/ServerCertificateName"],
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const AWSServerCertificatePropsSchema = annotateResourceSchema(
|
|
81
|
+
Schema.Struct({
|
|
82
|
+
CertificateBody: Schema.optionalKey(
|
|
83
|
+
Schema.String.check(
|
|
84
|
+
Schema.isMinLength(1).annotate({
|
|
85
|
+
expected: "a value with a length of at least 1",
|
|
86
|
+
}),
|
|
87
|
+
)
|
|
88
|
+
.check(
|
|
89
|
+
Schema.isMaxCodePoints(16384).annotate({
|
|
90
|
+
expected: "a string with at most 16384 code points",
|
|
91
|
+
}),
|
|
92
|
+
)
|
|
93
|
+
.check(
|
|
94
|
+
Schema.isPattern(
|
|
95
|
+
new globalThis.RegExp(
|
|
96
|
+
"[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
97
|
+
"u",
|
|
98
|
+
),
|
|
99
|
+
).annotate({
|
|
100
|
+
expected:
|
|
101
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
102
|
+
}),
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
CertificateChain: Schema.optionalKey(
|
|
106
|
+
Schema.String.check(
|
|
107
|
+
Schema.isMinLength(1).annotate({
|
|
108
|
+
expected: "a value with a length of at least 1",
|
|
109
|
+
}),
|
|
110
|
+
)
|
|
111
|
+
.check(
|
|
112
|
+
Schema.isMaxCodePoints(2097152).annotate({
|
|
113
|
+
expected: "a string with at most 2097152 code points",
|
|
114
|
+
}),
|
|
115
|
+
)
|
|
116
|
+
.check(
|
|
117
|
+
Schema.isPattern(
|
|
118
|
+
new globalThis.RegExp(
|
|
119
|
+
"[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
120
|
+
"u",
|
|
121
|
+
),
|
|
122
|
+
).annotate({
|
|
123
|
+
expected:
|
|
124
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
125
|
+
}),
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
ServerCertificateName: Schema.optionalKey(
|
|
129
|
+
Schema.String.check(
|
|
130
|
+
Schema.isMinLength(1).annotate({
|
|
131
|
+
expected: "a value with a length of at least 1",
|
|
132
|
+
}),
|
|
133
|
+
)
|
|
134
|
+
.check(
|
|
135
|
+
Schema.isMaxCodePoints(128).annotate({
|
|
136
|
+
expected: "a string with at most 128 code points",
|
|
137
|
+
}),
|
|
138
|
+
)
|
|
139
|
+
.check(
|
|
140
|
+
Schema.isPattern(new globalThis.RegExp("[\\w+=,.@-]+", "u")).annotate(
|
|
141
|
+
{ expected: "a string matching the RegExp [\\w+=,.@-]+" },
|
|
142
|
+
),
|
|
143
|
+
),
|
|
144
|
+
),
|
|
145
|
+
Path: Schema.optionalKey(
|
|
146
|
+
Schema.String.check(
|
|
147
|
+
Schema.isMinLength(1).annotate({
|
|
148
|
+
expected: "a value with a length of at least 1",
|
|
149
|
+
}),
|
|
150
|
+
)
|
|
151
|
+
.check(
|
|
152
|
+
Schema.isMaxCodePoints(512).annotate({
|
|
153
|
+
expected: "a string with at most 512 code points",
|
|
154
|
+
}),
|
|
155
|
+
)
|
|
156
|
+
.check(
|
|
157
|
+
Schema.isPattern(
|
|
158
|
+
new globalThis.RegExp(
|
|
159
|
+
"(\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F)",
|
|
160
|
+
"u",
|
|
161
|
+
),
|
|
162
|
+
).annotate({
|
|
163
|
+
expected:
|
|
164
|
+
"a string matching the RegExp (\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F)",
|
|
165
|
+
}),
|
|
166
|
+
),
|
|
167
|
+
),
|
|
168
|
+
PrivateKey: Schema.optionalKey(
|
|
169
|
+
Schema.String.check(
|
|
170
|
+
Schema.isMinLength(1).annotate({
|
|
171
|
+
expected: "a value with a length of at least 1",
|
|
172
|
+
}),
|
|
173
|
+
)
|
|
174
|
+
.check(
|
|
175
|
+
Schema.isMaxCodePoints(16384).annotate({
|
|
176
|
+
expected: "a string with at most 16384 code points",
|
|
177
|
+
}),
|
|
178
|
+
)
|
|
179
|
+
.check(
|
|
180
|
+
Schema.isPattern(
|
|
181
|
+
new globalThis.RegExp(
|
|
182
|
+
"[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
183
|
+
"u",
|
|
184
|
+
),
|
|
185
|
+
).annotate({
|
|
186
|
+
expected:
|
|
187
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
188
|
+
}),
|
|
189
|
+
),
|
|
190
|
+
),
|
|
191
|
+
Tags: Schema.optionalKey(Schema.Array(Tag)),
|
|
192
|
+
}),
|
|
193
|
+
AWSServerCertificateResourceSchema,
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
export interface AWSServerCertificateOutputs {
|
|
197
|
+
readonly Arn?: string;
|
|
198
|
+
readonly ServerCertificateName?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const AWSServerCertificateOutputsSchema = Schema.Struct({
|
|
202
|
+
Arn: Schema.optionalKey(
|
|
203
|
+
Schema.String.annotate({
|
|
204
|
+
description: "Amazon Resource Name (ARN) of the server certificate",
|
|
205
|
+
})
|
|
206
|
+
.check(
|
|
207
|
+
Schema.isMinLength(1).annotate({
|
|
208
|
+
expected: "a value with a length of at least 1",
|
|
209
|
+
}),
|
|
210
|
+
)
|
|
211
|
+
.check(
|
|
212
|
+
Schema.isMaxCodePoints(1600).annotate({
|
|
213
|
+
expected: "a string with at most 1600 code points",
|
|
214
|
+
}),
|
|
215
|
+
),
|
|
216
|
+
),
|
|
217
|
+
ServerCertificateName: Schema.optionalKey(
|
|
218
|
+
Schema.String.check(
|
|
219
|
+
Schema.isMinLength(1).annotate({
|
|
220
|
+
expected: "a value with a length of at least 1",
|
|
221
|
+
}),
|
|
222
|
+
)
|
|
223
|
+
.check(
|
|
224
|
+
Schema.isMaxCodePoints(128).annotate({
|
|
225
|
+
expected: "a string with at most 128 code points",
|
|
226
|
+
}),
|
|
227
|
+
)
|
|
228
|
+
.check(
|
|
229
|
+
Schema.isPattern(new globalThis.RegExp("[\\w+=,.@-]+", "u")).annotate({
|
|
230
|
+
expected: "a string matching the RegExp [\\w+=,.@-]+",
|
|
231
|
+
}),
|
|
232
|
+
),
|
|
233
|
+
),
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
export interface AWSServerCertificateRequest {
|
|
237
|
+
readonly CertificateBody?: string;
|
|
238
|
+
readonly CertificateChain?: string;
|
|
239
|
+
readonly ServerCertificateName?: string;
|
|
240
|
+
readonly Path?: string;
|
|
241
|
+
readonly PrivateKey?: string;
|
|
242
|
+
readonly Tags?: ReadonlyArray<Tag>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const AWSServerCertificateRequestSchema = Schema.Struct({
|
|
246
|
+
CertificateBody: Schema.optionalKey(
|
|
247
|
+
Schema.String.check(
|
|
248
|
+
Schema.isMinLength(1).annotate({
|
|
249
|
+
expected: "a value with a length of at least 1",
|
|
250
|
+
}),
|
|
251
|
+
)
|
|
252
|
+
.check(
|
|
253
|
+
Schema.isMaxCodePoints(16384).annotate({
|
|
254
|
+
expected: "a string with at most 16384 code points",
|
|
255
|
+
}),
|
|
256
|
+
)
|
|
257
|
+
.check(
|
|
258
|
+
Schema.isPattern(
|
|
259
|
+
new globalThis.RegExp("[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+", "u"),
|
|
260
|
+
).annotate({
|
|
261
|
+
expected:
|
|
262
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
263
|
+
}),
|
|
264
|
+
),
|
|
265
|
+
),
|
|
266
|
+
CertificateChain: Schema.optionalKey(
|
|
267
|
+
Schema.String.check(
|
|
268
|
+
Schema.isMinLength(1).annotate({
|
|
269
|
+
expected: "a value with a length of at least 1",
|
|
270
|
+
}),
|
|
271
|
+
)
|
|
272
|
+
.check(
|
|
273
|
+
Schema.isMaxCodePoints(2097152).annotate({
|
|
274
|
+
expected: "a string with at most 2097152 code points",
|
|
275
|
+
}),
|
|
276
|
+
)
|
|
277
|
+
.check(
|
|
278
|
+
Schema.isPattern(
|
|
279
|
+
new globalThis.RegExp("[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+", "u"),
|
|
280
|
+
).annotate({
|
|
281
|
+
expected:
|
|
282
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
283
|
+
}),
|
|
284
|
+
),
|
|
285
|
+
),
|
|
286
|
+
ServerCertificateName: Schema.optionalKey(
|
|
287
|
+
Schema.String.check(
|
|
288
|
+
Schema.isMinLength(1).annotate({
|
|
289
|
+
expected: "a value with a length of at least 1",
|
|
290
|
+
}),
|
|
291
|
+
)
|
|
292
|
+
.check(
|
|
293
|
+
Schema.isMaxCodePoints(128).annotate({
|
|
294
|
+
expected: "a string with at most 128 code points",
|
|
295
|
+
}),
|
|
296
|
+
)
|
|
297
|
+
.check(
|
|
298
|
+
Schema.isPattern(new globalThis.RegExp("[\\w+=,.@-]+", "u")).annotate({
|
|
299
|
+
expected: "a string matching the RegExp [\\w+=,.@-]+",
|
|
300
|
+
}),
|
|
301
|
+
),
|
|
302
|
+
),
|
|
303
|
+
Path: Schema.optionalKey(
|
|
304
|
+
Schema.String.check(
|
|
305
|
+
Schema.isMinLength(1).annotate({
|
|
306
|
+
expected: "a value with a length of at least 1",
|
|
307
|
+
}),
|
|
308
|
+
)
|
|
309
|
+
.check(
|
|
310
|
+
Schema.isMaxCodePoints(512).annotate({
|
|
311
|
+
expected: "a string with at most 512 code points",
|
|
312
|
+
}),
|
|
313
|
+
)
|
|
314
|
+
.check(
|
|
315
|
+
Schema.isPattern(
|
|
316
|
+
new globalThis.RegExp(
|
|
317
|
+
"(\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F)",
|
|
318
|
+
"u",
|
|
319
|
+
),
|
|
320
|
+
).annotate({
|
|
321
|
+
expected:
|
|
322
|
+
"a string matching the RegExp (\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F)",
|
|
323
|
+
}),
|
|
324
|
+
),
|
|
325
|
+
),
|
|
326
|
+
PrivateKey: Schema.optionalKey(
|
|
327
|
+
Schema.String.check(
|
|
328
|
+
Schema.isMinLength(1).annotate({
|
|
329
|
+
expected: "a value with a length of at least 1",
|
|
330
|
+
}),
|
|
331
|
+
)
|
|
332
|
+
.check(
|
|
333
|
+
Schema.isMaxCodePoints(16384).annotate({
|
|
334
|
+
expected: "a string with at most 16384 code points",
|
|
335
|
+
}),
|
|
336
|
+
)
|
|
337
|
+
.check(
|
|
338
|
+
Schema.isPattern(
|
|
339
|
+
new globalThis.RegExp("[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+", "u"),
|
|
340
|
+
).annotate({
|
|
341
|
+
expected:
|
|
342
|
+
"a string matching the RegExp [\\u0009\\u000A\\u000D\\u0020-\\u00FF]+",
|
|
343
|
+
}),
|
|
344
|
+
),
|
|
345
|
+
),
|
|
346
|
+
Tags: Schema.optionalKey(Schema.Array(Tag)),
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The AWSServerCertificateRelationshipIssues array lists inputs that can use several outputs
|
|
351
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
352
|
+
* mapping chooses an output.
|
|
353
|
+
*/
|
|
354
|
+
export const AWSServerCertificateRelationshipIssues = [];
|
|
355
|
+
|
|
356
|
+
export const AWSServerCertificateResourceTypeSchema = Schema.Struct({
|
|
357
|
+
provider: Schema.Literal("aws"),
|
|
358
|
+
service: Schema.Literal("iam"),
|
|
359
|
+
resource: Schema.Literal("servercertificate"),
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* The AWSServerCertificateResource class retains its owning stack across declarations.
|
|
364
|
+
* Applied output properties are ordinary values maintained by the lifecycle.
|
|
365
|
+
*/
|
|
366
|
+
export class AWSServerCertificateResource<
|
|
367
|
+
Props = AWSServerCertificateProps,
|
|
368
|
+
> extends ResourceEntity<{
|
|
369
|
+
readonly provider: "aws";
|
|
370
|
+
readonly service: "iam";
|
|
371
|
+
readonly resource: "servercertificate";
|
|
372
|
+
}> {
|
|
373
|
+
constructor(
|
|
374
|
+
key: ResourceKey,
|
|
375
|
+
readonly props: Props,
|
|
376
|
+
private readonly binding?: ResourceOutputBinding,
|
|
377
|
+
) {
|
|
378
|
+
super({
|
|
379
|
+
key,
|
|
380
|
+
resourceType: {
|
|
381
|
+
provider: "aws",
|
|
382
|
+
service: "iam",
|
|
383
|
+
resource: "servercertificate",
|
|
384
|
+
},
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Successful lifecycle writes update this value for declarations owned by the stack.
|
|
390
|
+
* Reading an unavailable value throws ResourceOutputResolutionMissing.
|
|
391
|
+
*/
|
|
392
|
+
get Arn(): Required<AWSServerCertificateOutputs>["Arn"] {
|
|
393
|
+
const value: Required<AWSServerCertificateOutputs>["Arn"] =
|
|
394
|
+
ResourceOutputBinding.value(
|
|
395
|
+
this.binding,
|
|
396
|
+
this.key,
|
|
397
|
+
"Arn",
|
|
398
|
+
Schema.requiredKey(AWSServerCertificateOutputsSchema.fields.Arn),
|
|
399
|
+
);
|
|
400
|
+
return value;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Successful lifecycle writes update this value for declarations owned by the stack.
|
|
405
|
+
* Reading an unavailable value throws ResourceOutputResolutionMissing.
|
|
406
|
+
*/
|
|
407
|
+
get ServerCertificateName(): Required<AWSServerCertificateOutputs>["ServerCertificateName"] {
|
|
408
|
+
const value: Required<AWSServerCertificateOutputs>["ServerCertificateName"] =
|
|
409
|
+
ResourceOutputBinding.value(
|
|
410
|
+
this.binding,
|
|
411
|
+
this.key,
|
|
412
|
+
"ServerCertificateName",
|
|
413
|
+
Schema.requiredKey(
|
|
414
|
+
AWSServerCertificateOutputsSchema.fields.ServerCertificateName,
|
|
415
|
+
),
|
|
416
|
+
);
|
|
417
|
+
return value;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Callers must validate properties before constructing the declaration.
|
|
423
|
+
* Compatible resources can depend on it before apply supplies provider values.
|
|
424
|
+
* Reading applied outputs requires a binding to the owning stack.
|
|
425
|
+
*/
|
|
426
|
+
export function createAWSServerCertificateDeclaration<Props>(
|
|
427
|
+
key: ResourceKey,
|
|
428
|
+
props: Props,
|
|
429
|
+
binding?: ResourceOutputBinding,
|
|
430
|
+
): AWSServerCertificateResource<Props> {
|
|
431
|
+
const resource: AWSServerCertificateResource<Props> =
|
|
432
|
+
new AWSServerCertificateResource<Props>(key, props, binding);
|
|
433
|
+
|
|
434
|
+
return resource;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The AWSServerCertificate resource factory registers a validated declaration in the
|
|
439
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
440
|
+
*/
|
|
441
|
+
export const AWSServerCertificate = Effect.fn("AWSServerCertificate")(
|
|
442
|
+
function* (input: { logicalId: string; props: AWSServerCertificateProps }) {
|
|
443
|
+
const graph = yield* ResourceGraphBuilder;
|
|
444
|
+
|
|
445
|
+
const key: ResourceKey = { logicalId: input.logicalId };
|
|
446
|
+
|
|
447
|
+
const declaration = yield* graph.resource(key);
|
|
448
|
+
|
|
449
|
+
const props = yield* Schema.decodeEffect(AWSServerCertificatePropsSchema)(
|
|
450
|
+
input.props,
|
|
451
|
+
);
|
|
452
|
+
|
|
453
|
+
yield* declaration.registerEntity(AWSServerCertificateResourceTypeSchema, {
|
|
454
|
+
propsSchema: AWSServerCertificatePropsSchema,
|
|
455
|
+
requestSchema: AWSServerCertificateRequestSchema,
|
|
456
|
+
outputsSchema: AWSServerCertificateOutputsSchema,
|
|
457
|
+
props,
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
const resource: AWSServerCertificateResource =
|
|
461
|
+
createAWSServerCertificateDeclaration(key, props, declaration.outputs);
|
|
462
|
+
|
|
463
|
+
return resource;
|
|
464
|
+
},
|
|
465
|
+
);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// Generated from the CloudFormation Registry resource schema. Do not edit.
|
|
2
|
+
// biome-ignore-all lint/complexity/useRegexLiterals: Preserve Effect's generated regular expressions.
|
|
3
|
+
import { Effect, Schema } from "effect";
|
|
4
|
+
import {
|
|
5
|
+
annotateResourceSchema,
|
|
6
|
+
ResourceEntity,
|
|
7
|
+
ResourceGraphBuilder,
|
|
8
|
+
type ResourceKey,
|
|
9
|
+
ResourceSchemaAnnotationSchema,
|
|
10
|
+
} from "nomoss/core";
|
|
11
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
12
|
+
|
|
13
|
+
export interface AWSServiceLinkedRoleProps {
|
|
14
|
+
readonly CustomSuffix?: string;
|
|
15
|
+
readonly Description?: string;
|
|
16
|
+
readonly AWSServiceName?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const AWSServiceLinkedRoleResourceSchema =
|
|
20
|
+
ResourceSchemaAnnotationSchema.make({
|
|
21
|
+
provider: "aws",
|
|
22
|
+
service: "iam",
|
|
23
|
+
resource: "servicelinkedrole",
|
|
24
|
+
operation: "create",
|
|
25
|
+
stateSecretOutputKeys: [],
|
|
26
|
+
replacement: {
|
|
27
|
+
order: "createBeforeDestroy",
|
|
28
|
+
properties: [["CustomSuffix"], ["AWSServiceName"]],
|
|
29
|
+
},
|
|
30
|
+
primaryIdentifier: ["/properties/RoleName"],
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const AWSServiceLinkedRolePropsSchema = annotateResourceSchema(
|
|
34
|
+
Schema.Struct({
|
|
35
|
+
CustomSuffix: Schema.optionalKey(
|
|
36
|
+
Schema.String.annotate({
|
|
37
|
+
description:
|
|
38
|
+
"A string that you provide, which is combined with the service-provided prefix to form the complete role name.",
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
Description: Schema.optionalKey(
|
|
42
|
+
Schema.String.annotate({ description: "The description of the role." }),
|
|
43
|
+
),
|
|
44
|
+
AWSServiceName: Schema.optionalKey(
|
|
45
|
+
Schema.String.annotate({
|
|
46
|
+
description:
|
|
47
|
+
"The service principal for the AWS service to which this role is attached.",
|
|
48
|
+
}),
|
|
49
|
+
),
|
|
50
|
+
}),
|
|
51
|
+
AWSServiceLinkedRoleResourceSchema,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export interface AWSServiceLinkedRoleOutputs {
|
|
55
|
+
readonly RoleName?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const AWSServiceLinkedRoleOutputsSchema = Schema.Struct({
|
|
59
|
+
RoleName: Schema.optionalKey(
|
|
60
|
+
Schema.String.annotate({ description: "The name of the role." }),
|
|
61
|
+
),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export interface AWSServiceLinkedRoleRequest {
|
|
65
|
+
readonly CustomSuffix?: string;
|
|
66
|
+
readonly Description?: string;
|
|
67
|
+
readonly AWSServiceName?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const AWSServiceLinkedRoleRequestSchema = Schema.Struct({
|
|
71
|
+
CustomSuffix: Schema.optionalKey(
|
|
72
|
+
Schema.String.annotate({
|
|
73
|
+
description:
|
|
74
|
+
"A string that you provide, which is combined with the service-provided prefix to form the complete role name.",
|
|
75
|
+
}),
|
|
76
|
+
),
|
|
77
|
+
Description: Schema.optionalKey(
|
|
78
|
+
Schema.String.annotate({ description: "The description of the role." }),
|
|
79
|
+
),
|
|
80
|
+
AWSServiceName: Schema.optionalKey(
|
|
81
|
+
Schema.String.annotate({
|
|
82
|
+
description:
|
|
83
|
+
"The service principal for the AWS service to which this role is attached.",
|
|
84
|
+
}),
|
|
85
|
+
),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The AWSServiceLinkedRoleRelationshipIssues array lists inputs that can use several outputs
|
|
90
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
91
|
+
* mapping chooses an output.
|
|
92
|
+
*/
|
|
93
|
+
export const AWSServiceLinkedRoleRelationshipIssues = [];
|
|
94
|
+
|
|
95
|
+
export const AWSServiceLinkedRoleResourceTypeSchema = Schema.Struct({
|
|
96
|
+
provider: Schema.Literal("aws"),
|
|
97
|
+
service: Schema.Literal("iam"),
|
|
98
|
+
resource: Schema.Literal("servicelinkedrole"),
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The AWSServiceLinkedRoleResource class retains its owning stack across declarations.
|
|
103
|
+
* Applied output properties are ordinary values maintained by the lifecycle.
|
|
104
|
+
*/
|
|
105
|
+
export class AWSServiceLinkedRoleResource<
|
|
106
|
+
Props = AWSServiceLinkedRoleProps,
|
|
107
|
+
> extends ResourceEntity<{
|
|
108
|
+
readonly provider: "aws";
|
|
109
|
+
readonly service: "iam";
|
|
110
|
+
readonly resource: "servicelinkedrole";
|
|
111
|
+
}> {
|
|
112
|
+
constructor(
|
|
113
|
+
key: ResourceKey,
|
|
114
|
+
readonly props: Props,
|
|
115
|
+
private readonly binding?: ResourceOutputBinding,
|
|
116
|
+
) {
|
|
117
|
+
super({
|
|
118
|
+
key,
|
|
119
|
+
resourceType: {
|
|
120
|
+
provider: "aws",
|
|
121
|
+
service: "iam",
|
|
122
|
+
resource: "servicelinkedrole",
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Successful lifecycle writes update this value for declarations owned by the stack.
|
|
129
|
+
* Reading an unavailable value throws ResourceOutputResolutionMissing.
|
|
130
|
+
*/
|
|
131
|
+
get RoleName(): Required<AWSServiceLinkedRoleOutputs>["RoleName"] {
|
|
132
|
+
const value: Required<AWSServiceLinkedRoleOutputs>["RoleName"] =
|
|
133
|
+
ResourceOutputBinding.value(
|
|
134
|
+
this.binding,
|
|
135
|
+
this.key,
|
|
136
|
+
"RoleName",
|
|
137
|
+
Schema.requiredKey(AWSServiceLinkedRoleOutputsSchema.fields.RoleName),
|
|
138
|
+
);
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Callers must validate properties before constructing the declaration.
|
|
145
|
+
* Compatible resources can depend on it before apply supplies provider values.
|
|
146
|
+
* Reading applied outputs requires a binding to the owning stack.
|
|
147
|
+
*/
|
|
148
|
+
export function createAWSServiceLinkedRoleDeclaration<Props>(
|
|
149
|
+
key: ResourceKey,
|
|
150
|
+
props: Props,
|
|
151
|
+
binding?: ResourceOutputBinding,
|
|
152
|
+
): AWSServiceLinkedRoleResource<Props> {
|
|
153
|
+
const resource: AWSServiceLinkedRoleResource<Props> =
|
|
154
|
+
new AWSServiceLinkedRoleResource<Props>(key, props, binding);
|
|
155
|
+
|
|
156
|
+
return resource;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The AWSServiceLinkedRole resource factory registers a validated declaration in the
|
|
161
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
162
|
+
*/
|
|
163
|
+
export const AWSServiceLinkedRole = Effect.fn("AWSServiceLinkedRole")(
|
|
164
|
+
function* (input: { logicalId: string; props: AWSServiceLinkedRoleProps }) {
|
|
165
|
+
const graph = yield* ResourceGraphBuilder;
|
|
166
|
+
|
|
167
|
+
const key: ResourceKey = { logicalId: input.logicalId };
|
|
168
|
+
|
|
169
|
+
const declaration = yield* graph.resource(key);
|
|
170
|
+
|
|
171
|
+
const props = yield* Schema.decodeEffect(AWSServiceLinkedRolePropsSchema)(
|
|
172
|
+
input.props,
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
yield* declaration.registerEntity(AWSServiceLinkedRoleResourceTypeSchema, {
|
|
176
|
+
propsSchema: AWSServiceLinkedRolePropsSchema,
|
|
177
|
+
requestSchema: AWSServiceLinkedRoleRequestSchema,
|
|
178
|
+
outputsSchema: AWSServiceLinkedRoleOutputsSchema,
|
|
179
|
+
props,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const resource: AWSServiceLinkedRoleResource =
|
|
183
|
+
createAWSServiceLinkedRoleDeclaration(key, props, declaration.outputs);
|
|
184
|
+
|
|
185
|
+
return resource;
|
|
186
|
+
},
|
|
187
|
+
);
|