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.
Files changed (150) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +5 -15
  3. package/ROADMAP.md +2 -0
  4. package/docs/README.md +1 -1
  5. package/docs/application/aws-resource-coverage.md +26 -0
  6. package/docs/application/aws-resource-lifecycle-management.md +13 -23
  7. package/docs/application/cli-workflow.md +1 -1
  8. package/docs/application/engine-design.md +2 -2
  9. package/docs/application/generation-architecture.md +10 -45
  10. package/docs/application/resource-command-policy-stage.md +2 -2
  11. package/docs/application/resource-graph.md +1 -1
  12. package/docs/application/resource-lifecycle-tracker.md +1 -9
  13. package/docs/application/resource-mapping.md +4 -9
  14. package/docs/application/resource-operations.md +4 -2
  15. package/docs/application/tracing.md +2 -6
  16. package/docs/development/code-documentation.md +2 -0
  17. package/docs/development/effect-native-development.md +44 -0
  18. package/docs/development/linting.md +1 -1
  19. package/docs/development/review-code.md +22 -6
  20. package/docs/development/review-remediation-spec.md +28 -37
  21. package/docs/development/spec-writing.md +1 -1
  22. package/docs/development/testing.md +23 -9
  23. package/docs/operations/observability-sop.md +11 -17
  24. package/docs/operations/releasing.md +3 -1
  25. package/examples/README.md +3 -26
  26. package/examples/commands.ts +2 -36
  27. package/examples/queue/application.ts +8 -2
  28. package/examples/state-machine/application.ts +3 -1
  29. package/package.json +40 -46
  30. package/providers/aws/README.md +21 -0
  31. package/providers/aws/awsEnvironment.ts +114 -0
  32. package/providers/aws/generated/managementRegistry.ts +136 -0
  33. package/{src/providers/aws/resources/generated/native/apigatewayv2/api/index.ts → providers/aws/generated/resources/apigatewayv2/api.ts} +13 -50
  34. package/{src/providers/aws/resources/generated/native/apigatewayv2/integration/index.ts → providers/aws/generated/resources/apigatewayv2/integration.ts} +13 -37
  35. package/{src/providers/aws/resources/generated/native/apigatewayv2/route/index.ts → providers/aws/generated/resources/apigatewayv2/route.ts} +23 -40
  36. package/{src/providers/aws/resources/generated/native/apigatewayv2/stage/index.ts → providers/aws/generated/resources/apigatewayv2/stage.ts} +13 -38
  37. package/providers/aws/generated/resources/iam/accesskey.ts +184 -0
  38. package/{src/providers/aws/resources/generated/native/iam/group/index.ts → providers/aws/generated/resources/iam/group.ts} +13 -38
  39. package/{src/providers/aws/resources/generated/native/iam/grouppolicy/index.ts → providers/aws/generated/resources/iam/grouppolicy.ts} +29 -59
  40. package/{src/providers/aws/resources/generated/native/iam/instanceprofile/index.ts → providers/aws/generated/resources/iam/instanceprofile.ts} +13 -41
  41. package/{src/providers/aws/resources/generated/native/iam/managedpolicy/index.ts → providers/aws/generated/resources/iam/managedpolicy.ts} +13 -95
  42. package/providers/aws/generated/resources/iam/oidcprovider.ts +314 -0
  43. package/{src/providers/aws/resources/generated/native/iam/policy/index.ts → providers/aws/generated/resources/iam/policy.ts} +13 -28
  44. package/{src/providers/aws/resources/generated/native/iam/role/index.ts → providers/aws/generated/resources/iam/role.ts} +13 -47
  45. package/{src/providers/aws/resources/generated/native/iam/rolepolicy/index.ts → providers/aws/generated/resources/iam/rolepolicy.ts} +29 -59
  46. package/providers/aws/generated/resources/iam/samlprovider.ts +463 -0
  47. package/providers/aws/generated/resources/iam/servercertificate.ts +465 -0
  48. package/providers/aws/generated/resources/iam/servicelinkedrole.ts +187 -0
  49. package/{src/providers/aws/resources/generated/native/iam/user/index.ts → providers/aws/generated/resources/iam/user.ts} +13 -38
  50. package/{src/providers/aws/resources/generated/native/iam/userpolicy/index.ts → providers/aws/generated/resources/iam/userpolicy.ts} +29 -59
  51. package/{src/providers/aws/resources/generated/native/iam/usertogroupaddition/index.ts → providers/aws/generated/resources/iam/usertogroupaddition.ts} +13 -27
  52. package/providers/aws/generated/resources/iam/virtualmfadevice.ts +298 -0
  53. package/{src/providers/aws/resources/generated/native/kms/key/index.ts → providers/aws/generated/resources/kms/key.ts} +13 -41
  54. package/{src/providers/aws/resources/generated/native/lambda/function/index.ts → providers/aws/generated/resources/lambda/function.ts} +13 -63
  55. package/{src/providers/aws/resources/generated/native/lambda/permission/index.ts → providers/aws/generated/resources/lambda/permission.ts} +13 -55
  56. package/{src/providers/aws/resources/generated/native/s3/bucket/index.ts → providers/aws/generated/resources/s3/bucket.ts} +14 -104
  57. package/{src/providers/aws/resources/generated/native/sns/topic/index.ts → providers/aws/generated/resources/sns/topic.ts} +14 -29
  58. package/{src/providers/aws/resources/generated/native/sqs/queue/index.ts → providers/aws/generated/resources/sqs/queue.ts} +14 -38
  59. package/{src/providers/aws/resources/generated/native/stepfunctions/statemachine/index.ts → providers/aws/generated/resources/stepfunctions/statemachine.ts} +15 -58
  60. package/providers/aws/management/mappings/iam/group.ts +63 -0
  61. package/providers/aws/management/mappings/iam/iamIdentity.ts +41 -0
  62. package/providers/aws/management/mappings/iam/iamLifecycleSettings.ts +8 -0
  63. package/providers/aws/management/mappings/iam/inlinePolicies.ts +159 -0
  64. package/providers/aws/management/mappings/iam/instanceProfile.ts +77 -0
  65. package/providers/aws/management/mappings/iam/oidcProvider.ts +94 -0
  66. package/providers/aws/management/mappings/iam/role.ts +74 -0
  67. package/providers/aws/management/mappings/iam/samlProvider.ts +98 -0
  68. package/providers/aws/management/mappings/iam/serverCertificate.ts +72 -0
  69. package/providers/aws/management/mappings/iam/user.ts +61 -0
  70. package/providers/aws/management/mappings/iam/userToGroupAddition.ts +75 -0
  71. package/providers/aws/management/operations/iam/accessKey.ts +206 -0
  72. package/providers/aws/management/operations/iam/managedPolicy.ts +491 -0
  73. package/providers/aws/management/operations/iam/policy.ts +476 -0
  74. package/providers/aws/management/operations/iam/serviceLinkedRole.ts +172 -0
  75. package/providers/aws/management/operations/iam/virtualMfaDevice.ts +253 -0
  76. package/providers/aws/management/resourceAssociationConfiguration.ts +112 -0
  77. package/providers/aws/management/resourceAssociationRegistration.ts +349 -0
  78. package/providers/aws/management/resourceAssociations.ts +168 -0
  79. package/{src/providers → providers}/aws/management/resourceConfiguration.ts +24 -26
  80. package/providers/aws/management/resourceLifecycleRegistration.ts +540 -0
  81. package/providers/aws/management/resourceManagementModule.ts +31 -0
  82. package/providers/aws/management/resourceManagementRegistry.ts +62 -0
  83. package/providers/aws/management/resourceMapping.ts +84 -0
  84. package/providers/aws/management/resourceOperation.ts +134 -0
  85. package/providers/aws/management/resourceTagOperations.ts +108 -0
  86. package/providers/aws/management/resourceTiming.ts +4 -0
  87. package/providers/aws/runtime.ts +52 -0
  88. package/src/core/resource/resourceCommandPolicy.ts +20 -0
  89. package/src/core/resource/resourceLifecycle.ts +644 -0
  90. package/src/core/resource/resourceStabilization.ts +120 -0
  91. package/src/core/resource/resourceVersions.ts +102 -0
  92. package/src/core/stack/planner.ts +9 -0
  93. package/src/core/stack/resourceStackLifecycle.ts +36 -3
  94. package/src/core/state/resourceState.ts +6 -4
  95. package/src/core/state/stateStore.ts +57 -10
  96. package/src/providers/file/resourcePolicy.ts +13 -12
  97. package/src/providers/providerRuntimeLayer.ts +5 -2
  98. package/src/providers/resourceCommandPolicyLayer.ts +117 -37
  99. package/src/providers/stripe/management/resourcePolicy.ts +22 -11
  100. package/examples/http-echo/application.ts +0 -87
  101. package/src/providers/aws/client/awsClient.ts +0 -418
  102. package/src/providers/aws/client/awsClientConfig.ts +0 -133
  103. package/src/providers/aws/client/awsClientModel.ts +0 -119
  104. package/src/providers/aws/client/awsHttpOperation.ts +0 -153
  105. package/src/providers/aws/client/awsQueryOperation.ts +0 -149
  106. package/src/providers/aws/client/awsRequestSigner.ts +0 -115
  107. package/src/providers/aws/client/awsResponseDecoder.ts +0 -135
  108. package/src/providers/aws/client/awsRetryPolicy.ts +0 -62
  109. package/src/providers/aws/client/generated/apiGatewayV2.ts +0 -3025
  110. package/src/providers/aws/client/generated/cloudControl.ts +0 -5746
  111. package/src/providers/aws/client/generated/iam.ts +0 -10892
  112. package/src/providers/aws/client/generated/lambda.ts +0 -5403
  113. package/src/providers/aws/client/generated/sqs.ts +0 -3769
  114. package/src/providers/aws/client/generated/stepFunctions.ts +0 -1726
  115. package/src/providers/aws/client/openapi/cloudControl/CancelResourceRequest.json +0 -579
  116. package/src/providers/aws/client/openapi/cloudControl/CreateResource.json +0 -1019
  117. package/src/providers/aws/client/openapi/cloudControl/DeleteResource.json +0 -1018
  118. package/src/providers/aws/client/openapi/cloudControl/GetResource.json +0 -883
  119. package/src/providers/aws/client/openapi/cloudControl/GetResourceRequestStatus.json +0 -655
  120. package/src/providers/aws/client/openapi/cloudControl/ListResourceRequests.json +0 -566
  121. package/src/providers/aws/client/openapi/cloudControl/ListResources.json +0 -913
  122. package/src/providers/aws/client/openapi/cloudControl/UpdateResource.json +0 -1027
  123. package/src/providers/aws/cloudControl/client.ts +0 -69
  124. package/src/providers/aws/cloudControl/requestTracker.ts +0 -138
  125. package/src/providers/aws/cloudControl/resourceCommandPolicyLayer.ts +0 -63
  126. package/src/providers/aws/cloudControl/resourceLifecycle.ts +0 -479
  127. package/src/providers/aws/cloudControl/resources/generated/certificatemanager/certificate/index.ts +0 -179
  128. package/src/providers/aws/cloudControl/resources/generated/kms/key/index.ts +0 -362
  129. package/src/providers/aws/cloudControl/resources/generated/s3/bucket/index.ts +0 -2364
  130. package/src/providers/aws/cloudControl/resources/generated/sns/topic/index.ts +0 -326
  131. package/src/providers/aws/cloudControl/resources/generated/sqs/queue/index.ts +0 -307
  132. package/src/providers/aws/cloudControl/resources/generated/sqs/queueinlinepolicy/index.ts +0 -108
  133. package/src/providers/aws/cloudControl/runtime.ts +0 -127
  134. package/src/providers/aws/management/resourceMapping.ts +0 -343
  135. package/src/providers/aws/management/resourceOperation.ts +0 -57
  136. package/src/providers/aws/management/resourcePolicy.ts +0 -549
  137. package/src/providers/aws/management/resourceRegistration.ts +0 -294
  138. package/src/providers/aws/resources/apiGatewayV2/httpApi.ts +0 -327
  139. package/src/providers/aws/resources/generated/native/resourceCommands.ts +0 -152
  140. package/src/providers/aws/resources/iam/grant.ts +0 -150
  141. package/src/providers/aws/resources/iam/grantCommands.ts +0 -283
  142. package/src/providers/aws/resources/iam/policyDocument.ts +0 -30
  143. package/src/providers/aws/resources/iam/policyStatement.ts +0 -59
  144. package/src/providers/aws/resources/iam/role.ts +0 -426
  145. package/src/providers/aws/resources/iam/roleDeclaration.ts +0 -105
  146. package/src/providers/aws/resources/lambda/function.ts +0 -403
  147. package/src/providers/aws/resources/lambda/functionDeclaration.ts +0 -234
  148. package/src/providers/aws/resources/lambda/permission.ts +0 -363
  149. package/src/providers/aws/resources/stepFunctions/stateMachine.ts +0 -95
  150. package/src/providers/aws/runtime.ts +0 -70
@@ -0,0 +1,314 @@
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 AWSOIDCProviderProps {
53
+ readonly ClientIdList?: ReadonlyArray<string>;
54
+ readonly Url?: string;
55
+ readonly ThumbprintList?: ReadonlyArray<string>;
56
+ readonly Tags?: ReadonlyArray<Tag>;
57
+ }
58
+
59
+ export const AWSOIDCProviderResourceSchema =
60
+ ResourceSchemaAnnotationSchema.make({
61
+ provider: "aws",
62
+ service: "iam",
63
+ resource: "oidcprovider",
64
+ operation: "create",
65
+ stateSecretOutputKeys: [],
66
+ replacement: {
67
+ order: "createBeforeDestroy",
68
+ properties: [["Url"]],
69
+ },
70
+ primaryIdentifier: ["/properties/Arn"],
71
+ });
72
+
73
+ export const AWSOIDCProviderPropsSchema = annotateResourceSchema(
74
+ Schema.Struct({
75
+ ClientIdList: Schema.optionalKey(
76
+ Schema.Array(
77
+ Schema.String.check(
78
+ Schema.isMinLength(1).annotate({
79
+ expected: "a value with a length of at least 1",
80
+ }),
81
+ ).check(
82
+ Schema.isMaxCodePoints(255).annotate({
83
+ expected: "a string with at most 255 code points",
84
+ }),
85
+ ),
86
+ ),
87
+ ),
88
+ Url: Schema.optionalKey(
89
+ Schema.String.check(
90
+ Schema.isMinLength(1).annotate({
91
+ expected: "a value with a length of at least 1",
92
+ }),
93
+ ).check(
94
+ Schema.isMaxCodePoints(255).annotate({
95
+ expected: "a string with at most 255 code points",
96
+ }),
97
+ ),
98
+ ),
99
+ ThumbprintList: Schema.optionalKey(
100
+ Schema.Array(
101
+ Schema.String.check(
102
+ Schema.isMinCodePoints(40).annotate({
103
+ expected: "a string with at least 40 code points",
104
+ }),
105
+ )
106
+ .check(
107
+ Schema.isMaxCodePoints(40).annotate({
108
+ expected: "a string with at most 40 code points",
109
+ }),
110
+ )
111
+ .check(
112
+ Schema.isPattern(
113
+ new globalThis.RegExp("[0-9A-Fa-f]{40}", "u"),
114
+ ).annotate({
115
+ expected: "a string matching the RegExp [0-9A-Fa-f]{40}",
116
+ }),
117
+ ),
118
+ ).check(
119
+ Schema.isMaxLength(5).annotate({
120
+ expected: "a value with a length of at most 5",
121
+ }),
122
+ ),
123
+ ),
124
+ Tags: Schema.optionalKey(Schema.Array(Tag)),
125
+ }),
126
+ AWSOIDCProviderResourceSchema,
127
+ );
128
+
129
+ export interface AWSOIDCProviderOutputs {
130
+ readonly Arn?: string;
131
+ }
132
+
133
+ export const AWSOIDCProviderOutputsSchema = Schema.Struct({
134
+ Arn: Schema.optionalKey(
135
+ Schema.String.annotate({
136
+ description: "Amazon Resource Name (ARN) of the OIDC provider",
137
+ })
138
+ .check(
139
+ Schema.isMinCodePoints(20).annotate({
140
+ expected: "a string with at least 20 code points",
141
+ }),
142
+ )
143
+ .check(
144
+ Schema.isMaxCodePoints(2048).annotate({
145
+ expected: "a string with at most 2048 code points",
146
+ }),
147
+ ),
148
+ ),
149
+ });
150
+
151
+ export interface AWSOIDCProviderRequest {
152
+ readonly ClientIdList?: ReadonlyArray<string>;
153
+ readonly Url?: string;
154
+ readonly ThumbprintList?: ReadonlyArray<string>;
155
+ readonly Tags?: ReadonlyArray<Tag>;
156
+ }
157
+
158
+ export const AWSOIDCProviderRequestSchema = Schema.Struct({
159
+ ClientIdList: Schema.optionalKey(
160
+ Schema.Array(
161
+ Schema.String.check(
162
+ Schema.isMinLength(1).annotate({
163
+ expected: "a value with a length of at least 1",
164
+ }),
165
+ ).check(
166
+ Schema.isMaxCodePoints(255).annotate({
167
+ expected: "a string with at most 255 code points",
168
+ }),
169
+ ),
170
+ ),
171
+ ),
172
+ Url: Schema.optionalKey(
173
+ Schema.String.check(
174
+ Schema.isMinLength(1).annotate({
175
+ expected: "a value with a length of at least 1",
176
+ }),
177
+ ).check(
178
+ Schema.isMaxCodePoints(255).annotate({
179
+ expected: "a string with at most 255 code points",
180
+ }),
181
+ ),
182
+ ),
183
+ ThumbprintList: Schema.optionalKey(
184
+ Schema.Array(
185
+ Schema.String.check(
186
+ Schema.isMinCodePoints(40).annotate({
187
+ expected: "a string with at least 40 code points",
188
+ }),
189
+ )
190
+ .check(
191
+ Schema.isMaxCodePoints(40).annotate({
192
+ expected: "a string with at most 40 code points",
193
+ }),
194
+ )
195
+ .check(
196
+ Schema.isPattern(
197
+ new globalThis.RegExp("[0-9A-Fa-f]{40}", "u"),
198
+ ).annotate({
199
+ expected: "a string matching the RegExp [0-9A-Fa-f]{40}",
200
+ }),
201
+ ),
202
+ ).check(
203
+ Schema.isMaxLength(5).annotate({
204
+ expected: "a value with a length of at most 5",
205
+ }),
206
+ ),
207
+ ),
208
+ Tags: Schema.optionalKey(Schema.Array(Tag)),
209
+ });
210
+
211
+ /**
212
+ * The AWSOIDCProviderRelationshipIssues array lists inputs that can use several outputs
213
+ * from one source type. Each input retains its provider value until a reviewed
214
+ * mapping chooses an output.
215
+ */
216
+ export const AWSOIDCProviderRelationshipIssues = [];
217
+
218
+ export const AWSOIDCProviderResourceTypeSchema = Schema.Struct({
219
+ provider: Schema.Literal("aws"),
220
+ service: Schema.Literal("iam"),
221
+ resource: Schema.Literal("oidcprovider"),
222
+ });
223
+
224
+ /**
225
+ * The AWSOIDCProviderResource class retains its owning stack across declarations.
226
+ * Applied output properties are ordinary values maintained by the lifecycle.
227
+ */
228
+ export class AWSOIDCProviderResource<
229
+ Props = AWSOIDCProviderProps,
230
+ > extends ResourceEntity<{
231
+ readonly provider: "aws";
232
+ readonly service: "iam";
233
+ readonly resource: "oidcprovider";
234
+ }> {
235
+ constructor(
236
+ key: ResourceKey,
237
+ readonly props: Props,
238
+ private readonly binding?: ResourceOutputBinding,
239
+ ) {
240
+ super({
241
+ key,
242
+ resourceType: {
243
+ provider: "aws",
244
+ service: "iam",
245
+ resource: "oidcprovider",
246
+ },
247
+ });
248
+ }
249
+
250
+ /**
251
+ * Successful lifecycle writes update this value for declarations owned by the stack.
252
+ * Reading an unavailable value throws ResourceOutputResolutionMissing.
253
+ */
254
+ get Arn(): Required<AWSOIDCProviderOutputs>["Arn"] {
255
+ const value: Required<AWSOIDCProviderOutputs>["Arn"] =
256
+ ResourceOutputBinding.value(
257
+ this.binding,
258
+ this.key,
259
+ "Arn",
260
+ Schema.requiredKey(AWSOIDCProviderOutputsSchema.fields.Arn),
261
+ );
262
+ return value;
263
+ }
264
+ }
265
+
266
+ /**
267
+ * Callers must validate properties before constructing the declaration.
268
+ * Compatible resources can depend on it before apply supplies provider values.
269
+ * Reading applied outputs requires a binding to the owning stack.
270
+ */
271
+ export function createAWSOIDCProviderDeclaration<Props>(
272
+ key: ResourceKey,
273
+ props: Props,
274
+ binding?: ResourceOutputBinding,
275
+ ): AWSOIDCProviderResource<Props> {
276
+ const resource: AWSOIDCProviderResource<Props> =
277
+ new AWSOIDCProviderResource<Props>(key, props, binding);
278
+
279
+ return resource;
280
+ }
281
+
282
+ /**
283
+ * The AWSOIDCProvider resource factory registers a validated declaration in the
284
+ * stack graph. Its outputs become available after apply saves the resource.
285
+ */
286
+ export const AWSOIDCProvider = Effect.fn("AWSOIDCProvider")(function* (input: {
287
+ logicalId: string;
288
+ props: AWSOIDCProviderProps;
289
+ }) {
290
+ const graph = yield* ResourceGraphBuilder;
291
+
292
+ const key: ResourceKey = { logicalId: input.logicalId };
293
+
294
+ const declaration = yield* graph.resource(key);
295
+
296
+ const props = yield* Schema.decodeEffect(AWSOIDCProviderPropsSchema)(
297
+ input.props,
298
+ );
299
+
300
+ yield* declaration.registerEntity(AWSOIDCProviderResourceTypeSchema, {
301
+ propsSchema: AWSOIDCProviderPropsSchema,
302
+ requestSchema: AWSOIDCProviderRequestSchema,
303
+ outputsSchema: AWSOIDCProviderOutputsSchema,
304
+ props,
305
+ });
306
+
307
+ const resource: AWSOIDCProviderResource = createAWSOIDCProviderDeclaration(
308
+ key,
309
+ props,
310
+ declaration.outputs,
311
+ );
312
+
313
+ return resource;
314
+ });
@@ -8,7 +8,7 @@ import {
8
8
  type ResourceKey,
9
9
  ResourceSchemaAnnotationSchema,
10
10
  } from "nomoss/core";
11
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
11
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
12
12
 
13
13
  export interface AWSPolicyProps {
14
14
  readonly Groups?: ReadonlyArray<string>;
@@ -30,6 +30,7 @@ export const AWSPolicyResourceSchema = ResourceSchemaAnnotationSchema.make({
30
30
  stateSecretOutputKeys: [],
31
31
  primaryIdentifier: ["/properties/Id"],
32
32
  });
33
+
33
34
  export const AWSPolicyPropsSchema = annotateResourceSchema(
34
35
  Schema.Struct({
35
36
  Groups: Schema.optionalKey(
@@ -158,7 +159,14 @@ export const AWSPolicyRequestSchema = Schema.Struct({
158
159
  }),
159
160
  ),
160
161
  });
162
+
163
+ /**
164
+ * The AWSPolicyRelationshipIssues array lists inputs that can use several outputs
165
+ * from one source type. Each input retains its provider value until a reviewed
166
+ * mapping chooses an output.
167
+ */
161
168
  export const AWSPolicyRelationshipIssues = [];
169
+
162
170
  export const AWSPolicyResourceTypeSchema = Schema.Struct({
163
171
  provider: Schema.Literal("aws"),
164
172
  service: Schema.Literal("iam"),
@@ -223,7 +231,10 @@ export function createAWSPolicyDeclaration<Props>(
223
231
  return resource;
224
232
  }
225
233
 
226
- /** The AWSPolicy resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
234
+ /**
235
+ * The AWSPolicy resource factory registers a validated declaration in the
236
+ * stack graph. Its outputs become available after apply saves the resource.
237
+ */
227
238
  export const AWSPolicy = Effect.fn("AWSPolicy")(function* (input: {
228
239
  logicalId: string;
229
240
  props: AWSPolicyProps;
@@ -251,29 +262,3 @@ export const AWSPolicy = Effect.fn("AWSPolicy")(function* (input: {
251
262
 
252
263
  return resource;
253
264
  });
254
- export const AWSPolicyOutputCatalog = [
255
- {
256
- source: {
257
- provider: "AWS",
258
- service: "CloudFormation",
259
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-policy.json",
260
- format: "CloudFormation",
261
- },
262
- typeName: "AWS::IAM::Policy",
263
- resource: "policy",
264
- primaryIdentifier: ["/properties/Id"],
265
- createOnlyProperties: [],
266
- writeOnlyProperties: [],
267
- outputs: {
268
- Id: {
269
- schema: {
270
- description: "",
271
- type: "string",
272
- },
273
- schemaPath: "/properties/Id",
274
- valuePath: "/Id",
275
- required: false,
276
- },
277
- },
278
- },
279
- ];
@@ -9,7 +9,7 @@ import {
9
9
  ResourceReferenceSchema,
10
10
  ResourceSchemaAnnotationSchema,
11
11
  } from "nomoss/core";
12
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
12
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
13
13
 
14
14
  interface Policy {
15
15
  readonly PolicyDocument:
@@ -101,6 +101,7 @@ export const AWSRoleResourceSchema = ResourceSchemaAnnotationSchema.make({
101
101
  },
102
102
  primaryIdentifier: ["/properties/RoleName"],
103
103
  });
104
+
104
105
  export const AWSRolePropsSchema = annotateResourceSchema(
105
106
  Schema.Struct({
106
107
  AssumeRolePolicyDocument: Schema.Union([
@@ -308,7 +309,14 @@ export const AWSRoleRequestSchema = Schema.Struct({
308
309
  }),
309
310
  ),
310
311
  });
312
+
313
+ /**
314
+ * The AWSRoleRelationshipIssues array lists inputs that can use several outputs
315
+ * from one source type. Each input retains its provider value until a reviewed
316
+ * mapping chooses an output.
317
+ */
311
318
  export const AWSRoleRelationshipIssues = [];
319
+
312
320
  export const AWSRoleResourceTypeSchema = Schema.Struct({
313
321
  provider: Schema.Literal("aws"),
314
322
  service: Schema.Literal("iam"),
@@ -403,7 +411,10 @@ export function createAWSRoleDeclaration<Props>(
403
411
  return resource;
404
412
  }
405
413
 
406
- /** The AWSRole resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
414
+ /**
415
+ * The AWSRole resource factory registers a validated declaration in the
416
+ * stack graph. Its outputs become available after apply saves the resource.
417
+ */
407
418
  export const AWSRole = Effect.fn("AWSRole")(function* (input: {
408
419
  logicalId: string;
409
420
  props: AWSRoleProps;
@@ -431,48 +442,3 @@ export const AWSRole = Effect.fn("AWSRole")(function* (input: {
431
442
 
432
443
  return resource;
433
444
  });
434
- export const AWSRoleOutputCatalog = [
435
- {
436
- source: {
437
- provider: "AWS",
438
- service: "CloudFormation",
439
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-role.json",
440
- format: "CloudFormation",
441
- },
442
- typeName: "AWS::IAM::Role",
443
- resource: "role",
444
- primaryIdentifier: ["/properties/RoleName"],
445
- createOnlyProperties: ["/properties/Path", "/properties/RoleName"],
446
- writeOnlyProperties: [],
447
- outputs: {
448
- Arn: {
449
- schema: {
450
- description: "",
451
- type: "string",
452
- },
453
- schemaPath: "/properties/Arn",
454
- valuePath: "/Arn",
455
- required: false,
456
- },
457
- RoleId: {
458
- schema: {
459
- description: "",
460
- type: "string",
461
- },
462
- schemaPath: "/properties/RoleId",
463
- valuePath: "/RoleId",
464
- required: false,
465
- },
466
- RoleName: {
467
- schema: {
468
- description:
469
- 'A name for the IAM role, up to 64 characters in length. For valid values, see the ``RoleName`` parameter for the [CreateRole](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) action in the *User Guide*.\n This parameter allows (per its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".\n If you don\'t specify a name, CFN generates a unique physical ID and uses that ID for the role name.\n If you specify a name, you must specify the ``CAPABILITY_NAMED_IAM`` value to acknowledge your template\'s capabilities. For more information, see [Acknowledging Resources in Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities).\n Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using ``Fn::Join`` and ``AWS::Region`` to create a Region-specific name, as in the following example: ``{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}``.',
470
- type: "string",
471
- },
472
- schemaPath: "/properties/RoleName",
473
- valuePath: "/RoleName",
474
- required: false,
475
- },
476
- },
477
- },
478
- ];
@@ -9,10 +9,10 @@ import {
9
9
  ResourceReferenceSchema,
10
10
  ResourceSchemaAnnotationSchema,
11
11
  } from "nomoss/core";
12
- import { ResourceOutputBinding } from "../../../../../../../core/resource/resourceOutputBinding.js";
12
+ import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
13
13
 
14
14
  export interface AWSRolePolicyProps {
15
- readonly PolicyDocument?: {
15
+ readonly PolicyDocument: {
16
16
  readonly [x: string]: Schema.Json;
17
17
  };
18
18
  readonly PolicyName: string;
@@ -37,17 +37,16 @@ export const AWSRolePolicyResourceSchema = ResourceSchemaAnnotationSchema.make({
37
37
  },
38
38
  primaryIdentifier: ["/properties/PolicyName", "/properties/RoleName"],
39
39
  });
40
+
40
41
  export const AWSRolePolicyPropsSchema = annotateResourceSchema(
41
42
  Schema.Struct({
42
- PolicyDocument: Schema.optionalKey(
43
- Schema.Record(
44
- Schema.String,
45
- Schema.Json.annotate({ expected: "JSON value" }),
46
- ).annotate({
47
- description:
48
- "The policy document.\n You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM.\n The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to validate this parameter is a string of characters consisting of the following:\n + Any printable ASCII character ranging from the space character (``\\u0020``) through the end of the ASCII character range\n + The printable characters in the Basic Latin and Latin-1 Supplement character set (through ``\\u00FF``)\n + The special characters tab (``\\u0009``), line feed (``\\u000A``), and carriage return (``\\u000D``)",
49
- }),
50
- ),
43
+ PolicyDocument: Schema.Record(
44
+ Schema.String,
45
+ Schema.Json.annotate({ expected: "JSON value" }),
46
+ ).annotate({
47
+ description:
48
+ "The policy document.\n You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM.\n The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to validate this parameter is a string of characters consisting of the following:\n + Any printable ASCII character ranging from the space character (``\\u0020``) through the end of the ASCII character range\n + The printable characters in the Basic Latin and Latin-1 Supplement character set (through ``\\u00FF``)\n + The special characters tab (``\\u0009``), line feed (``\\u000A``), and carriage return (``\\u000D``)",
49
+ }),
51
50
  PolicyName: Schema.String.annotate({
52
51
  description:
53
52
  "The name of the policy document.\n This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-",
@@ -97,7 +96,7 @@ export const AWSRolePolicyOutputsSchema = Schema.Struct({
97
96
  });
98
97
 
99
98
  export interface AWSRolePolicyRequest {
100
- readonly PolicyDocument?: {
99
+ readonly PolicyDocument: {
101
100
  readonly [x: string]: Schema.Json;
102
101
  };
103
102
  readonly PolicyName: string;
@@ -105,15 +104,13 @@ export interface AWSRolePolicyRequest {
105
104
  }
106
105
 
107
106
  export const AWSRolePolicyRequestSchema = Schema.Struct({
108
- PolicyDocument: Schema.optionalKey(
109
- Schema.Record(
110
- Schema.String,
111
- Schema.Json.annotate({ expected: "JSON value" }),
112
- ).annotate({
113
- description:
114
- "The policy document.\n You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM.\n The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to validate this parameter is a string of characters consisting of the following:\n + Any printable ASCII character ranging from the space character (``\\u0020``) through the end of the ASCII character range\n + The printable characters in the Basic Latin and Latin-1 Supplement character set (through ``\\u00FF``)\n + The special characters tab (``\\u0009``), line feed (``\\u000A``), and carriage return (``\\u000D``)",
115
- }),
116
- ),
107
+ PolicyDocument: Schema.Record(
108
+ Schema.String,
109
+ Schema.Json.annotate({ expected: "JSON value" }),
110
+ ).annotate({
111
+ description:
112
+ "The policy document.\n You must provide policies in JSON format in IAM. However, for CFN templates formatted in YAML, you can provide the policy in JSON or YAML format. CFN always converts a YAML policy to JSON format before submitting it to IAM.\n The [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) used to validate this parameter is a string of characters consisting of the following:\n + Any printable ASCII character ranging from the space character (``\\u0020``) through the end of the ASCII character range\n + The printable characters in the Basic Latin and Latin-1 Supplement character set (through ``\\u00FF``)\n + The special characters tab (``\\u0009``), line feed (``\\u000A``), and carriage return (``\\u000D``)",
113
+ }),
117
114
  PolicyName: Schema.String.annotate({
118
115
  description:
119
116
  "The name of the policy document.\n This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-",
@@ -123,7 +120,14 @@ export const AWSRolePolicyRequestSchema = Schema.Struct({
123
120
  "The name of the role to associate the policy with.\n This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-",
124
121
  }),
125
122
  });
123
+
124
+ /**
125
+ * The AWSRolePolicyRelationshipIssues array lists inputs that can use several outputs
126
+ * from one source type. Each input retains its provider value until a reviewed
127
+ * mapping chooses an output.
128
+ */
126
129
  export const AWSRolePolicyRelationshipIssues = [];
130
+
127
131
  export const AWSRolePolicyResourceTypeSchema = Schema.Struct({
128
132
  provider: Schema.Literal("aws"),
129
133
  service: Schema.Literal("iam"),
@@ -203,7 +207,10 @@ export function createAWSRolePolicyDeclaration<Props>(
203
207
  return resource;
204
208
  }
205
209
 
206
- /** The AWSRolePolicy resource factory validates properties and registers the resource in the shared graph. Provider values become available after apply saves the resource. */
210
+ /**
211
+ * The AWSRolePolicy resource factory registers a validated declaration in the
212
+ * stack graph. Its outputs become available after apply saves the resource.
213
+ */
207
214
  export const AWSRolePolicy = Effect.fn("AWSRolePolicy")(function* (input: {
208
215
  logicalId: string;
209
216
  props: AWSRolePolicyProps;
@@ -233,40 +240,3 @@ export const AWSRolePolicy = Effect.fn("AWSRolePolicy")(function* (input: {
233
240
 
234
241
  return resource;
235
242
  });
236
- export const AWSRolePolicyOutputCatalog = [
237
- {
238
- source: {
239
- provider: "AWS",
240
- service: "CloudFormation",
241
- name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-rolepolicy.json",
242
- format: "CloudFormation",
243
- },
244
- typeName: "AWS::IAM::RolePolicy",
245
- resource: "rolepolicy",
246
- primaryIdentifier: ["/properties/PolicyName", "/properties/RoleName"],
247
- createOnlyProperties: ["/properties/PolicyName", "/properties/RoleName"],
248
- writeOnlyProperties: [],
249
- outputs: {
250
- PolicyName: {
251
- schema: {
252
- description:
253
- "The name of the policy document.\n This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-",
254
- type: "string",
255
- },
256
- schemaPath: "/properties/PolicyName",
257
- valuePath: "/PolicyName",
258
- required: true,
259
- },
260
- RoleName: {
261
- schema: {
262
- description:
263
- "The name of the role to associate the policy with.\n This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-",
264
- type: "string",
265
- },
266
- schemaPath: "/properties/RoleName",
267
- valuePath: "/RoleName",
268
- required: true,
269
- },
270
- },
271
- },
272
- ];