AWS SDK for C++

AWS SDK for C++ Version 1.11.827

Loading...
Searching...
No Matches
FlowLog.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/DestinationOptionsResponse.h>
13#include <aws/ec2/model/LogDestinationType.h>
14#include <aws/ec2/model/Tag.h>
15#include <aws/ec2/model/TagFieldSpecificationResponse.h>
16#include <aws/ec2/model/TrafficType.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Xml {
23class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace EC2 {
27namespace Model {
28
34class FlowLog {
35 public:
36 AWS_EC2_API FlowLog() = default;
37 AWS_EC2_API FlowLog(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_EC2_API FlowLog& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
47 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
48 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
49 template <typename CreationTimeT = Aws::Utils::DateTime>
50 void SetCreationTime(CreationTimeT&& value) {
51 m_creationTimeHasBeenSet = true;
52 m_creationTime = std::forward<CreationTimeT>(value);
53 }
54 template <typename CreationTimeT = Aws::Utils::DateTime>
55 FlowLog& WithCreationTime(CreationTimeT&& value) {
56 SetCreationTime(std::forward<CreationTimeT>(value));
57 return *this;
58 }
60
62
70 inline const Aws::String& GetDeliverLogsErrorMessage() const { return m_deliverLogsErrorMessage; }
71 inline bool DeliverLogsErrorMessageHasBeenSet() const { return m_deliverLogsErrorMessageHasBeenSet; }
72 template <typename DeliverLogsErrorMessageT = Aws::String>
73 void SetDeliverLogsErrorMessage(DeliverLogsErrorMessageT&& value) {
74 m_deliverLogsErrorMessageHasBeenSet = true;
75 m_deliverLogsErrorMessage = std::forward<DeliverLogsErrorMessageT>(value);
76 }
77 template <typename DeliverLogsErrorMessageT = Aws::String>
78 FlowLog& WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT&& value) {
79 SetDeliverLogsErrorMessage(std::forward<DeliverLogsErrorMessageT>(value));
80 return *this;
81 }
83
85
89 inline const Aws::String& GetDeliverLogsPermissionArn() const { return m_deliverLogsPermissionArn; }
90 inline bool DeliverLogsPermissionArnHasBeenSet() const { return m_deliverLogsPermissionArnHasBeenSet; }
91 template <typename DeliverLogsPermissionArnT = Aws::String>
92 void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
93 m_deliverLogsPermissionArnHasBeenSet = true;
94 m_deliverLogsPermissionArn = std::forward<DeliverLogsPermissionArnT>(value);
95 }
96 template <typename DeliverLogsPermissionArnT = Aws::String>
97 FlowLog& WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
98 SetDeliverLogsPermissionArn(std::forward<DeliverLogsPermissionArnT>(value));
99 return *this;
100 }
102
104
108 inline const Aws::String& GetDeliverCrossAccountRole() const { return m_deliverCrossAccountRole; }
109 inline bool DeliverCrossAccountRoleHasBeenSet() const { return m_deliverCrossAccountRoleHasBeenSet; }
110 template <typename DeliverCrossAccountRoleT = Aws::String>
111 void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
112 m_deliverCrossAccountRoleHasBeenSet = true;
113 m_deliverCrossAccountRole = std::forward<DeliverCrossAccountRoleT>(value);
114 }
115 template <typename DeliverCrossAccountRoleT = Aws::String>
116 FlowLog& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
117 SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value));
118 return *this;
119 }
121
123
127 inline const Aws::String& GetDeliverLogsStatus() const { return m_deliverLogsStatus; }
128 inline bool DeliverLogsStatusHasBeenSet() const { return m_deliverLogsStatusHasBeenSet; }
129 template <typename DeliverLogsStatusT = Aws::String>
130 void SetDeliverLogsStatus(DeliverLogsStatusT&& value) {
131 m_deliverLogsStatusHasBeenSet = true;
132 m_deliverLogsStatus = std::forward<DeliverLogsStatusT>(value);
133 }
134 template <typename DeliverLogsStatusT = Aws::String>
135 FlowLog& WithDeliverLogsStatus(DeliverLogsStatusT&& value) {
136 SetDeliverLogsStatus(std::forward<DeliverLogsStatusT>(value));
137 return *this;
138 }
140
142
145 inline const Aws::String& GetFlowLogId() const { return m_flowLogId; }
146 inline bool FlowLogIdHasBeenSet() const { return m_flowLogIdHasBeenSet; }
147 template <typename FlowLogIdT = Aws::String>
148 void SetFlowLogId(FlowLogIdT&& value) {
149 m_flowLogIdHasBeenSet = true;
150 m_flowLogId = std::forward<FlowLogIdT>(value);
151 }
152 template <typename FlowLogIdT = Aws::String>
153 FlowLog& WithFlowLogId(FlowLogIdT&& value) {
154 SetFlowLogId(std::forward<FlowLogIdT>(value));
155 return *this;
156 }
158
160
163 inline const Aws::String& GetFlowLogStatus() const { return m_flowLogStatus; }
164 inline bool FlowLogStatusHasBeenSet() const { return m_flowLogStatusHasBeenSet; }
165 template <typename FlowLogStatusT = Aws::String>
166 void SetFlowLogStatus(FlowLogStatusT&& value) {
167 m_flowLogStatusHasBeenSet = true;
168 m_flowLogStatus = std::forward<FlowLogStatusT>(value);
169 }
170 template <typename FlowLogStatusT = Aws::String>
171 FlowLog& WithFlowLogStatus(FlowLogStatusT&& value) {
172 SetFlowLogStatus(std::forward<FlowLogStatusT>(value));
173 return *this;
174 }
176
178
181 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
182 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
183 template <typename LogGroupNameT = Aws::String>
184 void SetLogGroupName(LogGroupNameT&& value) {
185 m_logGroupNameHasBeenSet = true;
186 m_logGroupName = std::forward<LogGroupNameT>(value);
187 }
188 template <typename LogGroupNameT = Aws::String>
189 FlowLog& WithLogGroupName(LogGroupNameT&& value) {
190 SetLogGroupName(std::forward<LogGroupNameT>(value));
191 return *this;
192 }
194
196
199 inline const Aws::String& GetResourceId() const { return m_resourceId; }
200 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
201 template <typename ResourceIdT = Aws::String>
202 void SetResourceId(ResourceIdT&& value) {
203 m_resourceIdHasBeenSet = true;
204 m_resourceId = std::forward<ResourceIdT>(value);
205 }
206 template <typename ResourceIdT = Aws::String>
207 FlowLog& WithResourceId(ResourceIdT&& value) {
208 SetResourceId(std::forward<ResourceIdT>(value));
209 return *this;
210 }
212
214
217 inline TrafficType GetTrafficType() const { return m_trafficType; }
218 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
219 inline void SetTrafficType(TrafficType value) {
220 m_trafficTypeHasBeenSet = true;
221 m_trafficType = value;
222 }
224 SetTrafficType(value);
225 return *this;
226 }
228
230
233 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
234 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
236 m_logDestinationTypeHasBeenSet = true;
237 m_logDestinationType = value;
238 }
241 return *this;
242 }
244
246
249 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
250 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
251 template <typename LogDestinationT = Aws::String>
252 void SetLogDestination(LogDestinationT&& value) {
253 m_logDestinationHasBeenSet = true;
254 m_logDestination = std::forward<LogDestinationT>(value);
255 }
256 template <typename LogDestinationT = Aws::String>
257 FlowLog& WithLogDestination(LogDestinationT&& value) {
258 SetLogDestination(std::forward<LogDestinationT>(value));
259 return *this;
260 }
262
264
267 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
268 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
269 template <typename LogFormatT = Aws::String>
270 void SetLogFormat(LogFormatT&& value) {
271 m_logFormatHasBeenSet = true;
272 m_logFormat = std::forward<LogFormatT>(value);
273 }
274 template <typename LogFormatT = Aws::String>
275 FlowLog& WithLogFormat(LogFormatT&& value) {
276 SetLogFormat(std::forward<LogFormatT>(value));
277 return *this;
278 }
280
282
285 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
286 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
287 template <typename TagsT = Aws::Vector<Tag>>
288 void SetTags(TagsT&& value) {
289 m_tagsHasBeenSet = true;
290 m_tags = std::forward<TagsT>(value);
291 }
292 template <typename TagsT = Aws::Vector<Tag>>
293 FlowLog& WithTags(TagsT&& value) {
294 SetTags(std::forward<TagsT>(value));
295 return *this;
296 }
297 template <typename TagsT = Tag>
298 FlowLog& AddTags(TagsT&& value) {
299 m_tagsHasBeenSet = true;
300 m_tags.emplace_back(std::forward<TagsT>(value));
301 return *this;
302 }
304
306
315 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
316 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
317 inline void SetMaxAggregationInterval(int value) {
318 m_maxAggregationIntervalHasBeenSet = true;
319 m_maxAggregationInterval = value;
320 }
323 return *this;
324 }
326
328
331 inline const DestinationOptionsResponse& GetDestinationOptions() const { return m_destinationOptions; }
332 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
333 template <typename DestinationOptionsT = DestinationOptionsResponse>
334 void SetDestinationOptions(DestinationOptionsT&& value) {
335 m_destinationOptionsHasBeenSet = true;
336 m_destinationOptions = std::forward<DestinationOptionsT>(value);
337 }
338 template <typename DestinationOptionsT = DestinationOptionsResponse>
339 FlowLog& WithDestinationOptions(DestinationOptionsT&& value) {
340 SetDestinationOptions(std::forward<DestinationOptionsT>(value));
341 return *this;
342 }
344
346
350 inline const Aws::Vector<TagFieldSpecificationResponse>& GetTagFieldSpecifications() const { return m_tagFieldSpecifications; }
351 inline bool TagFieldSpecificationsHasBeenSet() const { return m_tagFieldSpecificationsHasBeenSet; }
352 template <typename TagFieldSpecificationsT = Aws::Vector<TagFieldSpecificationResponse>>
353 void SetTagFieldSpecifications(TagFieldSpecificationsT&& value) {
354 m_tagFieldSpecificationsHasBeenSet = true;
355 m_tagFieldSpecifications = std::forward<TagFieldSpecificationsT>(value);
356 }
357 template <typename TagFieldSpecificationsT = Aws::Vector<TagFieldSpecificationResponse>>
358 FlowLog& WithTagFieldSpecifications(TagFieldSpecificationsT&& value) {
359 SetTagFieldSpecifications(std::forward<TagFieldSpecificationsT>(value));
360 return *this;
361 }
362 template <typename TagFieldSpecificationsT = TagFieldSpecificationResponse>
363 FlowLog& AddTagFieldSpecifications(TagFieldSpecificationsT&& value) {
364 m_tagFieldSpecificationsHasBeenSet = true;
365 m_tagFieldSpecifications.emplace_back(std::forward<TagFieldSpecificationsT>(value));
366 return *this;
367 }
369 private:
370 Aws::Utils::DateTime m_creationTime{};
371
372 Aws::String m_deliverLogsErrorMessage;
373
374 Aws::String m_deliverLogsPermissionArn;
375
376 Aws::String m_deliverCrossAccountRole;
377
378 Aws::String m_deliverLogsStatus;
379
380 Aws::String m_flowLogId;
381
382 Aws::String m_flowLogStatus;
383
384 Aws::String m_logGroupName;
385
386 Aws::String m_resourceId;
387
388 TrafficType m_trafficType{TrafficType::NOT_SET};
389
391
392 Aws::String m_logDestination;
393
394 Aws::String m_logFormat;
395
396 Aws::Vector<Tag> m_tags;
397
398 int m_maxAggregationInterval{0};
399
400 DestinationOptionsResponse m_destinationOptions;
401
402 Aws::Vector<TagFieldSpecificationResponse> m_tagFieldSpecifications;
403 bool m_creationTimeHasBeenSet = false;
404 bool m_deliverLogsErrorMessageHasBeenSet = false;
405 bool m_deliverLogsPermissionArnHasBeenSet = false;
406 bool m_deliverCrossAccountRoleHasBeenSet = false;
407 bool m_deliverLogsStatusHasBeenSet = false;
408 bool m_flowLogIdHasBeenSet = false;
409 bool m_flowLogStatusHasBeenSet = false;
410 bool m_logGroupNameHasBeenSet = false;
411 bool m_resourceIdHasBeenSet = false;
412 bool m_trafficTypeHasBeenSet = false;
413 bool m_logDestinationTypeHasBeenSet = false;
414 bool m_logDestinationHasBeenSet = false;
415 bool m_logFormatHasBeenSet = false;
416 bool m_tagsHasBeenSet = false;
417 bool m_maxAggregationIntervalHasBeenSet = false;
418 bool m_destinationOptionsHasBeenSet = false;
419 bool m_tagFieldSpecificationsHasBeenSet = false;
420};
421
422} // namespace Model
423} // namespace EC2
424} // namespace Aws
const Aws::String & GetFlowLogId() const
Definition FlowLog.h:145
FlowLog & WithDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:116
bool DeliverLogsErrorMessageHasBeenSet() const
Definition FlowLog.h:71
FlowLog & AddTags(TagsT &&value)
Definition FlowLog.h:298
FlowLog & WithLogFormat(LogFormatT &&value)
Definition FlowLog.h:275
const Aws::String & GetLogDestination() const
Definition FlowLog.h:249
int GetMaxAggregationInterval() const
Definition FlowLog.h:315
void SetLogDestinationType(LogDestinationType value)
Definition FlowLog.h:235
void SetCreationTime(CreationTimeT &&value)
Definition FlowLog.h:50
bool LogFormatHasBeenSet() const
Definition FlowLog.h:268
void SetLogFormat(LogFormatT &&value)
Definition FlowLog.h:270
bool DestinationOptionsHasBeenSet() const
Definition FlowLog.h:332
bool DeliverLogsStatusHasBeenSet() const
Definition FlowLog.h:128
void SetFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:148
FlowLog & WithFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:153
bool FlowLogStatusHasBeenSet() const
Definition FlowLog.h:164
bool ResourceIdHasBeenSet() const
Definition FlowLog.h:200
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
FlowLog & WithTags(TagsT &&value)
Definition FlowLog.h:293
const Aws::String & GetFlowLogStatus() const
Definition FlowLog.h:163
FlowLog & WithDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:339
FlowLog & WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
Definition FlowLog.h:97
FlowLog & WithLogDestination(LogDestinationT &&value)
Definition FlowLog.h:257
const Aws::Utils::DateTime & GetCreationTime() const
Definition FlowLog.h:47
const Aws::String & GetLogGroupName() const
Definition FlowLog.h:181
FlowLog & WithCreationTime(CreationTimeT &&value)
Definition FlowLog.h:55
void SetDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:73
FlowLog & WithLogDestinationType(LogDestinationType value)
Definition FlowLog.h:239
const Aws::String & GetDeliverCrossAccountRole() const
Definition FlowLog.h:108
bool CreationTimeHasBeenSet() const
Definition FlowLog.h:48
void SetDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:334
FlowLog & WithLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:189
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool TagFieldSpecificationsHasBeenSet() const
Definition FlowLog.h:351
bool DeliverCrossAccountRoleHasBeenSet() const
Definition FlowLog.h:109
bool MaxAggregationIntervalHasBeenSet() const
Definition FlowLog.h:316
FlowLog & AddTagFieldSpecifications(TagFieldSpecificationsT &&value)
Definition FlowLog.h:363
void SetDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:130
bool TrafficTypeHasBeenSet() const
Definition FlowLog.h:218
LogDestinationType GetLogDestinationType() const
Definition FlowLog.h:233
FlowLog & WithTrafficType(TrafficType value)
Definition FlowLog.h:223
AWS_EC2_API FlowLog & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:111
AWS_EC2_API FlowLog(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetDeliverLogsErrorMessage() const
Definition FlowLog.h:70
void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
Definition FlowLog.h:92
TrafficType GetTrafficType() const
Definition FlowLog.h:217
const DestinationOptionsResponse & GetDestinationOptions() const
Definition FlowLog.h:331
bool LogGroupNameHasBeenSet() const
Definition FlowLog.h:182
const Aws::Vector< TagFieldSpecificationResponse > & GetTagFieldSpecifications() const
Definition FlowLog.h:350
void SetTrafficType(TrafficType value)
Definition FlowLog.h:219
const Aws::String & GetResourceId() const
Definition FlowLog.h:199
FlowLog & WithMaxAggregationInterval(int value)
Definition FlowLog.h:321
const Aws::String & GetDeliverLogsPermissionArn() const
Definition FlowLog.h:89
void SetLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:184
void SetLogDestination(LogDestinationT &&value)
Definition FlowLog.h:252
FlowLog & WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:78
void SetTagFieldSpecifications(TagFieldSpecificationsT &&value)
Definition FlowLog.h:353
FlowLog & WithDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:135
bool LogDestinationTypeHasBeenSet() const
Definition FlowLog.h:234
bool LogDestinationHasBeenSet() const
Definition FlowLog.h:250
void SetFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:166
FlowLog & WithFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:171
bool TagsHasBeenSet() const
Definition FlowLog.h:286
const Aws::String & GetLogFormat() const
Definition FlowLog.h:267
void SetResourceId(ResourceIdT &&value)
Definition FlowLog.h:202
void SetMaxAggregationInterval(int value)
Definition FlowLog.h:317
void SetTags(TagsT &&value)
Definition FlowLog.h:288
FlowLog & WithResourceId(ResourceIdT &&value)
Definition FlowLog.h:207
const Aws::Vector< Tag > & GetTags() const
Definition FlowLog.h:285
AWS_EC2_API FlowLog()=default
bool DeliverLogsPermissionArnHasBeenSet() const
Definition FlowLog.h:90
bool FlowLogIdHasBeenSet() const
Definition FlowLog.h:146
FlowLog & WithTagFieldSpecifications(TagFieldSpecificationsT &&value)
Definition FlowLog.h:358
const Aws::String & GetDeliverLogsStatus() const
Definition FlowLog.h:127
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream