aws_sdk_cloudtrail/client/
generate_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 [`GenerateQuery`](crate::operation::generate_query::builders::GenerateQueryFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`event_data_stores(impl Into<String>)`](crate::operation::generate_query::builders::GenerateQueryFluentBuilder::event_data_stores) / [`set_event_data_stores(Option<Vec::<String>>)`](crate::operation::generate_query::builders::GenerateQueryFluentBuilder::set_event_data_stores):<br>required: **true**<br><p>The ARN (or ID suffix of the ARN) of the event data store that you want to query. You can only specify one event data store.</p><br>
7    ///   - [`prompt(impl Into<String>)`](crate::operation::generate_query::builders::GenerateQueryFluentBuilder::prompt) / [`set_prompt(Option<String>)`](crate::operation::generate_query::builders::GenerateQueryFluentBuilder::set_prompt):<br>required: **true**<br><p>The prompt that you want to use to generate the query. The prompt must be in English. For example prompts, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-query-generator.html#lake-query-generator-examples">Example prompts</a> in the <i>CloudTrail </i> user guide.</p><br>
8    /// - On success, responds with [`GenerateQueryOutput`](crate::operation::generate_query::GenerateQueryOutput) with field(s):
9    ///   - [`query_statement(Option<String>)`](crate::operation::generate_query::GenerateQueryOutput::query_statement): <p>The SQL query statement generated from the prompt.</p>
10    ///   - [`query_alias(Option<String>)`](crate::operation::generate_query::GenerateQueryOutput::query_alias): <p>An alias that identifies the prompt. When you run the <code>StartQuery</code> operation, you can pass in either the <code>QueryAlias</code> or <code>QueryStatement</code> parameter.</p>
11    ///   - [`event_data_store_owner_account_id(Option<String>)`](crate::operation::generate_query::GenerateQueryOutput::event_data_store_owner_account_id): <p>The account ID of the event data store owner.</p>
12    /// - On failure, responds with [`SdkError<GenerateQueryError>`](crate::operation::generate_query::GenerateQueryError)
13    pub fn generate_query(&self) -> crate::operation::generate_query::builders::GenerateQueryFluentBuilder {
14        crate::operation::generate_query::builders::GenerateQueryFluentBuilder::new(self.handle.clone())
15    }
16}