-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_lifecyclepolicy_types.go
executable file
·985 lines (706 loc) · 58.7 KB
/
zz_lifecyclepolicy_types.go
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
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type ActionInitParameters struct {
// The rule for copying shared snapshots across Regions. See the cross_region_copy configuration block.
CrossRegionCopy []CrossRegionCopyInitParameters `json:"crossRegionCopy,omitempty" tf:"cross_region_copy,omitempty"`
// A descriptive name for the action.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type ActionObservation struct {
// The rule for copying shared snapshots across Regions. See the cross_region_copy configuration block.
CrossRegionCopy []CrossRegionCopyObservation `json:"crossRegionCopy,omitempty" tf:"cross_region_copy,omitempty"`
// A descriptive name for the action.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type ActionParameters struct {
// The rule for copying shared snapshots across Regions. See the cross_region_copy configuration block.
// +kubebuilder:validation:Optional
CrossRegionCopy []CrossRegionCopyParameters `json:"crossRegionCopy" tf:"cross_region_copy,omitempty"`
// A descriptive name for the action.
// +kubebuilder:validation:Optional
Name *string `json:"name" tf:"name,omitempty"`
}
type CreateRuleInitParameters struct {
// The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. Conflicts with interval, interval_unit, and times.
CronExpression *string `json:"cronExpression,omitempty" tf:"cron_expression,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
// Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specify CLOUD. To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. If you omit this parameter, CLOUD is used by default. If the policy targets resources in an AWS Region, then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost. Valid values are CLOUD and OUTPOST_LOCAL.
Location *string `json:"location,omitempty" tf:"location,omitempty"`
// A list of times in 24 hour clock format that sets when the lifecycle policy should be evaluated. Max of 1. Conflicts with cron_expression. Must be set if interval is set.
Times []*string `json:"times,omitempty" tf:"times,omitempty"`
}
type CreateRuleObservation struct {
// The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. Conflicts with interval, interval_unit, and times.
CronExpression *string `json:"cronExpression,omitempty" tf:"cron_expression,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
// Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specify CLOUD. To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. If you omit this parameter, CLOUD is used by default. If the policy targets resources in an AWS Region, then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost. Valid values are CLOUD and OUTPOST_LOCAL.
Location *string `json:"location,omitempty" tf:"location,omitempty"`
// A list of times in 24 hour clock format that sets when the lifecycle policy should be evaluated. Max of 1. Conflicts with cron_expression. Must be set if interval is set.
Times []*string `json:"times,omitempty" tf:"times,omitempty"`
}
type CreateRuleParameters struct {
// The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. Conflicts with interval, interval_unit, and times.
// +kubebuilder:validation:Optional
CronExpression *string `json:"cronExpression,omitempty" tf:"cron_expression,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
// Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specify CLOUD. To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. If you omit this parameter, CLOUD is used by default. If the policy targets resources in an AWS Region, then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost. Valid values are CLOUD and OUTPOST_LOCAL.
// +kubebuilder:validation:Optional
Location *string `json:"location,omitempty" tf:"location,omitempty"`
// A list of times in 24 hour clock format that sets when the lifecycle policy should be evaluated. Max of 1. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
Times []*string `json:"times,omitempty" tf:"times,omitempty"`
}
type CrossRegionCopyInitParameters struct {
// The encryption settings for the copied snapshot. See the encryption_configuration block. Max of 1 per action.
EncryptionConfiguration []EncryptionConfigurationInitParameters `json:"encryptionConfiguration,omitempty" tf:"encryption_configuration,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []RetainRuleInitParameters `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type CrossRegionCopyObservation struct {
// The encryption settings for the copied snapshot. See the encryption_configuration block. Max of 1 per action.
EncryptionConfiguration []EncryptionConfigurationObservation `json:"encryptionConfiguration,omitempty" tf:"encryption_configuration,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []RetainRuleObservation `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type CrossRegionCopyParameters struct {
// The encryption settings for the copied snapshot. See the encryption_configuration block. Max of 1 per action.
// +kubebuilder:validation:Optional
EncryptionConfiguration []EncryptionConfigurationParameters `json:"encryptionConfiguration" tf:"encryption_configuration,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
// +kubebuilder:validation:Optional
RetainRule []RetainRuleParameters `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
// +kubebuilder:validation:Optional
Target *string `json:"target" tf:"target,omitempty"`
}
type CrossRegionCopyRuleInitParameters struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true)
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// Reference to a Key in kms to populate cmkArn.
// +kubebuilder:validation:Optional
CmkArnRef *v1.Reference `json:"cmkArnRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate cmkArn.
// +kubebuilder:validation:Optional
CmkArnSelector *v1.Selector `json:"cmkArnSelector,omitempty" tf:"-"`
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
DeprecateRule []DeprecateRuleInitParameters `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []CrossRegionCopyRuleRetainRuleInitParameters `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type CrossRegionCopyRuleObservation struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
DeprecateRule []DeprecateRuleObservation `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []CrossRegionCopyRuleRetainRuleObservation `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type CrossRegionCopyRuleParameters struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/kms/v1beta1.Key
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("arn",true)
// +kubebuilder:validation:Optional
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// Reference to a Key in kms to populate cmkArn.
// +kubebuilder:validation:Optional
CmkArnRef *v1.Reference `json:"cmkArnRef,omitempty" tf:"-"`
// Selector for a Key in kms to populate cmkArn.
// +kubebuilder:validation:Optional
CmkArnSelector *v1.Selector `json:"cmkArnSelector,omitempty" tf:"-"`
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
// +kubebuilder:validation:Optional
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
// +kubebuilder:validation:Optional
DeprecateRule []DeprecateRuleParameters `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
// +kubebuilder:validation:Optional
Encrypted *bool `json:"encrypted" tf:"encrypted,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
// +kubebuilder:validation:Optional
RetainRule []CrossRegionCopyRuleRetainRuleParameters `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
// +kubebuilder:validation:Optional
Target *string `json:"target" tf:"target,omitempty"`
}
type CrossRegionCopyRuleRetainRuleInitParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type CrossRegionCopyRuleRetainRuleObservation struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type CrossRegionCopyRuleRetainRuleParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit" tf:"interval_unit,omitempty"`
}
type DeprecateRuleInitParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type DeprecateRuleObservation struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type DeprecateRuleParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit" tf:"interval_unit,omitempty"`
}
type EncryptionConfigurationInitParameters struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
}
type EncryptionConfigurationObservation struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
}
type EncryptionConfigurationParameters struct {
// The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
// +kubebuilder:validation:Optional
CmkArn *string `json:"cmkArn,omitempty" tf:"cmk_arn,omitempty"`
// To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
// +kubebuilder:validation:Optional
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
}
type EventSourceInitParameters struct {
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
Parameters []ParametersInitParameters `json:"parameters,omitempty" tf:"parameters,omitempty"`
// The source of the event. Currently only managed CloudWatch Events rules are supported. Valid values are MANAGED_CWE.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type EventSourceObservation struct {
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
Parameters []ParametersObservation `json:"parameters,omitempty" tf:"parameters,omitempty"`
// The source of the event. Currently only managed CloudWatch Events rules are supported. Valid values are MANAGED_CWE.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type EventSourceParameters struct {
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
// +kubebuilder:validation:Optional
Parameters []ParametersParameters `json:"parameters" tf:"parameters,omitempty"`
// The source of the event. Currently only managed CloudWatch Events rules are supported. Valid values are MANAGED_CWE.
// +kubebuilder:validation:Optional
Type *string `json:"type" tf:"type,omitempty"`
}
type FastRestoreRuleInitParameters struct {
// The Availability Zones in which to enable fast snapshot restore.
// +listType=set
AvailabilityZones []*string `json:"availabilityZones,omitempty" tf:"availability_zones,omitempty"`
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type FastRestoreRuleObservation struct {
// The Availability Zones in which to enable fast snapshot restore.
// +listType=set
AvailabilityZones []*string `json:"availabilityZones,omitempty" tf:"availability_zones,omitempty"`
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type FastRestoreRuleParameters struct {
// The Availability Zones in which to enable fast snapshot restore.
// +kubebuilder:validation:Optional
// +listType=set
AvailabilityZones []*string `json:"availabilityZones" tf:"availability_zones,omitempty"`
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
// +kubebuilder:validation:Optional
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type LifecyclePolicyInitParameters struct {
// A description for the DLM lifecycle policy.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The ARN of an IAM role that is able to be assumed by the DLM service.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/iam/v1beta1.Role
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor()
ExecutionRoleArn *string `json:"executionRoleArn,omitempty" tf:"execution_role_arn,omitempty"`
// Reference to a Role in iam to populate executionRoleArn.
// +kubebuilder:validation:Optional
ExecutionRoleArnRef *v1.Reference `json:"executionRoleArnRef,omitempty" tf:"-"`
// Selector for a Role in iam to populate executionRoleArn.
// +kubebuilder:validation:Optional
ExecutionRoleArnSelector *v1.Selector `json:"executionRoleArnSelector,omitempty" tf:"-"`
// See the policy_details configuration block. Max of 1.
PolicyDetails []PolicyDetailsInitParameters `json:"policyDetails,omitempty" tf:"policy_details,omitempty"`
// Whether the lifecycle policy should be enabled or disabled. ENABLED or DISABLED are valid values. Defaults to ENABLED.
State *string `json:"state,omitempty" tf:"state,omitempty"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
type LifecyclePolicyObservation struct {
// Amazon Resource Name (ARN) of the DLM Lifecycle Policy.
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// A description for the DLM lifecycle policy.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The ARN of an IAM role that is able to be assumed by the DLM service.
ExecutionRoleArn *string `json:"executionRoleArn,omitempty" tf:"execution_role_arn,omitempty"`
// Identifier of the DLM Lifecycle Policy.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// See the policy_details configuration block. Max of 1.
PolicyDetails []PolicyDetailsObservation `json:"policyDetails,omitempty" tf:"policy_details,omitempty"`
// Whether the lifecycle policy should be enabled or disabled. ENABLED or DISABLED are valid values. Defaults to ENABLED.
State *string `json:"state,omitempty" tf:"state,omitempty"`
// Key-value map of resource tags.
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
// A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
// +mapType=granular
TagsAll map[string]*string `json:"tagsAll,omitempty" tf:"tags_all,omitempty"`
}
type LifecyclePolicyParameters struct {
// A description for the DLM lifecycle policy.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The ARN of an IAM role that is able to be assumed by the DLM service.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/iam/v1beta1.Role
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.ARNExtractor()
// +kubebuilder:validation:Optional
ExecutionRoleArn *string `json:"executionRoleArn,omitempty" tf:"execution_role_arn,omitempty"`
// Reference to a Role in iam to populate executionRoleArn.
// +kubebuilder:validation:Optional
ExecutionRoleArnRef *v1.Reference `json:"executionRoleArnRef,omitempty" tf:"-"`
// Selector for a Role in iam to populate executionRoleArn.
// +kubebuilder:validation:Optional
ExecutionRoleArnSelector *v1.Selector `json:"executionRoleArnSelector,omitempty" tf:"-"`
// See the policy_details configuration block. Max of 1.
// +kubebuilder:validation:Optional
PolicyDetails []PolicyDetailsParameters `json:"policyDetails,omitempty" tf:"policy_details,omitempty"`
// Region is the region you'd like your resource to be created in.
// +upjet:crd:field:TFTag=-
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"-"`
// Whether the lifecycle policy should be enabled or disabled. ENABLED or DISABLED are valid values. Defaults to ENABLED.
// +kubebuilder:validation:Optional
State *string `json:"state,omitempty" tf:"state,omitempty"`
// Key-value map of resource tags.
// +kubebuilder:validation:Optional
// +mapType=granular
Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"`
}
type ParametersInitParameters struct {
// The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
DescriptionRegex *string `json:"descriptionRegex,omitempty" tf:"description_regex,omitempty"`
// The type of event. Currently, only shareSnapshot events are supported.
EventType *string `json:"eventType,omitempty" tf:"event_type,omitempty"`
// The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
// +listType=set
SnapshotOwner []*string `json:"snapshotOwner,omitempty" tf:"snapshot_owner,omitempty"`
}
type ParametersObservation struct {
// The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
DescriptionRegex *string `json:"descriptionRegex,omitempty" tf:"description_regex,omitempty"`
// The type of event. Currently, only shareSnapshot events are supported.
EventType *string `json:"eventType,omitempty" tf:"event_type,omitempty"`
// The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
// +listType=set
SnapshotOwner []*string `json:"snapshotOwner,omitempty" tf:"snapshot_owner,omitempty"`
}
type ParametersParameters struct {
// The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
// +kubebuilder:validation:Optional
DescriptionRegex *string `json:"descriptionRegex" tf:"description_regex,omitempty"`
// The type of event. Currently, only shareSnapshot events are supported.
// +kubebuilder:validation:Optional
EventType *string `json:"eventType" tf:"event_type,omitempty"`
// The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
// +kubebuilder:validation:Optional
// +listType=set
SnapshotOwner []*string `json:"snapshotOwner" tf:"snapshot_owner,omitempty"`
}
type PolicyDetailsInitParameters struct {
// The actions to be performed when the event-based policy is triggered. You can specify only one action per policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the action configuration block.
Action []ActionInitParameters `json:"action,omitempty" tf:"action,omitempty"`
// The event that triggers the event-based policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the event_source configuration block.
EventSource []EventSourceInitParameters `json:"eventSource,omitempty" tf:"event_source,omitempty"`
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
Parameters []PolicyDetailsParametersInitParameters `json:"parameters,omitempty" tf:"parameters,omitempty"`
// The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your AWS account. Default value is EBS_SNAPSHOT_MANAGEMENT.
PolicyType *string `json:"policyType,omitempty" tf:"policy_type,omitempty"`
// The location of the resources to backup. If the source resources are located in an AWS Region, specify CLOUD. If the source resources are located on an Outpost in your account, specify OUTPOST. If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account. Valid values are CLOUD and OUTPOST.
ResourceLocations []*string `json:"resourceLocations,omitempty" tf:"resource_locations,omitempty"`
// A list of resource types that should be targeted by the lifecycle policy. Valid values are VOLUME and INSTANCE.
ResourceTypes []*string `json:"resourceTypes,omitempty" tf:"resource_types,omitempty"`
// See the schedule configuration block.
Schedule []ScheduleInitParameters `json:"schedule,omitempty" tf:"schedule,omitempty"`
// A map of tag keys and their values. Any resources that match the resource_types and are tagged with any of these tags will be targeted.
// +mapType=granular
TargetTags map[string]*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"`
}
type PolicyDetailsObservation struct {
// The actions to be performed when the event-based policy is triggered. You can specify only one action per policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the action configuration block.
Action []ActionObservation `json:"action,omitempty" tf:"action,omitempty"`
// The event that triggers the event-based policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the event_source configuration block.
EventSource []EventSourceObservation `json:"eventSource,omitempty" tf:"event_source,omitempty"`
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
Parameters []PolicyDetailsParametersObservation `json:"parameters,omitempty" tf:"parameters,omitempty"`
// The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your AWS account. Default value is EBS_SNAPSHOT_MANAGEMENT.
PolicyType *string `json:"policyType,omitempty" tf:"policy_type,omitempty"`
// The location of the resources to backup. If the source resources are located in an AWS Region, specify CLOUD. If the source resources are located on an Outpost in your account, specify OUTPOST. If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account. Valid values are CLOUD and OUTPOST.
ResourceLocations []*string `json:"resourceLocations,omitempty" tf:"resource_locations,omitempty"`
// A list of resource types that should be targeted by the lifecycle policy. Valid values are VOLUME and INSTANCE.
ResourceTypes []*string `json:"resourceTypes,omitempty" tf:"resource_types,omitempty"`
// See the schedule configuration block.
Schedule []ScheduleObservation `json:"schedule,omitempty" tf:"schedule,omitempty"`
// A map of tag keys and their values. Any resources that match the resource_types and are tagged with any of these tags will be targeted.
// +mapType=granular
TargetTags map[string]*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"`
}
type PolicyDetailsParameters struct {
// The actions to be performed when the event-based policy is triggered. You can specify only one action per policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the action configuration block.
// +kubebuilder:validation:Optional
Action []ActionParameters `json:"action,omitempty" tf:"action,omitempty"`
// The event that triggers the event-based policy. This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter. See the event_source configuration block.
// +kubebuilder:validation:Optional
EventSource []EventSourceParameters `json:"eventSource,omitempty" tf:"event_source,omitempty"`
// A set of optional parameters for snapshot and AMI lifecycle policies. See the parameters configuration block.
// +kubebuilder:validation:Optional
Parameters []PolicyDetailsParametersParameters `json:"parameters,omitempty" tf:"parameters,omitempty"`
// The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your AWS account. Default value is EBS_SNAPSHOT_MANAGEMENT.
// +kubebuilder:validation:Optional
PolicyType *string `json:"policyType,omitempty" tf:"policy_type,omitempty"`
// The location of the resources to backup. If the source resources are located in an AWS Region, specify CLOUD. If the source resources are located on an Outpost in your account, specify OUTPOST. If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account. Valid values are CLOUD and OUTPOST.
// +kubebuilder:validation:Optional
ResourceLocations []*string `json:"resourceLocations,omitempty" tf:"resource_locations,omitempty"`
// A list of resource types that should be targeted by the lifecycle policy. Valid values are VOLUME and INSTANCE.
// +kubebuilder:validation:Optional
ResourceTypes []*string `json:"resourceTypes,omitempty" tf:"resource_types,omitempty"`
// See the schedule configuration block.
// +kubebuilder:validation:Optional
Schedule []ScheduleParameters `json:"schedule,omitempty" tf:"schedule,omitempty"`
// A map of tag keys and their values. Any resources that match the resource_types and are tagged with any of these tags will be targeted.
// +kubebuilder:validation:Optional
// +mapType=granular
TargetTags map[string]*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"`
}
type PolicyDetailsParametersInitParameters struct {
// Indicates whether to exclude the root volume from snapshots created using CreateSnapshots. The default is false.
ExcludeBootVolume *bool `json:"excludeBootVolume,omitempty" tf:"exclude_boot_volume,omitempty"`
// Applies to AMI lifecycle policies only. Indicates whether targeted instances are rebooted when the lifecycle policy runs. true indicates that targeted instances are not rebooted when the policy runs. false indicates that target instances are rebooted when the policy runs. The default is true (instances are not rebooted).
NoReboot *bool `json:"noReboot,omitempty" tf:"no_reboot,omitempty"`
}
type PolicyDetailsParametersObservation struct {
// Indicates whether to exclude the root volume from snapshots created using CreateSnapshots. The default is false.
ExcludeBootVolume *bool `json:"excludeBootVolume,omitempty" tf:"exclude_boot_volume,omitempty"`
// Applies to AMI lifecycle policies only. Indicates whether targeted instances are rebooted when the lifecycle policy runs. true indicates that targeted instances are not rebooted when the policy runs. false indicates that target instances are rebooted when the policy runs. The default is true (instances are not rebooted).
NoReboot *bool `json:"noReboot,omitempty" tf:"no_reboot,omitempty"`
}
type PolicyDetailsParametersParameters struct {
// Indicates whether to exclude the root volume from snapshots created using CreateSnapshots. The default is false.
// +kubebuilder:validation:Optional
ExcludeBootVolume *bool `json:"excludeBootVolume,omitempty" tf:"exclude_boot_volume,omitempty"`
// Applies to AMI lifecycle policies only. Indicates whether targeted instances are rebooted when the lifecycle policy runs. true indicates that targeted instances are not rebooted when the policy runs. false indicates that target instances are rebooted when the policy runs. The default is true (instances are not rebooted).
// +kubebuilder:validation:Optional
NoReboot *bool `json:"noReboot,omitempty" tf:"no_reboot,omitempty"`
}
type RetainRuleInitParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type RetainRuleObservation struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type RetainRuleParameters struct {
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit" tf:"interval_unit,omitempty"`
}
type ScheduleDeprecateRuleInitParameters struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ScheduleDeprecateRuleObservation struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ScheduleDeprecateRuleParameters struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
// +kubebuilder:validation:Optional
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ScheduleInitParameters struct {
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the create_rule block. Max of 1 per schedule.
CreateRule []CreateRuleInitParameters `json:"createRule,omitempty" tf:"create_rule,omitempty"`
// See the cross_region_copy_rule block. Max of 3 per schedule.
CrossRegionCopyRule []CrossRegionCopyRuleInitParameters `json:"crossRegionCopyRule,omitempty" tf:"cross_region_copy_rule,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
DeprecateRule []ScheduleDeprecateRuleInitParameters `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// See the fast_restore_rule block. Max of 1 per schedule.
FastRestoreRule []FastRestoreRuleInitParameters `json:"fastRestoreRule,omitempty" tf:"fast_restore_rule,omitempty"`
// A descriptive name for the action.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []ScheduleRetainRuleInitParameters `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// See the share_rule block. Max of 1 per schedule.
ShareRule []ShareRuleInitParameters `json:"shareRule,omitempty" tf:"share_rule,omitempty"`
// A map of tag keys and their values. DLM lifecycle policies will already tag the snapshot with the tags on the volume. This configuration adds extra tags on top of these.
// +mapType=granular
TagsToAdd map[string]*string `json:"tagsToAdd,omitempty" tf:"tags_to_add,omitempty"`
// A map of tag keys and variable values, where the values are determined when the policy is executed. Only $(instance-id) or $(timestamp) are valid values. Can only be used when resource_types is INSTANCE.
// +mapType=granular
VariableTags map[string]*string `json:"variableTags,omitempty" tf:"variable_tags,omitempty"`
}
type ScheduleObservation struct {
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the create_rule block. Max of 1 per schedule.
CreateRule []CreateRuleObservation `json:"createRule,omitempty" tf:"create_rule,omitempty"`
// See the cross_region_copy_rule block. Max of 3 per schedule.
CrossRegionCopyRule []CrossRegionCopyRuleObservation `json:"crossRegionCopyRule,omitempty" tf:"cross_region_copy_rule,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
DeprecateRule []ScheduleDeprecateRuleObservation `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// See the fast_restore_rule block. Max of 1 per schedule.
FastRestoreRule []FastRestoreRuleObservation `json:"fastRestoreRule,omitempty" tf:"fast_restore_rule,omitempty"`
// A descriptive name for the action.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
RetainRule []ScheduleRetainRuleObservation `json:"retainRule,omitempty" tf:"retain_rule,omitempty"`
// See the share_rule block. Max of 1 per schedule.
ShareRule []ShareRuleObservation `json:"shareRule,omitempty" tf:"share_rule,omitempty"`
// A map of tag keys and their values. DLM lifecycle policies will already tag the snapshot with the tags on the volume. This configuration adds extra tags on top of these.
// +mapType=granular
TagsToAdd map[string]*string `json:"tagsToAdd,omitempty" tf:"tags_to_add,omitempty"`
// A map of tag keys and variable values, where the values are determined when the policy is executed. Only $(instance-id) or $(timestamp) are valid values. Can only be used when resource_types is INSTANCE.
// +mapType=granular
VariableTags map[string]*string `json:"variableTags,omitempty" tf:"variable_tags,omitempty"`
}
type ScheduleParameters struct {
// Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
// +kubebuilder:validation:Optional
CopyTags *bool `json:"copyTags,omitempty" tf:"copy_tags,omitempty"`
// See the create_rule block. Max of 1 per schedule.
// +kubebuilder:validation:Optional
CreateRule []CreateRuleParameters `json:"createRule" tf:"create_rule,omitempty"`
// See the cross_region_copy_rule block. Max of 3 per schedule.
// +kubebuilder:validation:Optional
CrossRegionCopyRule []CrossRegionCopyRuleParameters `json:"crossRegionCopyRule,omitempty" tf:"cross_region_copy_rule,omitempty"`
// See the deprecate_rule block. Max of 1 per schedule.
// +kubebuilder:validation:Optional
DeprecateRule []ScheduleDeprecateRuleParameters `json:"deprecateRule,omitempty" tf:"deprecate_rule,omitempty"`
// See the fast_restore_rule block. Max of 1 per schedule.
// +kubebuilder:validation:Optional
FastRestoreRule []FastRestoreRuleParameters `json:"fastRestoreRule,omitempty" tf:"fast_restore_rule,omitempty"`
// A descriptive name for the action.
// +kubebuilder:validation:Optional
Name *string `json:"name" tf:"name,omitempty"`
// Specifies the retention rule for cross-Region snapshot copies. See the retain_rule block. Max of 1 per action.
// +kubebuilder:validation:Optional
RetainRule []ScheduleRetainRuleParameters `json:"retainRule" tf:"retain_rule,omitempty"`
// See the share_rule block. Max of 1 per schedule.
// +kubebuilder:validation:Optional
ShareRule []ShareRuleParameters `json:"shareRule,omitempty" tf:"share_rule,omitempty"`
// A map of tag keys and their values. DLM lifecycle policies will already tag the snapshot with the tags on the volume. This configuration adds extra tags on top of these.
// +kubebuilder:validation:Optional
// +mapType=granular
TagsToAdd map[string]*string `json:"tagsToAdd,omitempty" tf:"tags_to_add,omitempty"`
// A map of tag keys and variable values, where the values are determined when the policy is executed. Only $(instance-id) or $(timestamp) are valid values. Can only be used when resource_types is INSTANCE.
// +kubebuilder:validation:Optional
// +mapType=granular
VariableTags map[string]*string `json:"variableTags,omitempty" tf:"variable_tags,omitempty"`
}
type ScheduleRetainRuleInitParameters struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ScheduleRetainRuleObservation struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ScheduleRetainRuleParameters struct {
// Specifies the number of oldest AMIs to deprecate. Must be an integer between 1 and 1000. Conflicts with interval and interval_unit.
// +kubebuilder:validation:Optional
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
Interval *float64 `json:"interval,omitempty" tf:"interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
IntervalUnit *string `json:"intervalUnit,omitempty" tf:"interval_unit,omitempty"`
}
type ShareRuleInitParameters struct {
// The IDs of the AWS accounts with which to share the snapshots.
// +listType=set
TargetAccounts []*string `json:"targetAccounts,omitempty" tf:"target_accounts,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
UnshareInterval *float64 `json:"unshareInterval,omitempty" tf:"unshare_interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
UnshareIntervalUnit *string `json:"unshareIntervalUnit,omitempty" tf:"unshare_interval_unit,omitempty"`
}
type ShareRuleObservation struct {
// The IDs of the AWS accounts with which to share the snapshots.
// +listType=set
TargetAccounts []*string `json:"targetAccounts,omitempty" tf:"target_accounts,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
UnshareInterval *float64 `json:"unshareInterval,omitempty" tf:"unshare_interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
UnshareIntervalUnit *string `json:"unshareIntervalUnit,omitempty" tf:"unshare_interval_unit,omitempty"`
}
type ShareRuleParameters struct {
// The IDs of the AWS accounts with which to share the snapshots.
// +kubebuilder:validation:Optional
// +listType=set
TargetAccounts []*string `json:"targetAccounts" tf:"target_accounts,omitempty"`
// How often this lifecycle policy should be evaluated. 1, 2,3,4,6,8,12 or 24 are valid values. Conflicts with cron_expression. If set, interval_unit and times must also be set.
// +kubebuilder:validation:Optional
UnshareInterval *float64 `json:"unshareInterval,omitempty" tf:"unshare_interval,omitempty"`
// The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value. Conflicts with cron_expression. Must be set if interval is set.
// +kubebuilder:validation:Optional
UnshareIntervalUnit *string `json:"unshareIntervalUnit,omitempty" tf:"unshare_interval_unit,omitempty"`
}
// LifecyclePolicySpec defines the desired state of LifecyclePolicy
type LifecyclePolicySpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider LifecyclePolicyParameters `json:"forProvider"`
// THIS IS A BETA FIELD. It will be honored
// unless the Management Policies feature flag is disabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
// The same fields are also added to the terraform ignore_changes hook, to
// avoid updating them after creation. This is useful for fields that are
// required on creation, but we do not desire to update them after creation,
// for example because of an external controller is managing them, like an
// autoscaler.
InitProvider LifecyclePolicyInitParameters `json:"initProvider,omitempty"`
}
// LifecyclePolicyStatus defines the observed state of LifecyclePolicy.
type LifecyclePolicyStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider LifecyclePolicyObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// LifecyclePolicy is the Schema for the LifecyclePolicys API. Provides a Data Lifecycle Manager (DLM) lifecycle policy for managing snapshots.
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws}
type LifecyclePolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.description) || (has(self.initProvider) && has(self.initProvider.description))",message="spec.forProvider.description is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.policyDetails) || (has(self.initProvider) && has(self.initProvider.policyDetails))",message="spec.forProvider.policyDetails is a required parameter"
Spec LifecyclePolicySpec `json:"spec"`
Status LifecyclePolicyStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// LifecyclePolicyList contains a list of LifecyclePolicys
type LifecyclePolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LifecyclePolicy `json:"items"`
}
// Repository type metadata.
var (
LifecyclePolicy_Kind = "LifecyclePolicy"
LifecyclePolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: LifecyclePolicy_Kind}.String()
LifecyclePolicy_KindAPIVersion = LifecyclePolicy_Kind + "." + CRDGroupVersion.String()
LifecyclePolicy_GroupVersionKind = CRDGroupVersion.WithKind(LifecyclePolicy_Kind)
)
func init() {
SchemeBuilder.Register(&LifecyclePolicy{}, &LifecyclePolicyList{})
}