aws_sdk_cloudwatchlogs/client/put_query_definition.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`PutQueryDefinition`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::set_name):<br>required: **true**<br><p>A name for the query definition. If you are saving numerous query definitions, we recommend that you name them. This way, you can find the ones you want by using the first part of the name as a filter in the <code>queryDefinitionNamePrefix</code> parameter of <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a>.</p><br>
/// - [`query_definition_id(impl Into<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::query_definition_id) / [`set_query_definition_id(Option<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::set_query_definition_id):<br>required: **false**<br><p>If you are updating a query definition, use this parameter to specify the ID of the query definition that you want to update. You can use <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html">DescribeQueryDefinitions</a> to retrieve the IDs of your saved query definitions.</p> <p>If you are creating a query definition, do not specify this parameter. CloudWatch generates a unique ID for the new query definition and include it in the response to this operation.</p><br>
/// - [`log_group_names(impl Into<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::log_group_names) / [`set_log_group_names(Option<Vec::<String>>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::set_log_group_names):<br>required: **false**<br><p>Use this parameter to include specific log groups as part of your query definition.</p> <p>If you are updating a query definition and you omit this parameter, then the updated definition will contain no log groups.</p><br>
/// - [`query_string(impl Into<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::query_string) / [`set_query_string(Option<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::set_query_string):<br>required: **true**<br><p>The query string to use for this definition. 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>
/// - [`client_token(impl Into<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::set_client_token):<br>required: **false**<br><p>Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network error.</p><br>
/// - On success, responds with [`PutQueryDefinitionOutput`](crate::operation::put_query_definition::PutQueryDefinitionOutput) with field(s):
/// - [`query_definition_id(Option<String>)`](crate::operation::put_query_definition::PutQueryDefinitionOutput::query_definition_id): <p>The ID of the query definition.</p>
/// - On failure, responds with [`SdkError<PutQueryDefinitionError>`](crate::operation::put_query_definition::PutQueryDefinitionError)
pub fn put_query_definition(&self) -> crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder {
crate::operation::put_query_definition::builders::PutQueryDefinitionFluentBuilder::new(self.handle.clone())
}
}