AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateFlowLogsRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/FlowLogsResourceType.h>
12#include <aws/ec2/model/TrafficType.h>
13#include <aws/ec2/model/LogDestinationType.h>
14#include <aws/ec2/model/DestinationOptionsRequest.h>
15#include <aws/ec2/model/TagSpecification.h>
16#include <utility>
17
18namespace Aws
19{
20namespace EC2
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_EC2_API CreateFlowLogsRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateFlowLogs"; }
37
38 AWS_EC2_API Aws::String SerializePayload() const override;
39
40 protected:
41 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
42
43 public:
44
46
52 inline bool GetDryRun() const { return m_dryRun; }
53 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
54 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
55 inline CreateFlowLogsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
57
59
65 inline const Aws::String& GetClientToken() const { return m_clientToken; }
66 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
67 template<typename ClientTokenT = Aws::String>
68 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
69 template<typename ClientTokenT = Aws::String>
70 CreateFlowLogsRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
72
74
81 inline const Aws::String& GetDeliverLogsPermissionArn() const { return m_deliverLogsPermissionArn; }
82 inline bool DeliverLogsPermissionArnHasBeenSet() const { return m_deliverLogsPermissionArnHasBeenSet; }
83 template<typename DeliverLogsPermissionArnT = Aws::String>
84 void SetDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) { m_deliverLogsPermissionArnHasBeenSet = true; m_deliverLogsPermissionArn = std::forward<DeliverLogsPermissionArnT>(value); }
85 template<typename DeliverLogsPermissionArnT = Aws::String>
86 CreateFlowLogsRequest& WithDeliverLogsPermissionArn(DeliverLogsPermissionArnT&& value) { SetDeliverLogsPermissionArn(std::forward<DeliverLogsPermissionArnT>(value)); return *this;}
88
90
94 inline const Aws::String& GetDeliverCrossAccountRole() const { return m_deliverCrossAccountRole; }
95 inline bool DeliverCrossAccountRoleHasBeenSet() const { return m_deliverCrossAccountRoleHasBeenSet; }
96 template<typename DeliverCrossAccountRoleT = Aws::String>
97 void SetDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) { m_deliverCrossAccountRoleHasBeenSet = true; m_deliverCrossAccountRole = std::forward<DeliverCrossAccountRoleT>(value); }
98 template<typename DeliverCrossAccountRoleT = Aws::String>
99 CreateFlowLogsRequest& WithDeliverCrossAccountRole(DeliverCrossAccountRoleT&& value) { SetDeliverCrossAccountRole(std::forward<DeliverCrossAccountRoleT>(value)); return *this;}
101
103
108 inline const Aws::String& GetLogGroupName() const { return m_logGroupName; }
109 inline bool LogGroupNameHasBeenSet() const { return m_logGroupNameHasBeenSet; }
110 template<typename LogGroupNameT = Aws::String>
111 void SetLogGroupName(LogGroupNameT&& value) { m_logGroupNameHasBeenSet = true; m_logGroupName = std::forward<LogGroupNameT>(value); }
112 template<typename LogGroupNameT = Aws::String>
113 CreateFlowLogsRequest& WithLogGroupName(LogGroupNameT&& value) { SetLogGroupName(std::forward<LogGroupNameT>(value)); return *this;}
115
117
123 inline const Aws::Vector<Aws::String>& GetResourceIds() const { return m_resourceIds; }
124 inline bool ResourceIdsHasBeenSet() const { return m_resourceIdsHasBeenSet; }
125 template<typename ResourceIdsT = Aws::Vector<Aws::String>>
126 void SetResourceIds(ResourceIdsT&& value) { m_resourceIdsHasBeenSet = true; m_resourceIds = std::forward<ResourceIdsT>(value); }
127 template<typename ResourceIdsT = Aws::Vector<Aws::String>>
128 CreateFlowLogsRequest& WithResourceIds(ResourceIdsT&& value) { SetResourceIds(std::forward<ResourceIdsT>(value)); return *this;}
129 template<typename ResourceIdsT = Aws::String>
130 CreateFlowLogsRequest& AddResourceIds(ResourceIdsT&& value) { m_resourceIdsHasBeenSet = true; m_resourceIds.emplace_back(std::forward<ResourceIdsT>(value)); return *this; }
132
134
137 inline FlowLogsResourceType GetResourceType() const { return m_resourceType; }
138 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
139 inline void SetResourceType(FlowLogsResourceType value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
142
144
149 inline TrafficType GetTrafficType() const { return m_trafficType; }
150 inline bool TrafficTypeHasBeenSet() const { return m_trafficTypeHasBeenSet; }
151 inline void SetTrafficType(TrafficType value) { m_trafficTypeHasBeenSet = true; m_trafficType = value; }
152 inline CreateFlowLogsRequest& WithTrafficType(TrafficType value) { SetTrafficType(value); return *this;}
154
156
160 inline LogDestinationType GetLogDestinationType() const { return m_logDestinationType; }
161 inline bool LogDestinationTypeHasBeenSet() const { return m_logDestinationTypeHasBeenSet; }
162 inline void SetLogDestinationType(LogDestinationType value) { m_logDestinationTypeHasBeenSet = true; m_logDestinationType = value; }
165
167
183 inline const Aws::String& GetLogDestination() const { return m_logDestination; }
184 inline bool LogDestinationHasBeenSet() const { return m_logDestinationHasBeenSet; }
185 template<typename LogDestinationT = Aws::String>
186 void SetLogDestination(LogDestinationT&& value) { m_logDestinationHasBeenSet = true; m_logDestination = std::forward<LogDestinationT>(value); }
187 template<typename LogDestinationT = Aws::String>
188 CreateFlowLogsRequest& WithLogDestination(LogDestinationT&& value) { SetLogDestination(std::forward<LogDestinationT>(value)); return *this;}
190
192
204 inline const Aws::String& GetLogFormat() const { return m_logFormat; }
205 inline bool LogFormatHasBeenSet() const { return m_logFormatHasBeenSet; }
206 template<typename LogFormatT = Aws::String>
207 void SetLogFormat(LogFormatT&& value) { m_logFormatHasBeenSet = true; m_logFormat = std::forward<LogFormatT>(value); }
208 template<typename LogFormatT = Aws::String>
209 CreateFlowLogsRequest& WithLogFormat(LogFormatT&& value) { SetLogFormat(std::forward<LogFormatT>(value)); return *this;}
211
213
216 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
217 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
218 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
219 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
220 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
221 CreateFlowLogsRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
222 template<typename TagSpecificationsT = TagSpecification>
223 CreateFlowLogsRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
225
227
236 inline int GetMaxAggregationInterval() const { return m_maxAggregationInterval; }
237 inline bool MaxAggregationIntervalHasBeenSet() const { return m_maxAggregationIntervalHasBeenSet; }
238 inline void SetMaxAggregationInterval(int value) { m_maxAggregationIntervalHasBeenSet = true; m_maxAggregationInterval = value; }
241
243
246 inline const DestinationOptionsRequest& GetDestinationOptions() const { return m_destinationOptions; }
247 inline bool DestinationOptionsHasBeenSet() const { return m_destinationOptionsHasBeenSet; }
248 template<typename DestinationOptionsT = DestinationOptionsRequest>
249 void SetDestinationOptions(DestinationOptionsT&& value) { m_destinationOptionsHasBeenSet = true; m_destinationOptions = std::forward<DestinationOptionsT>(value); }
250 template<typename DestinationOptionsT = DestinationOptionsRequest>
251 CreateFlowLogsRequest& WithDestinationOptions(DestinationOptionsT&& value) { SetDestinationOptions(std::forward<DestinationOptionsT>(value)); return *this;}
253 private:
254
255 bool m_dryRun{false};
256 bool m_dryRunHasBeenSet = false;
257
258 Aws::String m_clientToken;
259 bool m_clientTokenHasBeenSet = false;
260
261 Aws::String m_deliverLogsPermissionArn;
262 bool m_deliverLogsPermissionArnHasBeenSet = false;
263
264 Aws::String m_deliverCrossAccountRole;
265 bool m_deliverCrossAccountRoleHasBeenSet = false;
266
267 Aws::String m_logGroupName;
268 bool m_logGroupNameHasBeenSet = false;
269
270 Aws::Vector<Aws::String> m_resourceIds;
271 bool m_resourceIdsHasBeenSet = false;
272
274 bool m_resourceTypeHasBeenSet = false;
275
276 TrafficType m_trafficType{TrafficType::NOT_SET};
277 bool m_trafficTypeHasBeenSet = false;
278
280 bool m_logDestinationTypeHasBeenSet = false;
281
282 Aws::String m_logDestination;
283 bool m_logDestinationHasBeenSet = false;
284
285 Aws::String m_logFormat;
286 bool m_logFormatHasBeenSet = false;
287
288 Aws::Vector<TagSpecification> m_tagSpecifications;
289 bool m_tagSpecificationsHasBeenSet = false;
290
291 int m_maxAggregationInterval{0};
292 bool m_maxAggregationIntervalHasBeenSet = false;
293
294 DestinationOptionsRequest m_destinationOptions;
295 bool m_destinationOptionsHasBeenSet = false;
296 };
297
298} // namespace Model
299} // namespace EC2
300} // 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