-
Notifications
You must be signed in to change notification settings - Fork 165
/
Cw2ComponentConfiguration.java
360 lines (309 loc) · 10.8 KB
/
Cw2ComponentConfiguration.java
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
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.camel.component.aws2.cw.springboot;
import java.time.Instant;
import org.apache.camel.component.aws2.cw.Cw2Component;
import org.apache.camel.component.aws2.cw.Cw2Configuration;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;
import software.amazon.awssdk.core.Protocol;
import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
/**
* Sending metrics to AWS CloudWatch.
*
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@ConfigurationProperties(prefix = "camel.component.aws2-cw")
public class Cw2ComponentConfiguration
extends
ComponentConfigurationPropertiesCommon {
/**
* Whether to enable auto configuration of the aws2-cw component. This is
* enabled by default.
*/
private Boolean enabled;
/**
* The component configuration. The option is a
* org.apache.camel.component.aws2.cw.Cw2Configuration type.
*/
private Cw2Configuration configuration;
/**
* Whether the producer should be started lazy (on the first message). By
* starting lazy you can use this to allow CamelContext and routes to
* startup in situations where a producer may otherwise fail during starting
* and cause the route to fail being started. By deferring this startup to
* be lazy then the startup failure can be handled during routing messages
* via Camel's routing error handlers. Beware that when the first message is
* processed then creating and starting the producer may take a little time
* and prolong the total processing time of the processing.
*/
private Boolean lazyStartProducer = false;
/**
* The metric name
*/
private String name;
/**
* Set the need for overriding the endpoint. This option needs to be used in
* combination with the uriEndpointOverride option
*/
private Boolean overrideEndpoint = false;
/**
* The region in which CW client needs to work. When using this parameter,
* the configuration will expect the lowercase name of the region (for
* example, ap-east-1) You'll need to use the name Region.EU_WEST_1.id()
*/
private String region;
/**
* The metric timestamp
*/
private Instant timestamp;
/**
* The metric unit
*/
private String unit;
/**
* Set the overriding uri endpoint. This option needs to be used in
* combination with overrideEndpoint option
*/
private String uriEndpointOverride;
/**
* The metric value
*/
private Double value;
/**
* To use the AmazonCloudWatch as the client. The option is a
* software.amazon.awssdk.services.cloudwatch.CloudWatchClient type.
*/
private CloudWatchClient amazonCwClient;
/**
* Whether autowiring is enabled. This is used for automatic autowiring
* options (the option must be marked as autowired) by looking up in the
* registry to find if there is a single instance of matching type, which
* then gets configured on the component. This can be used for automatic
* configuring JDBC data sources, JMS connection factories, AWS Clients,
* etc.
*/
private Boolean autowiredEnabled = true;
/**
* Used for enabling or disabling all consumer based health checks from this
* component
*/
private Boolean healthCheckConsumerEnabled = true;
/**
* Used for enabling or disabling all producer based health checks from this
* component. Notice: Camel has by default disabled all producer based
* health-checks. You can turn on producer checks globally by setting
* camel.health.producersEnabled=true.
*/
private Boolean healthCheckProducerEnabled = true;
/**
* To define a proxy host when instantiating the CW client
*/
private String proxyHost;
/**
* To define a proxy port when instantiating the CW client
*/
private Integer proxyPort;
/**
* To define a proxy protocol when instantiating the CW client
*/
private Protocol proxyProtocol = Protocol.HTTPS;
/**
* Amazon AWS Access Key
*/
private String accessKey;
/**
* If using a profile credentials provider, this parameter will set the
* profile name
*/
private String profileCredentialsName;
/**
* Amazon AWS Secret Key
*/
private String secretKey;
/**
* Amazon AWS Session Token used when the user needs to assume an IAM role
*/
private String sessionToken;
/**
* If we want to trust all certificates in case of overriding the endpoint
*/
private Boolean trustAllCertificates = false;
/**
* Set whether the S3 client should expect to load credentials through a
* default credentials provider or to expect static credentials to be passed
* in.
*/
private Boolean useDefaultCredentialsProvider = false;
/**
* Set whether the Cloudwatch client should expect to load credentials
* through a profile credentials provider.
*/
private Boolean useProfileCredentialsProvider = false;
/**
* Set whether the CloudWatch client should expect to use Session
* Credentials. This is useful in a situation in which the user needs to
* assume an IAM role for doing operations in CloudWatch.
*/
private Boolean useSessionCredentials = false;
public Cw2Configuration getConfiguration() {
return configuration;
}
public void setConfiguration(Cw2Configuration configuration) {
this.configuration = configuration;
}
public Boolean getLazyStartProducer() {
return lazyStartProducer;
}
public void setLazyStartProducer(Boolean lazyStartProducer) {
this.lazyStartProducer = lazyStartProducer;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getOverrideEndpoint() {
return overrideEndpoint;
}
public void setOverrideEndpoint(Boolean overrideEndpoint) {
this.overrideEndpoint = overrideEndpoint;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public Instant getTimestamp() {
return timestamp;
}
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getUriEndpointOverride() {
return uriEndpointOverride;
}
public void setUriEndpointOverride(String uriEndpointOverride) {
this.uriEndpointOverride = uriEndpointOverride;
}
public Double getValue() {
return value;
}
public void setValue(Double value) {
this.value = value;
}
public CloudWatchClient getAmazonCwClient() {
return amazonCwClient;
}
public void setAmazonCwClient(CloudWatchClient amazonCwClient) {
this.amazonCwClient = amazonCwClient;
}
public Boolean getAutowiredEnabled() {
return autowiredEnabled;
}
public void setAutowiredEnabled(Boolean autowiredEnabled) {
this.autowiredEnabled = autowiredEnabled;
}
public Boolean getHealthCheckConsumerEnabled() {
return healthCheckConsumerEnabled;
}
public void setHealthCheckConsumerEnabled(Boolean healthCheckConsumerEnabled) {
this.healthCheckConsumerEnabled = healthCheckConsumerEnabled;
}
public Boolean getHealthCheckProducerEnabled() {
return healthCheckProducerEnabled;
}
public void setHealthCheckProducerEnabled(Boolean healthCheckProducerEnabled) {
this.healthCheckProducerEnabled = healthCheckProducerEnabled;
}
public String getProxyHost() {
return proxyHost;
}
public void setProxyHost(String proxyHost) {
this.proxyHost = proxyHost;
}
public Integer getProxyPort() {
return proxyPort;
}
public void setProxyPort(Integer proxyPort) {
this.proxyPort = proxyPort;
}
public Protocol getProxyProtocol() {
return proxyProtocol;
}
public void setProxyProtocol(Protocol proxyProtocol) {
this.proxyProtocol = proxyProtocol;
}
public String getAccessKey() {
return accessKey;
}
public void setAccessKey(String accessKey) {
this.accessKey = accessKey;
}
public String getProfileCredentialsName() {
return profileCredentialsName;
}
public void setProfileCredentialsName(String profileCredentialsName) {
this.profileCredentialsName = profileCredentialsName;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getSessionToken() {
return sessionToken;
}
public void setSessionToken(String sessionToken) {
this.sessionToken = sessionToken;
}
public Boolean getTrustAllCertificates() {
return trustAllCertificates;
}
public void setTrustAllCertificates(Boolean trustAllCertificates) {
this.trustAllCertificates = trustAllCertificates;
}
public Boolean getUseDefaultCredentialsProvider() {
return useDefaultCredentialsProvider;
}
public void setUseDefaultCredentialsProvider(
Boolean useDefaultCredentialsProvider) {
this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
}
public Boolean getUseProfileCredentialsProvider() {
return useProfileCredentialsProvider;
}
public void setUseProfileCredentialsProvider(
Boolean useProfileCredentialsProvider) {
this.useProfileCredentialsProvider = useProfileCredentialsProvider;
}
public Boolean getUseSessionCredentials() {
return useSessionCredentials;
}
public void setUseSessionCredentials(Boolean useSessionCredentials) {
this.useSessionCredentials = useSessionCredentials;
}
}