1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateTrail`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_name):<br>required: **true**<br><p>Specifies the name of the trail or trail ARN. If <code>Name</code> is a trail name, the string must meet the following requirements:</p> <ul>  <li>   <p>Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)</p></li>  <li>   <p>Start with a letter or number, and end with a letter or number</p></li>  <li>   <p>Be between 3 and 128 characters</p></li>  <li>   <p>Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code> and <code>my--namespace</code> are not valid.</p></li>  <li>   <p>Not be in IP address format (for example, 192.168.5.4)</p></li> </ul> <p>If <code>Name</code> is a trail ARN, it must be in the following format.</p> <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p><br>
    ///   - [`s3_bucket_name(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::s3_bucket_name) / [`set_s3_bucket_name(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_s3_bucket_name):<br>required: **false**<br><p>Specifies the name of the Amazon S3 bucket designated for publishing log files. See <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html">Amazon S3 Bucket Naming Requirements</a>.</p><br>
    ///   - [`s3_key_prefix(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::s3_key_prefix) / [`set_s3_key_prefix(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_s3_key_prefix):<br>required: **false**<br><p>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 <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html">Finding Your CloudTrail Log Files</a>. The maximum length is 200 characters.</p><br>
    ///   - [`sns_topic_name(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::sns_topic_name) / [`set_sns_topic_name(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_sns_topic_name):<br>required: **false**<br><p>Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.</p><br>
    ///   - [`include_global_service_events(bool)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::include_global_service_events) / [`set_include_global_service_events(Option<bool>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_include_global_service_events):<br>required: **false**<br><p>Specifies whether the trail is publishing events from global services such as IAM to the log files.</p><br>
    ///   - [`is_multi_region_trail(bool)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::is_multi_region_trail) / [`set_is_multi_region_trail(Option<bool>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_is_multi_region_trail):<br>required: **false**<br><p>Specifies whether the trail applies only to the current Region or to all Regions. The default is false. If the trail exists only in the current Region and this value is set to true, shadow trails (replications of the trail) will be created in the other Regions. If the trail exists in all Regions and this value is set to false, the trail will remain in the Region where it was created, and its shadow trails in other Regions will be deleted. As a best practice, consider using trails that log events in all Regions.</p><br>
    ///   - [`enable_log_file_validation(bool)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::enable_log_file_validation) / [`set_enable_log_file_validation(Option<bool>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_enable_log_file_validation):<br>required: **false**<br><p>Specifies whether log file validation is enabled. The default is false.</p><note>  <p>When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.</p> </note><br>
    ///   - [`cloud_watch_logs_log_group_arn(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::cloud_watch_logs_log_group_arn) / [`set_cloud_watch_logs_log_group_arn(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_cloud_watch_logs_log_group_arn):<br>required: **false**<br><p>Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs are delivered. You must use a log group that exists in your account.</p> <p>Not required unless you specify <code>CloudWatchLogsRoleArn</code>.</p><br>
    ///   - [`cloud_watch_logs_role_arn(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::cloud_watch_logs_role_arn) / [`set_cloud_watch_logs_role_arn(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_cloud_watch_logs_role_arn):<br>required: **false**<br><p>Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.</p><br>
    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.</p> <p>CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p> <p>Examples:</p> <ul>  <li>   <p>alias/MyAliasName</p></li>  <li>   <p>arn:aws:kms:us-east-2:123456789012:alias/MyAliasName</p></li>  <li>   <p>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</p></li>  <li>   <p>12345678-1234-1234-1234-123456789012</p></li> </ul><br>
    ///   - [`is_organization_trail(bool)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::is_organization_trail) / [`set_is_organization_trail(Option<bool>)`](crate::operation::update_trail::builders::UpdateTrailFluentBuilder::set_is_organization_trail):<br>required: **false**<br><p>Specifies whether the trail is applied to all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in Organizations. If the trail is not an organization trail and this is set to <code>true</code>, the trail will be created in all Amazon Web Services accounts that belong to the organization. If the trail is an organization trail and this is set to <code>false</code>, the trail will remain in the current Amazon Web Services account but be deleted from all member accounts in the organization.</p><note>  <p>Only the management account for the organization can convert an organization trail to a non-organization trail, or convert a non-organization trail to an organization trail.</p> </note><br>
    /// - On success, responds with [`UpdateTrailOutput`](crate::operation::update_trail::UpdateTrailOutput) with field(s):
    ///   - [`name(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::name): <p>Specifies the name of the trail.</p>
    ///   - [`s3_bucket_name(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::s3_bucket_name): <p>Specifies the name of the Amazon S3 bucket designated for publishing log files.</p>
    ///   - [`s3_key_prefix(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::s3_key_prefix): <p>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 <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html">Finding Your IAM Log Files</a>.</p>
    ///   - [`sns_topic_name(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::sns_topic_name): <p>This field is no longer in use. Use <code>SnsTopicARN</code>.</p>
    ///   - [`sns_topic_arn(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::sns_topic_arn): <p>Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.</p> <p><code>arn:aws:sns:us-east-2:123456789012:MyTopic</code></p>
    ///   - [`include_global_service_events(Option<bool>)`](crate::operation::update_trail::UpdateTrailOutput::include_global_service_events): <p>Specifies whether the trail is publishing events from global services such as IAM to the log files.</p>
    ///   - [`is_multi_region_trail(Option<bool>)`](crate::operation::update_trail::UpdateTrailOutput::is_multi_region_trail): <p>Specifies whether the trail exists in one Region or in all Regions.</p>
    ///   - [`trail_arn(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::trail_arn): <p>Specifies the ARN of the trail that was updated. The following is the format of a trail ARN.</p> <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
    ///   - [`log_file_validation_enabled(Option<bool>)`](crate::operation::update_trail::UpdateTrailOutput::log_file_validation_enabled): <p>Specifies whether log file integrity validation is enabled.</p>
    ///   - [`cloud_watch_logs_log_group_arn(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::cloud_watch_logs_log_group_arn): <p>Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs are delivered.</p>
    ///   - [`cloud_watch_logs_role_arn(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::cloud_watch_logs_role_arn): <p>Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.</p>
    ///   - [`kms_key_id(Option<String>)`](crate::operation::update_trail::UpdateTrailOutput::kms_key_id): <p>Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p> <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    ///   - [`is_organization_trail(Option<bool>)`](crate::operation::update_trail::UpdateTrailOutput::is_organization_trail): <p>Specifies whether the trail is an organization trail.</p>
    /// - On failure, responds with [`SdkError<UpdateTrailError>`](crate::operation::update_trail::UpdateTrailError)
    pub fn update_trail(&self) -> crate::operation::update_trail::builders::UpdateTrailFluentBuilder {
        crate::operation::update_trail::builders::UpdateTrailFluentBuilder::new(self.handle.clone())
    }
}