aws_sdk_cloudtrail/client/
get_trail_status.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetTrailStatus`](crate::operation::get_trail_status::builders::GetTrailStatusFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::get_trail_status::builders::GetTrailStatusFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::get_trail_status::builders::GetTrailStatusFluentBuilder::set_name):<br>required: **true**<br><p>Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another Region), you must specify its ARN.</p> <p>The following is the format of a trail ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p><note>  <p>If the trail is an organization trail and you are a member account in the organization in Organizations, you must provide the full ARN of that trail, and not just the name.</p> </note><br>
7    /// - On success, responds with [`GetTrailStatusOutput`](crate::operation::get_trail_status::GetTrailStatusOutput) with field(s):
8    ///   - [`is_logging(Option<bool>)`](crate::operation::get_trail_status::GetTrailStatusOutput::is_logging): <p>Whether the CloudTrail trail is currently logging Amazon Web Services API calls.</p>
9    ///   - [`latest_delivery_error(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_delivery_error): <p>Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html">Error Responses</a> in the Amazon S3 API Reference.</p><note>  <p>This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, fix the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html">bucket policy</a> so that CloudTrail can write to the bucket; or create a new bucket and call <code>UpdateTrail</code> to specify the new bucket.</p> </note>
10    ///   - [`latest_notification_error(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_notification_error): <p>Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/welcome.html">Amazon SNS Developer Guide</a>.</p>
11    ///   - [`latest_delivery_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_delivery_time): <p>Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.</p>
12    ///   - [`latest_notification_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_notification_time): <p>Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.</p>
13    ///   - [`start_logging_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::start_logging_time): <p>Specifies the most recent date and time when CloudTrail started recording API calls for an Amazon Web Services account.</p>
14    ///   - [`stop_logging_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::stop_logging_time): <p>Specifies the most recent date and time when CloudTrail stopped recording API calls for an Amazon Web Services account.</p>
15    ///   - [`latest_cloud_watch_logs_delivery_error(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_cloud_watch_logs_delivery_error): <p>Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.</p>
16    ///   - [`latest_cloud_watch_logs_delivery_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_cloud_watch_logs_delivery_time): <p>Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.</p>
17    ///   - [`latest_digest_delivery_time(Option<DateTime>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_digest_delivery_time): <p>Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket.</p>
18    ///   - [`latest_digest_delivery_error(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_digest_delivery_error): <p>Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html">Error Responses</a> in the Amazon S3 API Reference.</p><note>  <p>This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, fix the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html">bucket policy</a> so that CloudTrail can write to the bucket; or create a new bucket and call <code>UpdateTrail</code> to specify the new bucket.</p> </note>
19    ///   - [`latest_delivery_attempt_time(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_delivery_attempt_time): <p>This field is no longer in use.</p>
20    ///   - [`latest_notification_attempt_time(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_notification_attempt_time): <p>This field is no longer in use.</p>
21    ///   - [`latest_notification_attempt_succeeded(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_notification_attempt_succeeded): <p>This field is no longer in use.</p>
22    ///   - [`latest_delivery_attempt_succeeded(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::latest_delivery_attempt_succeeded): <p>This field is no longer in use.</p>
23    ///   - [`time_logging_started(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::time_logging_started): <p>This field is no longer in use.</p>
24    ///   - [`time_logging_stopped(Option<String>)`](crate::operation::get_trail_status::GetTrailStatusOutput::time_logging_stopped): <p>This field is no longer in use.</p>
25    /// - On failure, responds with [`SdkError<GetTrailStatusError>`](crate::operation::get_trail_status::GetTrailStatusError)
26    pub fn get_trail_status(&self) -> crate::operation::get_trail_status::builders::GetTrailStatusFluentBuilder {
27        crate::operation::get_trail_status::builders::GetTrailStatusFluentBuilder::new(self.handle.clone())
28    }
29}