Skip to main content

invocation_steps

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

Overview

Nameinvocation_steps
TypeResource
Idaws.bedrock_agent_runtime.invocation_steps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
invocation_idstringThe unique identifier (in UUID format) for the invocation that includes the invocation step. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>)
invocation_step_idstringThe unique identifier (in UUID format) for the invocation step. (pattern: <code>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</code>)
invocation_step_timestring (date-time)The timestamp for when the invocation step was created.
payloadobjectPayload content, such as text and images, for the invocation step.
session_idstringThe unique identifier of the session containing the invocation step. (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
get_invocation_stepselectinvocation_step_id, session_identifier, regionRetrieves the details of a specific invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
list_invocation_stepsselectsession_identifier, regionmaxResults, nextTokenLists all invocation steps associated with a session and optionally, an invocation within the session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
put_invocation_stepreplacesession_identifier, region, invocationIdentifier, invocationStepTime, payloadAdd an invocation step to an invocation in a session. An invocation step stores fine-grained state checkpoints, including text and images, for each interaction. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. Related APIs: GetInvocationStep ListInvocationSteps ListInvocations ListSessions

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
invocation_step_idstringThe unique identifier (in UUID format) for the specific invocation step to retrieve.
regionstringAWS region (default: us-east-1)
session_identifierstringThe unique identifier for the session to add the invocation step to. 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

Retrieves the details of a specific invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

SELECT
invocation_id,
invocation_step_id,
invocation_step_time,
payload,
session_id
FROM aws.bedrock_agent_runtime.invocation_steps
WHERE invocation_step_id = '{{ invocation_step_id }}' -- required
AND session_identifier = '{{ session_identifier }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Add an invocation step to an invocation in a session. An invocation step stores fine-grained state checkpoints, including text and images, for each interaction. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions. Related APIs: GetInvocationStep ListInvocationSteps ListInvocations ListSessions

REPLACE aws.bedrock_agent_runtime.invocation_steps
SET
invocationIdentifier = '{{ invocationIdentifier }}',
invocationStepId = '{{ invocationStepId }}',
invocationStepTime = '{{ invocationStepTime }}',
payload = '{{ payload }}'
WHERE
session_identifier = '{{ session_identifier }}' --required
AND region = '{{ region }}' --required
AND invocationIdentifier = '{{ invocationIdentifier }}' --required
AND invocationStepTime = '{{ invocationStepTime }}' --required
AND payload = '{{ payload }}' --required
RETURNING
invocation_step_id;