/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace CloudTrail { namespace Model { /** *

Returns the objects or data listed below if successful. Otherwise, returns an * error.

See Also:

AWS * API Reference

*/ class CreateTrailResult { public: AWS_CLOUDTRAIL_API CreateTrailResult(); AWS_CLOUDTRAIL_API CreateTrailResult(const Aws::AmazonWebServiceResult& result); AWS_CLOUDTRAIL_API CreateTrailResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

Specifies the name of the trail.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

Specifies the name of the trail.

*/ inline void SetName(const Aws::String& value) { m_name = value; } /** *

Specifies the name of the trail.

*/ inline void SetName(Aws::String&& value) { m_name = std::move(value); } /** *

Specifies the name of the trail.

*/ inline void SetName(const char* value) { m_name.assign(value); } /** *

Specifies the name of the trail.

*/ inline CreateTrailResult& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

Specifies the name of the trail.

*/ inline CreateTrailResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

Specifies the name of the trail.

*/ inline CreateTrailResult& WithName(const char* value) { SetName(value); return *this;} /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline const Aws::String& GetS3BucketName() const{ return m_s3BucketName; } /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline void SetS3BucketName(const Aws::String& value) { m_s3BucketName = value; } /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline void SetS3BucketName(Aws::String&& value) { m_s3BucketName = std::move(value); } /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline void SetS3BucketName(const char* value) { m_s3BucketName.assign(value); } /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline CreateTrailResult& WithS3BucketName(const Aws::String& value) { SetS3BucketName(value); return *this;} /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline CreateTrailResult& WithS3BucketName(Aws::String&& value) { SetS3BucketName(std::move(value)); return *this;} /** *

Specifies the name of the Amazon S3 bucket designated for publishing log * files.

*/ inline CreateTrailResult& WithS3BucketName(const char* value) { SetS3BucketName(value); return *this;} /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline const Aws::String& GetS3KeyPrefix() const{ return m_s3KeyPrefix; } /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline void SetS3KeyPrefix(const Aws::String& value) { m_s3KeyPrefix = value; } /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline void SetS3KeyPrefix(Aws::String&& value) { m_s3KeyPrefix = std::move(value); } /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline void SetS3KeyPrefix(const char* value) { m_s3KeyPrefix.assign(value); } /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline CreateTrailResult& WithS3KeyPrefix(const Aws::String& value) { SetS3KeyPrefix(value); return *this;} /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline CreateTrailResult& WithS3KeyPrefix(Aws::String&& value) { SetS3KeyPrefix(std::move(value)); return *this;} /** *

Specifies the Amazon S3 key prefix that comes after the name of the bucket * you have designated for log file delivery. For more information, see Finding * Your CloudTrail Log Files.

*/ inline CreateTrailResult& WithS3KeyPrefix(const char* value) { SetS3KeyPrefix(value); return *this;} /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline const Aws::String& GetSnsTopicARN() const{ return m_snsTopicARN; } /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline void SetSnsTopicARN(const Aws::String& value) { m_snsTopicARN = value; } /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline void SetSnsTopicARN(Aws::String&& value) { m_snsTopicARN = std::move(value); } /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline void SetSnsTopicARN(const char* value) { m_snsTopicARN.assign(value); } /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline CreateTrailResult& WithSnsTopicARN(const Aws::String& value) { SetSnsTopicARN(value); return *this;} /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline CreateTrailResult& WithSnsTopicARN(Aws::String&& value) { SetSnsTopicARN(std::move(value)); return *this;} /** *

Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send * notifications when log files are delivered. The format of a topic ARN is:

*

arn:aws:sns:us-east-2:123456789012:MyTopic

*/ inline CreateTrailResult& WithSnsTopicARN(const char* value) { SetSnsTopicARN(value); return *this;} /** *

Specifies whether the trail is publishing events from global services such as * IAM to the log files.

*/ inline bool GetIncludeGlobalServiceEvents() const{ return m_includeGlobalServiceEvents; } /** *

Specifies whether the trail is publishing events from global services such as * IAM to the log files.

*/ inline void SetIncludeGlobalServiceEvents(bool value) { m_includeGlobalServiceEvents = value; } /** *

Specifies whether the trail is publishing events from global services such as * IAM to the log files.

*/ inline CreateTrailResult& WithIncludeGlobalServiceEvents(bool value) { SetIncludeGlobalServiceEvents(value); return *this;} /** *

Specifies whether the trail exists in one Region or in all Regions.

*/ inline bool GetIsMultiRegionTrail() const{ return m_isMultiRegionTrail; } /** *

Specifies whether the trail exists in one Region or in all Regions.

*/ inline void SetIsMultiRegionTrail(bool value) { m_isMultiRegionTrail = value; } /** *

Specifies whether the trail exists in one Region or in all Regions.

*/ inline CreateTrailResult& WithIsMultiRegionTrail(bool value) { SetIsMultiRegionTrail(value); return *this;} /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline const Aws::String& GetTrailARN() const{ return m_trailARN; } /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline void SetTrailARN(const Aws::String& value) { m_trailARN = value; } /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline void SetTrailARN(Aws::String&& value) { m_trailARN = std::move(value); } /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline void SetTrailARN(const char* value) { m_trailARN.assign(value); } /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline CreateTrailResult& WithTrailARN(const Aws::String& value) { SetTrailARN(value); return *this;} /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline CreateTrailResult& WithTrailARN(Aws::String&& value) { SetTrailARN(std::move(value)); return *this;} /** *

Specifies the ARN of the trail that was created. The format of a trail ARN * is:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail *

*/ inline CreateTrailResult& WithTrailARN(const char* value) { SetTrailARN(value); return *this;} /** *

Specifies whether log file integrity validation is enabled.

*/ inline bool GetLogFileValidationEnabled() const{ return m_logFileValidationEnabled; } /** *

Specifies whether log file integrity validation is enabled.

*/ inline void SetLogFileValidationEnabled(bool value) { m_logFileValidationEnabled = value; } /** *

Specifies whether log file integrity validation is enabled.

*/ inline CreateTrailResult& WithLogFileValidationEnabled(bool value) { SetLogFileValidationEnabled(value); return *this;} /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline const Aws::String& GetCloudWatchLogsLogGroupArn() const{ return m_cloudWatchLogsLogGroupArn; } /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline void SetCloudWatchLogsLogGroupArn(const Aws::String& value) { m_cloudWatchLogsLogGroupArn = value; } /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline void SetCloudWatchLogsLogGroupArn(Aws::String&& value) { m_cloudWatchLogsLogGroupArn = std::move(value); } /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline void SetCloudWatchLogsLogGroupArn(const char* value) { m_cloudWatchLogsLogGroupArn.assign(value); } /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline CreateTrailResult& WithCloudWatchLogsLogGroupArn(const Aws::String& value) { SetCloudWatchLogsLogGroupArn(value); return *this;} /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline CreateTrailResult& WithCloudWatchLogsLogGroupArn(Aws::String&& value) { SetCloudWatchLogsLogGroupArn(std::move(value)); return *this;} /** *

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail * logs will be delivered.

*/ inline CreateTrailResult& WithCloudWatchLogsLogGroupArn(const char* value) { SetCloudWatchLogsLogGroupArn(value); return *this;} /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline const Aws::String& GetCloudWatchLogsRoleArn() const{ return m_cloudWatchLogsRoleArn; } /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline void SetCloudWatchLogsRoleArn(const Aws::String& value) { m_cloudWatchLogsRoleArn = value; } /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline void SetCloudWatchLogsRoleArn(Aws::String&& value) { m_cloudWatchLogsRoleArn = std::move(value); } /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline void SetCloudWatchLogsRoleArn(const char* value) { m_cloudWatchLogsRoleArn.assign(value); } /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline CreateTrailResult& WithCloudWatchLogsRoleArn(const Aws::String& value) { SetCloudWatchLogsRoleArn(value); return *this;} /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline CreateTrailResult& WithCloudWatchLogsRoleArn(Aws::String&& value) { SetCloudWatchLogsRoleArn(std::move(value)); return *this;} /** *

Specifies the role for the CloudWatch Logs endpoint to assume to write to a * user's log group.

*/ inline CreateTrailResult& WithCloudWatchLogsRoleArn(const char* value) { SetCloudWatchLogsRoleArn(value); return *this;} /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyId = value; } /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyId = std::move(value); } /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyId.assign(value); } /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline CreateTrailResult& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline CreateTrailResult& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

Specifies the KMS key ID that encrypts the events delivered by CloudTrail. * The value is a fully specified ARN to a KMS key in the following format.

* arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 *

*/ inline CreateTrailResult& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

Specifies whether the trail is an organization trail.

*/ inline bool GetIsOrganizationTrail() const{ return m_isOrganizationTrail; } /** *

Specifies whether the trail is an organization trail.

*/ inline void SetIsOrganizationTrail(bool value) { m_isOrganizationTrail = value; } /** *

Specifies whether the trail is an organization trail.

*/ inline CreateTrailResult& WithIsOrganizationTrail(bool value) { SetIsOrganizationTrail(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline CreateTrailResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline CreateTrailResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline CreateTrailResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_name; Aws::String m_s3BucketName; Aws::String m_s3KeyPrefix; Aws::String m_snsTopicARN; bool m_includeGlobalServiceEvents; bool m_isMultiRegionTrail; Aws::String m_trailARN; bool m_logFileValidationEnabled; Aws::String m_cloudWatchLogsLogGroupArn; Aws::String m_cloudWatchLogsRoleArn; Aws::String m_kmsKeyId; bool m_isOrganizationTrail; Aws::String m_requestId; }; } // namespace Model } // namespace CloudTrail } // namespace Aws