Module Values.GenerateQueryResponseSource

Generates a query from a natural language prompt. This operation uses generative artificial intelligence (generative AI) to produce a ready-to-use SQL query from the prompt. The prompt can be a question or a statement about the event data in your event data store. For example, you can enter prompts like "What are my top errors in the past month?" and “Give me a list of users that used SNS.” The prompt must be in English. For information about limitations, permissions, and supported Regions, see Create CloudTrail Lake queries from natural language prompts in the CloudTrail user guide. Do not include any personally identifying, confidential, or sensitive information in your prompts. This feature uses generative AI large language models (LLMs); we recommend double-checking the LLM response.

Sourcetype nonrec t = {
  1. queryStatement : QueryStatement.t option;
    (*

    The SQL query statement generated from the prompt.

    *)
  2. queryAlias : QueryAlias.t option;
    (*

    An alias that identifies the prompt. When you run the StartQuery operation, you can pass in either the QueryAlias or QueryStatement parameter.

    *)
  3. eventDataStoreOwnerAccountId : AccountId.t option;
    (*

    The account ID of the event data store owner.

    *)
}
Sourcetype nonrec error = [
  1. | `EventDataStoreARNInvalidException of EventDataStoreARNInvalidException.t
  2. | `EventDataStoreNotFoundException of EventDataStoreNotFoundException.t
  3. | `GenerateResponseException of GenerateResponseException.t
  4. | `InactiveEventDataStoreException of InactiveEventDataStoreException.t
  5. | `InvalidParameterException of InvalidParameterException.t
  6. | `NoManagementAccountSLRExistsException of NoManagementAccountSLRExistsException.t
  7. | `OperationNotPermittedException of OperationNotPermittedException.t
  8. | `UnsupportedOperationException of UnsupportedOperationException.t
  9. | `Unknown_operation_error of string * string option
]
Sourceval make : ?queryStatement:??? -> ?queryAlias:??? -> ?eventDataStoreOwnerAccountId:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `EventDataStoreARNInvalidException of unit | `EventDataStoreNotFoundException of unit | `GenerateResponseException of unit | `InactiveEventDataStoreException of unit | `InvalidParameterException of unit | `NoManagementAccountSLRExistsException of unit | `OperationNotPermittedException of unit | `Unknown_operation_error of string * string option | `UnsupportedOperationException of unit ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `EventDataStoreARNInvalidException of unit | `EventDataStoreNotFoundException of unit | `GenerateResponseException of unit | `InactiveEventDataStoreException of unit | `InvalidParameterException of unit | `NoManagementAccountSLRExistsException of unit | `OperationNotPermittedException of unit | `Unknown_operation_error of string * string option | `UnsupportedOperationException of unit ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `String of QueryStatement.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t