Skip to main content

invocations

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

Overview

Nameinvocations
TypeResource
Idaws.bedrock_agent_runtime.invocations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp for when the invocation was created.
invocation_idstringA unique identifier for the invocation in UUID format. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>)
session_idstringThe unique identifier for the session associated with the invocation. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_invocationsselectsession_identifier, regionmaxResults, nextTokenLists all invocations associated with a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
create_invocationinsertsession_identifier, regionCreates a new invocation within a session. An invocation groups the related invocation steps that store the content from a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. Related APIs ListInvocations ListSessions GetSession

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)
session_identifierstringThe unique identifier for the associated session for the invocation. You can specify either the session's sessionId or its Amazon Resource Name (ARN).
maxResultsintegerThe maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.
nextTokenstringIf the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

SELECT examples

Lists all invocations associated with a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

SELECT
created_at,
invocation_id,
session_id
FROM aws.bedrock_agent_runtime.invocations
WHERE session_identifier = '{{ session_identifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. Related APIs ListInvocations ListSessions GetSession

INSERT INTO aws.bedrock_agent_runtime.invocations (
description,
invocationId,
session_identifier,
region
)
SELECT
'{{ description }}',
'{{ invocationId }}',
'{{ session_identifier }}',
'{{ region }}'
RETURNING
created_at,
invocation_id,
session_id
;