/
index.ts
2176 lines (2032 loc) · 81.2 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/cloudwatch_event_target
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
// Configuration
export interface CloudwatchEventTargetConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#arn CloudwatchEventTarget#arn}
*/
readonly arn: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#event_bus_name CloudwatchEventTarget#event_bus_name}
*/
readonly eventBusName?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#id CloudwatchEventTarget#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/cloudwatch_event_target#input CloudwatchEventTarget#input}
*/
readonly input?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#input_path CloudwatchEventTarget#input_path}
*/
readonly inputPath?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#role_arn CloudwatchEventTarget#role_arn}
*/
readonly roleArn?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#rule CloudwatchEventTarget#rule}
*/
readonly rule: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#target_id CloudwatchEventTarget#target_id}
*/
readonly targetId?: string;
/**
* batch_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#batch_target CloudwatchEventTarget#batch_target}
*/
readonly batchTarget?: CloudwatchEventTargetBatchTarget;
/**
* dead_letter_config block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#dead_letter_config CloudwatchEventTarget#dead_letter_config}
*/
readonly deadLetterConfig?: CloudwatchEventTargetDeadLetterConfig;
/**
* ecs_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#ecs_target CloudwatchEventTarget#ecs_target}
*/
readonly ecsTarget?: CloudwatchEventTargetEcsTarget;
/**
* http_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#http_target CloudwatchEventTarget#http_target}
*/
readonly httpTarget?: CloudwatchEventTargetHttpTarget;
/**
* input_transformer block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#input_transformer CloudwatchEventTarget#input_transformer}
*/
readonly inputTransformer?: CloudwatchEventTargetInputTransformer;
/**
* kinesis_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#kinesis_target CloudwatchEventTarget#kinesis_target}
*/
readonly kinesisTarget?: CloudwatchEventTargetKinesisTarget;
/**
* redshift_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#redshift_target CloudwatchEventTarget#redshift_target}
*/
readonly redshiftTarget?: CloudwatchEventTargetRedshiftTarget;
/**
* retry_policy block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#retry_policy CloudwatchEventTarget#retry_policy}
*/
readonly retryPolicy?: CloudwatchEventTargetRetryPolicy;
/**
* run_command_targets block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#run_command_targets CloudwatchEventTarget#run_command_targets}
*/
readonly runCommandTargets?: CloudwatchEventTargetRunCommandTargets[] | cdktf.IResolvable;
/**
* sqs_target block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#sqs_target CloudwatchEventTarget#sqs_target}
*/
readonly sqsTarget?: CloudwatchEventTargetSqsTarget;
}
export interface CloudwatchEventTargetBatchTarget {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#array_size CloudwatchEventTarget#array_size}
*/
readonly arraySize?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#job_attempts CloudwatchEventTarget#job_attempts}
*/
readonly jobAttempts?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#job_definition CloudwatchEventTarget#job_definition}
*/
readonly jobDefinition: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#job_name CloudwatchEventTarget#job_name}
*/
readonly jobName: string;
}
export function cloudwatchEventTargetBatchTargetToTerraform(struct?: CloudwatchEventTargetBatchTargetOutputReference | CloudwatchEventTargetBatchTarget): 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 {
array_size: cdktf.numberToTerraform(struct!.arraySize),
job_attempts: cdktf.numberToTerraform(struct!.jobAttempts),
job_definition: cdktf.stringToTerraform(struct!.jobDefinition),
job_name: cdktf.stringToTerraform(struct!.jobName),
}
}
export class CloudwatchEventTargetBatchTargetOutputReference 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(): CloudwatchEventTargetBatchTarget | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._arraySize !== undefined) {
hasAnyValues = true;
internalValueResult.arraySize = this._arraySize;
}
if (this._jobAttempts !== undefined) {
hasAnyValues = true;
internalValueResult.jobAttempts = this._jobAttempts;
}
if (this._jobDefinition !== undefined) {
hasAnyValues = true;
internalValueResult.jobDefinition = this._jobDefinition;
}
if (this._jobName !== undefined) {
hasAnyValues = true;
internalValueResult.jobName = this._jobName;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetBatchTarget | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._arraySize = undefined;
this._jobAttempts = undefined;
this._jobDefinition = undefined;
this._jobName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._arraySize = value.arraySize;
this._jobAttempts = value.jobAttempts;
this._jobDefinition = value.jobDefinition;
this._jobName = value.jobName;
}
}
// array_size - computed: false, optional: true, required: false
private _arraySize?: number;
public get arraySize() {
return this.getNumberAttribute('array_size');
}
public set arraySize(value: number) {
this._arraySize = value;
}
public resetArraySize() {
this._arraySize = undefined;
}
// Temporarily expose input value. Use with caution.
public get arraySizeInput() {
return this._arraySize;
}
// job_attempts - computed: false, optional: true, required: false
private _jobAttempts?: number;
public get jobAttempts() {
return this.getNumberAttribute('job_attempts');
}
public set jobAttempts(value: number) {
this._jobAttempts = value;
}
public resetJobAttempts() {
this._jobAttempts = undefined;
}
// Temporarily expose input value. Use with caution.
public get jobAttemptsInput() {
return this._jobAttempts;
}
// job_definition - computed: false, optional: false, required: true
private _jobDefinition?: string;
public get jobDefinition() {
return this.getStringAttribute('job_definition');
}
public set jobDefinition(value: string) {
this._jobDefinition = value;
}
// Temporarily expose input value. Use with caution.
public get jobDefinitionInput() {
return this._jobDefinition;
}
// job_name - computed: false, optional: false, required: true
private _jobName?: string;
public get jobName() {
return this.getStringAttribute('job_name');
}
public set jobName(value: string) {
this._jobName = value;
}
// Temporarily expose input value. Use with caution.
public get jobNameInput() {
return this._jobName;
}
}
export interface CloudwatchEventTargetDeadLetterConfig {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#arn CloudwatchEventTarget#arn}
*/
readonly arn?: string;
}
export function cloudwatchEventTargetDeadLetterConfigToTerraform(struct?: CloudwatchEventTargetDeadLetterConfigOutputReference | CloudwatchEventTargetDeadLetterConfig): 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 {
arn: cdktf.stringToTerraform(struct!.arn),
}
}
export class CloudwatchEventTargetDeadLetterConfigOutputReference 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(): CloudwatchEventTargetDeadLetterConfig | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._arn !== undefined) {
hasAnyValues = true;
internalValueResult.arn = this._arn;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetDeadLetterConfig | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._arn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._arn = value.arn;
}
}
// arn - computed: false, optional: true, required: false
private _arn?: string;
public get arn() {
return this.getStringAttribute('arn');
}
public set arn(value: string) {
this._arn = value;
}
public resetArn() {
this._arn = undefined;
}
// Temporarily expose input value. Use with caution.
public get arnInput() {
return this._arn;
}
}
export interface CloudwatchEventTargetEcsTargetCapacityProviderStrategy {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#base CloudwatchEventTarget#base}
*/
readonly base?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#capacity_provider CloudwatchEventTarget#capacity_provider}
*/
readonly capacityProvider: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#weight CloudwatchEventTarget#weight}
*/
readonly weight?: number;
}
export function cloudwatchEventTargetEcsTargetCapacityProviderStrategyToTerraform(struct?: CloudwatchEventTargetEcsTargetCapacityProviderStrategy | 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 {
base: cdktf.numberToTerraform(struct!.base),
capacity_provider: cdktf.stringToTerraform(struct!.capacityProvider),
weight: cdktf.numberToTerraform(struct!.weight),
}
}
export class CloudwatchEventTargetEcsTargetCapacityProviderStrategyOutputReference 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(): CloudwatchEventTargetEcsTargetCapacityProviderStrategy | cdktf.IResolvable | undefined {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._base !== undefined) {
hasAnyValues = true;
internalValueResult.base = this._base;
}
if (this._capacityProvider !== undefined) {
hasAnyValues = true;
internalValueResult.capacityProvider = this._capacityProvider;
}
if (this._weight !== undefined) {
hasAnyValues = true;
internalValueResult.weight = this._weight;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetEcsTargetCapacityProviderStrategy | cdktf.IResolvable | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._base = undefined;
this._capacityProvider = undefined;
this._weight = 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._base = value.base;
this._capacityProvider = value.capacityProvider;
this._weight = value.weight;
}
}
// base - computed: false, optional: true, required: false
private _base?: number;
public get base() {
return this.getNumberAttribute('base');
}
public set base(value: number) {
this._base = value;
}
public resetBase() {
this._base = undefined;
}
// Temporarily expose input value. Use with caution.
public get baseInput() {
return this._base;
}
// capacity_provider - computed: false, optional: false, required: true
private _capacityProvider?: string;
public get capacityProvider() {
return this.getStringAttribute('capacity_provider');
}
public set capacityProvider(value: string) {
this._capacityProvider = value;
}
// Temporarily expose input value. Use with caution.
public get capacityProviderInput() {
return this._capacityProvider;
}
// weight - computed: false, optional: true, required: false
private _weight?: number;
public get weight() {
return this.getNumberAttribute('weight');
}
public set weight(value: number) {
this._weight = value;
}
public resetWeight() {
this._weight = undefined;
}
// Temporarily expose input value. Use with caution.
public get weightInput() {
return this._weight;
}
}
export class CloudwatchEventTargetEcsTargetCapacityProviderStrategyList extends cdktf.ComplexList {
public internalValue? : CloudwatchEventTargetEcsTargetCapacityProviderStrategy[] | 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): CloudwatchEventTargetEcsTargetCapacityProviderStrategyOutputReference {
return new CloudwatchEventTargetEcsTargetCapacityProviderStrategyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
export interface CloudwatchEventTargetEcsTargetNetworkConfiguration {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#assign_public_ip CloudwatchEventTarget#assign_public_ip}
*/
readonly assignPublicIp?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#security_groups CloudwatchEventTarget#security_groups}
*/
readonly securityGroups?: string[];
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#subnets CloudwatchEventTarget#subnets}
*/
readonly subnets: string[];
}
export function cloudwatchEventTargetEcsTargetNetworkConfigurationToTerraform(struct?: CloudwatchEventTargetEcsTargetNetworkConfigurationOutputReference | CloudwatchEventTargetEcsTargetNetworkConfiguration): 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 {
assign_public_ip: cdktf.booleanToTerraform(struct!.assignPublicIp),
security_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.securityGroups),
subnets: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.subnets),
}
}
export class CloudwatchEventTargetEcsTargetNetworkConfigurationOutputReference 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(): CloudwatchEventTargetEcsTargetNetworkConfiguration | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._assignPublicIp !== undefined) {
hasAnyValues = true;
internalValueResult.assignPublicIp = this._assignPublicIp;
}
if (this._securityGroups !== undefined) {
hasAnyValues = true;
internalValueResult.securityGroups = this._securityGroups;
}
if (this._subnets !== undefined) {
hasAnyValues = true;
internalValueResult.subnets = this._subnets;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetEcsTargetNetworkConfiguration | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._assignPublicIp = undefined;
this._securityGroups = undefined;
this._subnets = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._assignPublicIp = value.assignPublicIp;
this._securityGroups = value.securityGroups;
this._subnets = value.subnets;
}
}
// assign_public_ip - computed: false, optional: true, required: false
private _assignPublicIp?: boolean | cdktf.IResolvable;
public get assignPublicIp() {
return this.getBooleanAttribute('assign_public_ip');
}
public set assignPublicIp(value: boolean | cdktf.IResolvable) {
this._assignPublicIp = value;
}
public resetAssignPublicIp() {
this._assignPublicIp = undefined;
}
// Temporarily expose input value. Use with caution.
public get assignPublicIpInput() {
return this._assignPublicIp;
}
// security_groups - computed: false, optional: true, required: false
private _securityGroups?: string[];
public get securityGroups() {
return cdktf.Fn.tolist(this.getListAttribute('security_groups'));
}
public set securityGroups(value: string[]) {
this._securityGroups = value;
}
public resetSecurityGroups() {
this._securityGroups = undefined;
}
// Temporarily expose input value. Use with caution.
public get securityGroupsInput() {
return this._securityGroups;
}
// subnets - computed: false, optional: false, required: true
private _subnets?: string[];
public get subnets() {
return cdktf.Fn.tolist(this.getListAttribute('subnets'));
}
public set subnets(value: string[]) {
this._subnets = value;
}
// Temporarily expose input value. Use with caution.
public get subnetsInput() {
return this._subnets;
}
}
export interface CloudwatchEventTargetEcsTargetPlacementConstraint {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#expression CloudwatchEventTarget#expression}
*/
readonly expression?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#type CloudwatchEventTarget#type}
*/
readonly type: string;
}
export function cloudwatchEventTargetEcsTargetPlacementConstraintToTerraform(struct?: CloudwatchEventTargetEcsTargetPlacementConstraint | 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 {
expression: cdktf.stringToTerraform(struct!.expression),
type: cdktf.stringToTerraform(struct!.type),
}
}
export class CloudwatchEventTargetEcsTargetPlacementConstraintOutputReference 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(): CloudwatchEventTargetEcsTargetPlacementConstraint | cdktf.IResolvable | undefined {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._expression !== undefined) {
hasAnyValues = true;
internalValueResult.expression = this._expression;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetEcsTargetPlacementConstraint | cdktf.IResolvable | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._expression = undefined;
this._type = 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._expression = value.expression;
this._type = value.type;
}
}
// expression - computed: false, optional: true, required: false
private _expression?: string;
public get expression() {
return this.getStringAttribute('expression');
}
public set expression(value: string) {
this._expression = value;
}
public resetExpression() {
this._expression = undefined;
}
// Temporarily expose input value. Use with caution.
public get expressionInput() {
return this._expression;
}
// type - computed: false, optional: false, required: true
private _type?: string;
public get type() {
return this.getStringAttribute('type');
}
public set type(value: string) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
public get typeInput() {
return this._type;
}
}
export class CloudwatchEventTargetEcsTargetPlacementConstraintList extends cdktf.ComplexList {
public internalValue? : CloudwatchEventTargetEcsTargetPlacementConstraint[] | 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): CloudwatchEventTargetEcsTargetPlacementConstraintOutputReference {
return new CloudwatchEventTargetEcsTargetPlacementConstraintOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
export interface CloudwatchEventTargetEcsTarget {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#enable_ecs_managed_tags CloudwatchEventTarget#enable_ecs_managed_tags}
*/
readonly enableEcsManagedTags?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#enable_execute_command CloudwatchEventTarget#enable_execute_command}
*/
readonly enableExecuteCommand?: boolean | cdktf.IResolvable;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#group CloudwatchEventTarget#group}
*/
readonly group?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#launch_type CloudwatchEventTarget#launch_type}
*/
readonly launchType?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#platform_version CloudwatchEventTarget#platform_version}
*/
readonly platformVersion?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#propagate_tags CloudwatchEventTarget#propagate_tags}
*/
readonly propagateTags?: string;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#tags CloudwatchEventTarget#tags}
*/
readonly tags?: { [key: string]: string };
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#task_count CloudwatchEventTarget#task_count}
*/
readonly taskCount?: number;
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#task_definition_arn CloudwatchEventTarget#task_definition_arn}
*/
readonly taskDefinitionArn: string;
/**
* capacity_provider_strategy block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#capacity_provider_strategy CloudwatchEventTarget#capacity_provider_strategy}
*/
readonly capacityProviderStrategy?: CloudwatchEventTargetEcsTargetCapacityProviderStrategy[] | cdktf.IResolvable;
/**
* network_configuration block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#network_configuration CloudwatchEventTarget#network_configuration}
*/
readonly networkConfiguration?: CloudwatchEventTargetEcsTargetNetworkConfiguration;
/**
* placement_constraint block
*
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target#placement_constraint CloudwatchEventTarget#placement_constraint}
*/
readonly placementConstraint?: CloudwatchEventTargetEcsTargetPlacementConstraint[] | cdktf.IResolvable;
}
export function cloudwatchEventTargetEcsTargetToTerraform(struct?: CloudwatchEventTargetEcsTargetOutputReference | CloudwatchEventTargetEcsTarget): 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 {
enable_ecs_managed_tags: cdktf.booleanToTerraform(struct!.enableEcsManagedTags),
enable_execute_command: cdktf.booleanToTerraform(struct!.enableExecuteCommand),
group: cdktf.stringToTerraform(struct!.group),
launch_type: cdktf.stringToTerraform(struct!.launchType),
platform_version: cdktf.stringToTerraform(struct!.platformVersion),
propagate_tags: cdktf.stringToTerraform(struct!.propagateTags),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct!.tags),
task_count: cdktf.numberToTerraform(struct!.taskCount),
task_definition_arn: cdktf.stringToTerraform(struct!.taskDefinitionArn),
capacity_provider_strategy: cdktf.listMapper(cloudwatchEventTargetEcsTargetCapacityProviderStrategyToTerraform, true)(struct!.capacityProviderStrategy),
network_configuration: cloudwatchEventTargetEcsTargetNetworkConfigurationToTerraform(struct!.networkConfiguration),
placement_constraint: cdktf.listMapper(cloudwatchEventTargetEcsTargetPlacementConstraintToTerraform, true)(struct!.placementConstraint),
}
}
export class CloudwatchEventTargetEcsTargetOutputReference 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(): CloudwatchEventTargetEcsTarget | undefined {
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._enableEcsManagedTags !== undefined) {
hasAnyValues = true;
internalValueResult.enableEcsManagedTags = this._enableEcsManagedTags;
}
if (this._enableExecuteCommand !== undefined) {
hasAnyValues = true;
internalValueResult.enableExecuteCommand = this._enableExecuteCommand;
}
if (this._group !== undefined) {
hasAnyValues = true;
internalValueResult.group = this._group;
}
if (this._launchType !== undefined) {
hasAnyValues = true;
internalValueResult.launchType = this._launchType;
}
if (this._platformVersion !== undefined) {
hasAnyValues = true;
internalValueResult.platformVersion = this._platformVersion;
}
if (this._propagateTags !== undefined) {
hasAnyValues = true;
internalValueResult.propagateTags = this._propagateTags;
}
if (this._tags !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags;
}
if (this._taskCount !== undefined) {
hasAnyValues = true;
internalValueResult.taskCount = this._taskCount;
}
if (this._taskDefinitionArn !== undefined) {
hasAnyValues = true;
internalValueResult.taskDefinitionArn = this._taskDefinitionArn;
}
if (this._capacityProviderStrategy?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.capacityProviderStrategy = this._capacityProviderStrategy?.internalValue;
}
if (this._networkConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.networkConfiguration = this._networkConfiguration?.internalValue;
}
if (this._placementConstraint?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.placementConstraint = this._placementConstraint?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
public set internalValue(value: CloudwatchEventTargetEcsTarget | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableEcsManagedTags = undefined;
this._enableExecuteCommand = undefined;
this._group = undefined;
this._launchType = undefined;
this._platformVersion = undefined;
this._propagateTags = undefined;
this._tags = undefined;
this._taskCount = undefined;
this._taskDefinitionArn = undefined;
this._capacityProviderStrategy.internalValue = undefined;
this._networkConfiguration.internalValue = undefined;
this._placementConstraint.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableEcsManagedTags = value.enableEcsManagedTags;
this._enableExecuteCommand = value.enableExecuteCommand;
this._group = value.group;
this._launchType = value.launchType;
this._platformVersion = value.platformVersion;
this._propagateTags = value.propagateTags;
this._tags = value.tags;
this._taskCount = value.taskCount;
this._taskDefinitionArn = value.taskDefinitionArn;
this._capacityProviderStrategy.internalValue = value.capacityProviderStrategy;
this._networkConfiguration.internalValue = value.networkConfiguration;
this._placementConstraint.internalValue = value.placementConstraint;
}
}
// enable_ecs_managed_tags - computed: false, optional: true, required: false
private _enableEcsManagedTags?: boolean | cdktf.IResolvable;
public get enableEcsManagedTags() {
return this.getBooleanAttribute('enable_ecs_managed_tags');
}
public set enableEcsManagedTags(value: boolean | cdktf.IResolvable) {
this._enableEcsManagedTags = value;
}
public resetEnableEcsManagedTags() {
this._enableEcsManagedTags = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableEcsManagedTagsInput() {
return this._enableEcsManagedTags;
}
// enable_execute_command - computed: false, optional: true, required: false
private _enableExecuteCommand?: boolean | cdktf.IResolvable;
public get enableExecuteCommand() {
return this.getBooleanAttribute('enable_execute_command');
}
public set enableExecuteCommand(value: boolean | cdktf.IResolvable) {
this._enableExecuteCommand = value;
}
public resetEnableExecuteCommand() {
this._enableExecuteCommand = undefined;
}
// Temporarily expose input value. Use with caution.
public get enableExecuteCommandInput() {
return this._enableExecuteCommand;
}
// group - computed: false, optional: true, required: false
private _group?: string;
public get group() {
return this.getStringAttribute('group');
}
public set group(value: string) {
this._group = value;
}
public resetGroup() {
this._group = undefined;
}
// Temporarily expose input value. Use with caution.
public get groupInput() {
return this._group;
}
// launch_type - computed: false, optional: true, required: false
private _launchType?: string;
public get launchType() {
return this.getStringAttribute('launch_type');
}
public set launchType(value: string) {
this._launchType = value;
}
public resetLaunchType() {
this._launchType = undefined;
}
// Temporarily expose input value. Use with caution.
public get launchTypeInput() {
return this._launchType;
}
// platform_version - computed: false, optional: true, required: false
private _platformVersion?: string;
public get platformVersion() {
return this.getStringAttribute('platform_version');
}
public set platformVersion(value: string) {
this._platformVersion = value;
}
public resetPlatformVersion() {
this._platformVersion = undefined;
}
// Temporarily expose input value. Use with caution.
public get platformVersionInput() {
return this._platformVersion;
}
// propagate_tags - computed: false, optional: true, required: false
private _propagateTags?: string;
public get propagateTags() {
return this.getStringAttribute('propagate_tags');
}
public set propagateTags(value: string) {
this._propagateTags = value;
}
public resetPropagateTags() {
this._propagateTags = undefined;
}
// Temporarily expose input value. Use with caution.
public get propagateTagsInput() {
return this._propagateTags;
}
// 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;
}
// Temporarily expose input value. Use with caution.
public get tagsInput() {
return this._tags;
}
// task_count - computed: false, optional: true, required: false
private _taskCount?: number;
public get taskCount() {
return this.getNumberAttribute('task_count');
}
public set taskCount(value: number) {
this._taskCount = value;
}
public resetTaskCount() {
this._taskCount = undefined;
}
// Temporarily expose input value. Use with caution.
public get taskCountInput() {
return this._taskCount;
}
// task_definition_arn - computed: false, optional: false, required: true