-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.ts
1082 lines (1010 loc) · 39.6 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// https://www.terraform.io/docs/providers/aws/r/amplify_app
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
// Configuration
export interface AmplifyAppConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#access_token AmplifyApp#access_token}
*/
readonly accessToken?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#auto_branch_creation_patterns AmplifyApp#auto_branch_creation_patterns}
*/
readonly autoBranchCreationPatterns?: string[];
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#basic_auth_credentials AmplifyApp#basic_auth_credentials}
*/
readonly basicAuthCredentials?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#build_spec AmplifyApp#build_spec}
*/
readonly buildSpec?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#description AmplifyApp#description}
*/
readonly description?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_auto_branch_creation AmplifyApp#enable_auto_branch_creation}
*/
readonly enableAutoBranchCreation?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_basic_auth AmplifyApp#enable_basic_auth}
*/
readonly enableBasicAuth?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_branch_auto_build AmplifyApp#enable_branch_auto_build}
*/
readonly enableBranchAutoBuild?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_branch_auto_deletion AmplifyApp#enable_branch_auto_deletion}
*/
readonly enableBranchAutoDeletion?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#environment_variables AmplifyApp#environment_variables}
*/
readonly environmentVariables?: { [key: string]: string };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#iam_service_role_arn AmplifyApp#iam_service_role_arn}
*/
readonly iamServiceRoleArn?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#id AmplifyApp#id}
*
* Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2.
* If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
*/
readonly id?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#name AmplifyApp#name}
*/
readonly name: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#oauth_token AmplifyApp#oauth_token}
*/
readonly oauthToken?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#platform AmplifyApp#platform}
*/
readonly platform?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#repository AmplifyApp#repository}
*/
readonly repository?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#tags AmplifyApp#tags}
*/
readonly tags?: { [key: string]: string };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#tags_all AmplifyApp#tags_all}
*/
readonly tagsAll?: { [key: string]: string };
/**
* auto_branch_creation_config block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#auto_branch_creation_config AmplifyApp#auto_branch_creation_config}
*/
readonly autoBranchCreationConfig?: AmplifyAppAutoBranchCreationConfig;
/**
* custom_rule block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#custom_rule AmplifyApp#custom_rule}
*/
readonly customRule?: AmplifyAppCustomRule[] | cdktf.IResolvable;
}
export interface AmplifyAppProductionBranch {
}
export function amplifyAppProductionBranchToTerraform(struct?: AmplifyAppProductionBranch): any {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; }
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
}
}
export class AmplifyAppProductionBranchOutputReference extends cdktf.ComplexObject {
private isEmptyObject = false;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
}
public get internalValue(): AmplifyAppProductionBranch | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: AmplifyAppProductionBranch | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// branch_name - computed: true, optional: false, required: false
public get branchName() {
return this.getStringAttribute('branch_name');
}
// last_deploy_time - computed: true, optional: false, required: false
public get lastDeployTime() {
return this.getStringAttribute('last_deploy_time');
}
// status - computed: true, optional: false, required: false
public get status() {
return this.getStringAttribute('status');
}
// thumbnail_url - computed: true, optional: false, required: false
public get thumbnailUrl() {
return this.getStringAttribute('thumbnail_url');
}
}
export class AmplifyAppProductionBranchList extends cdktf.ComplexList {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(protected terraformResource: cdktf.IInterpolatingParent, protected terraformAttribute: string, protected wrapsSet: boolean) {
super(terraformResource, terraformAttribute, wrapsSet)
}
/**
* @param index the index of the item to return
*/
public get(index: number): AmplifyAppProductionBranchOutputReference {
return new AmplifyAppProductionBranchOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
export interface AmplifyAppAutoBranchCreationConfig {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#basic_auth_credentials AmplifyApp#basic_auth_credentials}
*/
readonly basicAuthCredentials?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#build_spec AmplifyApp#build_spec}
*/
readonly buildSpec?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_auto_build AmplifyApp#enable_auto_build}
*/
readonly enableAutoBuild?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_basic_auth AmplifyApp#enable_basic_auth}
*/
readonly enableBasicAuth?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_performance_mode AmplifyApp#enable_performance_mode}
*/
readonly enablePerformanceMode?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#enable_pull_request_preview AmplifyApp#enable_pull_request_preview}
*/
readonly enablePullRequestPreview?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#environment_variables AmplifyApp#environment_variables}
*/
readonly environmentVariables?: { [key: string]: string };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#framework AmplifyApp#framework}
*/
readonly framework?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#pull_request_environment_name AmplifyApp#pull_request_environment_name}
*/
readonly pullRequestEnvironmentName?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#stage AmplifyApp#stage}
*/
readonly stage?: string;
}
export function amplifyAppAutoBranchCreationConfigToTerraform(struct?: AmplifyAppAutoBranchCreationConfigOutputReference | AmplifyAppAutoBranchCreationConfig): any {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; }
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
basic_auth_credentials: cdktf.stringToTerraform(struct!.basicAuthCredentials),
build_spec: cdktf.stringToTerraform(struct!.buildSpec),
enable_auto_build: cdktf.booleanToTerraform(struct!.enableAutoBuild),
enable_basic_auth: cdktf.booleanToTerraform(struct!.enableBasicAuth),
enable_performance_mode: cdktf.booleanToTerraform(struct!.enablePerformanceMode),
enable_pull_request_preview: cdktf.booleanToTerraform(struct!.enablePullRequestPreview),
environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct!.environmentVariables),
framework: cdktf.stringToTerraform(struct!.framework),
pull_request_environment_name: cdktf.stringToTerraform(struct!.pullRequestEnvironmentName),
stage: cdktf.stringToTerraform(struct!.stage),
}
}
export class AmplifyAppAutoBranchCreationConfigOutputReference extends cdktf.ComplexObject {
private isEmptyObject = false;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) {
super(terraformResource, terraformAttribute, false, 0);
}
public get internalValue(): AmplifyAppAutoBranchCreationConfig | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._basicAuthCredentials !== undefined) {
hasAnyValues = true;
internalValueResult.basicAuthCredentials = this._basicAuthCredentials;
}
if (this._buildSpec !== undefined) {
hasAnyValues = true;
internalValueResult.buildSpec = this._buildSpec;
}
if (this._enableAutoBuild !== undefined) {
hasAnyValues = true;
internalValueResult.enableAutoBuild = this._enableAutoBuild;
}
if (this._enableBasicAuth !== undefined) {
hasAnyValues = true;
internalValueResult.enableBasicAuth = this._enableBasicAuth;
}
if (this._enablePerformanceMode !== undefined) {
hasAnyValues = true;
internalValueResult.enablePerformanceMode = this._enablePerformanceMode;
}
if (this._enablePullRequestPreview !== undefined) {
hasAnyValues = true;
internalValueResult.enablePullRequestPreview = this._enablePullRequestPreview;
}
if (this._environmentVariables !== undefined) {
hasAnyValues = true;
internalValueResult.environmentVariables = this._environmentVariables;
}
if (this._framework !== undefined) {
hasAnyValues = true;
internalValueResult.framework = this._framework;
}
if (this._pullRequestEnvironmentName !== undefined) {
hasAnyValues = true;
internalValueResult.pullRequestEnvironmentName = this._pullRequestEnvironmentName;
}
if (this._stage !== undefined) {
hasAnyValues = true;
internalValueResult.stage = this._stage;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: AmplifyAppAutoBranchCreationConfig | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._basicAuthCredentials = undefined;
this._buildSpec = undefined;
this._enableAutoBuild = undefined;
this._enableBasicAuth = undefined;
this._enablePerformanceMode = undefined;
this._enablePullRequestPreview = undefined;
this._environmentVariables = undefined;
this._framework = undefined;
this._pullRequestEnvironmentName = undefined;
this._stage = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._basicAuthCredentials = value.basicAuthCredentials;
this._buildSpec = value.buildSpec;
this._enableAutoBuild = value.enableAutoBuild;
this._enableBasicAuth = value.enableBasicAuth;
this._enablePerformanceMode = value.enablePerformanceMode;
this._enablePullRequestPreview = value.enablePullRequestPreview;
this._environmentVariables = value.environmentVariables;
this._framework = value.framework;
this._pullRequestEnvironmentName = value.pullRequestEnvironmentName;
this._stage = value.stage;
}
}
// basic_auth_credentials - computed: false, optional: true, required: false
private _basicAuthCredentials?: string;
public get basicAuthCredentials() {
return this.getStringAttribute('basic_auth_credentials');
}
public set basicAuthCredentials(value: string) {
this._basicAuthCredentials = value;
}
public resetBasicAuthCredentials() {
this._basicAuthCredentials = undefined;
}
// Temporarily expose input value. Use with caution.
public get basicAuthCredentialsInput() {
return this._basicAuthCredentials;
}
// build_spec - computed: false, optional: true, required: false
private _buildSpec?: string;
public get buildSpec() {
return this.getStringAttribute('build_spec');
}
public set buildSpec(value: string) {
this._buildSpec = value;
}
public resetBuildSpec() {
this._buildSpec = undefined;
}
// Temporarily expose input value. Use with caution.
public get buildSpecInput() {
return this._buildSpec;
}
// enable_auto_build - computed: false, optional: true, required: false
private _enableAutoBuild?: boolean | cdktf.IResolvable;
public get enableAutoBuild() {
return this.getBooleanAttribute('enable_auto_build');
}
public set enableAutoBuild(value: boolean | cdktf.IResolvable) {
this._enableAutoBuild = value;
}
public resetEnableAutoBuild() {
this._enableAutoBuild = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableAutoBuildInput() {
return this._enableAutoBuild;
}
// enable_basic_auth - computed: false, optional: true, required: false
private _enableBasicAuth?: boolean | cdktf.IResolvable;
public get enableBasicAuth() {
return this.getBooleanAttribute('enable_basic_auth');
}
public set enableBasicAuth(value: boolean | cdktf.IResolvable) {
this._enableBasicAuth = value;
}
public resetEnableBasicAuth() {
this._enableBasicAuth = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableBasicAuthInput() {
return this._enableBasicAuth;
}
// enable_performance_mode - computed: false, optional: true, required: false
private _enablePerformanceMode?: boolean | cdktf.IResolvable;
public get enablePerformanceMode() {
return this.getBooleanAttribute('enable_performance_mode');
}
public set enablePerformanceMode(value: boolean | cdktf.IResolvable) {
this._enablePerformanceMode = value;
}
public resetEnablePerformanceMode() {
this._enablePerformanceMode = undefined;
}
// Temporarily expose input value. Use with caution.
public get enablePerformanceModeInput() {
return this._enablePerformanceMode;
}
// enable_pull_request_preview - computed: false, optional: true, required: false
private _enablePullRequestPreview?: boolean | cdktf.IResolvable;
public get enablePullRequestPreview() {
return this.getBooleanAttribute('enable_pull_request_preview');
}
public set enablePullRequestPreview(value: boolean | cdktf.IResolvable) {
this._enablePullRequestPreview = value;
}
public resetEnablePullRequestPreview() {
this._enablePullRequestPreview = undefined;
}
// Temporarily expose input value. Use with caution.
public get enablePullRequestPreviewInput() {
return this._enablePullRequestPreview;
}
// environment_variables - computed: false, optional: true, required: false
private _environmentVariables?: { [key: string]: string };
public get environmentVariables() {
return this.getStringMapAttribute('environment_variables');
}
public set environmentVariables(value: { [key: string]: string }) {
this._environmentVariables = value;
}
public resetEnvironmentVariables() {
this._environmentVariables = undefined;
}
// Temporarily expose input value. Use with caution.
public get environmentVariablesInput() {
return this._environmentVariables;
}
// framework - computed: false, optional: true, required: false
private _framework?: string;
public get framework() {
return this.getStringAttribute('framework');
}
public set framework(value: string) {
this._framework = value;
}
public resetFramework() {
this._framework = undefined;
}
// Temporarily expose input value. Use with caution.
public get frameworkInput() {
return this._framework;
}
// pull_request_environment_name - computed: false, optional: true, required: false
private _pullRequestEnvironmentName?: string;
public get pullRequestEnvironmentName() {
return this.getStringAttribute('pull_request_environment_name');
}
public set pullRequestEnvironmentName(value: string) {
this._pullRequestEnvironmentName = value;
}
public resetPullRequestEnvironmentName() {
this._pullRequestEnvironmentName = undefined;
}
// Temporarily expose input value. Use with caution.
public get pullRequestEnvironmentNameInput() {
return this._pullRequestEnvironmentName;
}
// stage - computed: false, optional: true, required: false
private _stage?: string;
public get stage() {
return this.getStringAttribute('stage');
}
public set stage(value: string) {
this._stage = value;
}
public resetStage() {
this._stage = undefined;
}
// Temporarily expose input value. Use with caution.
public get stageInput() {
return this._stage;
}
}
export interface AmplifyAppCustomRule {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#condition AmplifyApp#condition}
*/
readonly condition?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#source AmplifyApp#source}
*/
readonly source: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#status AmplifyApp#status}
*/
readonly status?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/amplify_app#target AmplifyApp#target}
*/
readonly target: string;
}
export function amplifyAppCustomRuleToTerraform(struct?: AmplifyAppCustomRule | cdktf.IResolvable): any {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; }
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
condition: cdktf.stringToTerraform(struct!.condition),
source: cdktf.stringToTerraform(struct!.source),
status: cdktf.stringToTerraform(struct!.status),
target: cdktf.stringToTerraform(struct!.target),
}
}
export class AmplifyAppCustomRuleOutputReference extends cdktf.ComplexObject {
private isEmptyObject = false;
private resolvableValue?: cdktf.IResolvable;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
}
public get internalValue(): AmplifyAppCustomRule | cdktf.IResolvable | undefined {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._condition !== undefined) {
hasAnyValues = true;
internalValueResult.condition = this._condition;
}
if (this._source !== undefined) {
hasAnyValues = true;
internalValueResult.source = this._source;
}
if (this._status !== undefined) {
hasAnyValues = true;
internalValueResult.status = this._status;
}
if (this._target !== undefined) {
hasAnyValues = true;
internalValueResult.target = this._target;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: AmplifyAppCustomRule | cdktf.IResolvable | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._condition = undefined;
this._source = undefined;
this._status = undefined;
this._target = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._condition = value.condition;
this._source = value.source;
this._status = value.status;
this._target = value.target;
}
}
// condition - computed: false, optional: true, required: false
private _condition?: string;
public get condition() {
return this.getStringAttribute('condition');
}
public set condition(value: string) {
this._condition = value;
}
public resetCondition() {
this._condition = undefined;
}
// Temporarily expose input value. Use with caution.
public get conditionInput() {
return this._condition;
}
// source - computed: false, optional: false, required: true
private _source?: string;
public get source() {
return this.getStringAttribute('source');
}
public set source(value: string) {
this._source = value;
}
// Temporarily expose input value. Use with caution.
public get sourceInput() {
return this._source;
}
// status - computed: false, optional: true, required: false
private _status?: string;
public get status() {
return this.getStringAttribute('status');
}
public set status(value: string) {
this._status = value;
}
public resetStatus() {
this._status = undefined;
}
// Temporarily expose input value. Use with caution.
public get statusInput() {
return this._status;
}
// target - computed: false, optional: false, required: true
private _target?: string;
public get target() {
return this.getStringAttribute('target');
}
public set target(value: string) {
this._target = value;
}
// Temporarily expose input value. Use with caution.
public get targetInput() {
return this._target;
}
}
export class AmplifyAppCustomRuleList extends cdktf.ComplexList {
public internalValue? : AmplifyAppCustomRule[] | cdktf.IResolvable
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(protected terraformResource: cdktf.IInterpolatingParent, protected terraformAttribute: string, protected wrapsSet: boolean) {
super(terraformResource, terraformAttribute, wrapsSet)
}
/**
* @param index the index of the item to return
*/
public get(index: number): AmplifyAppCustomRuleOutputReference {
return new AmplifyAppCustomRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/amplify_app aws_amplify_app}
*/
export class AmplifyApp extends cdktf.TerraformResource {
// =================
// STATIC PROPERTIES
// =================
public static readonly tfResourceType = "aws_amplify_app";
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://www.terraform.io/docs/providers/aws/r/amplify_app aws_amplify_app} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options AmplifyAppConfig
*/
public constructor(scope: Construct, id: string, config: AmplifyAppConfig) {
super(scope, id, {
terraformResourceType: 'aws_amplify_app',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '4.46.0',
providerVersionConstraint: '~> 4.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
this._accessToken = config.accessToken;
this._autoBranchCreationPatterns = config.autoBranchCreationPatterns;
this._basicAuthCredentials = config.basicAuthCredentials;
this._buildSpec = config.buildSpec;
this._description = config.description;
this._enableAutoBranchCreation = config.enableAutoBranchCreation;
this._enableBasicAuth = config.enableBasicAuth;
this._enableBranchAutoBuild = config.enableBranchAutoBuild;
this._enableBranchAutoDeletion = config.enableBranchAutoDeletion;
this._environmentVariables = config.environmentVariables;
this._iamServiceRoleArn = config.iamServiceRoleArn;
this._id = config.id;
this._name = config.name;
this._oauthToken = config.oauthToken;
this._platform = config.platform;
this._repository = config.repository;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._autoBranchCreationConfig.internalValue = config.autoBranchCreationConfig;
this._customRule.internalValue = config.customRule;
}
// ==========
// ATTRIBUTES
// ==========
// access_token - computed: false, optional: true, required: false
private _accessToken?: string;
public get accessToken() {
return this.getStringAttribute('access_token');
}
public set accessToken(value: string) {
this._accessToken = value;
}
public resetAccessToken() {
this._accessToken = undefined;
}
// Temporarily expose input value. Use with caution.
public get accessTokenInput() {
return this._accessToken;
}
// arn - computed: true, optional: false, required: false
public get arn() {
return this.getStringAttribute('arn');
}
// auto_branch_creation_patterns - computed: false, optional: true, required: false
private _autoBranchCreationPatterns?: string[];
public get autoBranchCreationPatterns() {
return cdktf.Fn.tolist(this.getListAttribute('auto_branch_creation_patterns'));
}
public set autoBranchCreationPatterns(value: string[]) {
this._autoBranchCreationPatterns = value;
}
public resetAutoBranchCreationPatterns() {
this._autoBranchCreationPatterns = undefined;
}
// Temporarily expose input value. Use with caution.
public get autoBranchCreationPatternsInput() {
return this._autoBranchCreationPatterns;
}
// basic_auth_credentials - computed: false, optional: true, required: false
private _basicAuthCredentials?: string;
public get basicAuthCredentials() {
return this.getStringAttribute('basic_auth_credentials');
}
public set basicAuthCredentials(value: string) {
this._basicAuthCredentials = value;
}
public resetBasicAuthCredentials() {
this._basicAuthCredentials = undefined;
}
// Temporarily expose input value. Use with caution.
public get basicAuthCredentialsInput() {
return this._basicAuthCredentials;
}
// build_spec - computed: true, optional: true, required: false
private _buildSpec?: string;
public get buildSpec() {
return this.getStringAttribute('build_spec');
}
public set buildSpec(value: string) {
this._buildSpec = value;
}
public resetBuildSpec() {
this._buildSpec = undefined;
}
// Temporarily expose input value. Use with caution.
public get buildSpecInput() {
return this._buildSpec;
}
// default_domain - computed: true, optional: false, required: false
public get defaultDomain() {
return this.getStringAttribute('default_domain');
}
// description - computed: false, optional: true, required: false
private _description?: string;
public get description() {
return this.getStringAttribute('description');
}
public set description(value: string) {
this._description = value;
}
public resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
public get descriptionInput() {
return this._description;
}
// enable_auto_branch_creation - computed: false, optional: true, required: false
private _enableAutoBranchCreation?: boolean | cdktf.IResolvable;
public get enableAutoBranchCreation() {
return this.getBooleanAttribute('enable_auto_branch_creation');
}
public set enableAutoBranchCreation(value: boolean | cdktf.IResolvable) {
this._enableAutoBranchCreation = value;
}
public resetEnableAutoBranchCreation() {
this._enableAutoBranchCreation = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableAutoBranchCreationInput() {
return this._enableAutoBranchCreation;
}
// enable_basic_auth - computed: false, optional: true, required: false
private _enableBasicAuth?: boolean | cdktf.IResolvable;
public get enableBasicAuth() {
return this.getBooleanAttribute('enable_basic_auth');
}
public set enableBasicAuth(value: boolean | cdktf.IResolvable) {
this._enableBasicAuth = value;
}
public resetEnableBasicAuth() {
this._enableBasicAuth = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableBasicAuthInput() {
return this._enableBasicAuth;
}
// enable_branch_auto_build - computed: false, optional: true, required: false
private _enableBranchAutoBuild?: boolean | cdktf.IResolvable;
public get enableBranchAutoBuild() {
return this.getBooleanAttribute('enable_branch_auto_build');
}
public set enableBranchAutoBuild(value: boolean | cdktf.IResolvable) {
this._enableBranchAutoBuild = value;
}
public resetEnableBranchAutoBuild() {
this._enableBranchAutoBuild = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableBranchAutoBuildInput() {
return this._enableBranchAutoBuild;
}
// enable_branch_auto_deletion - computed: false, optional: true, required: false
private _enableBranchAutoDeletion?: boolean | cdktf.IResolvable;
public get enableBranchAutoDeletion() {
return this.getBooleanAttribute('enable_branch_auto_deletion');
}
public set enableBranchAutoDeletion(value: boolean | cdktf.IResolvable) {
this._enableBranchAutoDeletion = value;
}
public resetEnableBranchAutoDeletion() {
this._enableBranchAutoDeletion = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableBranchAutoDeletionInput() {
return this._enableBranchAutoDeletion;
}
// environment_variables - computed: false, optional: true, required: false
private _environmentVariables?: { [key: string]: string };
public get environmentVariables() {
return this.getStringMapAttribute('environment_variables');
}
public set environmentVariables(value: { [key: string]: string }) {
this._environmentVariables = value;
}
public resetEnvironmentVariables() {
this._environmentVariables = undefined;
}
// Temporarily expose input value. Use with caution.
public get environmentVariablesInput() {
return this._environmentVariables;
}
// iam_service_role_arn - computed: false, optional: true, required: false
private _iamServiceRoleArn?: string;
public get iamServiceRoleArn() {
return this.getStringAttribute('iam_service_role_arn');
}
public set iamServiceRoleArn(value: string) {
this._iamServiceRoleArn = value;
}
public resetIamServiceRoleArn() {
this._iamServiceRoleArn = undefined;
}
// Temporarily expose input value. Use with caution.
public get iamServiceRoleArnInput() {
return this._iamServiceRoleArn;
}
// id - computed: true, optional: true, required: false
private _id?: string;
public get id() {
return this.getStringAttribute('id');
}
public set id(value: string) {
this._id = value;
}
public resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
public get idInput() {
return this._id;
}
// name - computed: false, optional: false, required: true
private _name?: string;
public get name() {
return this.getStringAttribute('name');
}
public set name(value: string) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
public get nameInput() {
return this._name;
}
// oauth_token - computed: false, optional: true, required: false
private _oauthToken?: string;
public get oauthToken() {
return this.getStringAttribute('oauth_token');
}
public set oauthToken(value: string) {
this._oauthToken = value;
}
public resetOauthToken() {
this._oauthToken = undefined;
}
// Temporarily expose input value. Use with caution.
public get oauthTokenInput() {
return this._oauthToken;
}
// platform - computed: false, optional: true, required: false
private _platform?: string;
public get platform() {
return this.getStringAttribute('platform');
}
public set platform(value: string) {
this._platform = value;
}
public resetPlatform() {
this._platform = undefined;
}
// Temporarily expose input value. Use with caution.
public get platformInput() {
return this._platform;
}
// production_branch - computed: true, optional: false, required: false
private _productionBranch = new AmplifyAppProductionBranchList(this, "production_branch", false);
public get productionBranch() {
return this._productionBranch;
}
// repository - computed: false, optional: true, required: false
private _repository?: string;
public get repository() {
return this.getStringAttribute('repository');
}
public set repository(value: string) {
this._repository = value;
}
public resetRepository() {
this._repository = undefined;
}
// Temporarily expose input value. Use with caution.
public get repositoryInput() {
return this._repository;
}
// tags - computed: false, optional: true, required: false
private _tags?: { [key: string]: string };
public get tags() {
return this.getStringMapAttribute('tags');
}
public set tags(value: { [key: string]: string }) {
this._tags = value;
}
public resetTags() {
this._tags = undefined;
}