// 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:
/// - [`query_language(QueryLanguage)`](crate::operation::start_query::builders::StartQueryFluentBuilder::query_language) / [`set_query_language(Option<QueryLanguage>)`](crate::operation::start_query::builders::StartQueryFluentBuilder::set_query_language):<br>required: **false**<br><p>Specify the query language to use for this query. The options are Logs Insights QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query languages that CloudWatch Logs supports, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html">Supported query languages</a>.</p><br>
/// - [`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><note> <p>A <code>StartQuery</code> operation must include exactly one of the following parameters: <code>logGroupName</code>, <code>logGroupNames</code>, or <code>logGroupIdentifiers</code>. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the <code>querystring</code> instead of here.</p> </note><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><note> <p>A <code>StartQuery</code> operation must include exactly one of the following parameters: <code>logGroupName</code>, <code>logGroupNames</code>, or <code>logGroupIdentifiers</code>. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the <code>querystring</code> instead of here.</p> </note><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>. The exception is queries using the OpenSearch Service SQL query language, where you specify the log group names inside the <code>querystring</code> instead of here.</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 from the query. The maximum limit is 100,000. The maximum events returned in a single GetQueryResults API call is 10,000 log events per request. You can retrieve up to 100,000 log event results from a query by paginating with the <code>nextToken</code>. 100,000 limit is only supported for Logs Insights QL and is currently not supported for PPL and SQL query languages.</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())
}
}