AWS SDK for C++

AWS SDK for C++ Version 1.11.827

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/TagFieldSpecificationRequest.h>
15#include <aws/ec2/model/TagSpecification.h>
16#include <aws/ec2/model/TrafficType.h>
17
18#include <utility>
19
20namespace Aws {
21namespace EC2 {
22namespace Model {
23
27 public:
28 AWS_EC2_API CreateFlowLogsRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateFlowLogs"; }
35
36 AWS_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
40
41 public:
43
49 inline bool GetDryRun() const { return m_dryRun; }
50 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
51 inline void SetDryRun(bool value) {
52 m_dryRunHasBeenSet = true;
53 m_dryRun = value;
54 }
55 inline CreateFlowLogsRequest& WithDryRun(bool value) {
56 SetDryRun(value);
57 return *this;
58 }
60
62
68 inline const Aws::String& GetClientToken() const { return m_clientToken; }
69 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
70 template <typename ClientTokenT = Aws::String>
71 void SetClientToken(ClientTokenT&& value) {
72 m_clientTokenHasBeenSet = true;
73 m_clientToken = std::forward<ClientTokenT>(value);
74 }
75 template <typename ClientTokenT = Aws::String>
76 CreateFlowLogsRequest& WithClientToken(ClientTokenT&& value) {
77 SetClientToken(std::forward<ClientTokenT>(value));
78 return *this;
79 }
81
83
90 inline const Aws::String& GetDeliverLogsPermissionArn() const { return m_deliverLogsPermissionArn; }
91 inline bool DeliverLogsPermissionArnHasBeenSet() const { return m_deliverLogsPermissionArnHasBeenSet; }
92 template <typename DeliverLogsPermissionArnT = Aws::String>
93 void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
94 m_deliverLogsPermissionArnHasBeenSet = true;
95 m_deliverLogsPermissionArn = std::forward<DeliverLogsPermissionArnT>(value);
96 }
97 template <typename DeliverLogsPermissionArnT = Aws::String>
98 CreateFlowLogsRequest& WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) {
99 SetDeliverLogsPermissionArn(std::forward<DeliverLogsPermissionArnT>(value));
100 return *this;
101 }
103
105
109 inline const Aws::String& GetDeliverCrossAccountRole() const { return m_deliverCrossAccountRole; }
110 inline bool DeliverCrossAccountRoleHasBeenSet() const { return m_deliverCrossAccountRoleHasBeenSet; }
111 template <typename DeliverCrossAccountRoleT = Aws::String>
112 void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
113 m_deliverCrossAccountRoleHasBeenSet = true;
114 m_deliverCrossAccountRole = std::forward<DeliverCrossAccountRoleT>(value);
115 }
116 template <typename DeliverCrossAccountRoleT = Aws::String>
117 CreateFlowLogsRequest& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) {
118 SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value));
119 return *this;
120 }
122
124
129 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
130 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
131 template <typename LogGroupNameT = Aws::String>
132 void SetLogGroupName(LogGroupNameT&& value) {
133 m_logGroupNameHasBeenSet = true;
134 m_logGroupName = std::forward<LogGroupNameT>(value);
135 }
136 template <typename LogGroupNameT = Aws::String>
137 CreateFlowLogsRequest& WithLogGroupName(LogGroupNameT&& value) {
138 SetLogGroupName(std::forward<LogGroupNameT>(value));
139 return *this;
140 }
142
144
150 inline const Aws::Vector<Aws::String>& GetResourceIds() const { return m_resourceIds; }
151 inline bool ResourceIdsHasBeenSet() const { return m_resourceIdsHasBeenSet; }
152 template <typename ResourceIdsT = Aws::Vector<Aws::String>>
153 void SetResourceIds(ResourceIdsT&& value) {
154 m_resourceIdsHasBeenSet = true;
155 m_resourceIds = std::forward<ResourceIdsT>(value);
156 }
157 template <typename ResourceIdsT = Aws::Vector<Aws::String>>
158 CreateFlowLogsRequest& WithResourceIds(ResourceIdsT&& value) {
159 SetResourceIds(std::forward<ResourceIdsT>(value));
160 return *this;
161 }
162 template <typename ResourceIdsT = Aws::String>
163 CreateFlowLogsRequest& AddResourceIds(ResourceIdsT&& value) {
164 m_resourceIdsHasBeenSet = true;
165 m_resourceIds.emplace_back(std::forward<ResourceIdsT>(value));
166 return *this;
167 }
169
171
174 inline FlowLogsResourceType GetResourceType() const { return m_resourceType; }
175 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
177 m_resourceTypeHasBeenSet = true;
178 m_resourceType = value;
179 }
181 SetResourceType(value);
182 return *this;
183 }
185
187
192 inline TrafficType GetTrafficType() const { return m_trafficType; }
193 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
194 inline void SetTrafficType(TrafficType value) {
195 m_trafficTypeHasBeenSet = true;
196 m_trafficType = value;
197 }
199 SetTrafficType(value);
200 return *this;
201 }
203
205
209 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
210 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
212 m_logDestinationTypeHasBeenSet = true;
213 m_logDestinationType = value;
214 }
217 return *this;
218 }
220
222
238 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
239 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
240 template <typename LogDestinationT = Aws::String>
241 void SetLogDestination(LogDestinationT&& value) {
242 m_logDestinationHasBeenSet = true;
243 m_logDestination = std::forward<LogDestinationT>(value);
244 }
245 template <typename LogDestinationT = Aws::String>
246 CreateFlowLogsRequest& WithLogDestination(LogDestinationT&& value) {
247 SetLogDestination(std::forward<LogDestinationT>(value));
248 return *this;
249 }
251
253
265 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
266 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
267 template <typename LogFormatT = Aws::String>
268 void SetLogFormat(LogFormatT&& value) {
269 m_logFormatHasBeenSet = true;
270 m_logFormat = std::forward<LogFormatT>(value);
271 }
272 template <typename LogFormatT = Aws::String>
274 SetLogFormat(std::forward<LogFormatT>(value));
275 return *this;
276 }
278
280
283 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
284 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
285 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
286 void SetTagSpecifications(TagSpecificationsT&& value) {
287 m_tagSpecificationsHasBeenSet = true;
288 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
289 }
290 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
291 CreateFlowLogsRequest& WithTagSpecifications(TagSpecificationsT&& value) {
292 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
293 return *this;
294 }
295 template <typename TagSpecificationsT = TagSpecification>
296 CreateFlowLogsRequest& AddTagSpecifications(TagSpecificationsT&& value) {
297 m_tagSpecificationsHasBeenSet = true;
298 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
299 return *this;
300 }
302
304
313 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
314 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
315 inline void SetMaxAggregationInterval(int value) {
316 m_maxAggregationIntervalHasBeenSet = true;
317 m_maxAggregationInterval = value;
318 }
321 return *this;
322 }
324
326
329 inline const DestinationOptionsRequest& GetDestinationOptions() const { return m_destinationOptions; }
330 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
331 template <typename DestinationOptionsT = DestinationOptionsRequest>
332 void SetDestinationOptions(DestinationOptionsT&& value) {
333 m_destinationOptionsHasBeenSet = true;
334 m_destinationOptions = std::forward<DestinationOptionsT>(value);
335 }
336 template <typename DestinationOptionsT = DestinationOptionsRequest>
337 CreateFlowLogsRequest& WithDestinationOptions(DestinationOptionsT&& value) {
338 SetDestinationOptions(std::forward<DestinationOptionsT>(value));
339 return *this;
340 }
342
344
348 inline const Aws::Vector<TagFieldSpecificationRequest>& GetTagFieldSpecifications() const { return m_tagFieldSpecifications; }
349 inline bool TagFieldSpecificationsHasBeenSet() const { return m_tagFieldSpecificationsHasBeenSet; }
350 template <typename TagFieldSpecificationsT = Aws::Vector<TagFieldSpecificationRequest>>
351 void SetTagFieldSpecifications(TagFieldSpecificationsT&& value) {
352 m_tagFieldSpecificationsHasBeenSet = true;
353 m_tagFieldSpecifications = std::forward<TagFieldSpecificationsT>(value);
354 }
355 template <typename TagFieldSpecificationsT = Aws::Vector<TagFieldSpecificationRequest>>
356 CreateFlowLogsRequest& WithTagFieldSpecifications(TagFieldSpecificationsT&& value) {
357 SetTagFieldSpecifications(std::forward<TagFieldSpecificationsT>(value));
358 return *this;
359 }
360 template <typename TagFieldSpecificationsT = TagFieldSpecificationRequest>
361 CreateFlowLogsRequest& AddTagFieldSpecifications(TagFieldSpecificationsT&& value) {
362 m_tagFieldSpecificationsHasBeenSet = true;
363 m_tagFieldSpecifications.emplace_back(std::forward<TagFieldSpecificationsT>(value));
364 return *this;
365 }
367 private:
368 bool m_dryRun{false};
369
370 Aws::String m_clientToken;
371
372 Aws::String m_deliverLogsPermissionArn;
373
374 Aws::String m_deliverCrossAccountRole;
375
376 Aws::String m_logGroupName;
377
378 Aws::Vector<Aws::String> m_resourceIds;
379
381
382 TrafficType m_trafficType{TrafficType::NOT_SET};
383
385
386 Aws::String m_logDestination;
387
388 Aws::String m_logFormat;
389
390 Aws::Vector<TagSpecification> m_tagSpecifications;
391
392 int m_maxAggregationInterval{0};
393
394 DestinationOptionsRequest m_destinationOptions;
395
396 Aws::Vector<TagFieldSpecificationRequest> m_tagFieldSpecifications;
397 bool m_dryRunHasBeenSet = false;
398 bool m_clientTokenHasBeenSet = false;
399 bool m_deliverLogsPermissionArnHasBeenSet = false;
400 bool m_deliverCrossAccountRoleHasBeenSet = false;
401 bool m_logGroupNameHasBeenSet = false;
402 bool m_resourceIdsHasBeenSet = false;
403 bool m_resourceTypeHasBeenSet = false;
404 bool m_trafficTypeHasBeenSet = false;
405 bool m_logDestinationTypeHasBeenSet = false;
406 bool m_logDestinationHasBeenSet = false;
407 bool m_logFormatHasBeenSet = false;
408 bool m_tagSpecificationsHasBeenSet = false;
409 bool m_maxAggregationIntervalHasBeenSet = false;
410 bool m_destinationOptionsHasBeenSet = false;
411 bool m_tagFieldSpecificationsHasBeenSet = false;
412};
413
414} // namespace Model
415} // namespace EC2
416} // 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)
CreateFlowLogsRequest & WithTagFieldSpecifications(TagFieldSpecificationsT &&value)
FlowLogsResourceType GetResourceType() const
void SetTagSpecifications(TagSpecificationsT &&value)
void SetTagFieldSpecifications(TagFieldSpecificationsT &&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 & AddTagFieldSpecifications(TagFieldSpecificationsT &&value)
const Aws::Vector< TagFieldSpecificationRequest > & GetTagFieldSpecifications() const
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