Skip to content

Commit 6f1aa80

Browse files
authored
chore: add enum-like updater (#33500)
### Issue # (if applicable) N/A ### Reason for this change Adds metadata collector for CDK's enum-like classes. ### Description of changes * Added `EnumLikeUpdater` to parse out the enum-like classes and write them to a separate file to be used and updated. * Altered existing `EnumUpdater` to also write to another file, including the module name to prevent ambiguity when updating. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes N/A ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent ae544a1 commit 6f1aa80

File tree

7 files changed

+9177
-100
lines changed

7 files changed

+9177
-100
lines changed

packages/aws-cdk-lib/core/lib/analytics-data-source/enums.ts

+11-95
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
224224
'objectLike',
225225
'arrayWith'
226226
],
227-
'AssetBuildTime': [
228-
'all-before-deploy',
229-
'just-in-time'
230-
],
231227
'AssetHashType': [
232228
'source',
233229
'bundle',
@@ -634,31 +630,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
634630
'TEXT32K',
635631
'ZSTD'
636632
],
637-
'Command': [
638-
'ls',
639-
'list',
640-
'diff',
641-
'bootstrap',
642-
'deploy',
643-
'destroy',
644-
'synthesize',
645-
'synth',
646-
'metadata',
647-
'init',
648-
'version',
649-
'watch',
650-
'gc',
651-
'rollback',
652-
'import',
653-
'acknowledge',
654-
'ack',
655-
'notices',
656-
'migrate',
657-
'context',
658-
'docs',
659-
'doc',
660-
'doctor'
661-
],
662633
'ComparisonOperator': [
663634
0,
664635
1,
@@ -896,12 +867,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
896867
'CONTINUE',
897868
'ABANDON'
898869
],
899-
'DefaultSelection': [
900-
'none',
901-
'single',
902-
'main',
903-
'all'
904-
],
905870
'DeleteOption': [
906871
'SAFE_DELETE',
907872
'FORCE_DELETE',
@@ -927,14 +892,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
927892
'CODE_DEPLOY',
928893
'EXTERNAL'
929894
],
930-
'DeploymentState': [
931-
'pending',
932-
'queued',
933-
'deploying',
934-
'completed',
935-
'failed',
936-
'skipped'
937-
],
938895
'DesiredState': [
939896
'RUNNING',
940897
'STOPPED'
@@ -1067,7 +1024,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
10671024
'ECS_AL2_NVIDIA'
10681025
],
10691026
'Effect': [
1070-
'Unknown',
10711027
'Allow',
10721028
'Deny'
10731029
],
@@ -1177,11 +1133,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
11771133
'SUPERSEDED',
11781134
'PARALLEL'
11791135
],
1180-
'ExtendedStackSelection': [
1181-
'none',
1182-
'upstream',
1183-
'downstream'
1184-
],
11851136
'FailoverStatusCode': [
11861137
403,
11871138
404,
@@ -1236,12 +1187,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
12361187
0,
12371188
1
12381189
],
1239-
'FilterType': [
1240-
'resource-identifier',
1241-
'resource-type-prefix',
1242-
'tag-key',
1243-
'tag-value'
1244-
],
12451190
'FirehoseRecordSeparator': [
12461191
'\n',
12471192
'\t',
@@ -1300,11 +1245,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
13001245
'BIWEEKLY',
13011246
'MONTHLY'
13021247
],
1303-
'FromScan': [
1304-
0,
1305-
1,
1306-
2
1307-
],
13081248
'FunctionEventType': [
13091249
'viewer-request',
13101250
'viewer-response'
@@ -2863,16 +2803,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
28632803
'resume-cluster',
28642804
'failover-primary-compute'
28652805
],
2866-
'ResourceImpact': [
2867-
'WILL_UPDATE',
2868-
'WILL_CREATE',
2869-
'WILL_REPLACE',
2870-
'MAY_REPLACE',
2871-
'WILL_DESTROY',
2872-
'WILL_ORPHAN',
2873-
'WILL_IMPORT',
2874-
'NO_CHANGE'
2875-
],
28762806
'RetentionDays': [
28772807
1,
28782808
3,
@@ -2907,12 +2837,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
29072837
'StartsWith',
29082838
'NotEqual'
29092839
],
2910-
'RollbackChoice': [
2911-
0,
2912-
1,
2913-
2,
2914-
3
2915-
],
29162840
'RouterType': [
29172841
'CarrierGateway',
29182842
'EgressOnlyInternetGateway',
@@ -2989,11 +2913,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
29892913
'AddToLoadBalancer',
29902914
'InstanceRefresh'
29912915
],
2992-
'ScanStatus': [
2993-
'IN_PROGRESS',
2994-
'COMPLETE',
2995-
'FAILED'
2996-
],
29972916
'Scope': [
29982917
'task',
29992918
'shared'
@@ -3138,14 +3057,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
31383057
'bar',
31393058
'events'
31403059
],
3141-
'StackSelectionStrategy': [
3142-
'ALL_STACKS',
3143-
'MAIN_ASSEMBLY',
3144-
'ONLY_SINGLE',
3145-
'PATTERN_MATCH',
3146-
'PATTERN_MUST_MATCH',
3147-
'PATTERN_MUST_MATCH_SINGLE'
3148-
],
31493060
'StackSetOrganizationsAutoDeployment': [
31503061
'Enabled',
31513062
'Disabled',
@@ -3406,11 +3317,6 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
34063317
'TcpRetryEvent': [
34073318
'connection-error'
34083319
],
3409-
'TemplateSourceOptions': [
3410-
'path',
3411-
'stack',
3412-
'scan'
3413-
],
34143320
'TemplateType': [
34153321
'Text',
34163322
'Object'
@@ -4075,7 +3981,17 @@ export const AWS_CDK_ENUMS: { [key: string]: any } = {
40753981
'Windows_Server-2022-English-Full-SQL_2022_Express',
40763982
'Windows_Server-2022-English-Full-SQL_2022_Standard',
40773983
'Windows_Server-2022-Japanese-Full-SQL_2022_Standard',
4078-
'Windows_Server-2022-Japanese-Full-SQL_2022_Enterprise'
3984+
'Windows_Server-2022-Japanese-Full-SQL_2022_Enterprise',
3985+
'Windows_Server-2025-Chinese_Simplified-Full-Base',
3986+
'Windows_Server-2025-Chinese_Traditional-Full-Base',
3987+
'Windows_Server-2025-English-Core-Base',
3988+
'Windows_Server-2025-English-Full-Base',
3989+
'Windows_Server-2025-English-Full-SQL_2022_Enterprise',
3990+
'Windows_Server-2025-English-Full-SQL_2022_Express',
3991+
'Windows_Server-2025-English-Full-SQL_2022_Standard',
3992+
'Windows_Server-2025-English-Full-SQL_2022_Web',
3993+
'Windows_Server-2025-Japanese-Full-Base',
3994+
'Windows_Server-2025-Korean-Full-Base'
40793995
],
40803996
'WorkerType': [
40813997
'Standard',

0 commit comments

Comments
 (0)