-
Notifications
You must be signed in to change notification settings - Fork 113
/
zz_methodsettings_types.go
executable file
·255 lines (192 loc) · 13.5 KB
/
zz_methodsettings_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
/*
Copyright 2022 Upbound Inc.
*/
// 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 MethodSettingsInitParameters struct {
// Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., trimprefix(aws_api_gateway_resource.example.path, "/")).
MethodPath *string `json:"methodPath,omitempty" tf:"method_path,omitempty"`
// Settings block, see below.
Settings []SettingsInitParameters `json:"settings,omitempty" tf:"settings,omitempty"`
}
type MethodSettingsObservation struct {
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., trimprefix(aws_api_gateway_resource.example.path, "/")).
MethodPath *string `json:"methodPath,omitempty" tf:"method_path,omitempty"`
// ID of the REST API
RestAPIID *string `json:"restApiId,omitempty" tf:"rest_api_id,omitempty"`
// Settings block, see below.
Settings []SettingsObservation `json:"settings,omitempty" tf:"settings,omitempty"`
// Name of the stage
StageName *string `json:"stageName,omitempty" tf:"stage_name,omitempty"`
}
type MethodSettingsParameters struct {
// Method path defined as {resource_path}/{http_method} for an individual method override, or */* for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., trimprefix(aws_api_gateway_resource.example.path, "/")).
// +kubebuilder:validation:Optional
MethodPath *string `json:"methodPath,omitempty" tf:"method_path,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:"-"`
// ID of the REST API
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/apigateway/v1beta1.RestAPI
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
RestAPIID *string `json:"restApiId,omitempty" tf:"rest_api_id,omitempty"`
// Reference to a RestAPI in apigateway to populate restApiId.
// +kubebuilder:validation:Optional
RestAPIIDRef *v1.Reference `json:"restApiIdRef,omitempty" tf:"-"`
// Selector for a RestAPI in apigateway to populate restApiId.
// +kubebuilder:validation:Optional
RestAPIIDSelector *v1.Selector `json:"restApiIdSelector,omitempty" tf:"-"`
// Settings block, see below.
// +kubebuilder:validation:Optional
Settings []SettingsParameters `json:"settings,omitempty" tf:"settings,omitempty"`
// Name of the stage
// +crossplane:generate:reference:type=github.com/upbound/provider-aws/apis/apigateway/v1beta1.Stage
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractParamPath("stage_name",false)
// +kubebuilder:validation:Optional
StageName *string `json:"stageName,omitempty" tf:"stage_name,omitempty"`
// Reference to a Stage in apigateway to populate stageName.
// +kubebuilder:validation:Optional
StageNameRef *v1.Reference `json:"stageNameRef,omitempty" tf:"-"`
// Selector for a Stage in apigateway to populate stageName.
// +kubebuilder:validation:Optional
StageNameSelector *v1.Selector `json:"stageNameSelector,omitempty" tf:"-"`
}
type SettingsInitParameters struct {
// Whether the cached responses are encrypted.
CacheDataEncrypted *bool `json:"cacheDataEncrypted,omitempty" tf:"cache_data_encrypted,omitempty"`
// Time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.
CacheTTLInSeconds *int64 `json:"cacheTtlInSeconds,omitempty" tf:"cache_ttl_in_seconds,omitempty"`
// Whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.
CachingEnabled *bool `json:"cachingEnabled,omitempty" tf:"caching_enabled,omitempty"`
// Whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
DataTraceEnabled *bool `json:"dataTraceEnabled,omitempty" tf:"data_trace_enabled,omitempty"`
// Logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The available levels are OFF, ERROR, and INFO.
LoggingLevel *string `json:"loggingLevel,omitempty" tf:"logging_level,omitempty"`
// Whether Amazon CloudWatch metrics are enabled for this method.
MetricsEnabled *bool `json:"metricsEnabled,omitempty" tf:"metrics_enabled,omitempty"`
// Whether authorization is required for a cache invalidation request.
RequireAuthorizationForCacheControl *bool `json:"requireAuthorizationForCacheControl,omitempty" tf:"require_authorization_for_cache_control,omitempty"`
// Throttling burst limit. Default: -1 (throttling disabled).
ThrottlingBurstLimit *int64 `json:"throttlingBurstLimit,omitempty" tf:"throttling_burst_limit,omitempty"`
// Throttling rate limit. Default: -1 (throttling disabled).
ThrottlingRateLimit *float64 `json:"throttlingRateLimit,omitempty" tf:"throttling_rate_limit,omitempty"`
// How to handle unauthorized requests for cache invalidation. The available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.
UnauthorizedCacheControlHeaderStrategy *string `json:"unauthorizedCacheControlHeaderStrategy,omitempty" tf:"unauthorized_cache_control_header_strategy,omitempty"`
}
type SettingsObservation struct {
// Whether the cached responses are encrypted.
CacheDataEncrypted *bool `json:"cacheDataEncrypted,omitempty" tf:"cache_data_encrypted,omitempty"`
// Time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.
CacheTTLInSeconds *int64 `json:"cacheTtlInSeconds,omitempty" tf:"cache_ttl_in_seconds,omitempty"`
// Whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.
CachingEnabled *bool `json:"cachingEnabled,omitempty" tf:"caching_enabled,omitempty"`
// Whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
DataTraceEnabled *bool `json:"dataTraceEnabled,omitempty" tf:"data_trace_enabled,omitempty"`
// Logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The available levels are OFF, ERROR, and INFO.
LoggingLevel *string `json:"loggingLevel,omitempty" tf:"logging_level,omitempty"`
// Whether Amazon CloudWatch metrics are enabled for this method.
MetricsEnabled *bool `json:"metricsEnabled,omitempty" tf:"metrics_enabled,omitempty"`
// Whether authorization is required for a cache invalidation request.
RequireAuthorizationForCacheControl *bool `json:"requireAuthorizationForCacheControl,omitempty" tf:"require_authorization_for_cache_control,omitempty"`
// Throttling burst limit. Default: -1 (throttling disabled).
ThrottlingBurstLimit *int64 `json:"throttlingBurstLimit,omitempty" tf:"throttling_burst_limit,omitempty"`
// Throttling rate limit. Default: -1 (throttling disabled).
ThrottlingRateLimit *float64 `json:"throttlingRateLimit,omitempty" tf:"throttling_rate_limit,omitempty"`
// How to handle unauthorized requests for cache invalidation. The available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.
UnauthorizedCacheControlHeaderStrategy *string `json:"unauthorizedCacheControlHeaderStrategy,omitempty" tf:"unauthorized_cache_control_header_strategy,omitempty"`
}
type SettingsParameters struct {
// Whether the cached responses are encrypted.
// +kubebuilder:validation:Optional
CacheDataEncrypted *bool `json:"cacheDataEncrypted,omitempty" tf:"cache_data_encrypted,omitempty"`
// Time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.
// +kubebuilder:validation:Optional
CacheTTLInSeconds *int64 `json:"cacheTtlInSeconds,omitempty" tf:"cache_ttl_in_seconds,omitempty"`
// Whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.
// +kubebuilder:validation:Optional
CachingEnabled *bool `json:"cachingEnabled,omitempty" tf:"caching_enabled,omitempty"`
// Whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
// +kubebuilder:validation:Optional
DataTraceEnabled *bool `json:"dataTraceEnabled,omitempty" tf:"data_trace_enabled,omitempty"`
// Logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The available levels are OFF, ERROR, and INFO.
// +kubebuilder:validation:Optional
LoggingLevel *string `json:"loggingLevel,omitempty" tf:"logging_level,omitempty"`
// Whether Amazon CloudWatch metrics are enabled for this method.
// +kubebuilder:validation:Optional
MetricsEnabled *bool `json:"metricsEnabled,omitempty" tf:"metrics_enabled,omitempty"`
// Whether authorization is required for a cache invalidation request.
// +kubebuilder:validation:Optional
RequireAuthorizationForCacheControl *bool `json:"requireAuthorizationForCacheControl,omitempty" tf:"require_authorization_for_cache_control,omitempty"`
// Throttling burst limit. Default: -1 (throttling disabled).
// +kubebuilder:validation:Optional
ThrottlingBurstLimit *int64 `json:"throttlingBurstLimit,omitempty" tf:"throttling_burst_limit,omitempty"`
// Throttling rate limit. Default: -1 (throttling disabled).
// +kubebuilder:validation:Optional
ThrottlingRateLimit *float64 `json:"throttlingRateLimit,omitempty" tf:"throttling_rate_limit,omitempty"`
// How to handle unauthorized requests for cache invalidation. The available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.
// +kubebuilder:validation:Optional
UnauthorizedCacheControlHeaderStrategy *string `json:"unauthorizedCacheControlHeaderStrategy,omitempty" tf:"unauthorized_cache_control_header_strategy,omitempty"`
}
// MethodSettingsSpec defines the desired state of MethodSettings
type MethodSettingsSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider MethodSettingsParameters `json:"forProvider"`
// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
// unless the relevant Crossplane feature flag is enabled, and may be
// changed or removed without notice.
// 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 MethodSettingsInitParameters `json:"initProvider,omitempty"`
}
// MethodSettingsStatus defines the observed state of MethodSettings.
type MethodSettingsStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider MethodSettingsObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// MethodSettings is the Schema for the MethodSettingss API. Manages API Gateway Stage Method Settings
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].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:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,aws}
type MethodSettings 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.methodPath) || (has(self.initProvider) && has(self.initProvider.methodPath))",message="spec.forProvider.methodPath is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.settings) || (has(self.initProvider) && has(self.initProvider.settings))",message="spec.forProvider.settings is a required parameter"
Spec MethodSettingsSpec `json:"spec"`
Status MethodSettingsStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// MethodSettingsList contains a list of MethodSettingss
type MethodSettingsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MethodSettings `json:"items"`
}
// Repository type metadata.
var (
MethodSettings_Kind = "MethodSettings"
MethodSettings_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: MethodSettings_Kind}.String()
MethodSettings_KindAPIVersion = MethodSettings_Kind + "." + CRDGroupVersion.String()
MethodSettings_GroupVersionKind = CRDGroupVersion.WithKind(MethodSettings_Kind)
)
func init() {
SchemeBuilder.Register(&MethodSettings{}, &MethodSettingsList{})
}