Skip to content

CloudTrail  >  Operations  >  search_sample_queries

search_sample_queries

Operation

search_sample_queries async

search_sample_queries(input: SearchSampleQueriesInput, plugins: list[Plugin] | None = None) -> SearchSampleQueriesOutput
Warning

CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.

Searches sample queries and returns a list of sample queries that are sorted by relevance. To search for sample queries, provide a natural language SearchPhrase in English.

Parameters:

Name Type Description Default
input SearchSampleQueriesInput

An instance of SearchSampleQueriesInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
SearchSampleQueriesOutput

An instance of SearchSampleQueriesOutput.

Input

SearchSampleQueriesInput dataclass

Dataclass for SearchSampleQueriesInput structure.

Attributes

max_results class-attribute instance-attribute
max_results: int | None = None

The maximum number of results to return on a single page. The default value is 10.

next_token class-attribute instance-attribute
next_token: str | None = None

A token you can use to get the next page of results. The length constraint is in characters, not words.

search_phrase class-attribute instance-attribute
search_phrase: str | None = None

The natural language phrase to use for the semantic search. The phrase must be in English. The length constraint is in characters, not words.

Output

SearchSampleQueriesOutput dataclass

Dataclass for SearchSampleQueriesOutput structure.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

A token you can use to get the next page of results.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = field(default=EMPTY_RESPONSE_METADATA, repr=False, compare=False)

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

search_results class-attribute instance-attribute
search_results: list[SearchSampleQueriesSearchResult] | None = None

A list of objects containing the search results ordered from most relevant to least relevant.