-
Notifications
You must be signed in to change notification settings - Fork 117
/
zz_safetyrule_types.go
executable file
·249 lines (189 loc) · 12.5 KB
/
zz_safetyrule_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
// 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 RuleConfigInitParameters struct {
// Logical negation of the rule.
Inverted *bool `json:"inverted,omitempty" tf:"inverted,omitempty"`
// Number of controls that must be set when you specify an ATLEAST type rule.
Threshold *float64 `json:"threshold,omitempty" tf:"threshold,omitempty"`
// Rule type. Valid values are ATLEAST, AND, and OR.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type RuleConfigObservation struct {
// Logical negation of the rule.
Inverted *bool `json:"inverted,omitempty" tf:"inverted,omitempty"`
// Number of controls that must be set when you specify an ATLEAST type rule.
Threshold *float64 `json:"threshold,omitempty" tf:"threshold,omitempty"`
// Rule type. Valid values are ATLEAST, AND, and OR.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type RuleConfigParameters struct {
// Logical negation of the rule.
// +kubebuilder:validation:Optional
Inverted *bool `json:"inverted" tf:"inverted,omitempty"`
// Number of controls that must be set when you specify an ATLEAST type rule.
// +kubebuilder:validation:Optional
Threshold *float64 `json:"threshold" tf:"threshold,omitempty"`
// Rule type. Valid values are ATLEAST, AND, and OR.
// +kubebuilder:validation:Optional
Type *string `json:"type" tf:"type,omitempty"`
}
type SafetyRuleInitParameters struct {
// Routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/route53recoverycontrolconfig/v1beta1.RoutingControl
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.TerraformID()
AssertedControls []*string `json:"assertedControls,omitempty" tf:"asserted_controls,omitempty"`
// References to RoutingControl in route53recoverycontrolconfig to populate assertedControls.
// +kubebuilder:validation:Optional
AssertedControlsRefs []v1.Reference `json:"assertedControlsRefs,omitempty" tf:"-"`
// Selector for a list of RoutingControl in route53recoverycontrolconfig to populate assertedControls.
// +kubebuilder:validation:Optional
AssertedControlsSelector *v1.Selector `json:"assertedControlsSelector,omitempty" tf:"-"`
// ARN of the control panel in which this safety rule will reside.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/route53recoverycontrolconfig/v1beta1.ControlPanel
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.TerraformID()
ControlPanelArn *string `json:"controlPanelArn,omitempty" tf:"control_panel_arn,omitempty"`
// Reference to a ControlPanel in route53recoverycontrolconfig to populate controlPanelArn.
// +kubebuilder:validation:Optional
ControlPanelArnRef *v1.Reference `json:"controlPanelArnRef,omitempty" tf:"-"`
// Selector for a ControlPanel in route53recoverycontrolconfig to populate controlPanelArn.
// +kubebuilder:validation:Optional
ControlPanelArnSelector *v1.Selector `json:"controlPanelArnSelector,omitempty" tf:"-"`
// Gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
GatingControls []*string `json:"gatingControls,omitempty" tf:"gating_controls,omitempty"`
// Name describing the safety rule.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Configuration block for safety rule criteria. See below.
RuleConfig []RuleConfigInitParameters `json:"ruleConfig,omitempty" tf:"rule_config,omitempty"`
// Routing controls that can only be set or unset if the specified rule_config evaluates to true for the specified gating_controls.
TargetControls []*string `json:"targetControls,omitempty" tf:"target_controls,omitempty"`
// Evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
WaitPeriodMs *float64 `json:"waitPeriodMs,omitempty" tf:"wait_period_ms,omitempty"`
}
type SafetyRuleObservation struct {
// ARN of the safety rule.
Arn *string `json:"arn,omitempty" tf:"arn,omitempty"`
// Routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
AssertedControls []*string `json:"assertedControls,omitempty" tf:"asserted_controls,omitempty"`
// ARN of the control panel in which this safety rule will reside.
ControlPanelArn *string `json:"controlPanelArn,omitempty" tf:"control_panel_arn,omitempty"`
// Gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
GatingControls []*string `json:"gatingControls,omitempty" tf:"gating_controls,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Name describing the safety rule.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Configuration block for safety rule criteria. See below.
RuleConfig []RuleConfigObservation `json:"ruleConfig,omitempty" tf:"rule_config,omitempty"`
// Status of the safety rule. PENDING when it is being created/updated, PENDING_DELETION when it is being deleted, and DEPLOYED otherwise.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
// Routing controls that can only be set or unset if the specified rule_config evaluates to true for the specified gating_controls.
TargetControls []*string `json:"targetControls,omitempty" tf:"target_controls,omitempty"`
// Evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
WaitPeriodMs *float64 `json:"waitPeriodMs,omitempty" tf:"wait_period_ms,omitempty"`
}
type SafetyRuleParameters struct {
// Routing controls that are part of transactions that are evaluated to determine if a request to change a routing control state is allowed.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/route53recoverycontrolconfig/v1beta1.RoutingControl
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.TerraformID()
// +kubebuilder:validation:Optional
AssertedControls []*string `json:"assertedControls,omitempty" tf:"asserted_controls,omitempty"`
// References to RoutingControl in route53recoverycontrolconfig to populate assertedControls.
// +kubebuilder:validation:Optional
AssertedControlsRefs []v1.Reference `json:"assertedControlsRefs,omitempty" tf:"-"`
// Selector for a list of RoutingControl in route53recoverycontrolconfig to populate assertedControls.
// +kubebuilder:validation:Optional
AssertedControlsSelector *v1.Selector `json:"assertedControlsSelector,omitempty" tf:"-"`
// ARN of the control panel in which this safety rule will reside.
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/route53recoverycontrolconfig/v1beta1.ControlPanel
// +crossplane:generate:reference:extractor=github.com/upbound/provider-aws/config/common.TerraformID()
// +kubebuilder:validation:Optional
ControlPanelArn *string `json:"controlPanelArn,omitempty" tf:"control_panel_arn,omitempty"`
// Reference to a ControlPanel in route53recoverycontrolconfig to populate controlPanelArn.
// +kubebuilder:validation:Optional
ControlPanelArnRef *v1.Reference `json:"controlPanelArnRef,omitempty" tf:"-"`
// Selector for a ControlPanel in route53recoverycontrolconfig to populate controlPanelArn.
// +kubebuilder:validation:Optional
ControlPanelArnSelector *v1.Selector `json:"controlPanelArnSelector,omitempty" tf:"-"`
// Gating controls for the new gating rule. That is, routing controls that are evaluated by the rule configuration that you specify.
// +kubebuilder:validation:Optional
GatingControls []*string `json:"gatingControls,omitempty" tf:"gating_controls,omitempty"`
// Name describing the safety rule.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,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:"-"`
// Configuration block for safety rule criteria. See below.
// +kubebuilder:validation:Optional
RuleConfig []RuleConfigParameters `json:"ruleConfig,omitempty" tf:"rule_config,omitempty"`
// Routing controls that can only be set or unset if the specified rule_config evaluates to true for the specified gating_controls.
// +kubebuilder:validation:Optional
TargetControls []*string `json:"targetControls,omitempty" tf:"target_controls,omitempty"`
// Evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail.
// +kubebuilder:validation:Optional
WaitPeriodMs *float64 `json:"waitPeriodMs,omitempty" tf:"wait_period_ms,omitempty"`
}
// SafetyRuleSpec defines the desired state of SafetyRule
type SafetyRuleSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider SafetyRuleParameters `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 SafetyRuleInitParameters `json:"initProvider,omitempty"`
}
// SafetyRuleStatus defines the observed state of SafetyRule.
type SafetyRuleStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider SafetyRuleObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// SafetyRule is the Schema for the SafetyRules API. Provides an AWS Route 53 Recovery Control Config Safety Rule
// +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 SafetyRule 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.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.ruleConfig) || (has(self.initProvider) && has(self.initProvider.ruleConfig))",message="spec.forProvider.ruleConfig is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.waitPeriodMs) || (has(self.initProvider) && has(self.initProvider.waitPeriodMs))",message="spec.forProvider.waitPeriodMs is a required parameter"
Spec SafetyRuleSpec `json:"spec"`
Status SafetyRuleStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// SafetyRuleList contains a list of SafetyRules
type SafetyRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SafetyRule `json:"items"`
}
// Repository type metadata.
var (
SafetyRule_Kind = "SafetyRule"
SafetyRule_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: SafetyRule_Kind}.String()
SafetyRule_KindAPIVersion = SafetyRule_Kind + "." + CRDGroupVersion.String()
SafetyRule_GroupVersionKind = CRDGroupVersion.WithKind(SafetyRule_Kind)
)
func init() {
SchemeBuilder.Register(&SafetyRule{}, &SafetyRuleList{})
}