AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateFlowLogsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/DestinationOptionsRequest.h>
12#include <aws/ec2/model/FlowLogsResourceType.h>
13#include <aws/ec2/model/LogDestinationType.h>
14#include <aws/ec2/model/TagSpecification.h>
15#include <aws/ec2/model/TrafficType.h>
16
17#include <utility>
18
19namespace Aws {
20namespace EC2 {
21namespace Model {
22
26 public:
27 AWS_EC2_API CreateFlowLogsRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateFlowLogs"; }
34
35 AWS_EC2_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
48 inline bool GetDryRun() const { return m_dryRun; }
49 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
50 inline void SetDryRun(bool value) {
51 m_dryRunHasBeenSet = true;
52 m_dryRun = value;
53 }
54 inline CreateFlowLogsRequest& WithDryRun(bool value) {
55 SetDryRun(value);
56 return *this;
57 }
59
61
67 inline const Aws::String& GetClientToken() const { return m_clientToken; }
68 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
69 template <typename ClientTokenT = Aws::String>
70 void SetClientToken(ClientTokenT&& value) {
71 m_clientTokenHasBeenSet = true;
72 m_clientToken = std::forward<ClientTokenT>(value);
73 }
74 template <typename ClientTokenT = Aws::String>
75 CreateFlowLogsRequest& WithClientToken(ClientTokenT&& value) {
76 SetClientToken(std::forward<ClientTokenT>(value));
77 return *this;
78 }
80
82
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 CreateFlowLogsRequest& 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 CreateFlowLogsRequest& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
117 SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value));
118 return *this;
119 }
121
123
128 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
129 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
130 template <typename LogGroupNameT = Aws::String>
131 void SetLogGroupName(LogGroupNameT&& value) {
132 m_logGroupNameHasBeenSet = true;
133 m_logGroupName = std::forward<LogGroupNameT>(value);
134 }
135 template <typename LogGroupNameT = Aws::String>
136 CreateFlowLogsRequest& WithLogGroupName(LogGroupNameT&& value) {
137 SetLogGroupName(std::forward<LogGroupNameT>(value));
138 return *this;
139 }
141
143
149 inline const Aws::Vector<Aws::String>& GetResourceIds() const { return m_resourceIds; }
150 inline bool ResourceIdsHasBeenSet() const { return m_resourceIdsHasBeenSet; }
151 template <typename ResourceIdsT = Aws::Vector<Aws::String>>
152 void SetResourceIds(ResourceIdsT&& value) {
153 m_resourceIdsHasBeenSet = true;
154 m_resourceIds = std::forward<ResourceIdsT>(value);
155 }
156 template <typename ResourceIdsT = Aws::Vector<Aws::String>>
157 CreateFlowLogsRequest& WithResourceIds(ResourceIdsT&& value) {
158 SetResourceIds(std::forward<ResourceIdsT>(value));
159 return *this;
160 }
161 template <typename ResourceIdsT = Aws::String>
162 CreateFlowLogsRequest& AddResourceIds(ResourceIdsT&& value) {
163 m_resourceIdsHasBeenSet = true;
164 m_resourceIds.emplace_back(std::forward<ResourceIdsT>(value));
165 return *this;
166 }
168
170
173 inline FlowLogsResourceType GetResourceType() const { return m_resourceType; }
174 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
176 m_resourceTypeHasBeenSet = true;
177 m_resourceType = value;
178 }
180 SetResourceType(value);
181 return *this;
182 }
184
186
191 inline TrafficType GetTrafficType() const { return m_trafficType; }
192 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
193 inline void SetTrafficType(TrafficType value) {
194 m_trafficTypeHasBeenSet = true;
195 m_trafficType = value;
196 }
198 SetTrafficType(value);
199 return *this;
200 }
202
204
208 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
209 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
211 m_logDestinationTypeHasBeenSet = true;
212 m_logDestinationType = value;
213 }
216 return *this;
217 }
219
221
237 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
238 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
239 template <typename LogDestinationT = Aws::String>
240 void SetLogDestination(LogDestinationT&& value) {
241 m_logDestinationHasBeenSet = true;
242 m_logDestination = std::forward<LogDestinationT>(value);
243 }
244 template <typename LogDestinationT = Aws::String>
245 CreateFlowLogsRequest& WithLogDestination(LogDestinationT&& value) {
246 SetLogDestination(std::forward<LogDestinationT>(value));
247 return *this;
248 }
250
252
264 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
265 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
266 template <typename LogFormatT = Aws::String>
267 void SetLogFormat(LogFormatT&& value) {
268 m_logFormatHasBeenSet = true;
269 m_logFormat = std::forward<LogFormatT>(value);
270 }
271 template <typename LogFormatT = Aws::String>
273 SetLogFormat(std::forward<LogFormatT>(value));
274 return *this;
275 }
277
279
282 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
283 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
284 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
285 void SetTagSpecifications(TagSpecificationsT&& value) {
286 m_tagSpecificationsHasBeenSet = true;
287 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
288 }
289 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
290 CreateFlowLogsRequest& WithTagSpecifications(TagSpecificationsT&& value) {
291 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
292 return *this;
293 }
294 template <typename TagSpecificationsT = TagSpecification>
295 CreateFlowLogsRequest& AddTagSpecifications(TagSpecificationsT&& value) {
296 m_tagSpecificationsHasBeenSet = true;
297 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
298 return *this;
299 }
301
303
312 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
313 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
314 inline void SetMaxAggregationInterval(int value) {
315 m_maxAggregationIntervalHasBeenSet = true;
316 m_maxAggregationInterval = value;
317 }
320 return *this;
321 }
323
325
328 inline const DestinationOptionsRequest& GetDestinationOptions() const { return m_destinationOptions; }
329 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
330 template <typename DestinationOptionsT = DestinationOptionsRequest>
331 void SetDestinationOptions(DestinationOptionsT&& value) {
332 m_destinationOptionsHasBeenSet = true;
333 m_destinationOptions = std::forward<DestinationOptionsT>(value);
334 }
335 template <typename DestinationOptionsT = DestinationOptionsRequest>
336 CreateFlowLogsRequest& WithDestinationOptions(DestinationOptionsT&& value) {
337 SetDestinationOptions(std::forward<DestinationOptionsT>(value));
338 return *this;
339 }
341 private:
342 bool m_dryRun{false};
343
344 Aws::String m_clientToken;
345
346 Aws::String m_deliverLogsPermissionArn;
347
348 Aws::String m_deliverCrossAccountRole;
349
350 Aws::String m_logGroupName;
351
352 Aws::Vector<Aws::String> m_resourceIds;
353
355
356 TrafficType m_trafficType{TrafficType::NOT_SET};
357
359
360 Aws::String m_logDestination;
361
362 Aws::String m_logFormat;
363
364 Aws::Vector<TagSpecification> m_tagSpecifications;
365
366 int m_maxAggregationInterval{0};
367
368 DestinationOptionsRequest m_destinationOptions;
369 bool m_dryRunHasBeenSet = false;
370 bool m_clientTokenHasBeenSet = false;
371 bool m_deliverLogsPermissionArnHasBeenSet = false;
372 bool m_deliverCrossAccountRoleHasBeenSet = false;
373 bool m_logGroupNameHasBeenSet = false;
374 bool m_resourceIdsHasBeenSet = false;
375 bool m_resourceTypeHasBeenSet = false;
376 bool m_trafficTypeHasBeenSet = false;
377 bool m_logDestinationTypeHasBeenSet = false;
378 bool m_logDestinationHasBeenSet = false;
379 bool m_logFormatHasBeenSet = false;
380 bool m_tagSpecificationsHasBeenSet = false;
381 bool m_maxAggregationIntervalHasBeenSet = false;
382 bool m_destinationOptionsHasBeenSet = false;
383};
384
385} // namespace Model
386} // namespace EC2
387} // namespace Aws
CreateFlowLogsRequest & WithLogDestinationType(LogDestinationType value)
AWS_EC2_API CreateFlowLogsRequest()=default
const Aws::String & GetDeliverCrossAccountRole() const
CreateFlowLogsRequest & AddResourceIds(ResourceIdsT &&value)
CreateFlowLogsRequest & WithDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
CreateFlowLogsRequest & WithLogGroupName(LogGroupNameT &&value)
void SetLogDestination(LogDestinationT &&value)
void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT &&value)
CreateFlowLogsRequest & WithLogDestination(LogDestinationT &&value)
FlowLogsResourceType GetResourceType() const
void SetTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
const DestinationOptionsRequest & GetDestinationOptions() const
CreateFlowLogsRequest & WithMaxAggregationInterval(int value)
CreateFlowLogsRequest & WithResourceType(FlowLogsResourceType value)
CreateFlowLogsRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateFlowLogsRequest & WithDestinationOptions(DestinationOptionsT &&value)
const Aws::Vector< Aws::String > & GetResourceIds() const
CreateFlowLogsRequest & AddTagSpecifications(TagSpecificationsT &&value)
CreateFlowLogsRequest & WithResourceIds(ResourceIdsT &&value)
CreateFlowLogsRequest & WithDryRun(bool value)
void SetResourceType(FlowLogsResourceType value)
CreateFlowLogsRequest & WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT &&value)
CreateFlowLogsRequest & WithLogFormat(LogFormatT &&value)
const Aws::String & GetLogDestination() const
LogDestinationType GetLogDestinationType() const
void SetDestinationOptions(DestinationOptionsT &&value)
CreateFlowLogsRequest & WithTrafficType(TrafficType value)
const Aws::String & GetDeliverLogsPermissionArn() const
virtual const char * GetServiceRequestName() const override
CreateFlowLogsRequest & WithClientToken(ClientTokenT &&value)
void SetLogDestinationType(LogDestinationType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector