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,184 @@
|
|
|
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 AWSAccessKeyProps {
|
|
14
|
+
readonly Serial?: number;
|
|
15
|
+
readonly Status?: string;
|
|
16
|
+
readonly UserName: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const AWSAccessKeyResourceSchema = ResourceSchemaAnnotationSchema.make({
|
|
20
|
+
provider: "aws",
|
|
21
|
+
service: "iam",
|
|
22
|
+
resource: "accesskey",
|
|
23
|
+
operation: "create",
|
|
24
|
+
stateSecretOutputKeys: ["SecretAccessKey"],
|
|
25
|
+
replacement: {
|
|
26
|
+
order: "createBeforeDestroy",
|
|
27
|
+
properties: [["UserName"], ["Serial"]],
|
|
28
|
+
},
|
|
29
|
+
primaryIdentifier: ["/properties/Id"],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const AWSAccessKeyPropsSchema = annotateResourceSchema(
|
|
33
|
+
Schema.Struct({
|
|
34
|
+
Serial: Schema.optionalKey(Schema.Int),
|
|
35
|
+
Status: Schema.optionalKey(Schema.String),
|
|
36
|
+
UserName: Schema.String,
|
|
37
|
+
}),
|
|
38
|
+
AWSAccessKeyResourceSchema,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export interface AWSAccessKeyOutputs {
|
|
42
|
+
readonly SecretAccessKey?: string;
|
|
43
|
+
readonly Id?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const AWSAccessKeyOutputsSchema = Schema.Struct({
|
|
47
|
+
SecretAccessKey: Schema.optionalKey(Schema.String),
|
|
48
|
+
Id: Schema.optionalKey(Schema.String),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export interface AWSAccessKeyRequest {
|
|
52
|
+
readonly Serial?: number;
|
|
53
|
+
readonly Status?: string;
|
|
54
|
+
readonly UserName: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const AWSAccessKeyRequestSchema = Schema.Struct({
|
|
58
|
+
Serial: Schema.optionalKey(Schema.Int),
|
|
59
|
+
Status: Schema.optionalKey(Schema.String),
|
|
60
|
+
UserName: Schema.String,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The AWSAccessKeyRelationshipIssues array lists inputs that can use several outputs
|
|
65
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
66
|
+
* mapping chooses an output.
|
|
67
|
+
*/
|
|
68
|
+
export const AWSAccessKeyRelationshipIssues = [];
|
|
69
|
+
|
|
70
|
+
export const AWSAccessKeyResourceTypeSchema = Schema.Struct({
|
|
71
|
+
provider: Schema.Literal("aws"),
|
|
72
|
+
service: Schema.Literal("iam"),
|
|
73
|
+
resource: Schema.Literal("accesskey"),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The AWSAccessKeyResource class retains its owning stack across declarations.
|
|
78
|
+
* Applied output properties are ordinary values maintained by the lifecycle.
|
|
79
|
+
*/
|
|
80
|
+
export class AWSAccessKeyResource<
|
|
81
|
+
Props = AWSAccessKeyProps,
|
|
82
|
+
> extends ResourceEntity<{
|
|
83
|
+
readonly provider: "aws";
|
|
84
|
+
readonly service: "iam";
|
|
85
|
+
readonly resource: "accesskey";
|
|
86
|
+
}> {
|
|
87
|
+
constructor(
|
|
88
|
+
key: ResourceKey,
|
|
89
|
+
readonly props: Props,
|
|
90
|
+
private readonly binding?: ResourceOutputBinding,
|
|
91
|
+
) {
|
|
92
|
+
super({
|
|
93
|
+
key,
|
|
94
|
+
resourceType: {
|
|
95
|
+
provider: "aws",
|
|
96
|
+
service: "iam",
|
|
97
|
+
resource: "accesskey",
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Successful lifecycle writes update this value for declarations owned by the stack.
|
|
104
|
+
* Reading an unavailable value throws ResourceOutputResolutionMissing.
|
|
105
|
+
*/
|
|
106
|
+
get SecretAccessKey(): Required<AWSAccessKeyOutputs>["SecretAccessKey"] {
|
|
107
|
+
const value: Required<AWSAccessKeyOutputs>["SecretAccessKey"] =
|
|
108
|
+
ResourceOutputBinding.value(
|
|
109
|
+
this.binding,
|
|
110
|
+
this.key,
|
|
111
|
+
"SecretAccessKey",
|
|
112
|
+
Schema.requiredKey(AWSAccessKeyOutputsSchema.fields.SecretAccessKey),
|
|
113
|
+
);
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Successful lifecycle writes update this value for declarations owned by the stack.
|
|
119
|
+
* Reading an unavailable value throws ResourceOutputResolutionMissing.
|
|
120
|
+
*/
|
|
121
|
+
get Id(): Required<AWSAccessKeyOutputs>["Id"] {
|
|
122
|
+
const value: Required<AWSAccessKeyOutputs>["Id"] =
|
|
123
|
+
ResourceOutputBinding.value(
|
|
124
|
+
this.binding,
|
|
125
|
+
this.key,
|
|
126
|
+
"Id",
|
|
127
|
+
Schema.requiredKey(AWSAccessKeyOutputsSchema.fields.Id),
|
|
128
|
+
);
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Callers must validate properties before constructing the declaration.
|
|
135
|
+
* Compatible resources can depend on it before apply supplies provider values.
|
|
136
|
+
* Reading applied outputs requires a binding to the owning stack.
|
|
137
|
+
*/
|
|
138
|
+
export function createAWSAccessKeyDeclaration<Props>(
|
|
139
|
+
key: ResourceKey,
|
|
140
|
+
props: Props,
|
|
141
|
+
binding?: ResourceOutputBinding,
|
|
142
|
+
): AWSAccessKeyResource<Props> {
|
|
143
|
+
const resource: AWSAccessKeyResource<Props> = new AWSAccessKeyResource<Props>(
|
|
144
|
+
key,
|
|
145
|
+
props,
|
|
146
|
+
binding,
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
return resource;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The AWSAccessKey resource factory registers a validated declaration in the
|
|
154
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
155
|
+
*/
|
|
156
|
+
export const AWSAccessKey = Effect.fn("AWSAccessKey")(function* (input: {
|
|
157
|
+
logicalId: string;
|
|
158
|
+
props: AWSAccessKeyProps;
|
|
159
|
+
}) {
|
|
160
|
+
const graph = yield* ResourceGraphBuilder;
|
|
161
|
+
|
|
162
|
+
const key: ResourceKey = { logicalId: input.logicalId };
|
|
163
|
+
|
|
164
|
+
const declaration = yield* graph.resource(key);
|
|
165
|
+
|
|
166
|
+
const props = yield* Schema.decodeEffect(AWSAccessKeyPropsSchema)(
|
|
167
|
+
input.props,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
yield* declaration.registerEntity(AWSAccessKeyResourceTypeSchema, {
|
|
171
|
+
propsSchema: AWSAccessKeyPropsSchema,
|
|
172
|
+
requestSchema: AWSAccessKeyRequestSchema,
|
|
173
|
+
outputsSchema: AWSAccessKeyOutputsSchema,
|
|
174
|
+
props,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
const resource: AWSAccessKeyResource = createAWSAccessKeyDeclaration(
|
|
178
|
+
key,
|
|
179
|
+
props,
|
|
180
|
+
declaration.outputs,
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
return resource;
|
|
184
|
+
});
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ResourceReferenceSchema,
|
|
10
10
|
ResourceSchemaAnnotationSchema,
|
|
11
11
|
} from "nomoss/core";
|
|
12
|
-
import { ResourceOutputBinding } from "
|
|
12
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
13
13
|
|
|
14
14
|
interface Policy {
|
|
15
15
|
readonly PolicyDocument:
|
|
@@ -63,6 +63,7 @@ export const AWSGroupResourceSchema = ResourceSchemaAnnotationSchema.make({
|
|
|
63
63
|
},
|
|
64
64
|
primaryIdentifier: ["/properties/GroupName"],
|
|
65
65
|
});
|
|
66
|
+
|
|
66
67
|
export const AWSGroupPropsSchema = annotateResourceSchema(
|
|
67
68
|
Schema.Struct({
|
|
68
69
|
GroupName: Schema.optionalKey(
|
|
@@ -173,7 +174,14 @@ export const AWSGroupRequestSchema = Schema.Struct({
|
|
|
173
174
|
}),
|
|
174
175
|
),
|
|
175
176
|
});
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The AWSGroupRelationshipIssues array lists inputs that can use several outputs
|
|
180
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
181
|
+
* mapping chooses an output.
|
|
182
|
+
*/
|
|
176
183
|
export const AWSGroupRelationshipIssues = [];
|
|
184
|
+
|
|
177
185
|
export const AWSGroupResourceTypeSchema = Schema.Struct({
|
|
178
186
|
provider: Schema.Literal("aws"),
|
|
179
187
|
service: Schema.Literal("iam"),
|
|
@@ -253,7 +261,10 @@ export function createAWSGroupDeclaration<Props>(
|
|
|
253
261
|
return resource;
|
|
254
262
|
}
|
|
255
263
|
|
|
256
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* The AWSGroup resource factory registers a validated declaration in the
|
|
266
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
267
|
+
*/
|
|
257
268
|
export const AWSGroup = Effect.fn("AWSGroup")(function* (input: {
|
|
258
269
|
logicalId: string;
|
|
259
270
|
props: AWSGroupProps;
|
|
@@ -281,39 +292,3 @@ export const AWSGroup = Effect.fn("AWSGroup")(function* (input: {
|
|
|
281
292
|
|
|
282
293
|
return resource;
|
|
283
294
|
});
|
|
284
|
-
export const AWSGroupOutputCatalog = [
|
|
285
|
-
{
|
|
286
|
-
source: {
|
|
287
|
-
provider: "AWS",
|
|
288
|
-
service: "CloudFormation",
|
|
289
|
-
name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-group.json",
|
|
290
|
-
format: "CloudFormation",
|
|
291
|
-
},
|
|
292
|
-
typeName: "AWS::IAM::Group",
|
|
293
|
-
resource: "group",
|
|
294
|
-
primaryIdentifier: ["/properties/GroupName"],
|
|
295
|
-
createOnlyProperties: ["/properties/GroupName"],
|
|
296
|
-
writeOnlyProperties: [],
|
|
297
|
-
outputs: {
|
|
298
|
-
Arn: {
|
|
299
|
-
schema: {
|
|
300
|
-
description: "",
|
|
301
|
-
type: "string",
|
|
302
|
-
},
|
|
303
|
-
schemaPath: "/properties/Arn",
|
|
304
|
-
valuePath: "/Arn",
|
|
305
|
-
required: false,
|
|
306
|
-
},
|
|
307
|
-
GroupName: {
|
|
308
|
-
schema: {
|
|
309
|
-
description:
|
|
310
|
-
'The name of the group to create. Do not include the path in this value.\n The group name must be unique within the account. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins". If you don\'t specify a name, CFN generates a unique physical ID and uses that ID for the group name.\n If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new 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"}]]}``.',
|
|
311
|
-
type: "string",
|
|
312
|
-
},
|
|
313
|
-
schemaPath: "/properties/GroupName",
|
|
314
|
-
valuePath: "/GroupName",
|
|
315
|
-
required: false,
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
];
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
ResourceReferenceSchema,
|
|
10
10
|
ResourceSchemaAnnotationSchema,
|
|
11
11
|
} from "nomoss/core";
|
|
12
|
-
import { ResourceOutputBinding } from "
|
|
12
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
13
13
|
|
|
14
14
|
export interface AWSGroupPolicyProps {
|
|
15
|
-
readonly PolicyDocument
|
|
15
|
+
readonly PolicyDocument: {
|
|
16
16
|
readonly [x: string]: Schema.Json;
|
|
17
17
|
};
|
|
18
18
|
readonly PolicyName: string;
|
|
@@ -39,17 +39,16 @@ export const AWSGroupPolicyResourceSchema = ResourceSchemaAnnotationSchema.make(
|
|
|
39
39
|
primaryIdentifier: ["/properties/PolicyName", "/properties/GroupName"],
|
|
40
40
|
},
|
|
41
41
|
);
|
|
42
|
+
|
|
42
43
|
export const AWSGroupPolicyPropsSchema = annotateResourceSchema(
|
|
43
44
|
Schema.Struct({
|
|
44
|
-
PolicyDocument: Schema.
|
|
45
|
-
Schema.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
),
|
|
45
|
+
PolicyDocument: Schema.Record(
|
|
46
|
+
Schema.String,
|
|
47
|
+
Schema.Json.annotate({ expected: "JSON value" }),
|
|
48
|
+
).annotate({
|
|
49
|
+
description:
|
|
50
|
+
"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``)",
|
|
51
|
+
}),
|
|
53
52
|
PolicyName: Schema.String.annotate({
|
|
54
53
|
description:
|
|
55
54
|
"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: _+=,.@-",
|
|
@@ -99,7 +98,7 @@ export const AWSGroupPolicyOutputsSchema = Schema.Struct({
|
|
|
99
98
|
});
|
|
100
99
|
|
|
101
100
|
export interface AWSGroupPolicyRequest {
|
|
102
|
-
readonly PolicyDocument
|
|
101
|
+
readonly PolicyDocument: {
|
|
103
102
|
readonly [x: string]: Schema.Json;
|
|
104
103
|
};
|
|
105
104
|
readonly PolicyName: string;
|
|
@@ -107,15 +106,13 @@ export interface AWSGroupPolicyRequest {
|
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
export const AWSGroupPolicyRequestSchema = Schema.Struct({
|
|
110
|
-
PolicyDocument: Schema.
|
|
111
|
-
Schema.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}),
|
|
118
|
-
),
|
|
109
|
+
PolicyDocument: 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
|
+
}),
|
|
119
116
|
PolicyName: Schema.String.annotate({
|
|
120
117
|
description:
|
|
121
118
|
"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: _+=,.@-",
|
|
@@ -125,7 +122,14 @@ export const AWSGroupPolicyRequestSchema = Schema.Struct({
|
|
|
125
122
|
"The name of the group 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: _+=,.@-.",
|
|
126
123
|
}),
|
|
127
124
|
});
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The AWSGroupPolicyRelationshipIssues array lists inputs that can use several outputs
|
|
128
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
129
|
+
* mapping chooses an output.
|
|
130
|
+
*/
|
|
128
131
|
export const AWSGroupPolicyRelationshipIssues = [];
|
|
132
|
+
|
|
129
133
|
export const AWSGroupPolicyResourceTypeSchema = Schema.Struct({
|
|
130
134
|
provider: Schema.Literal("aws"),
|
|
131
135
|
service: Schema.Literal("iam"),
|
|
@@ -205,7 +209,10 @@ export function createAWSGroupPolicyDeclaration<Props>(
|
|
|
205
209
|
return resource;
|
|
206
210
|
}
|
|
207
211
|
|
|
208
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* The AWSGroupPolicy resource factory registers a validated declaration in the
|
|
214
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
215
|
+
*/
|
|
209
216
|
export const AWSGroupPolicy = Effect.fn("AWSGroupPolicy")(function* (input: {
|
|
210
217
|
logicalId: string;
|
|
211
218
|
props: AWSGroupPolicyProps;
|
|
@@ -235,40 +242,3 @@ export const AWSGroupPolicy = Effect.fn("AWSGroupPolicy")(function* (input: {
|
|
|
235
242
|
|
|
236
243
|
return resource;
|
|
237
244
|
});
|
|
238
|
-
export const AWSGroupPolicyOutputCatalog = [
|
|
239
|
-
{
|
|
240
|
-
source: {
|
|
241
|
-
provider: "AWS",
|
|
242
|
-
service: "CloudFormation",
|
|
243
|
-
name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-grouppolicy.json",
|
|
244
|
-
format: "CloudFormation",
|
|
245
|
-
},
|
|
246
|
-
typeName: "AWS::IAM::GroupPolicy",
|
|
247
|
-
resource: "grouppolicy",
|
|
248
|
-
primaryIdentifier: ["/properties/PolicyName", "/properties/GroupName"],
|
|
249
|
-
createOnlyProperties: ["/properties/PolicyName", "/properties/GroupName"],
|
|
250
|
-
writeOnlyProperties: [],
|
|
251
|
-
outputs: {
|
|
252
|
-
PolicyName: {
|
|
253
|
-
schema: {
|
|
254
|
-
description:
|
|
255
|
-
"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: _+=,.@-",
|
|
256
|
-
type: "string",
|
|
257
|
-
},
|
|
258
|
-
schemaPath: "/properties/PolicyName",
|
|
259
|
-
valuePath: "/PolicyName",
|
|
260
|
-
required: true,
|
|
261
|
-
},
|
|
262
|
-
GroupName: {
|
|
263
|
-
schema: {
|
|
264
|
-
description:
|
|
265
|
-
"The name of the group 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: _+=,.@-.",
|
|
266
|
-
type: "string",
|
|
267
|
-
},
|
|
268
|
-
schemaPath: "/properties/GroupName",
|
|
269
|
-
valuePath: "/GroupName",
|
|
270
|
-
required: true,
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
];
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ResourceReferenceSchema,
|
|
10
10
|
ResourceSchemaAnnotationSchema,
|
|
11
11
|
} from "nomoss/core";
|
|
12
|
-
import { ResourceOutputBinding } from "
|
|
12
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
13
13
|
|
|
14
14
|
export interface AWSInstanceProfileProps {
|
|
15
15
|
readonly Path?: string;
|
|
@@ -37,6 +37,7 @@ export const AWSInstanceProfileResourceSchema =
|
|
|
37
37
|
},
|
|
38
38
|
primaryIdentifier: ["/properties/InstanceProfileName"],
|
|
39
39
|
});
|
|
40
|
+
|
|
40
41
|
export const AWSInstanceProfilePropsSchema = annotateResourceSchema(
|
|
41
42
|
Schema.Struct({
|
|
42
43
|
Path: Schema.optionalKey(
|
|
@@ -128,7 +129,14 @@ export const AWSInstanceProfileRequestSchema = Schema.Struct({
|
|
|
128
129
|
}),
|
|
129
130
|
),
|
|
130
131
|
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The AWSInstanceProfileRelationshipIssues array lists inputs that can use several outputs
|
|
135
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
136
|
+
* mapping chooses an output.
|
|
137
|
+
*/
|
|
131
138
|
export const AWSInstanceProfileRelationshipIssues = [];
|
|
139
|
+
|
|
132
140
|
export const AWSInstanceProfileResourceTypeSchema = Schema.Struct({
|
|
133
141
|
provider: Schema.Literal("aws"),
|
|
134
142
|
service: Schema.Literal("iam"),
|
|
@@ -210,7 +218,10 @@ export function createAWSInstanceProfileDeclaration<Props>(
|
|
|
210
218
|
return resource;
|
|
211
219
|
}
|
|
212
220
|
|
|
213
|
-
/**
|
|
221
|
+
/**
|
|
222
|
+
* The AWSInstanceProfile resource factory registers a validated declaration in the
|
|
223
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
224
|
+
*/
|
|
214
225
|
export const AWSInstanceProfile = Effect.fn("AWSInstanceProfile")(
|
|
215
226
|
function* (input: { logicalId: string; props: AWSInstanceProfileProps }) {
|
|
216
227
|
const graph = yield* ResourceGraphBuilder;
|
|
@@ -236,42 +247,3 @@ export const AWSInstanceProfile = Effect.fn("AWSInstanceProfile")(
|
|
|
236
247
|
return resource;
|
|
237
248
|
},
|
|
238
249
|
);
|
|
239
|
-
export const AWSInstanceProfileOutputCatalog = [
|
|
240
|
-
{
|
|
241
|
-
source: {
|
|
242
|
-
provider: "AWS",
|
|
243
|
-
service: "CloudFormation",
|
|
244
|
-
name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-instanceprofile.json",
|
|
245
|
-
format: "CloudFormation",
|
|
246
|
-
},
|
|
247
|
-
typeName: "AWS::IAM::InstanceProfile",
|
|
248
|
-
resource: "instanceprofile",
|
|
249
|
-
primaryIdentifier: ["/properties/InstanceProfileName"],
|
|
250
|
-
createOnlyProperties: [
|
|
251
|
-
"/properties/InstanceProfileName",
|
|
252
|
-
"/properties/Path",
|
|
253
|
-
],
|
|
254
|
-
writeOnlyProperties: [],
|
|
255
|
-
outputs: {
|
|
256
|
-
Arn: {
|
|
257
|
-
schema: {
|
|
258
|
-
type: "string",
|
|
259
|
-
description: "",
|
|
260
|
-
},
|
|
261
|
-
schemaPath: "/properties/Arn",
|
|
262
|
-
valuePath: "/Arn",
|
|
263
|
-
required: false,
|
|
264
|
-
},
|
|
265
|
-
InstanceProfileName: {
|
|
266
|
-
schema: {
|
|
267
|
-
type: "string",
|
|
268
|
-
description:
|
|
269
|
-
"The name of the instance profile to create.\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: _+=,.@-",
|
|
270
|
-
},
|
|
271
|
-
schemaPath: "/properties/InstanceProfileName",
|
|
272
|
-
valuePath: "/InstanceProfileName",
|
|
273
|
-
required: false,
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
];
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ResourceReferenceSchema,
|
|
10
10
|
ResourceSchemaAnnotationSchema,
|
|
11
11
|
} from "nomoss/core";
|
|
12
|
-
import { ResourceOutputBinding } from "
|
|
12
|
+
import { ResourceOutputBinding } from "../../../../../src/core/resource/resourceOutputBinding.js";
|
|
13
13
|
|
|
14
14
|
export interface AWSManagedPolicyProps {
|
|
15
15
|
readonly Description?: string;
|
|
@@ -59,6 +59,7 @@ export const AWSManagedPolicyResourceSchema =
|
|
|
59
59
|
},
|
|
60
60
|
primaryIdentifier: ["/properties/PolicyArn"],
|
|
61
61
|
});
|
|
62
|
+
|
|
62
63
|
export const AWSManagedPolicyPropsSchema = annotateResourceSchema(
|
|
63
64
|
Schema.Struct({
|
|
64
65
|
Description: Schema.optionalKey(
|
|
@@ -303,7 +304,14 @@ export const AWSManagedPolicyRequestSchema = Schema.Struct({
|
|
|
303
304
|
),
|
|
304
305
|
),
|
|
305
306
|
});
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* The AWSManagedPolicyRelationshipIssues array lists inputs that can use several outputs
|
|
310
|
+
* from one source type. Each input retains its provider value until a reviewed
|
|
311
|
+
* mapping chooses an output.
|
|
312
|
+
*/
|
|
306
313
|
export const AWSManagedPolicyRelationshipIssues = [];
|
|
314
|
+
|
|
307
315
|
export const AWSManagedPolicyResourceTypeSchema = Schema.Struct({
|
|
308
316
|
provider: Schema.Literal("aws"),
|
|
309
317
|
service: Schema.Literal("iam"),
|
|
@@ -479,7 +487,10 @@ export function createAWSManagedPolicyDeclaration<Props>(
|
|
|
479
487
|
return resource;
|
|
480
488
|
}
|
|
481
489
|
|
|
482
|
-
/**
|
|
490
|
+
/**
|
|
491
|
+
* The AWSManagedPolicy resource factory registers a validated declaration in the
|
|
492
|
+
* stack graph. Its outputs become available after apply saves the resource.
|
|
493
|
+
*/
|
|
483
494
|
export const AWSManagedPolicy = Effect.fn("AWSManagedPolicy")(
|
|
484
495
|
function* (input: { logicalId: string; props: AWSManagedPolicyProps }) {
|
|
485
496
|
const graph = yield* ResourceGraphBuilder;
|
|
@@ -505,96 +516,3 @@ export const AWSManagedPolicy = Effect.fn("AWSManagedPolicy")(
|
|
|
505
516
|
return resource;
|
|
506
517
|
},
|
|
507
518
|
);
|
|
508
|
-
export const AWSManagedPolicyOutputCatalog = [
|
|
509
|
-
{
|
|
510
|
-
source: {
|
|
511
|
-
provider: "AWS",
|
|
512
|
-
service: "CloudFormation",
|
|
513
|
-
name: "refs/aws-cdk-service-spec/sources/CloudFormationSchema/us-east-1/aws-iam-managedpolicy.json",
|
|
514
|
-
format: "CloudFormation",
|
|
515
|
-
},
|
|
516
|
-
typeName: "AWS::IAM::ManagedPolicy",
|
|
517
|
-
resource: "managedpolicy",
|
|
518
|
-
primaryIdentifier: ["/properties/PolicyArn"],
|
|
519
|
-
createOnlyProperties: [
|
|
520
|
-
"/properties/ManagedPolicyName",
|
|
521
|
-
"/properties/Description",
|
|
522
|
-
"/properties/Path",
|
|
523
|
-
],
|
|
524
|
-
writeOnlyProperties: [],
|
|
525
|
-
outputs: {
|
|
526
|
-
PolicyArn: {
|
|
527
|
-
schema: {
|
|
528
|
-
type: "string",
|
|
529
|
-
description: "",
|
|
530
|
-
},
|
|
531
|
-
schemaPath: "/properties/PolicyArn",
|
|
532
|
-
valuePath: "/PolicyArn",
|
|
533
|
-
required: false,
|
|
534
|
-
},
|
|
535
|
-
AttachmentCount: {
|
|
536
|
-
schema: {
|
|
537
|
-
type: "integer",
|
|
538
|
-
description: "",
|
|
539
|
-
},
|
|
540
|
-
schemaPath: "/properties/AttachmentCount",
|
|
541
|
-
valuePath: "/AttachmentCount",
|
|
542
|
-
required: false,
|
|
543
|
-
},
|
|
544
|
-
CreateDate: {
|
|
545
|
-
schema: {
|
|
546
|
-
type: "string",
|
|
547
|
-
description: "",
|
|
548
|
-
},
|
|
549
|
-
schemaPath: "/properties/CreateDate",
|
|
550
|
-
valuePath: "/CreateDate",
|
|
551
|
-
required: false,
|
|
552
|
-
},
|
|
553
|
-
DefaultVersionId: {
|
|
554
|
-
schema: {
|
|
555
|
-
type: "string",
|
|
556
|
-
description: "",
|
|
557
|
-
},
|
|
558
|
-
schemaPath: "/properties/DefaultVersionId",
|
|
559
|
-
valuePath: "/DefaultVersionId",
|
|
560
|
-
required: false,
|
|
561
|
-
},
|
|
562
|
-
IsAttachable: {
|
|
563
|
-
schema: {
|
|
564
|
-
type: "boolean",
|
|
565
|
-
description: "",
|
|
566
|
-
},
|
|
567
|
-
schemaPath: "/properties/IsAttachable",
|
|
568
|
-
valuePath: "/IsAttachable",
|
|
569
|
-
required: false,
|
|
570
|
-
},
|
|
571
|
-
PermissionsBoundaryUsageCount: {
|
|
572
|
-
schema: {
|
|
573
|
-
type: "integer",
|
|
574
|
-
description: "",
|
|
575
|
-
},
|
|
576
|
-
schemaPath: "/properties/PermissionsBoundaryUsageCount",
|
|
577
|
-
valuePath: "/PermissionsBoundaryUsageCount",
|
|
578
|
-
required: false,
|
|
579
|
-
},
|
|
580
|
-
PolicyId: {
|
|
581
|
-
schema: {
|
|
582
|
-
type: "string",
|
|
583
|
-
description: "",
|
|
584
|
-
},
|
|
585
|
-
schemaPath: "/properties/PolicyId",
|
|
586
|
-
valuePath: "/PolicyId",
|
|
587
|
-
required: false,
|
|
588
|
-
},
|
|
589
|
-
UpdateDate: {
|
|
590
|
-
schema: {
|
|
591
|
-
type: "string",
|
|
592
|
-
description: "",
|
|
593
|
-
},
|
|
594
|
-
schemaPath: "/properties/UpdateDate",
|
|
595
|
-
valuePath: "/UpdateDate",
|
|
596
|
-
required: false,
|
|
597
|
-
},
|
|
598
|
-
},
|
|
599
|
-
},
|
|
600
|
-
];
|