AWS SDK for C++

AWS SDK for C++ Version 1.11.901

Loading...
Searching...
No Matches
CreateTrailRequest.h
1
6#pragma once
7#include <aws/cloudtrail/CloudTrailRequest.h>
8#include <aws/cloudtrail/CloudTrail_EXPORTS.h>
9#include <aws/cloudtrail/model/Tag.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace CloudTrail {
17namespace Model {
18
25 public:
26 AWS_CLOUDTRAIL_API CreateTrailRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateTrail"; }
33
34 AWS_CLOUDTRAIL_API Aws::String SerializePayload() const override;
35
37
39
49 inline const Aws::String& GetName() const { return m_name; }
50 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
51 template <typename NameT = Aws::String>
52 void SetName(NameT&& value) {
53 m_nameHasBeenSet = true;
54 m_name = std::forward<NameT>(value);
55 }
56 template <typename NameT = Aws::String>
57 CreateTrailRequest& WithName(NameT&& value) {
58 SetName(std::forward<NameT>(value));
59 return *this;
60 }
62
64
70 inline const Aws::String& GetS3BucketName() const { return m_s3BucketName; }
71 inline bool S3BucketNameHasBeenSet() const { return m_s3BucketNameHasBeenSet; }
72 template <typename S3BucketNameT = Aws::String>
73 void SetS3BucketName(S3BucketNameT&& value) {
74 m_s3BucketNameHasBeenSet = true;
75 m_s3BucketName = std::forward<S3BucketNameT>(value);
76 }
77 template <typename S3BucketNameT = Aws::String>
78 CreateTrailRequest& WithS3BucketName(S3BucketNameT&& value) {
79 SetS3BucketName(std::forward<S3BucketNameT>(value));
80 return *this;
81 }
83
85
91 inline const Aws::String& GetS3KeyPrefix() const { return m_s3KeyPrefix; }
92 inline bool S3KeyPrefixHasBeenSet() const { return m_s3KeyPrefixHasBeenSet; }
93 template <typename S3KeyPrefixT = Aws::String>
94 void SetS3KeyPrefix(S3KeyPrefixT&& value) {
95 m_s3KeyPrefixHasBeenSet = true;
96 m_s3KeyPrefix = std::forward<S3KeyPrefixT>(value);
97 }
98 template <typename S3KeyPrefixT = Aws::String>
99 CreateTrailRequest& WithS3KeyPrefix(S3KeyPrefixT&& value) {
100 SetS3KeyPrefix(std::forward<S3KeyPrefixT>(value));
101 return *this;
102 }
104
106
110 inline const Aws::String& GetSnsTopicName() const { return m_snsTopicName; }
111 inline bool SnsTopicNameHasBeenSet() const { return m_snsTopicNameHasBeenSet; }
112 template <typename SnsTopicNameT = Aws::String>
113 void SetSnsTopicName(SnsTopicNameT&& value) {
114 m_snsTopicNameHasBeenSet = true;
115 m_snsTopicName = std::forward<SnsTopicNameT>(value);
116 }
117 template <typename SnsTopicNameT = Aws::String>
118 CreateTrailRequest& WithSnsTopicName(SnsTopicNameT&& value) {
119 SetSnsTopicName(std::forward<SnsTopicNameT>(value));
120 return *this;
121 }
123
125
131 inline bool GetIncludeGlobalServiceEvents() const { return m_includeGlobalServiceEvents; }
132 inline bool IncludeGlobalServiceEventsHasBeenSet() const { return m_includeGlobalServiceEventsHasBeenSet; }
133 inline void SetIncludeGlobalServiceEvents(bool value) {
134 m_includeGlobalServiceEventsHasBeenSet = true;
135 m_includeGlobalServiceEvents = value;
136 }
139 return *this;
140 }
142
144
150 inline bool GetIsMultiRegionTrail() const { return m_isMultiRegionTrail; }
151 inline bool IsMultiRegionTrailHasBeenSet() const { return m_isMultiRegionTrailHasBeenSet; }
152 inline void SetIsMultiRegionTrail(bool value) {
153 m_isMultiRegionTrailHasBeenSet = true;
154 m_isMultiRegionTrail = value;
155 }
158 return *this;
159 }
161
163
174 inline bool GetEnableLogFileValidation() const { return m_enableLogFileValidation; }
175 inline bool EnableLogFileValidationHasBeenSet() const { return m_enableLogFileValidationHasBeenSet; }
176 inline void SetEnableLogFileValidation(bool value) {
177 m_enableLogFileValidationHasBeenSet = true;
178 m_enableLogFileValidation = value;
179 }
182 return *this;
183 }
185
187
193 inline const Aws::String& GetCloudWatchLogsLogGroupArn() const { return m_cloudWatchLogsLogGroupArn; }
194 inline bool CloudWatchLogsLogGroupArnHasBeenSet() const { return m_cloudWatchLogsLogGroupArnHasBeenSet; }
195 template <typename CloudWatchLogsLogGroupArnT = Aws::String>
196 void SetCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT&& value) {
197 m_cloudWatchLogsLogGroupArnHasBeenSet = true;
198 m_cloudWatchLogsLogGroupArn = std::forward<CloudWatchLogsLogGroupArnT>(value);
199 }
200 template <typename CloudWatchLogsLogGroupArnT = Aws::String>
201 CreateTrailRequest& WithCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT&& value) {
202 SetCloudWatchLogsLogGroupArn(std::forward<CloudWatchLogsLogGroupArnT>(value));
203 return *this;
204 }
206
208
212 inline const Aws::String& GetCloudWatchLogsRoleArn() const { return m_cloudWatchLogsRoleArn; }
213 inline bool CloudWatchLogsRoleArnHasBeenSet() const { return m_cloudWatchLogsRoleArnHasBeenSet; }
214 template <typename CloudWatchLogsRoleArnT = Aws::String>
215 void SetCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT&& value) {
216 m_cloudWatchLogsRoleArnHasBeenSet = true;
217 m_cloudWatchLogsRoleArn = std::forward<CloudWatchLogsRoleArnT>(value);
218 }
219 template <typename CloudWatchLogsRoleArnT = Aws::String>
220 CreateTrailRequest& WithCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT&& value) {
221 SetCloudWatchLogsRoleArn(std::forward<CloudWatchLogsRoleArnT>(value));
222 return *this;
223 }
225
227
242 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
243 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
244 template <typename KmsKeyIdT = Aws::String>
245 void SetKmsKeyId(KmsKeyIdT&& value) {
246 m_kmsKeyIdHasBeenSet = true;
247 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
248 }
249 template <typename KmsKeyIdT = Aws::String>
250 CreateTrailRequest& WithKmsKeyId(KmsKeyIdT&& value) {
251 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
252 return *this;
253 }
255
257
264 inline bool GetIsOrganizationTrail() const { return m_isOrganizationTrail; }
265 inline bool IsOrganizationTrailHasBeenSet() const { return m_isOrganizationTrailHasBeenSet; }
266 inline void SetIsOrganizationTrail(bool value) {
267 m_isOrganizationTrailHasBeenSet = true;
268 m_isOrganizationTrail = value;
269 }
272 return *this;
273 }
275
277
278 inline const Aws::Vector<Tag>& GetTagsList() const { return m_tagsList; }
279 inline bool TagsListHasBeenSet() const { return m_tagsListHasBeenSet; }
280 template <typename TagsListT = Aws::Vector<Tag>>
281 void SetTagsList(TagsListT&& value) {
282 m_tagsListHasBeenSet = true;
283 m_tagsList = std::forward<TagsListT>(value);
284 }
285 template <typename TagsListT = Aws::Vector<Tag>>
286 CreateTrailRequest& WithTagsList(TagsListT&& value) {
287 SetTagsList(std::forward<TagsListT>(value));
288 return *this;
289 }
290 template <typename TagsListT = Tag>
291 CreateTrailRequest& AddTagsList(TagsListT&& value) {
292 m_tagsListHasBeenSet = true;
293 m_tagsList.emplace_back(std::forward<TagsListT>(value));
294 return *this;
295 }
297
299
306 inline bool GetRecursiveLogging() const { return m_recursiveLogging; }
307 inline bool RecursiveLoggingHasBeenSet() const { return m_recursiveLoggingHasBeenSet; }
308 inline void SetRecursiveLogging(bool value) {
309 m_recursiveLoggingHasBeenSet = true;
310 m_recursiveLogging = value;
311 }
313 SetRecursiveLogging(value);
314 return *this;
315 }
317 private:
318 Aws::String m_name;
319
320 Aws::String m_s3BucketName;
321
322 Aws::String m_s3KeyPrefix;
323
324 Aws::String m_snsTopicName;
325
326 bool m_includeGlobalServiceEvents{false};
327
328 bool m_isMultiRegionTrail{false};
329
330 bool m_enableLogFileValidation{false};
331
332 Aws::String m_cloudWatchLogsLogGroupArn;
333
334 Aws::String m_cloudWatchLogsRoleArn;
335
336 Aws::String m_kmsKeyId;
337
338 bool m_isOrganizationTrail{false};
339
340 Aws::Vector<Tag> m_tagsList;
341
342 bool m_recursiveLogging{false};
343 bool m_nameHasBeenSet = false;
344 bool m_s3BucketNameHasBeenSet = false;
345 bool m_s3KeyPrefixHasBeenSet = false;
346 bool m_snsTopicNameHasBeenSet = false;
347 bool m_includeGlobalServiceEventsHasBeenSet = false;
348 bool m_isMultiRegionTrailHasBeenSet = false;
349 bool m_enableLogFileValidationHasBeenSet = false;
350 bool m_cloudWatchLogsLogGroupArnHasBeenSet = false;
351 bool m_cloudWatchLogsRoleArnHasBeenSet = false;
352 bool m_kmsKeyIdHasBeenSet = false;
353 bool m_isOrganizationTrailHasBeenSet = false;
354 bool m_tagsListHasBeenSet = false;
355 bool m_recursiveLoggingHasBeenSet = false;
356};
357
358} // namespace Model
359} // namespace CloudTrail
360} // namespace Aws
CreateTrailRequest & WithEnableLogFileValidation(bool value)
AWS_CLOUDTRAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateTrailRequest & WithCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT &&value)
CreateTrailRequest & WithS3BucketName(S3BucketNameT &&value)
void SetCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT &&value)
CreateTrailRequest & WithTagsList(TagsListT &&value)
CreateTrailRequest & WithSnsTopicName(SnsTopicNameT &&value)
CreateTrailRequest & AddTagsList(TagsListT &&value)
const Aws::Vector< Tag > & GetTagsList() const
CreateTrailRequest & WithIsOrganizationTrail(bool value)
CreateTrailRequest & WithIncludeGlobalServiceEvents(bool value)
CreateTrailRequest & WithS3KeyPrefix(S3KeyPrefixT &&value)
AWS_CLOUDTRAIL_API Aws::String SerializePayload() const override
void SetCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT &&value)
CreateTrailRequest & WithIsMultiRegionTrail(bool value)
const Aws::String & GetCloudWatchLogsRoleArn() const
AWS_CLOUDTRAIL_API CreateTrailRequest()=default
CreateTrailRequest & WithCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT &&value)
CreateTrailRequest & WithKmsKeyId(KmsKeyIdT &&value)
CreateTrailRequest & WithRecursiveLogging(bool value)
CreateTrailRequest & WithName(NameT &&value)
const Aws::String & GetCloudWatchLogsLogGroupArn() const
virtual const char * GetServiceRequestName() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector