Skip to main content

insights

Creates, updates, deletes, gets or lists an insights resource.

Overview

Nameinsights
TypeResource
Idaws.opensearch.insights

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
insightsarrayThe list of insights returned for the specified entity.
next_tokenstringWhen nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Send the request again using the returned token to retrieve the next page.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_insightsselectregionLists insights for an Amazon OpenSearch Service domain or Amazon Web Services account. Returns a paginated list of insights based on the specified entity, filters, time range, and sort order.
insight_feedbackexecregion, Entity, InsightId, ThumbsSubmits feedback for an existing insight in an Amazon OpenSearch Service domain. Allows users to provide a thumbs up or thumbs down rating and optional text feedback for a specific insight.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists insights for an Amazon OpenSearch Service domain or Amazon Web Services account. Returns a paginated list of insights based on the specified entity, filters, time range, and sort order.

SELECT
insights,
next_token
FROM aws.opensearch.insights
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Submits feedback for an existing insight in an Amazon OpenSearch Service domain. Allows users to provide a thumbs up or thumbs down rating and optional text feedback for a specific insight.

EXEC aws.opensearch.insights.insight_feedback
@region='{{ region }}' --required
@@json=
'{
"Entity": "{{ Entity }}",
"InsightId": "{{ InsightId }}",
"Thumbs": "{{ Thumbs }}",
"FeedbackText": "{{ FeedbackText }}"
}'
;