aws_sdk_cloudwatchlogs/client/
start_query.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`StartQuery`](crate::operation::start_query::builders::StartQueryFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`log_group_name(impl Into<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::log_group_name) / [`set_log_group_name(Option<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_log_group_name):<br>required: **false**<br><p>The log group on which to perform the query.</p><br>
    ///   - [`log_group_names(impl Into<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::log_group_names) / [`set_log_group_names(Option<Vec::<String>>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_log_group_names):<br>required: **false**<br><p>The list of log groups to be queried. You can include up to 50 log groups.</p><br>
    ///   - [`log_group_identifiers(impl Into<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::log_group_identifiers) / [`set_log_group_identifiers(Option<Vec::<String>>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_log_group_identifiers):<br>required: **false**<br><p>The list of log groups to query. You can include up to 50 log groups.</p> <p>You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.</p> <p>If you specify an ARN, use the format arn:aws:logs:<i>region</i>:<i>account-id</i>:log-group:<i>log_group_name</i> Don't include an * at the end.</p> <p>A <code>StartQuery</code> operation must include exactly one of the following parameters: <code>logGroupName</code>, <code>logGroupNames</code>, or <code>logGroupIdentifiers</code>.</p><br>
    ///   - [`start_time(i64)`](crate::operation::start_query::builders::StartQueryFluentBuilder::start_time) / [`set_start_time(Option<i64>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_start_time):<br>required: **true**<br><p>The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since <code>January 1, 1970, 00:00:00 UTC</code>.</p><br>
    ///   - [`end_time(i64)`](crate::operation::start_query::builders::StartQueryFluentBuilder::end_time) / [`set_end_time(Option<i64>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_end_time):<br>required: **true**<br><p>The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since <code>January 1, 1970, 00:00:00 UTC</code>.</p><br>
    ///   - [`query_string(impl Into<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::query_string) / [`set_query_string(Option<String>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_query_string):<br>required: **true**<br><p>The query string to use. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p><br>
    ///   - [`limit(i32)`](crate::operation::start_query::builders::StartQueryFluentBuilder::limit) / [`set_limit(Option<i32>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_limit):<br>required: **false**<br><p>The maximum number of log events to return in the query. If the query string uses the <code>fields</code> command, only the specified fields and their values are returned. The default is 10,000.</p><br>
    /// - On success, responds with [`StartQueryOutput`](crate::operation::start_query::StartQueryOutput) with field(s):
    ///   - [`query_id(Option<String>)`](crate::operation::start_query::StartQueryOutput::query_id): <p>The unique ID of the query.</p>
    /// - On failure, responds with [`SdkError<StartQueryError>`](crate::operation::start_query::StartQueryError)
    pub fn start_query(&self) -> crate::operation::start_query::builders::StartQueryFluentBuilder {
        crate::operation::start_query::builders::StartQueryFluentBuilder::new(self.handle.clone())
    }
}