-
Notifications
You must be signed in to change notification settings - Fork 60
/
zz_alertpolicy_types.go
executable file
·1563 lines (1384 loc) · 65.7 KB
/
zz_alertpolicy_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
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// 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 AggregationsObservation struct {
// The alignment period for per-time
// series alignment. If present,
// alignmentPeriod must be at least
// 60 seconds. After per-time series
// alignment, each time series will
// contain data points only on the
// period boundaries. If
// perSeriesAligner is not specified
// or equals ALIGN_NONE, then this
// field is ignored. If
// perSeriesAligner is specified and
// does not equal ALIGN_NONE, then
// this field must be defined;
// otherwise an error is returned.
AlignmentPeriod *string `json:"alignmentPeriod,omitempty" tf:"alignment_period,omitempty"`
// The approach to be used to combine
// time series. Not all reducer
// functions may be applied to all
// time series, depending on the
// metric type and the value type of
// the original time series.
// Reduction may change the metric
// type of value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: REDUCE_NONE, REDUCE_MEAN, REDUCE_MIN, REDUCE_MAX, REDUCE_SUM, REDUCE_STDDEV, REDUCE_COUNT, REDUCE_COUNT_TRUE, REDUCE_COUNT_FALSE, REDUCE_FRACTION_TRUE, REDUCE_PERCENTILE_99, REDUCE_PERCENTILE_95, REDUCE_PERCENTILE_50, REDUCE_PERCENTILE_05.
CrossSeriesReducer *string `json:"crossSeriesReducer,omitempty" tf:"cross_series_reducer,omitempty"`
// The set of fields to preserve when
// crossSeriesReducer is specified.
// The groupByFields determine how
// the time series are partitioned
// into subsets prior to applying the
// aggregation function. Each subset
// contains time series that have the
// same value for each of the
// grouping fields. Each individual
// time series is a member of exactly
// one subset. The crossSeriesReducer
// is applied to each subset of time
// series. It is not possible to
// reduce across different resource
// types, so this field implicitly
// contains resource.type. Fields not
// specified in groupByFields are
// aggregated away. If groupByFields
// is not specified and all the time
// series have the same resource
// type, then the time series are
// aggregated into a single output
// time series. If crossSeriesReducer
// is not defined, this field is
// ignored.
GroupByFields []*string `json:"groupByFields,omitempty" tf:"group_by_fields,omitempty"`
// The approach to be used to align
// individual time series. Not all
// alignment functions may be applied
// to all time series, depending on
// the metric type and value type of
// the original time series.
// Alignment may change the metric
// type or the value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: ALIGN_NONE, ALIGN_DELTA, ALIGN_RATE, ALIGN_INTERPOLATE, ALIGN_NEXT_OLDER, ALIGN_MIN, ALIGN_MAX, ALIGN_MEAN, ALIGN_COUNT, ALIGN_SUM, ALIGN_STDDEV, ALIGN_COUNT_TRUE, ALIGN_COUNT_FALSE, ALIGN_FRACTION_TRUE, ALIGN_PERCENTILE_99, ALIGN_PERCENTILE_95, ALIGN_PERCENTILE_50, ALIGN_PERCENTILE_05, ALIGN_PERCENT_CHANGE.
PerSeriesAligner *string `json:"perSeriesAligner,omitempty" tf:"per_series_aligner,omitempty"`
}
type AggregationsParameters struct {
// The alignment period for per-time
// series alignment. If present,
// alignmentPeriod must be at least
// 60 seconds. After per-time series
// alignment, each time series will
// contain data points only on the
// period boundaries. If
// perSeriesAligner is not specified
// or equals ALIGN_NONE, then this
// field is ignored. If
// perSeriesAligner is specified and
// does not equal ALIGN_NONE, then
// this field must be defined;
// otherwise an error is returned.
// +kubebuilder:validation:Optional
AlignmentPeriod *string `json:"alignmentPeriod,omitempty" tf:"alignment_period,omitempty"`
// The approach to be used to combine
// time series. Not all reducer
// functions may be applied to all
// time series, depending on the
// metric type and the value type of
// the original time series.
// Reduction may change the metric
// type of value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: REDUCE_NONE, REDUCE_MEAN, REDUCE_MIN, REDUCE_MAX, REDUCE_SUM, REDUCE_STDDEV, REDUCE_COUNT, REDUCE_COUNT_TRUE, REDUCE_COUNT_FALSE, REDUCE_FRACTION_TRUE, REDUCE_PERCENTILE_99, REDUCE_PERCENTILE_95, REDUCE_PERCENTILE_50, REDUCE_PERCENTILE_05.
// +kubebuilder:validation:Optional
CrossSeriesReducer *string `json:"crossSeriesReducer,omitempty" tf:"cross_series_reducer,omitempty"`
// The set of fields to preserve when
// crossSeriesReducer is specified.
// The groupByFields determine how
// the time series are partitioned
// into subsets prior to applying the
// aggregation function. Each subset
// contains time series that have the
// same value for each of the
// grouping fields. Each individual
// time series is a member of exactly
// one subset. The crossSeriesReducer
// is applied to each subset of time
// series. It is not possible to
// reduce across different resource
// types, so this field implicitly
// contains resource.type. Fields not
// specified in groupByFields are
// aggregated away. If groupByFields
// is not specified and all the time
// series have the same resource
// type, then the time series are
// aggregated into a single output
// time series. If crossSeriesReducer
// is not defined, this field is
// ignored.
// +kubebuilder:validation:Optional
GroupByFields []*string `json:"groupByFields,omitempty" tf:"group_by_fields,omitempty"`
// The approach to be used to align
// individual time series. Not all
// alignment functions may be applied
// to all time series, depending on
// the metric type and value type of
// the original time series.
// Alignment may change the metric
// type or the value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: ALIGN_NONE, ALIGN_DELTA, ALIGN_RATE, ALIGN_INTERPOLATE, ALIGN_NEXT_OLDER, ALIGN_MIN, ALIGN_MAX, ALIGN_MEAN, ALIGN_COUNT, ALIGN_SUM, ALIGN_STDDEV, ALIGN_COUNT_TRUE, ALIGN_COUNT_FALSE, ALIGN_FRACTION_TRUE, ALIGN_PERCENTILE_99, ALIGN_PERCENTILE_95, ALIGN_PERCENTILE_50, ALIGN_PERCENTILE_05, ALIGN_PERCENT_CHANGE.
// +kubebuilder:validation:Optional
PerSeriesAligner *string `json:"perSeriesAligner,omitempty" tf:"per_series_aligner,omitempty"`
}
type AlertPolicyObservation struct {
// Control over how this alert policy's notification channels are notified.
// Structure is documented below.
AlertStrategy []AlertStrategyObservation `json:"alertStrategy,omitempty" tf:"alert_strategy,omitempty"`
// How to combine the results of multiple conditions to
// determine if an incident should be opened.
// Possible values are: AND, OR, AND_WITH_MATCHING_RESOURCE.
Combiner *string `json:"combiner,omitempty" tf:"combiner,omitempty"`
// A list of conditions for the policy. The conditions are combined by
// AND or OR according to the combiner field. If the combined conditions
// evaluate to true, then an incident is created. A policy can have from
// one to six conditions.
// Structure is documented below.
Conditions []ConditionsObservation `json:"conditions,omitempty" tf:"conditions,omitempty"`
// A read-only record of the creation of the alerting policy.
// If provided in a call to create or update, this field will
// be ignored.
// Structure is documented below.
CreationRecord []CreationRecordObservation `json:"creationRecord,omitempty" tf:"creation_record,omitempty"`
// A short name or phrase used to identify the policy in
// dashboards, notifications, and incidents. To avoid confusion, don't use
// the same display name for multiple policies in the same project. The
// name is limited to 512 Unicode characters.
DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"`
// Documentation that is included with notifications and incidents related
// to this policy. Best practice is for the documentation to include information
// to help responders understand, mitigate, escalate, and correct the underlying
// problems detected by the alerting policy. Notification channels that have
// limited capacity might not show this documentation.
// Structure is documented below.
Documentation []DocumentationObservation `json:"documentation,omitempty" tf:"documentation,omitempty"`
// Whether or not the policy is enabled. The default is true.
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// an identifier for the resource with format {{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The unique resource name for this policy.
// Its syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Identifies the notification channels to which notifications should be
// sent when incidents are opened or closed or when new violations occur
// on an already opened incident. Each element of this array corresponds
// to the name field in each of the NotificationChannel objects that are
// returned from the notificationChannels.list method. The syntax of the
// entries in this field is
// projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
NotificationChannels []*string `json:"notificationChannels,omitempty" tf:"notification_channels,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// This field is intended to be used for organizing and identifying the AlertPolicy
// objects.The field can contain up to 64 entries. Each key and value is limited
// to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values
// can contain only lowercase letters, numerals, underscores, and dashes. Keys
// must begin with a letter.
UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"`
}
type AlertPolicyParameters struct {
// Control over how this alert policy's notification channels are notified.
// Structure is documented below.
// +kubebuilder:validation:Optional
AlertStrategy []AlertStrategyParameters `json:"alertStrategy,omitempty" tf:"alert_strategy,omitempty"`
// How to combine the results of multiple conditions to
// determine if an incident should be opened.
// Possible values are: AND, OR, AND_WITH_MATCHING_RESOURCE.
// +kubebuilder:validation:Optional
Combiner *string `json:"combiner,omitempty" tf:"combiner,omitempty"`
// A list of conditions for the policy. The conditions are combined by
// AND or OR according to the combiner field. If the combined conditions
// evaluate to true, then an incident is created. A policy can have from
// one to six conditions.
// Structure is documented below.
// +kubebuilder:validation:Optional
Conditions []ConditionsParameters `json:"conditions,omitempty" tf:"conditions,omitempty"`
// A short name or phrase used to identify the policy in
// dashboards, notifications, and incidents. To avoid confusion, don't use
// the same display name for multiple policies in the same project. The
// name is limited to 512 Unicode characters.
// +kubebuilder:validation:Optional
DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"`
// Documentation that is included with notifications and incidents related
// to this policy. Best practice is for the documentation to include information
// to help responders understand, mitigate, escalate, and correct the underlying
// problems detected by the alerting policy. Notification channels that have
// limited capacity might not show this documentation.
// Structure is documented below.
// +kubebuilder:validation:Optional
Documentation []DocumentationParameters `json:"documentation,omitempty" tf:"documentation,omitempty"`
// Whether or not the policy is enabled. The default is true.
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Identifies the notification channels to which notifications should be
// sent when incidents are opened or closed or when new violations occur
// on an already opened incident. Each element of this array corresponds
// to the name field in each of the NotificationChannel objects that are
// returned from the notificationChannels.list method. The syntax of the
// entries in this field is
// projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
// +kubebuilder:validation:Optional
NotificationChannels []*string `json:"notificationChannels,omitempty" tf:"notification_channels,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
// +kubebuilder:validation:Optional
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// This field is intended to be used for organizing and identifying the AlertPolicy
// objects.The field can contain up to 64 entries. Each key and value is limited
// to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values
// can contain only lowercase letters, numerals, underscores, and dashes. Keys
// must begin with a letter.
// +kubebuilder:validation:Optional
UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"`
}
type AlertStrategyObservation struct {
// If an alert policy that was active has no data for this long, any open incidents will close.
AutoClose *string `json:"autoClose,omitempty" tf:"auto_close,omitempty"`
// Control over how the notification channels in notification_channels
// are notified when this alert fires, on a per-channel basis.
// Structure is documented below.
NotificationChannelStrategy []NotificationChannelStrategyObservation `json:"notificationChannelStrategy,omitempty" tf:"notification_channel_strategy,omitempty"`
// Required for alert policies with a LogMatch condition.
// This limit is not implemented for alert policies that are not log-based.
// Structure is documented below.
NotificationRateLimit []NotificationRateLimitObservation `json:"notificationRateLimit,omitempty" tf:"notification_rate_limit,omitempty"`
}
type AlertStrategyParameters struct {
// If an alert policy that was active has no data for this long, any open incidents will close.
// +kubebuilder:validation:Optional
AutoClose *string `json:"autoClose,omitempty" tf:"auto_close,omitempty"`
// Control over how the notification channels in notification_channels
// are notified when this alert fires, on a per-channel basis.
// Structure is documented below.
// +kubebuilder:validation:Optional
NotificationChannelStrategy []NotificationChannelStrategyParameters `json:"notificationChannelStrategy,omitempty" tf:"notification_channel_strategy,omitempty"`
// Required for alert policies with a LogMatch condition.
// This limit is not implemented for alert policies that are not log-based.
// Structure is documented below.
// +kubebuilder:validation:Optional
NotificationRateLimit []NotificationRateLimitParameters `json:"notificationRateLimit,omitempty" tf:"notification_rate_limit,omitempty"`
}
type ConditionAbsentObservation struct {
// Specifies the alignment of data points in
// individual time series as well as how to
// combine the retrieved time series together
// (such as when aggregating multiple streams
// on each resource to a single stream for each
// resource or when aggregating streams across
// all members of a group of resources).
// Multiple aggregations are applied in the
// order specified.This field is similar to the
// one in the MetricService.ListTimeSeries
// request. It is advisable to use the
// ListTimeSeries method when debugging this
// field.
// Structure is documented below.
Aggregations []AggregationsObservation `json:"aggregations,omitempty" tf:"aggregations,omitempty"`
// The amount of time that a time series must
// violate the threshold to be considered
// failing. Currently, only values that are a
// multiple of a minute--e.g., 0, 60, 120, or
// 300 seconds--are supported. If an invalid
// value is given, an error will be returned.
// When choosing a duration, it is useful to
// keep in mind the frequency of the underlying
// time series data (which may also be affected
// by any alignments specified in the
// aggregations field); a good duration is long
// enough so that a single outlier does not
// generate spurious alerts, but short enough
// that unhealthy states are detected and
// alerted on quickly.
Duration *string `json:"duration,omitempty" tf:"duration,omitempty"`
// A filter that identifies which time series
// should be compared with the threshold.The
// filter is similar to the one that is
// specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
// The number/percent of time series for which
// the comparison must hold in order for the
// condition to trigger. If unspecified, then
// the condition will trigger if the comparison
// is true for any of the time series that have
// been identified by filter and aggregations,
// or by the ratio, if denominator_filter and
// denominator_aggregations are specified.
// Structure is documented below.
Trigger []TriggerObservation `json:"trigger,omitempty" tf:"trigger,omitempty"`
}
type ConditionAbsentParameters struct {
// Specifies the alignment of data points in
// individual time series as well as how to
// combine the retrieved time series together
// (such as when aggregating multiple streams
// on each resource to a single stream for each
// resource or when aggregating streams across
// all members of a group of resources).
// Multiple aggregations are applied in the
// order specified.This field is similar to the
// one in the MetricService.ListTimeSeries
// request. It is advisable to use the
// ListTimeSeries method when debugging this
// field.
// Structure is documented below.
// +kubebuilder:validation:Optional
Aggregations []AggregationsParameters `json:"aggregations,omitempty" tf:"aggregations,omitempty"`
// The amount of time that a time series must
// violate the threshold to be considered
// failing. Currently, only values that are a
// multiple of a minute--e.g., 0, 60, 120, or
// 300 seconds--are supported. If an invalid
// value is given, an error will be returned.
// When choosing a duration, it is useful to
// keep in mind the frequency of the underlying
// time series data (which may also be affected
// by any alignments specified in the
// aggregations field); a good duration is long
// enough so that a single outlier does not
// generate spurious alerts, but short enough
// that unhealthy states are detected and
// alerted on quickly.
// +kubebuilder:validation:Required
Duration *string `json:"duration" tf:"duration,omitempty"`
// A filter that identifies which time series
// should be compared with the threshold.The
// filter is similar to the one that is
// specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
// +kubebuilder:validation:Optional
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
// The number/percent of time series for which
// the comparison must hold in order for the
// condition to trigger. If unspecified, then
// the condition will trigger if the comparison
// is true for any of the time series that have
// been identified by filter and aggregations,
// or by the ratio, if denominator_filter and
// denominator_aggregations are specified.
// Structure is documented below.
// +kubebuilder:validation:Optional
Trigger []TriggerParameters `json:"trigger,omitempty" tf:"trigger,omitempty"`
}
type ConditionMatchedLogObservation struct {
// A filter that identifies which time series
// should be compared with the threshold.The
// filter is similar to the one that is
// specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
// A map from a label key to an extractor expression, which is used to
// extract the value for this label key. Each entry in this map is
// a specification for how data should be extracted from log entries that
// match filter. Each combination of extracted values is treated as
// a separate rule for the purposes of triggering notifications.
// Label keys and corresponding values can be used in notifications
// generated by this condition.
LabelExtractors map[string]*string `json:"labelExtractors,omitempty" tf:"label_extractors,omitempty"`
}
type ConditionMatchedLogParameters struct {
// A filter that identifies which time series
// should be compared with the threshold.The
// filter is similar to the one that is
// specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
// +kubebuilder:validation:Required
Filter *string `json:"filter" tf:"filter,omitempty"`
// A map from a label key to an extractor expression, which is used to
// extract the value for this label key. Each entry in this map is
// a specification for how data should be extracted from log entries that
// match filter. Each combination of extracted values is treated as
// a separate rule for the purposes of triggering notifications.
// Label keys and corresponding values can be used in notifications
// generated by this condition.
// +kubebuilder:validation:Optional
LabelExtractors map[string]*string `json:"labelExtractors,omitempty" tf:"label_extractors,omitempty"`
}
type ConditionMonitoringQueryLanguageObservation struct {
// The amount of time that a time series must
// violate the threshold to be considered
// failing. Currently, only values that are a
// multiple of a minute--e.g., 0, 60, 120, or
// 300 seconds--are supported. If an invalid
// value is given, an error will be returned.
// When choosing a duration, it is useful to
// keep in mind the frequency of the underlying
// time series data (which may also be affected
// by any alignments specified in the
// aggregations field); a good duration is long
// enough so that a single outlier does not
// generate spurious alerts, but short enough
// that unhealthy states are detected and
// alerted on quickly.
Duration *string `json:"duration,omitempty" tf:"duration,omitempty"`
// A condition control that determines how
// metric-threshold conditions are evaluated when
// data stops arriving.
// Possible values are: EVALUATION_MISSING_DATA_INACTIVE, EVALUATION_MISSING_DATA_ACTIVE, EVALUATION_MISSING_DATA_NO_OP.
EvaluationMissingData *string `json:"evaluationMissingData,omitempty" tf:"evaluation_missing_data,omitempty"`
// Monitoring Query Language query that outputs a boolean stream.
Query *string `json:"query,omitempty" tf:"query,omitempty"`
// The number/percent of time series for which
// the comparison must hold in order for the
// condition to trigger. If unspecified, then
// the condition will trigger if the comparison
// is true for any of the time series that have
// been identified by filter and aggregations,
// or by the ratio, if denominator_filter and
// denominator_aggregations are specified.
// Structure is documented below.
Trigger []ConditionMonitoringQueryLanguageTriggerObservation `json:"trigger,omitempty" tf:"trigger,omitempty"`
}
type ConditionMonitoringQueryLanguageParameters struct {
// The amount of time that a time series must
// violate the threshold to be considered
// failing. Currently, only values that are a
// multiple of a minute--e.g., 0, 60, 120, or
// 300 seconds--are supported. If an invalid
// value is given, an error will be returned.
// When choosing a duration, it is useful to
// keep in mind the frequency of the underlying
// time series data (which may also be affected
// by any alignments specified in the
// aggregations field); a good duration is long
// enough so that a single outlier does not
// generate spurious alerts, but short enough
// that unhealthy states are detected and
// alerted on quickly.
// +kubebuilder:validation:Required
Duration *string `json:"duration" tf:"duration,omitempty"`
// A condition control that determines how
// metric-threshold conditions are evaluated when
// data stops arriving.
// Possible values are: EVALUATION_MISSING_DATA_INACTIVE, EVALUATION_MISSING_DATA_ACTIVE, EVALUATION_MISSING_DATA_NO_OP.
// +kubebuilder:validation:Optional
EvaluationMissingData *string `json:"evaluationMissingData,omitempty" tf:"evaluation_missing_data,omitempty"`
// Monitoring Query Language query that outputs a boolean stream.
// +kubebuilder:validation:Required
Query *string `json:"query" tf:"query,omitempty"`
// The number/percent of time series for which
// the comparison must hold in order for the
// condition to trigger. If unspecified, then
// the condition will trigger if the comparison
// is true for any of the time series that have
// been identified by filter and aggregations,
// or by the ratio, if denominator_filter and
// denominator_aggregations are specified.
// Structure is documented below.
// +kubebuilder:validation:Optional
Trigger []ConditionMonitoringQueryLanguageTriggerParameters `json:"trigger,omitempty" tf:"trigger,omitempty"`
}
type ConditionMonitoringQueryLanguageTriggerObservation struct {
// The absolute number of time series
// that must fail the predicate for the
// condition to be triggered.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// The percentage of time series that
// must fail the predicate for the
// condition to be triggered.
Percent *float64 `json:"percent,omitempty" tf:"percent,omitempty"`
}
type ConditionMonitoringQueryLanguageTriggerParameters struct {
// The absolute number of time series
// that must fail the predicate for the
// condition to be triggered.
// +kubebuilder:validation:Optional
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// The percentage of time series that
// must fail the predicate for the
// condition to be triggered.
// +kubebuilder:validation:Optional
Percent *float64 `json:"percent,omitempty" tf:"percent,omitempty"`
}
type ConditionThresholdAggregationsObservation struct {
// The alignment period for per-time
// series alignment. If present,
// alignmentPeriod must be at least
// 60 seconds. After per-time series
// alignment, each time series will
// contain data points only on the
// period boundaries. If
// perSeriesAligner is not specified
// or equals ALIGN_NONE, then this
// field is ignored. If
// perSeriesAligner is specified and
// does not equal ALIGN_NONE, then
// this field must be defined;
// otherwise an error is returned.
AlignmentPeriod *string `json:"alignmentPeriod,omitempty" tf:"alignment_period,omitempty"`
// The approach to be used to combine
// time series. Not all reducer
// functions may be applied to all
// time series, depending on the
// metric type and the value type of
// the original time series.
// Reduction may change the metric
// type of value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: REDUCE_NONE, REDUCE_MEAN, REDUCE_MIN, REDUCE_MAX, REDUCE_SUM, REDUCE_STDDEV, REDUCE_COUNT, REDUCE_COUNT_TRUE, REDUCE_COUNT_FALSE, REDUCE_FRACTION_TRUE, REDUCE_PERCENTILE_99, REDUCE_PERCENTILE_95, REDUCE_PERCENTILE_50, REDUCE_PERCENTILE_05.
CrossSeriesReducer *string `json:"crossSeriesReducer,omitempty" tf:"cross_series_reducer,omitempty"`
// The set of fields to preserve when
// crossSeriesReducer is specified.
// The groupByFields determine how
// the time series are partitioned
// into subsets prior to applying the
// aggregation function. Each subset
// contains time series that have the
// same value for each of the
// grouping fields. Each individual
// time series is a member of exactly
// one subset. The crossSeriesReducer
// is applied to each subset of time
// series. It is not possible to
// reduce across different resource
// types, so this field implicitly
// contains resource.type. Fields not
// specified in groupByFields are
// aggregated away. If groupByFields
// is not specified and all the time
// series have the same resource
// type, then the time series are
// aggregated into a single output
// time series. If crossSeriesReducer
// is not defined, this field is
// ignored.
GroupByFields []*string `json:"groupByFields,omitempty" tf:"group_by_fields,omitempty"`
// The approach to be used to align
// individual time series. Not all
// alignment functions may be applied
// to all time series, depending on
// the metric type and value type of
// the original time series.
// Alignment may change the metric
// type or the value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: ALIGN_NONE, ALIGN_DELTA, ALIGN_RATE, ALIGN_INTERPOLATE, ALIGN_NEXT_OLDER, ALIGN_MIN, ALIGN_MAX, ALIGN_MEAN, ALIGN_COUNT, ALIGN_SUM, ALIGN_STDDEV, ALIGN_COUNT_TRUE, ALIGN_COUNT_FALSE, ALIGN_FRACTION_TRUE, ALIGN_PERCENTILE_99, ALIGN_PERCENTILE_95, ALIGN_PERCENTILE_50, ALIGN_PERCENTILE_05, ALIGN_PERCENT_CHANGE.
PerSeriesAligner *string `json:"perSeriesAligner,omitempty" tf:"per_series_aligner,omitempty"`
}
type ConditionThresholdAggregationsParameters struct {
// The alignment period for per-time
// series alignment. If present,
// alignmentPeriod must be at least
// 60 seconds. After per-time series
// alignment, each time series will
// contain data points only on the
// period boundaries. If
// perSeriesAligner is not specified
// or equals ALIGN_NONE, then this
// field is ignored. If
// perSeriesAligner is specified and
// does not equal ALIGN_NONE, then
// this field must be defined;
// otherwise an error is returned.
// +kubebuilder:validation:Optional
AlignmentPeriod *string `json:"alignmentPeriod,omitempty" tf:"alignment_period,omitempty"`
// The approach to be used to combine
// time series. Not all reducer
// functions may be applied to all
// time series, depending on the
// metric type and the value type of
// the original time series.
// Reduction may change the metric
// type of value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: REDUCE_NONE, REDUCE_MEAN, REDUCE_MIN, REDUCE_MAX, REDUCE_SUM, REDUCE_STDDEV, REDUCE_COUNT, REDUCE_COUNT_TRUE, REDUCE_COUNT_FALSE, REDUCE_FRACTION_TRUE, REDUCE_PERCENTILE_99, REDUCE_PERCENTILE_95, REDUCE_PERCENTILE_50, REDUCE_PERCENTILE_05.
// +kubebuilder:validation:Optional
CrossSeriesReducer *string `json:"crossSeriesReducer,omitempty" tf:"cross_series_reducer,omitempty"`
// The set of fields to preserve when
// crossSeriesReducer is specified.
// The groupByFields determine how
// the time series are partitioned
// into subsets prior to applying the
// aggregation function. Each subset
// contains time series that have the
// same value for each of the
// grouping fields. Each individual
// time series is a member of exactly
// one subset. The crossSeriesReducer
// is applied to each subset of time
// series. It is not possible to
// reduce across different resource
// types, so this field implicitly
// contains resource.type. Fields not
// specified in groupByFields are
// aggregated away. If groupByFields
// is not specified and all the time
// series have the same resource
// type, then the time series are
// aggregated into a single output
// time series. If crossSeriesReducer
// is not defined, this field is
// ignored.
// +kubebuilder:validation:Optional
GroupByFields []*string `json:"groupByFields,omitempty" tf:"group_by_fields,omitempty"`
// The approach to be used to align
// individual time series. Not all
// alignment functions may be applied
// to all time series, depending on
// the metric type and value type of
// the original time series.
// Alignment may change the metric
// type or the value type of the time
// series.Time series data must be
// aligned in order to perform cross-
// time series reduction. If
// crossSeriesReducer is specified,
// then perSeriesAligner must be
// specified and not equal ALIGN_NONE
// and alignmentPeriod must be
// specified; otherwise, an error is
// returned.
// Possible values are: ALIGN_NONE, ALIGN_DELTA, ALIGN_RATE, ALIGN_INTERPOLATE, ALIGN_NEXT_OLDER, ALIGN_MIN, ALIGN_MAX, ALIGN_MEAN, ALIGN_COUNT, ALIGN_SUM, ALIGN_STDDEV, ALIGN_COUNT_TRUE, ALIGN_COUNT_FALSE, ALIGN_FRACTION_TRUE, ALIGN_PERCENTILE_99, ALIGN_PERCENTILE_95, ALIGN_PERCENTILE_50, ALIGN_PERCENTILE_05, ALIGN_PERCENT_CHANGE.
// +kubebuilder:validation:Optional
PerSeriesAligner *string `json:"perSeriesAligner,omitempty" tf:"per_series_aligner,omitempty"`
}
type ConditionThresholdObservation struct {
// Specifies the alignment of data points in
// individual time series as well as how to
// combine the retrieved time series together
// (such as when aggregating multiple streams
// on each resource to a single stream for each
// resource or when aggregating streams across
// all members of a group of resources).
// Multiple aggregations are applied in the
// order specified.This field is similar to the
// one in the MetricService.ListTimeSeries
// request. It is advisable to use the
// ListTimeSeries method when debugging this
// field.
// Structure is documented below.
Aggregations []ConditionThresholdAggregationsObservation `json:"aggregations,omitempty" tf:"aggregations,omitempty"`
// The comparison to apply between the time
// series (indicated by filter and aggregation)
// and the threshold (indicated by
// threshold_value). The comparison is applied
// on each time series, with the time series on
// the left-hand side and the threshold on the
// right-hand side. Only COMPARISON_LT and
// COMPARISON_GT are supported currently.
// Possible values are: COMPARISON_GT, COMPARISON_GE, COMPARISON_LT, COMPARISON_LE, COMPARISON_EQ, COMPARISON_NE.
Comparison *string `json:"comparison,omitempty" tf:"comparison,omitempty"`
// Specifies the alignment of data points in
// individual time series selected by
// denominatorFilter as well as how to combine
// the retrieved time series together (such as
// when aggregating multiple streams on each
// resource to a single stream for each
// resource or when aggregating streams across
// all members of a group of resources).When
// computing ratios, the aggregations and
// denominator_aggregations fields must use the
// same alignment period and produce time
// series that have the same periodicity and
// labels.This field is similar to the one in
// the MetricService.ListTimeSeries request. It
// is advisable to use the ListTimeSeries
// method when debugging this field.
// Structure is documented below.
DenominatorAggregations []DenominatorAggregationsObservation `json:"denominatorAggregations,omitempty" tf:"denominator_aggregations,omitempty"`
// A filter that identifies a time series that
// should be used as the denominator of a ratio
// that will be compared with the threshold. If
// a denominator_filter is specified, the time
// series specified by the filter field will be
// used as the numerator.The filter is similar
// to the one that is specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
DenominatorFilter *string `json:"denominatorFilter,omitempty" tf:"denominator_filter,omitempty"`
// The amount of time that a time series must
// violate the threshold to be considered
// failing. Currently, only values that are a
// multiple of a minute--e.g., 0, 60, 120, or
// 300 seconds--are supported. If an invalid
// value is given, an error will be returned.
// When choosing a duration, it is useful to
// keep in mind the frequency of the underlying
// time series data (which may also be affected
// by any alignments specified in the
// aggregations field); a good duration is long
// enough so that a single outlier does not
// generate spurious alerts, but short enough
// that unhealthy states are detected and
// alerted on quickly.
Duration *string `json:"duration,omitempty" tf:"duration,omitempty"`
// A condition control that determines how
// metric-threshold conditions are evaluated when
// data stops arriving.
// Possible values are: EVALUATION_MISSING_DATA_INACTIVE, EVALUATION_MISSING_DATA_ACTIVE, EVALUATION_MISSING_DATA_NO_OP.
EvaluationMissingData *string `json:"evaluationMissingData,omitempty" tf:"evaluation_missing_data,omitempty"`
// A filter that identifies which time series
// should be compared with the threshold.The
// filter is similar to the one that is
// specified in the
// MetricService.ListTimeSeries request (that
// call is useful to verify the time series
// that will be retrieved / processed) and must
// specify the metric type and optionally may
// contain restrictions on resource type,
// resource labels, and metric labels. This
// field may not exceed 2048 Unicode characters
// in length.
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
// When this field is present, the MetricThreshold
// condition forecasts whether the time series is
// predicted to violate the threshold within the
// forecastHorizon. When this field is not set, the
// MetricThreshold tests the current value of the
// timeseries against the threshold.
// Structure is documented below.
ForecastOptions []ForecastOptionsObservation `json:"forecastOptions,omitempty" tf:"forecast_options,omitempty"`
// A value against which to compare the time
// series.
ThresholdValue *float64 `json:"thresholdValue,omitempty" tf:"threshold_value,omitempty"`
// The number/percent of time series for which
// the comparison must hold in order for the
// condition to trigger. If unspecified, then
// the condition will trigger if the comparison
// is true for any of the time series that have
// been identified by filter and aggregations,
// or by the ratio, if denominator_filter and
// denominator_aggregations are specified.
// Structure is documented below.
Trigger []ConditionThresholdTriggerObservation `json:"trigger,omitempty" tf:"trigger,omitempty"`
}
type ConditionThresholdParameters struct {
// Specifies the alignment of data points in
// individual time series as well as how to
// combine the retrieved time series together
// (such as when aggregating multiple streams
// on each resource to a single stream for each
// resource or when aggregating streams across
// all members of a group of resources).
// Multiple aggregations are applied in the
// order specified.This field is similar to the
// one in the MetricService.ListTimeSeries
// request. It is advisable to use the
// ListTimeSeries method when debugging this
// field.
// Structure is documented below.
// +kubebuilder:validation:Optional
Aggregations []ConditionThresholdAggregationsParameters `json:"aggregations,omitempty" tf:"aggregations,omitempty"`
// The comparison to apply between the time
// series (indicated by filter and aggregation)
// and the threshold (indicated by
// threshold_value). The comparison is applied
// on each time series, with the time series on
// the left-hand side and the threshold on the
// right-hand side. Only COMPARISON_LT and
// COMPARISON_GT are supported currently.
// Possible values are: COMPARISON_GT, COMPARISON_GE, COMPARISON_LT, COMPARISON_LE, COMPARISON_EQ, COMPARISON_NE.
// +kubebuilder:validation:Required
Comparison *string `json:"comparison" tf:"comparison,omitempty"`
// Specifies the alignment of data points in
// individual time series selected by