aws_sdk_timestreamquery/client/
create_scheduled_query.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 [`CreateScheduledQuery`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_name):<br>required: **true**<br><p>Name of the scheduled query.</p><br>
7    ///   - [`query_string(impl Into<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::query_string) / [`set_query_string(Option<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_query_string):<br>required: **true**<br><p>The query string to run. Parameter names can be specified in the query string <code>@</code> character followed by an identifier. The named Parameter <code>@scheduled_runtime</code> is reserved and can be used in the query to get the time at which the query is scheduled to run.</p> <p>The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of <code>@scheduled_runtime</code> paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the <code>@scheduled_runtime</code> parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.</p><br>
8    ///   - [`schedule_configuration(ScheduleConfiguration)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::schedule_configuration) / [`set_schedule_configuration(Option<ScheduleConfiguration>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_schedule_configuration):<br>required: **true**<br><p>The schedule configuration for the query.</p><br>
9    ///   - [`notification_configuration(NotificationConfiguration)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::notification_configuration) / [`set_notification_configuration(Option<NotificationConfiguration>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_notification_configuration):<br>required: **true**<br><p>Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.</p><br>
10    ///   - [`target_configuration(TargetConfiguration)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::target_configuration) / [`set_target_configuration(Option<TargetConfiguration>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_target_configuration):<br>required: **false**<br><p>Configuration used for writing the result of a query.</p><br>
11    ///   - [`client_token(impl Into<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_client_token):<br>required: **false**<br><p>Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.</p> <ul>  <li>   <p>If CreateScheduledQuery is called without a <code>ClientToken</code>, the Query SDK generates a <code>ClientToken</code> on your behalf.</p></li>  <li>   <p>After 8 hours, any request with the same <code>ClientToken</code> is treated as a new request.</p></li> </ul><br>
12    ///   - [`scheduled_query_execution_role_arn(impl Into<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::scheduled_query_execution_role_arn) / [`set_scheduled_query_execution_role_arn(Option<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_scheduled_query_execution_role_arn):<br>required: **true**<br><p>The ARN for the IAM role that Timestream will assume when running the scheduled query.</p><br>
13    ///   - [`tags(Tag)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_tags):<br>required: **false**<br><p>A list of key-value pairs to label the scheduled query.</p><br>
14    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with <i>alias/</i></p> <p>If ErrorReportConfiguration uses <code>SSE_KMS</code> as encryption type, the same KmsKeyId is used to encrypt the error report at rest.</p><br>
15    ///   - [`error_report_configuration(ErrorReportConfiguration)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::error_report_configuration) / [`set_error_report_configuration(Option<ErrorReportConfiguration>)`](crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::set_error_report_configuration):<br>required: **true**<br><p>Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.</p><br>
16    /// - On success, responds with [`CreateScheduledQueryOutput`](crate::operation::create_scheduled_query::CreateScheduledQueryOutput) with field(s):
17    ///   - [`arn(String)`](crate::operation::create_scheduled_query::CreateScheduledQueryOutput::arn): <p>ARN for the created scheduled query.</p>
18    /// - On failure, responds with [`SdkError<CreateScheduledQueryError>`](crate::operation::create_scheduled_query::CreateScheduledQueryError)
19    pub fn create_scheduled_query(&self) -> crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder {
20        crate::operation::create_scheduled_query::builders::CreateScheduledQueryFluentBuilder::new(self.handle.clone())
21    }
22}