AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
FlowLog.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/TrafficType.h>
12#include <aws/ec2/model/LogDestinationType.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/ec2/model/DestinationOptionsResponse.h>
15#include <aws/ec2/model/Tag.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Xml
23{
24 class XmlNode;
25} // namespace Xml
26} // namespace Utils
27namespace EC2
28{
29namespace Model
30{
31
37 class FlowLog
38 {
39 public:
40 AWS_EC2_API FlowLog() = default;
41 AWS_EC2_API FlowLog(const Aws::Utils::Xml::XmlNode& xmlNode);
42 AWS_EC2_API FlowLog& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43
44 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
46
47
49
52 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
53 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
54 template<typename CreationTimeT = Aws::Utils::DateTime>
55 void SetCreationTime(CreationTimeT&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::forward<CreationTimeT>(value); }
56 template<typename CreationTimeT = Aws::Utils::DateTime>
57 FlowLog& WithCreationTime(CreationTimeT&& value) { SetCreationTime(std::forward<CreationTimeT>(value)); return *this;}
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) { m_deliverLogsErrorMessageHasBeenSet = true; m_deliverLogsErrorMessage = std::forward<DeliverLogsErrorMessageT>(value); }
73 template<typename DeliverLogsErrorMessageT = Aws::String>
74 FlowLog& WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT&& value) { SetDeliverLogsErrorMessage(std::forward<DeliverLogsErrorMessageT>(value)); return *this;}
76
78
82 inline const Aws::String& GetDeliverLogsPermissionArn() const { return m_deliverLogsPermissionArn; }
83 inline bool DeliverLogsPermissionArnHasBeenSet() const { return m_deliverLogsPermissionArnHasBeenSet; }
84 template<typename DeliverLogsPermissionArnT = Aws::String>
85 void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) { m_deliverLogsPermissionArnHasBeenSet = true; m_deliverLogsPermissionArn = std::forward<DeliverLogsPermissionArnT>(value); }
86 template<typename DeliverLogsPermissionArnT = Aws::String>
87 FlowLog& WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) { SetDeliverLogsPermissionArn(std::forward<DeliverLogsPermissionArnT>(value)); return *this;}
89
91
95 inline const Aws::String& GetDeliverCrossAccountRole() const { return m_deliverCrossAccountRole; }
96 inline bool DeliverCrossAccountRoleHasBeenSet() const { return m_deliverCrossAccountRoleHasBeenSet; }
97 template<typename DeliverCrossAccountRoleT = Aws::String>
98 void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) { m_deliverCrossAccountRoleHasBeenSet = true; m_deliverCrossAccountRole = std::forward<DeliverCrossAccountRoleT>(value); }
99 template<typename DeliverCrossAccountRoleT = Aws::String>
100 FlowLog& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) { SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value)); return *this;}
102
104
108 inline const Aws::String& GetDeliverLogsStatus() const { return m_deliverLogsStatus; }
109 inline bool DeliverLogsStatusHasBeenSet() const { return m_deliverLogsStatusHasBeenSet; }
110 template<typename DeliverLogsStatusT = Aws::String>
111 void SetDeliverLogsStatus(DeliverLogsStatusT&& value) { m_deliverLogsStatusHasBeenSet = true; m_deliverLogsStatus = std::forward<DeliverLogsStatusT>(value); }
112 template<typename DeliverLogsStatusT = Aws::String>
113 FlowLog& WithDeliverLogsStatus(DeliverLogsStatusT&& value) { SetDeliverLogsStatus(std::forward<DeliverLogsStatusT>(value)); return *this;}
115
117
120 inline const Aws::String& GetFlowLogId() const { return m_flowLogId; }
121 inline bool FlowLogIdHasBeenSet() const { return m_flowLogIdHasBeenSet; }
122 template<typename FlowLogIdT = Aws::String>
123 void SetFlowLogId(FlowLogIdT&& value) { m_flowLogIdHasBeenSet = true; m_flowLogId = std::forward<FlowLogIdT>(value); }
124 template<typename FlowLogIdT = Aws::String>
125 FlowLog& WithFlowLogId(FlowLogIdT&& value) { SetFlowLogId(std::forward<FlowLogIdT>(value)); return *this;}
127
129
132 inline const Aws::String& GetFlowLogStatus() const { return m_flowLogStatus; }
133 inline bool FlowLogStatusHasBeenSet() const { return m_flowLogStatusHasBeenSet; }
134 template<typename FlowLogStatusT = Aws::String>
135 void SetFlowLogStatus(FlowLogStatusT&& value) { m_flowLogStatusHasBeenSet = true; m_flowLogStatus = std::forward<FlowLogStatusT>(value); }
136 template<typename FlowLogStatusT = Aws::String>
137 FlowLog& WithFlowLogStatus(FlowLogStatusT&& value) { SetFlowLogStatus(std::forward<FlowLogStatusT>(value)); return *this;}
139
141
144 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
145 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
146 template<typename LogGroupNameT = Aws::String>
147 void SetLogGroupName(LogGroupNameT&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::forward<LogGroupNameT>(value); }
148 template<typename LogGroupNameT = Aws::String>
149 FlowLog& WithLogGroupName(LogGroupNameT&& value) { SetLogGroupName(std::forward<LogGroupNameT>(value)); return *this;}
151
153
156 inline const Aws::String& GetResourceId() const { return m_resourceId; }
157 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
158 template<typename ResourceIdT = Aws::String>
159 void SetResourceId(ResourceIdT&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::forward<ResourceIdT>(value); }
160 template<typename ResourceIdT = Aws::String>
161 FlowLog& WithResourceId(ResourceIdT&& value) { SetResourceId(std::forward<ResourceIdT>(value)); return *this;}
163
165
168 inline TrafficType GetTrafficType() const { return m_trafficType; }
169 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
170 inline void SetTrafficType(TrafficType value) { m_trafficTypeHasBeenSet = true; m_trafficType = value; }
171 inline FlowLog& WithTrafficType(TrafficType value) { SetTrafficType(value); return *this;}
173
175
178 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
179 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
180 inline void SetLogDestinationType(LogDestinationType value) { m_logDestinationTypeHasBeenSet = true; m_logDestinationType = value; }
183
185
188 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
189 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
190 template<typename LogDestinationT = Aws::String>
191 void SetLogDestination(LogDestinationT&& value) { m_logDestinationHasBeenSet = true; m_logDestination = std::forward<LogDestinationT>(value); }
192 template<typename LogDestinationT = Aws::String>
193 FlowLog& WithLogDestination(LogDestinationT&& value) { SetLogDestination(std::forward<LogDestinationT>(value)); return *this;}
195
197
200 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
201 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
202 template<typename LogFormatT = Aws::String>
203 void SetLogFormat(LogFormatT&& value) { m_logFormatHasBeenSet = true; m_logFormat = std::forward<LogFormatT>(value); }
204 template<typename LogFormatT = Aws::String>
205 FlowLog& WithLogFormat(LogFormatT&& value) { SetLogFormat(std::forward<LogFormatT>(value)); return *this;}
207
209
212 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
213 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
214 template<typename TagsT = Aws::Vector<Tag>>
215 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
216 template<typename TagsT = Aws::Vector<Tag>>
217 FlowLog& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
218 template<typename TagsT = Tag>
219 FlowLog& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
221
223
232 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
233 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
234 inline void SetMaxAggregationInterval(int value) { m_maxAggregationIntervalHasBeenSet = true; m_maxAggregationInterval = value; }
235 inline FlowLog& WithMaxAggregationInterval(int value) { SetMaxAggregationInterval(value); return *this;}
237
239
242 inline const DestinationOptionsResponse& GetDestinationOptions() const { return m_destinationOptions; }
243 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
244 template<typename DestinationOptionsT = DestinationOptionsResponse>
245 void SetDestinationOptions(DestinationOptionsT&& value) { m_destinationOptionsHasBeenSet = true; m_destinationOptions = std::forward<DestinationOptionsT>(value); }
246 template<typename DestinationOptionsT = DestinationOptionsResponse>
247 FlowLog& WithDestinationOptions(DestinationOptionsT&& value) { SetDestinationOptions(std::forward<DestinationOptionsT>(value)); return *this;}
249 private:
250
251 Aws::Utils::DateTime m_creationTime{};
252 bool m_creationTimeHasBeenSet = false;
253
254 Aws::String m_deliverLogsErrorMessage;
255 bool m_deliverLogsErrorMessageHasBeenSet = false;
256
257 Aws::String m_deliverLogsPermissionArn;
258 bool m_deliverLogsPermissionArnHasBeenSet = false;
259
260 Aws::String m_deliverCrossAccountRole;
261 bool m_deliverCrossAccountRoleHasBeenSet = false;
262
263 Aws::String m_deliverLogsStatus;
264 bool m_deliverLogsStatusHasBeenSet = false;
265
266 Aws::String m_flowLogId;
267 bool m_flowLogIdHasBeenSet = false;
268
269 Aws::String m_flowLogStatus;
270 bool m_flowLogStatusHasBeenSet = false;
271
272 Aws::String m_logGroupName;
273 bool m_logGroupNameHasBeenSet = false;
274
275 Aws::String m_resourceId;
276 bool m_resourceIdHasBeenSet = false;
277
278 TrafficType m_trafficType{TrafficType::NOT_SET};
279 bool m_trafficTypeHasBeenSet = false;
280
282 bool m_logDestinationTypeHasBeenSet = false;
283
284 Aws::String m_logDestination;
285 bool m_logDestinationHasBeenSet = false;
286
287 Aws::String m_logFormat;
288 bool m_logFormatHasBeenSet = false;
289
290 Aws::Vector<Tag> m_tags;
291 bool m_tagsHasBeenSet = false;
292
293 int m_maxAggregationInterval{0};
294 bool m_maxAggregationIntervalHasBeenSet = false;
295
296 DestinationOptionsResponse m_destinationOptions;
297 bool m_destinationOptionsHasBeenSet = false;
298 };
299
300} // namespace Model
301} // namespace EC2
302} // namespace Aws
const Aws::String & GetFlowLogId() const
Definition FlowLog.h:120
FlowLog & WithDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:100
bool DeliverLogsErrorMessageHasBeenSet() const
Definition FlowLog.h:70
FlowLog & AddTags(TagsT &&value)
Definition FlowLog.h:219
FlowLog & WithLogFormat(LogFormatT &&value)
Definition FlowLog.h:205
const Aws::String & GetLogDestination() const
Definition FlowLog.h:188
int GetMaxAggregationInterval() const
Definition FlowLog.h:232
void SetLogDestinationType(LogDestinationType value)
Definition FlowLog.h:180
void SetCreationTime(CreationTimeT &&value)
Definition FlowLog.h:55
bool LogFormatHasBeenSet() const
Definition FlowLog.h:201
void SetLogFormat(LogFormatT &&value)
Definition FlowLog.h:203
bool DestinationOptionsHasBeenSet() const
Definition FlowLog.h:243
bool DeliverLogsStatusHasBeenSet() const
Definition FlowLog.h:109
void SetFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:123
FlowLog & WithFlowLogId(FlowLogIdT &&value)
Definition FlowLog.h:125
bool FlowLogStatusHasBeenSet() const
Definition FlowLog.h:133
bool ResourceIdHasBeenSet() const
Definition FlowLog.h:157
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
FlowLog & WithTags(TagsT &&value)
Definition FlowLog.h:217
const Aws::String & GetFlowLogStatus() const
Definition FlowLog.h:132
FlowLog & WithDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:247
FlowLog & WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
Definition FlowLog.h:87
FlowLog & WithLogDestination(LogDestinationT &&value)
Definition FlowLog.h:193
const Aws::Utils::DateTime & GetCreationTime() const
Definition FlowLog.h:52
const Aws::String & GetLogGroupName() const
Definition FlowLog.h:144
FlowLog & WithCreationTime(CreationTimeT &&value)
Definition FlowLog.h:57
void SetDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:72
FlowLog & WithLogDestinationType(LogDestinationType value)
Definition FlowLog.h:181
const Aws::String & GetDeliverCrossAccountRole() const
Definition FlowLog.h:95
bool CreationTimeHasBeenSet() const
Definition FlowLog.h:53
void SetDestinationOptions(DestinationOptionsT &&value)
Definition FlowLog.h:245
FlowLog & WithLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:149
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool DeliverCrossAccountRoleHasBeenSet() const
Definition FlowLog.h:96
bool MaxAggregationIntervalHasBeenSet() const
Definition FlowLog.h:233
void SetDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:111
bool TrafficTypeHasBeenSet() const
Definition FlowLog.h:169
LogDestinationType GetLogDestinationType() const
Definition FlowLog.h:178
FlowLog & WithTrafficType(TrafficType value)
Definition FlowLog.h:171
AWS_EC2_API FlowLog & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
Definition FlowLog.h:98
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:85
TrafficType GetTrafficType() const
Definition FlowLog.h:168
const DestinationOptionsResponse & GetDestinationOptions() const
Definition FlowLog.h:242
bool LogGroupNameHasBeenSet() const
Definition FlowLog.h:145
void SetTrafficType(TrafficType value)
Definition FlowLog.h:170
const Aws::String & GetResourceId() const
Definition FlowLog.h:156
FlowLog & WithMaxAggregationInterval(int value)
Definition FlowLog.h:235
const Aws::String & GetDeliverLogsPermissionArn() const
Definition FlowLog.h:82
void SetLogGroupName(LogGroupNameT &&value)
Definition FlowLog.h:147
void SetLogDestination(LogDestinationT &&value)
Definition FlowLog.h:191
FlowLog & WithDeliverLogsErrorMessage(DeliverLogsErrorMessageT &&value)
Definition FlowLog.h:74
FlowLog & WithDeliverLogsStatus(DeliverLogsStatusT &&value)
Definition FlowLog.h:113
bool LogDestinationTypeHasBeenSet() const
Definition FlowLog.h:179
bool LogDestinationHasBeenSet() const
Definition FlowLog.h:189
void SetFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:135
FlowLog & WithFlowLogStatus(FlowLogStatusT &&value)
Definition FlowLog.h:137
bool TagsHasBeenSet() const
Definition FlowLog.h:213
const Aws::String & GetLogFormat() const
Definition FlowLog.h:200
void SetResourceId(ResourceIdT &&value)
Definition FlowLog.h:159
void SetMaxAggregationInterval(int value)
Definition FlowLog.h:234
void SetTags(TagsT &&value)
Definition FlowLog.h:215
FlowLog & WithResourceId(ResourceIdT &&value)
Definition FlowLog.h:161
const Aws::Vector< Tag > & GetTags() const
Definition FlowLog.h:212
AWS_EC2_API FlowLog()=default
bool DeliverLogsPermissionArnHasBeenSet() const
Definition FlowLog.h:83
bool FlowLogIdHasBeenSet() const
Definition FlowLog.h:121
const Aws::String & GetDeliverLogsStatus() const
Definition FlowLog.h:108
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