Skip to main content

recommendations

Creates, updates, deletes, gets or lists a recommendations resource.

Overview

Namerecommendations
TypeResource
Idaws.wisdom.recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
recommendationsarrayThe recommendations.
triggersarrayThe triggers corresponding to recommendations.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recommendationsselectassistant_id, session_id, regionmaxResults, waitTimeSecondsRetrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.
notify_recommendations_receivedexecassistant_id, session_id, region, recommendationIdsRemoves the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.

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
assistant_idstringThe identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
regionstringAWS region (default: us-east-1)
session_idstringThe identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
maxResultsintegerThe maximum number of results to return per page.
waitTimeSecondsintegerThe duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list.

SELECT examples

Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

SELECT
recommendations,
triggers
FROM aws.wisdom.recommendations
WHERE assistant_id = '{{ assistant_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND waitTimeSeconds = '{{ waitTimeSeconds }}'
;

Lifecycle Methods

Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.

EXEC aws.wisdom.recommendations.notify_recommendations_received
@assistant_id='{{ assistant_id }}' --required,
@session_id='{{ session_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"recommendationIds": "{{ recommendationIds }}"
}'
;