GenerateQuery
Source:
src/AWS/CloudTrail/GenerateQuery.ts
Runtime binding for cloudtrail:GenerateQuery.
Generates a CloudTrail Lake SQL statement from a natural-language prompt
against the bound EventDataStore (the store list is injected from
the binding). Provide the implementation with
Effect.provide(AWS.CloudTrail.GenerateQueryHttp).
Querying CloudTrail Lake
Section titled “Querying CloudTrail Lake”// init — bind the operation to the event data storeconst generateQuery = yield* AWS.CloudTrail.GenerateQuery(store);
// runtimeconst result = yield* generateQuery({ Prompt: "What are my top errors in the past month?",});console.log(result.QueryStatement);