AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/TrafficType.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Xml {
22class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace EC2 {
26namespace Model {
27
33class FlowLog {
34 public:
35 AWS_EC2_API FlowLog() = default;
36 AWS_EC2_API FlowLog(const Aws::Utils::Xml::XmlNode& xmlNode);
37 AWS_EC2_API FlowLog& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
41
43
46 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
47 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
48 template <typename CreationTimeT = Aws::Utils::DateTime>
49 void SetCreationTime(CreationTimeT&& value) {
50 m_creationTimeHasBeenSet = true;
51 m_creationTime = std::forward<CreationTimeT>(value);
52 }
53 template <typename CreationTimeT = Aws::Utils::DateTime>
54 FlowLog& WithCreationTime(CreationTimeT&& value) {
55 SetCreationTime(std::forward<CreationTimeT>(value));
56 return *this;
57 }
59
61
69 inline const Aws::String& GetDeliverLogsErrorMessage() const { return m_deliverLogsErrorMessage; }
70 inline bool DeliverLogsErrorMessageHasBeenSet() const { return m_deliverLogsErrorMessageHasBeenSet; }
71 template <typename DeliverLogsErrorMessageT = Aws::String>
72 void SetDeliverLogsErrorMessage(DeliverLogsErrorMessageT&& value) {
73 m_deliverLogsErrorMessageHasBeenSet = true;
74 m_deliverLogsErrorMessage = std::forward<DeliverLogsErrorMessageT>(value);
75 }
76 template <typename DeliverLogsErrorMessageT = Aws::String>
77 FlowLog& WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT&& value) {
78 SetDeliverLogsErrorMessage(std::forward<DeliverLogsErrorMessageT>(value));
79 return *this;
80 }
82
84
88 inline const Aws::String& GetDeliverLogsPermissionArn() const { return m_deliverLogsPermissionArn; }
89 inline bool DeliverLogsPermissionArnHasBeenSet() const { return m_deliverLogsPermissionArnHasBeenSet; }
90 template <typename DeliverLogsPermissionArnT = Aws::String>
91 void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
92 m_deliverLogsPermissionArnHasBeenSet = true;
93 m_deliverLogsPermissionArn = std::forward<DeliverLogsPermissionArnT>(value);
94 }
95 template <typename DeliverLogsPermissionArnT = Aws::String>
96 FlowLog& WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
97 SetDeliverLogsPermissionArn(std::forward<DeliverLogsPermissionArnT>(value));
98 return *this;
99 }
101
103
107 inline const Aws::String& GetDeliverCrossAccountRole() const { return m_deliverCrossAccountRole; }
108 inline bool DeliverCrossAccountRoleHasBeenSet() const { return m_deliverCrossAccountRoleHasBeenSet; }
109 template <typename DeliverCrossAccountRoleT = Aws::String>
110 void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
111 m_deliverCrossAccountRoleHasBeenSet = true;
112 m_deliverCrossAccountRole = std::forward<DeliverCrossAccountRoleT>(value);
113 }
114 template <typename DeliverCrossAccountRoleT = Aws::String>
115 FlowLog& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
116 SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value));
117 return *this;
118 }
120
122
126 inline const Aws::String& GetDeliverLogsStatus() const { return m_deliverLogsStatus; }
127 inline bool DeliverLogsStatusHasBeenSet() const { return m_deliverLogsStatusHasBeenSet; }
128 template <typename DeliverLogsStatusT = Aws::String>
129 void SetDeliverLogsStatus(DeliverLogsStatusT&& value) {
130 m_deliverLogsStatusHasBeenSet = true;
131 m_deliverLogsStatus = std::forward<DeliverLogsStatusT>(value);
132 }
133 template <typename DeliverLogsStatusT = Aws::String>
134 FlowLog& WithDeliverLogsStatus(DeliverLogsStatusT&& value) {
135 SetDeliverLogsStatus(std::forward<DeliverLogsStatusT>(value));
136 return *this;
137 }
139
141
144 inline const Aws::String& GetFlowLogId() const { return m_flowLogId; }
145 inline bool FlowLogIdHasBeenSet() const { return m_flowLogIdHasBeenSet; }
146 template <typename FlowLogIdT = Aws::String>
147 void SetFlowLogId(FlowLogIdT&& value) {
148 m_flowLogIdHasBeenSet = true;
149 m_flowLogId = std::forward<FlowLogIdT>(value);
150 }
151 template <typename FlowLogIdT = Aws::String>
152 FlowLog& WithFlowLogId(FlowLogIdT&& value) {
153 SetFlowLogId(std::forward<FlowLogIdT>(value));
154 return *this;
155 }
157
159
162 inline const Aws::String& GetFlowLogStatus() const { return m_flowLogStatus; }
163 inline bool FlowLogStatusHasBeenSet() const { return m_flowLogStatusHasBeenSet; }
164 template <typename FlowLogStatusT = Aws::String>
165 void SetFlowLogStatus(FlowLogStatusT&& value) {
166 m_flowLogStatusHasBeenSet = true;
167 m_flowLogStatus = std::forward<FlowLogStatusT>(value);
168 }
169 template <typename FlowLogStatusT = Aws::String>
170 FlowLog& WithFlowLogStatus(FlowLogStatusT&& value) {
171 SetFlowLogStatus(std::forward<FlowLogStatusT>(value));
172 return *this;
173 }
175
177
180 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
181 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
182 template <typename LogGroupNameT = Aws::String>
183 void SetLogGroupName(LogGroupNameT&& value) {
184 m_logGroupNameHasBeenSet = true;
185 m_logGroupName = std::forward<LogGroupNameT>(value);
186 }
187 template <typename LogGroupNameT = Aws::String>
188 FlowLog& WithLogGroupName(LogGroupNameT&& value) {
189 SetLogGroupName(std::forward<LogGroupNameT>(value));
190 return *this;
191 }
193
195
198 inline const Aws::String& GetResourceId() const { return m_resourceId; }
199 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
200 template <typename ResourceIdT = Aws::String>
201 void SetResourceId(ResourceIdT&& value) {
202 m_resourceIdHasBeenSet = true;
203 m_resourceId = std::forward<ResourceIdT>(value);
204 }
205 template <typename ResourceIdT = Aws::String>
206 FlowLog& WithResourceId(ResourceIdT&& value) {
207 SetResourceId(std::forward<ResourceIdT>(value));
208 return *this;
209 }
211
213
216 inline TrafficType GetTrafficType() const { return m_trafficType; }
217 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
218 inline void SetTrafficType(TrafficType value) {
219 m_trafficTypeHasBeenSet = true;
220 m_trafficType = value;
221 }
223 SetTrafficType(value);
224 return *this;
225 }
227
229
232 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
233 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
235 m_logDestinationTypeHasBeenSet = true;
236 m_logDestinationType = value;
237 }
240 return *this;
241 }
243
245
248 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
249 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
250 template <typename LogDestinationT = Aws::String>
251 void SetLogDestination(LogDestinationT&& value) {
252 m_logDestinationHasBeenSet = true;
253 m_logDestination = std::forward<LogDestinationT>(value);
254 }
255 template <typename LogDestinationT = Aws::String>
256 FlowLog& WithLogDestination(LogDestinationT&& value) {
257 SetLogDestination(std::forward<LogDestinationT>(value));
258 return *this;
259 }
261
263
266 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
267 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
268 template <typename LogFormatT = Aws::String>
269 void SetLogFormat(LogFormatT&& value) {
270 m_logFormatHasBeenSet = true;
271 m_logFormat = std::forward<LogFormatT>(value);
272 }
273 template <typename LogFormatT = Aws::String>
274 FlowLog& WithLogFormat(LogFormatT&& value) {
275 SetLogFormat(std::forward<LogFormatT>(value));
276 return *this;
277 }
279
281
284 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
285 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
286 template <typename TagsT = Aws::Vector<Tag>>
287 void SetTags(TagsT&& value) {
288 m_tagsHasBeenSet = true;
289 m_tags = std::forward<TagsT>(value);
290 }
291 template <typename TagsT = Aws::Vector<Tag>>
292 FlowLog& WithTags(TagsT&& value) {
293 SetTags(std::forward<TagsT>(value));
294 return *this;
295 }
296 template <typename TagsT = Tag>
297 FlowLog& AddTags(TagsT&& value) {
298 m_tagsHasBeenSet = true;
299 m_tags.emplace_back(std::forward<TagsT>(value));
300 return *this;
301 }
303
305
314 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
315 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
316 inline void SetMaxAggregationInterval(int value) {
317 m_maxAggregationIntervalHasBeenSet = true;
318 m_maxAggregationInterval = value;
319 }
322 return *this;
323 }
325
327
330 inline const DestinationOptionsResponse& GetDestinationOptions() const { return m_destinationOptions; }
331 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
332 template <typename DestinationOptionsT = DestinationOptionsResponse>
333 void SetDestinationOptions(DestinationOptionsT&& value) {
334 m_destinationOptionsHasBeenSet = true;
335 m_destinationOptions = std::forward<DestinationOptionsT>(value);
336 }
337 template <typename DestinationOptionsT = DestinationOptionsResponse>
338 FlowLog& WithDestinationOptions(DestinationOptionsT&& value) {
339 SetDestinationOptions(std::forward<DestinationOptionsT>(value));
340 return *this;
341 }
343 private:
344 Aws::Utils::DateTime m_creationTime{};
345
346 Aws::String m_deliverLogsErrorMessage;
347
348 Aws::String m_deliverLogsPermissionArn;
349
350 Aws::String m_deliverCrossAccountRole;
351
352 Aws::String m_deliverLogsStatus;
353
354 Aws::String m_flowLogId;
355
356 Aws::String m_flowLogStatus;
357
358 Aws::String m_logGroupName;
359
360 Aws::String m_resourceId;
361
362 TrafficType m_trafficType{TrafficType::NOT_SET};
363
365
366 Aws::String m_logDestination;
367
368 Aws::String m_logFormat;
369
370 Aws::Vector<Tag> m_tags;
371
372 int m_maxAggregationInterval{0};
373
374 DestinationOptionsResponse m_destinationOptions;
375 bool m_creationTimeHasBeenSet = false;
376 bool m_deliverLogsErrorMessageHasBeenSet = false;
377 bool m_deliverLogsPermissionArnHasBeenSet = false;
378 bool m_deliverCrossAccountRoleHasBeenSet = false;
379 bool m_deliverLogsStatusHasBeenSet = false;
380 bool m_flowLogIdHasBeenSet = false;
381 bool m_flowLogStatusHasBeenSet = false;
382 bool m_logGroupNameHasBeenSet = false;
383 bool m_resourceIdHasBeenSet = false;
384 bool m_trafficTypeHasBeenSet = false;
385 bool m_logDestinationTypeHasBeenSet = false;
386 bool m_logDestinationHasBeenSet = false;
387 bool m_logFormatHasBeenSet = false;
388 bool m_tagsHasBeenSet = false;
389 bool m_maxAggregationIntervalHasBeenSet = false;
390 bool m_destinationOptionsHasBeenSet = false;
391};
392
393} // namespace Model
394} // namespace EC2
395} // namespace Aws
const Aws::String & GetFlowLogId() const
Definition FlowLog.h:144
FlowLog & WithDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:115
bool DeliverLogsErrorMessageHasBeenSet() const
Definition FlowLog.h:70
FlowLog & AddTags(TagsT &&value)
Definition FlowLog.h:297
FlowLog & WithLogFormat(LogFormatT &&value)
Definition FlowLog.h:274
const Aws::String & GetLogDestination() const
Definition FlowLog.h:248
int GetMaxAggregationInterval() const
Definition FlowLog.h:314
void SetLogDestinationType(LogDestinationType value)
Definition FlowLog.h:234
void SetCreationTime(CreationTimeT &&value)
Definition FlowLog.h:49
bool LogFormatHasBeenSet() const
Definition FlowLog.h:267
void SetLogFormat(LogFormatT &&value)
Definition FlowLog.h:269
bool DestinationOptionsHasBeenSet() const
Definition FlowLog.h:331
bool DeliverLogsStatusHasBeenSet() const
Definition FlowLog.h:127
void SetFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:147
FlowLog & WithFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:152
bool FlowLogStatusHasBeenSet() const
Definition FlowLog.h:163
bool ResourceIdHasBeenSet() const
Definition FlowLog.h:199
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
FlowLog & WithTags(TagsT &&value)
Definition FlowLog.h:292
const Aws::String & GetFlowLogStatus() const
Definition FlowLog.h:162
FlowLog & WithDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:338
FlowLog & WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
Definition FlowLog.h:96
FlowLog & WithLogDestination(LogDestinationT &&value)
Definition FlowLog.h:256
const Aws::Utils::DateTime & GetCreationTime() const
Definition FlowLog.h:46
const Aws::String & GetLogGroupName() const
Definition FlowLog.h:180
FlowLog & WithCreationTime(CreationTimeT &&value)
Definition FlowLog.h:54
void SetDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:72
FlowLog & WithLogDestinationType(LogDestinationType value)
Definition FlowLog.h:238
const Aws::String & GetDeliverCrossAccountRole() const
Definition FlowLog.h:107
bool CreationTimeHasBeenSet() const
Definition FlowLog.h:47
void SetDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:333
FlowLog & WithLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:188
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool DeliverCrossAccountRoleHasBeenSet() const
Definition FlowLog.h:108
bool MaxAggregationIntervalHasBeenSet() const
Definition FlowLog.h:315
void SetDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:129
bool TrafficTypeHasBeenSet() const
Definition FlowLog.h:217
LogDestinationType GetLogDestinationType() const
Definition FlowLog.h:232
FlowLog & WithTrafficType(TrafficType value)
Definition FlowLog.h:222
AWS_EC2_API FlowLog & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:110
AWS_EC2_API FlowLog(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetDeliverLogsErrorMessage() const
Definition FlowLog.h:69
void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
Definition FlowLog.h:91
TrafficType GetTrafficType() const
Definition FlowLog.h:216
const DestinationOptionsResponse & GetDestinationOptions() const
Definition FlowLog.h:330
bool LogGroupNameHasBeenSet() const
Definition FlowLog.h:181
void SetTrafficType(TrafficType value)
Definition FlowLog.h:218
const Aws::String & GetResourceId() const
Definition FlowLog.h:198
FlowLog & WithMaxAggregationInterval(int value)
Definition FlowLog.h:320
const Aws::String & GetDeliverLogsPermissionArn() const
Definition FlowLog.h:88
void SetLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:183
void SetLogDestination(LogDestinationT &&value)
Definition FlowLog.h:251
FlowLog & WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:77
FlowLog & WithDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:134
bool LogDestinationTypeHasBeenSet() const
Definition FlowLog.h:233
bool LogDestinationHasBeenSet() const
Definition FlowLog.h:249
void SetFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:165
FlowLog & WithFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:170
bool TagsHasBeenSet() const
Definition FlowLog.h:285
const Aws::String & GetLogFormat() const
Definition FlowLog.h:266
void SetResourceId(ResourceIdT &&value)
Definition FlowLog.h:201
void SetMaxAggregationInterval(int value)
Definition FlowLog.h:316
void SetTags(TagsT &&value)
Definition FlowLog.h:287
FlowLog & WithResourceId(ResourceIdT &&value)
Definition FlowLog.h:206
const Aws::Vector< Tag > & GetTags() const
Definition FlowLog.h:284
AWS_EC2_API FlowLog()=default
bool DeliverLogsPermissionArnHasBeenSet() const
Definition FlowLog.h:89
bool FlowLogIdHasBeenSet() const
Definition FlowLog.h:145
const Aws::String & GetDeliverLogsStatus() const
Definition FlowLog.h:126
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