aws_sdk_cloudwatchlogs/client/
get_log_events.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetLogEvents`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`log_group_name(impl Into<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::log_group_name) / [`set_log_group_name(Option<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_log_group_name):<br>required: **false**<br><p>The name of the log group.</p><note>  <p>You must include either <code>logGroupIdentifier</code> or <code>logGroupName</code>, but not both.</p> </note><br>
    ///   - [`log_group_identifier(impl Into<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::log_group_identifier) / [`set_log_group_identifier(Option<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_log_group_identifier):<br>required: **false**<br><p>Specify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.</p><note>  <p>You must include either <code>logGroupIdentifier</code> or <code>logGroupName</code>, but not both.</p> </note><br>
    ///   - [`log_stream_name(impl Into<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::log_stream_name) / [`set_log_stream_name(Option<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_log_stream_name):<br>required: **true**<br><p>The name of the log stream.</p><br>
    ///   - [`start_time(i64)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::start_time) / [`set_start_time(Option<i64>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_start_time):<br>required: **false**<br><p>The start of the time range, expressed as the number of milliseconds after <code>Jan 1, 1970 00:00:00 UTC</code>. Events with a timestamp equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.</p><br>
    ///   - [`end_time(i64)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::end_time) / [`set_end_time(Option<i64>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_end_time):<br>required: **false**<br><p>The end of the time range, expressed as the number of milliseconds after <code>Jan 1, 1970 00:00:00 UTC</code>. Events with a timestamp equal to or later than this time are not included.</p><br>
    ///   - [`next_token(impl Into<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_next_token):<br>required: **false**<br><p>The token for the next set of items to return. (You received this token from a previous call.)</p><br>
    ///   - [`limit(i32)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::limit) / [`set_limit(Option<i32>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_limit):<br>required: **false**<br><p>The maximum number of log events returned. If you don't specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).</p><br>
    ///   - [`start_from_head(bool)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::start_from_head) / [`set_start_from_head(Option<bool>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_start_from_head):<br>required: **false**<br><p>If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.</p> <p>If you are using a previous <code>nextForwardToken</code> value as the <code>nextToken</code> in this operation, you must specify <code>true</code> for <code>startFromHead</code>.</p><br>
    ///   - [`unmask(bool)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::unmask) / [`set_unmask(Option<bool>)`](crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::set_unmask):<br>required: **false**<br><p>Specify <code>true</code> to display the log event fields with all sensitive data unmasked and visible. The default is <code>false</code>.</p> <p>To use this operation with this parameter, you must be signed into an account with the <code>logs:Unmask</code> permission.</p><br>
    /// - On success, responds with [`GetLogEventsOutput`](crate::operation::get_log_events::GetLogEventsOutput) with field(s):
    ///   - [`events(Option<Vec::<OutputLogEvent>>)`](crate::operation::get_log_events::GetLogEventsOutput::events): <p>The events.</p>
    ///   - [`next_forward_token(Option<String>)`](crate::operation::get_log_events::GetLogEventsOutput::next_forward_token): <p>The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.</p>
    ///   - [`next_backward_token(Option<String>)`](crate::operation::get_log_events::GetLogEventsOutput::next_backward_token): <p>The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.</p>
    /// - On failure, responds with [`SdkError<GetLogEventsError>`](crate::operation::get_log_events::GetLogEventsError)
    pub fn get_log_events(&self) -> crate::operation::get_log_events::builders::GetLogEventsFluentBuilder {
        crate::operation::get_log_events::builders::GetLogEventsFluentBuilder::new(self.handle.clone())
    }
}