AWS SDK for C++

AWS SDK for C++ Version 1.11.714

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
129 inline bool GetIncludeGlobalServiceEvents() const { return m_includeGlobalServiceEvents; }
130 inline bool IncludeGlobalServiceEventsHasBeenSet() const { return m_includeGlobalServiceEventsHasBeenSet; }
131 inline void SetIncludeGlobalServiceEvents(bool value) {
132 m_includeGlobalServiceEventsHasBeenSet = true;
133 m_includeGlobalServiceEvents = value;
134 }
137 return *this;
138 }
140
142
148 inline bool GetIsMultiRegionTrail() const { return m_isMultiRegionTrail; }
149 inline bool IsMultiRegionTrailHasBeenSet() const { return m_isMultiRegionTrailHasBeenSet; }
150 inline void SetIsMultiRegionTrail(bool value) {
151 m_isMultiRegionTrailHasBeenSet = true;
152 m_isMultiRegionTrail = value;
153 }
156 return *this;
157 }
159
161
172 inline bool GetEnableLogFileValidation() const { return m_enableLogFileValidation; }
173 inline bool EnableLogFileValidationHasBeenSet() const { return m_enableLogFileValidationHasBeenSet; }
174 inline void SetEnableLogFileValidation(bool value) {
175 m_enableLogFileValidationHasBeenSet = true;
176 m_enableLogFileValidation = value;
177 }
180 return *this;
181 }
183
185
191 inline const Aws::String& GetCloudWatchLogsLogGroupArn() const { return m_cloudWatchLogsLogGroupArn; }
192 inline bool CloudWatchLogsLogGroupArnHasBeenSet() const { return m_cloudWatchLogsLogGroupArnHasBeenSet; }
193 template <typename CloudWatchLogsLogGroupArnT = Aws::String>
194 void SetCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT&& value) {
195 m_cloudWatchLogsLogGroupArnHasBeenSet = true;
196 m_cloudWatchLogsLogGroupArn = std::forward<CloudWatchLogsLogGroupArnT>(value);
197 }
198 template <typename CloudWatchLogsLogGroupArnT = Aws::String>
199 CreateTrailRequest& WithCloudWatchLogsLogGroupArn(CloudWatchLogsLogGroupArnT&& value) {
200 SetCloudWatchLogsLogGroupArn(std::forward<CloudWatchLogsLogGroupArnT>(value));
201 return *this;
202 }
204
206
210 inline const Aws::String& GetCloudWatchLogsRoleArn() const { return m_cloudWatchLogsRoleArn; }
211 inline bool CloudWatchLogsRoleArnHasBeenSet() const { return m_cloudWatchLogsRoleArnHasBeenSet; }
212 template <typename CloudWatchLogsRoleArnT = Aws::String>
213 void SetCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT&& value) {
214 m_cloudWatchLogsRoleArnHasBeenSet = true;
215 m_cloudWatchLogsRoleArn = std::forward<CloudWatchLogsRoleArnT>(value);
216 }
217 template <typename CloudWatchLogsRoleArnT = Aws::String>
218 CreateTrailRequest& WithCloudWatchLogsRoleArn(CloudWatchLogsRoleArnT&& value) {
219 SetCloudWatchLogsRoleArn(std::forward<CloudWatchLogsRoleArnT>(value));
220 return *this;
221 }
223
225
240 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
241 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
242 template <typename KmsKeyIdT = Aws::String>
243 void SetKmsKeyId(KmsKeyIdT&& value) {
244 m_kmsKeyIdHasBeenSet = true;
245 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
246 }
247 template <typename KmsKeyIdT = Aws::String>
248 CreateTrailRequest& WithKmsKeyId(KmsKeyIdT&& value) {
249 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
250 return *this;
251 }
253
255
262 inline bool GetIsOrganizationTrail() const { return m_isOrganizationTrail; }
263 inline bool IsOrganizationTrailHasBeenSet() const { return m_isOrganizationTrailHasBeenSet; }
264 inline void SetIsOrganizationTrail(bool value) {
265 m_isOrganizationTrailHasBeenSet = true;
266 m_isOrganizationTrail = value;
267 }
270 return *this;
271 }
273
275
276 inline const Aws::Vector<Tag>& GetTagsList() const { return m_tagsList; }
277 inline bool TagsListHasBeenSet() const { return m_tagsListHasBeenSet; }
278 template <typename TagsListT = Aws::Vector<Tag>>
279 void SetTagsList(TagsListT&& value) {
280 m_tagsListHasBeenSet = true;
281 m_tagsList = std::forward<TagsListT>(value);
282 }
283 template <typename TagsListT = Aws::Vector<Tag>>
284 CreateTrailRequest& WithTagsList(TagsListT&& value) {
285 SetTagsList(std::forward<TagsListT>(value));
286 return *this;
287 }
288 template <typename TagsListT = Tag>
289 CreateTrailRequest& AddTagsList(TagsListT&& value) {
290 m_tagsListHasBeenSet = true;
291 m_tagsList.emplace_back(std::forward<TagsListT>(value));
292 return *this;
293 }
295 private:
296 Aws::String m_name;
297
298 Aws::String m_s3BucketName;
299
300 Aws::String m_s3KeyPrefix;
301
302 Aws::String m_snsTopicName;
303
304 bool m_includeGlobalServiceEvents{false};
305
306 bool m_isMultiRegionTrail{false};
307
308 bool m_enableLogFileValidation{false};
309
310 Aws::String m_cloudWatchLogsLogGroupArn;
311
312 Aws::String m_cloudWatchLogsRoleArn;
313
314 Aws::String m_kmsKeyId;
315
316 bool m_isOrganizationTrail{false};
317
318 Aws::Vector<Tag> m_tagsList;
319 bool m_nameHasBeenSet = false;
320 bool m_s3BucketNameHasBeenSet = false;
321 bool m_s3KeyPrefixHasBeenSet = false;
322 bool m_snsTopicNameHasBeenSet = false;
323 bool m_includeGlobalServiceEventsHasBeenSet = false;
324 bool m_isMultiRegionTrailHasBeenSet = false;
325 bool m_enableLogFileValidationHasBeenSet = false;
326 bool m_cloudWatchLogsLogGroupArnHasBeenSet = false;
327 bool m_cloudWatchLogsRoleArnHasBeenSet = false;
328 bool m_kmsKeyIdHasBeenSet = false;
329 bool m_isOrganizationTrailHasBeenSet = false;
330 bool m_tagsListHasBeenSet = false;
331};
332
333} // namespace Model
334} // namespace CloudTrail
335} // 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 & 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