Interface BedrockAgentRuntimeClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
Contains APIs related to model invocation and querying of knowledge bases.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aBedrockAgentRuntimeClient
.static BedrockAgentRuntimeClient
create()
Create aBedrockAgentRuntimeClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CreateInvocationResponse
createInvocation
(Consumer<CreateInvocationRequest.Builder> createInvocationRequest) Creates a new invocation within a session.default CreateInvocationResponse
createInvocation
(CreateInvocationRequest createInvocationRequest) Creates a new invocation within a session.default CreateSessionResponse
createSession
(Consumer<CreateSessionRequest.Builder> createSessionRequest) Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex.default CreateSessionResponse
createSession
(CreateSessionRequest createSessionRequest) Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex.default DeleteAgentMemoryResponse
deleteAgentMemory
(Consumer<DeleteAgentMemoryRequest.Builder> deleteAgentMemoryRequest) Deletes memory from the specified memory identifier.default DeleteAgentMemoryResponse
deleteAgentMemory
(DeleteAgentMemoryRequest deleteAgentMemoryRequest) Deletes memory from the specified memory identifier.default DeleteSessionResponse
deleteSession
(Consumer<DeleteSessionRequest.Builder> deleteSessionRequest) Deletes a session that you ended.default DeleteSessionResponse
deleteSession
(DeleteSessionRequest deleteSessionRequest) Deletes a session that you ended.default EndSessionResponse
endSession
(Consumer<EndSessionRequest.Builder> endSessionRequest) Ends the session.default EndSessionResponse
endSession
(EndSessionRequest endSessionRequest) Ends the session.default GenerateQueryResponse
generateQuery
(Consumer<GenerateQueryRequest.Builder> generateQueryRequest) Generates an SQL query from a natural language query.default GenerateQueryResponse
generateQuery
(GenerateQueryRequest generateQueryRequest) Generates an SQL query from a natural language query.default GetAgentMemoryResponse
getAgentMemory
(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) Gets the sessions stored in the memory of the agent.default GetAgentMemoryResponse
getAgentMemory
(GetAgentMemoryRequest getAgentMemoryRequest) Gets the sessions stored in the memory of the agent.default GetAgentMemoryIterable
getAgentMemoryPaginator
(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) This is a variant ofgetAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.default GetAgentMemoryIterable
getAgentMemoryPaginator
(GetAgentMemoryRequest getAgentMemoryRequest) This is a variant ofgetAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.default GetExecutionFlowSnapshotResponse
getExecutionFlowSnapshot
(Consumer<GetExecutionFlowSnapshotRequest.Builder> getExecutionFlowSnapshotRequest) Retrieves the flow definition snapshot used for a flow execution.default GetExecutionFlowSnapshotResponse
getExecutionFlowSnapshot
(GetExecutionFlowSnapshotRequest getExecutionFlowSnapshotRequest) Retrieves the flow definition snapshot used for a flow execution.default GetFlowExecutionResponse
getFlowExecution
(Consumer<GetFlowExecutionRequest.Builder> getFlowExecutionRequest) Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.default GetFlowExecutionResponse
getFlowExecution
(GetFlowExecutionRequest getFlowExecutionRequest) Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.default GetInvocationStepResponse
getInvocationStep
(Consumer<GetInvocationStepRequest.Builder> getInvocationStepRequest) Retrieves the details of a specific invocation step within an invocation in a session.default GetInvocationStepResponse
getInvocationStep
(GetInvocationStepRequest getInvocationStepRequest) Retrieves the details of a specific invocation step within an invocation in a session.default GetSessionResponse
getSession
(Consumer<GetSessionRequest.Builder> getSessionRequest) Retrieves details about a specific session.default GetSessionResponse
getSession
(GetSessionRequest getSessionRequest) Retrieves details about a specific session.default ListFlowExecutionEventsResponse
listFlowExecutionEvents
(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest) Lists events that occurred during a flow execution.default ListFlowExecutionEventsResponse
listFlowExecutionEvents
(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest) Lists events that occurred during a flow execution.default ListFlowExecutionEventsIterable
listFlowExecutionEventsPaginator
(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest) This is a variant oflistFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation.default ListFlowExecutionEventsIterable
listFlowExecutionEventsPaginator
(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest) This is a variant oflistFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation.default ListFlowExecutionsResponse
listFlowExecutions
(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest) Lists all executions of a flow.default ListFlowExecutionsResponse
listFlowExecutions
(ListFlowExecutionsRequest listFlowExecutionsRequest) Lists all executions of a flow.default ListFlowExecutionsIterable
listFlowExecutionsPaginator
(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest) This is a variant oflistFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation.default ListFlowExecutionsIterable
listFlowExecutionsPaginator
(ListFlowExecutionsRequest listFlowExecutionsRequest) This is a variant oflistFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation.default ListInvocationsResponse
listInvocations
(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest) Lists all invocations associated with a specific session.default ListInvocationsResponse
listInvocations
(ListInvocationsRequest listInvocationsRequest) Lists all invocations associated with a specific session.default ListInvocationsIterable
listInvocationsPaginator
(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest) This is a variant oflistInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation.default ListInvocationsIterable
listInvocationsPaginator
(ListInvocationsRequest listInvocationsRequest) This is a variant oflistInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation.default ListInvocationStepsResponse
listInvocationSteps
(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest) Lists all invocation steps associated with a session and optionally, an invocation within the session.default ListInvocationStepsResponse
listInvocationSteps
(ListInvocationStepsRequest listInvocationStepsRequest) Lists all invocation steps associated with a session and optionally, an invocation within the session.default ListInvocationStepsIterable
listInvocationStepsPaginator
(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest) This is a variant oflistInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation.default ListInvocationStepsIterable
listInvocationStepsPaginator
(ListInvocationStepsRequest listInvocationStepsRequest) This is a variant oflistInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation.default ListSessionsResponse
listSessions
(Consumer<ListSessionsRequest.Builder> listSessionsRequest) Lists all sessions in your Amazon Web Services account.default ListSessionsResponse
listSessions
(ListSessionsRequest listSessionsRequest) Lists all sessions in your Amazon Web Services account.default ListSessionsIterable
listSessionsPaginator
(Consumer<ListSessionsRequest.Builder> listSessionsRequest) This is a variant oflistSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation.default ListSessionsIterable
listSessionsPaginator
(ListSessionsRequest listSessionsRequest) This is a variant oflistSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation.default ListTagsForResourceResponse
listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) List all the tags for the resource you specify.default ListTagsForResourceResponse
listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) List all the tags for the resource you specify.default PutInvocationStepResponse
putInvocationStep
(Consumer<PutInvocationStepRequest.Builder> putInvocationStepRequest) Add an invocation step to an invocation in a session.default PutInvocationStepResponse
putInvocationStep
(PutInvocationStepRequest putInvocationStepRequest) Add an invocation step to an invocation in a session.default RerankResponse
rerank
(Consumer<RerankRequest.Builder> rerankRequest) Reranks the relevance of sources based on queries.default RerankResponse
rerank
(RerankRequest rerankRequest) Reranks the relevance of sources based on queries.default RerankIterable
rerankPaginator
(Consumer<RerankRequest.Builder> rerankRequest) This is a variant ofrerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation.default RerankIterable
rerankPaginator
(RerankRequest rerankRequest) This is a variant ofrerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation.default RetrieveResponse
retrieve
(Consumer<RetrieveRequest.Builder> retrieveRequest) Queries a knowledge base and retrieves information from it.default RetrieveResponse
retrieve
(RetrieveRequest retrieveRequest) Queries a knowledge base and retrieves information from it.default RetrieveAndGenerateResponse
retrieveAndGenerate
(Consumer<RetrieveAndGenerateRequest.Builder> retrieveAndGenerateRequest) Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile.default RetrieveAndGenerateResponse
retrieveAndGenerate
(RetrieveAndGenerateRequest retrieveAndGenerateRequest) Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile.default RetrieveIterable
retrievePaginator
(Consumer<RetrieveRequest.Builder> retrieveRequest) This is a variant ofretrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.default RetrieveIterable
retrievePaginator
(RetrieveRequest retrieveRequest) This is a variant ofretrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
default StartFlowExecutionResponse
startFlowExecution
(Consumer<StartFlowExecutionRequest.Builder> startFlowExecutionRequest) Starts an execution of an Amazon Bedrock flow.default StartFlowExecutionResponse
startFlowExecution
(StartFlowExecutionRequest startFlowExecutionRequest) Starts an execution of an Amazon Bedrock flow.default StopFlowExecutionResponse
stopFlowExecution
(Consumer<StopFlowExecutionRequest.Builder> stopFlowExecutionRequest) Stops an Amazon Bedrock flow's execution.default StopFlowExecutionResponse
stopFlowExecution
(StopFlowExecutionRequest stopFlowExecutionRequest) Stops an Amazon Bedrock flow's execution.default TagResourceResponse
tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associate tags with a resource.default TagResourceResponse
tagResource
(TagResourceRequest tagResourceRequest) Associate tags with a resource.default UntagResourceResponse
untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Remove tags from a resource.default UntagResourceResponse
untagResource
(UntagResourceRequest untagResourceRequest) Remove tags from a resource.default UpdateSessionResponse
updateSession
(Consumer<UpdateSessionRequest.Builder> updateSessionRequest) Updates the metadata or encryption settings of a session.default UpdateSessionResponse
updateSession
(UpdateSessionRequest updateSessionRequest) Updates the metadata or encryption settings of a session.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
createInvocation
default CreateInvocationResponse createInvocation(CreateInvocationRequest createInvocationRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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
- Parameters:
createInvocationRequest
-- Returns:
- Result of the CreateInvocation operation returned by the service.
- See Also:
-
createInvocation
default CreateInvocationResponse createInvocation(Consumer<CreateInvocationRequest.Builder> createInvocationRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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
This is a convenience which creates an instance of the
CreateInvocationRequest.Builder
avoiding the need to create one manually viaCreateInvocationRequest.builder()
- Parameters:
createInvocationRequest
- AConsumer
that will call methods onCreateInvocationRequest.Builder
to create a request.- Returns:
- Result of the CreateInvocation operation returned by the service.
- See Also:
-
createSession
default CreateSessionResponse createSession(CreateSessionRequest createSessionRequest) throws ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
By default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata, or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.
You use a session to store state and conversation history for generative AI applications built with open-source frameworks. For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the InvokeAgent API operation.
Related APIs:
- Parameters:
createSessionRequest
-- Returns:
- Result of the CreateSession operation returned by the service.
- See Also:
-
createSession
default CreateSessionResponse createSession(Consumer<CreateSessionRequest.Builder> createSessionRequest) throws ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
By default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata, or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.
You use a session to store state and conversation history for generative AI applications built with open-source frameworks. For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the InvokeAgent API operation.
Related APIs:
This is a convenience which creates an instance of the
CreateSessionRequest.Builder
avoiding the need to create one manually viaCreateSessionRequest.builder()
- Parameters:
createSessionRequest
- AConsumer
that will call methods onCreateSessionRequest.Builder
to create a request.- Returns:
- Result of the CreateSession operation returned by the service.
- See Also:
-
deleteAgentMemory
default DeleteAgentMemoryResponse deleteAgentMemory(DeleteAgentMemoryRequest deleteAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Deletes memory from the specified memory identifier.
- Parameters:
deleteAgentMemoryRequest
-- Returns:
- Result of the DeleteAgentMemory operation returned by the service.
- See Also:
-
deleteAgentMemory
default DeleteAgentMemoryResponse deleteAgentMemory(Consumer<DeleteAgentMemoryRequest.Builder> deleteAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Deletes memory from the specified memory identifier.
This is a convenience which creates an instance of the
DeleteAgentMemoryRequest.Builder
avoiding the need to create one manually viaDeleteAgentMemoryRequest.builder()
- Parameters:
deleteAgentMemoryRequest
- AConsumer
that will call methods onDeleteAgentMemoryRequest.Builder
to create a request.- Returns:
- Result of the DeleteAgentMemory operation returned by the service.
- See Also:
-
deleteSession
default DeleteSessionResponse deleteSession(DeleteSessionRequest deleteSessionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Deletes a session that you ended. You can't delete a session with an
ACTIVE
status. To delete an active session, you must first end it with the EndSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.- Parameters:
deleteSessionRequest
-- Returns:
- Result of the DeleteSession operation returned by the service.
- See Also:
-
deleteSession
default DeleteSessionResponse deleteSession(Consumer<DeleteSessionRequest.Builder> deleteSessionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Deletes a session that you ended. You can't delete a session with an
ACTIVE
status. To delete an active session, you must first end it with the EndSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
This is a convenience which creates an instance of the
DeleteSessionRequest.Builder
avoiding the need to create one manually viaDeleteSessionRequest.builder()
- Parameters:
deleteSessionRequest
- AConsumer
that will call methods onDeleteSessionRequest.Builder
to create a request.- Returns:
- Result of the DeleteSession operation returned by the service.
- See Also:
-
endSession
default EndSessionResponse endSession(EndSessionRequest endSessionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
- Parameters:
endSessionRequest
-- Returns:
- Result of the EndSession operation returned by the service.
- See Also:
-
endSession
default EndSessionResponse endSession(Consumer<EndSessionRequest.Builder> endSessionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
This is a convenience which creates an instance of the
EndSessionRequest.Builder
avoiding the need to create one manually viaEndSessionRequest.builder()
- Parameters:
endSessionRequest
- AConsumer
that will call methods onEndSessionRequest.Builder
to create a request.- Returns:
- Result of the EndSession operation returned by the service.
- See Also:
-
generateQuery
default GenerateQueryResponse generateQuery(GenerateQueryRequest generateQueryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Generates an SQL query from a natural language query. For more information, see Generate a query for structured data in the Amazon Bedrock User Guide.
- Parameters:
generateQueryRequest
-- Returns:
- Result of the GenerateQuery operation returned by the service.
- See Also:
-
generateQuery
default GenerateQueryResponse generateQuery(Consumer<GenerateQueryRequest.Builder> generateQueryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Generates an SQL query from a natural language query. For more information, see Generate a query for structured data in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GenerateQueryRequest.Builder
avoiding the need to create one manually viaGenerateQueryRequest.builder()
- Parameters:
generateQueryRequest
- AConsumer
that will call methods onGenerateQueryRequest.Builder
to create a request.- Returns:
- Result of the GenerateQuery operation returned by the service.
- See Also:
-
getAgentMemory
default GetAgentMemoryResponse getAgentMemory(GetAgentMemoryRequest getAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Gets the sessions stored in the memory of the agent.
- Parameters:
getAgentMemoryRequest
-- Returns:
- Result of the GetAgentMemory operation returned by the service.
- See Also:
-
getAgentMemory
default GetAgentMemoryResponse getAgentMemory(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Gets the sessions stored in the memory of the agent.
This is a convenience which creates an instance of the
GetAgentMemoryRequest.Builder
avoiding the need to create one manually viaGetAgentMemoryRequest.builder()
- Parameters:
getAgentMemoryRequest
- AConsumer
that will call methods onGetAgentMemoryRequest.Builder
to create a request.- Returns:
- Result of the GetAgentMemory operation returned by the service.
- See Also:
-
getAgentMemoryPaginator
default GetAgentMemoryIterable getAgentMemoryPaginator(GetAgentMemoryRequest getAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client .getAgentMemoryPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.- Parameters:
getAgentMemoryRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getAgentMemoryPaginator
default GetAgentMemoryIterable getAgentMemoryPaginator(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client .getAgentMemoryPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.
This is a convenience which creates an instance of the
GetAgentMemoryRequest.Builder
avoiding the need to create one manually viaGetAgentMemoryRequest.builder()
- Parameters:
getAgentMemoryRequest
- AConsumer
that will call methods onGetAgentMemoryRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getExecutionFlowSnapshot
default GetExecutionFlowSnapshotResponse getExecutionFlowSnapshot(GetExecutionFlowSnapshotRequest getExecutionFlowSnapshotRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves the flow definition snapshot used for a flow execution. The snapshot represents the flow metadata and definition as it existed at the time the execution was started. Note that even if the flow is edited after an execution starts, the snapshot connected to the execution remains unchanged.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
- Parameters:
getExecutionFlowSnapshotRequest
-- Returns:
- Result of the GetExecutionFlowSnapshot operation returned by the service.
- See Also:
-
getExecutionFlowSnapshot
default GetExecutionFlowSnapshotResponse getExecutionFlowSnapshot(Consumer<GetExecutionFlowSnapshotRequest.Builder> getExecutionFlowSnapshotRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves the flow definition snapshot used for a flow execution. The snapshot represents the flow metadata and definition as it existed at the time the execution was started. Note that even if the flow is edited after an execution starts, the snapshot connected to the execution remains unchanged.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
This is a convenience which creates an instance of the
GetExecutionFlowSnapshotRequest.Builder
avoiding the need to create one manually viaGetExecutionFlowSnapshotRequest.builder()
- Parameters:
getExecutionFlowSnapshotRequest
- AConsumer
that will call methods onGetExecutionFlowSnapshotRequest.Builder
to create a request.- Returns:
- Result of the GetExecutionFlowSnapshot operation returned by the service.
- See Also:
-
getFlowExecution
default GetFlowExecutionResponse getFlowExecution(GetFlowExecutionRequest getFlowExecutionRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.
- Parameters:
getFlowExecutionRequest
-- Returns:
- Result of the GetFlowExecution operation returned by the service.
- See Also:
-
getFlowExecution
default GetFlowExecutionResponse getFlowExecution(Consumer<GetFlowExecutionRequest.Builder> getFlowExecutionRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.
This is a convenience which creates an instance of the
GetFlowExecutionRequest.Builder
avoiding the need to create one manually viaGetFlowExecutionRequest.builder()
- Parameters:
getFlowExecutionRequest
- AConsumer
that will call methods onGetFlowExecutionRequest.Builder
to create a request.- Returns:
- Result of the GetFlowExecution operation returned by the service.
- See Also:
-
getInvocationStep
default GetInvocationStepResponse getInvocationStep(GetInvocationStepRequest getInvocationStepRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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.
- Parameters:
getInvocationStepRequest
-- Returns:
- Result of the GetInvocationStep operation returned by the service.
- See Also:
-
getInvocationStep
default GetInvocationStepResponse getInvocationStep(Consumer<GetInvocationStepRequest.Builder> getInvocationStepRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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.
This is a convenience which creates an instance of the
GetInvocationStepRequest.Builder
avoiding the need to create one manually viaGetInvocationStepRequest.builder()
- Parameters:
getInvocationStepRequest
- AConsumer
that will call methods onGetInvocationStepRequest.Builder
to create a request.- Returns:
- Result of the GetInvocationStep operation returned by the service.
- See Also:
-
getSession
default GetSessionResponse getSession(GetSessionRequest getSessionRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
- Parameters:
getSessionRequest
-- Returns:
- Result of the GetSession operation returned by the service.
- See Also:
-
getSession
default GetSessionResponse getSession(Consumer<GetSessionRequest.Builder> getSessionRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
This is a convenience which creates an instance of the
GetSessionRequest.Builder
avoiding the need to create one manually viaGetSessionRequest.builder()
- Parameters:
getSessionRequest
- AConsumer
that will call methods onGetSessionRequest.Builder
to create a request.- Returns:
- Result of the GetSession operation returned by the service.
- See Also:
-
listFlowExecutionEvents
default ListFlowExecutionEventsResponse listFlowExecutionEvents(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists events that occurred during a flow execution. Events provide detailed information about the execution progress, including node inputs and outputs, flow inputs and outputs, condition results, and failure events.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
- Parameters:
listFlowExecutionEventsRequest
-- Returns:
- Result of the ListFlowExecutionEvents operation returned by the service.
- See Also:
-
listFlowExecutionEvents
default ListFlowExecutionEventsResponse listFlowExecutionEvents(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists events that occurred during a flow execution. Events provide detailed information about the execution progress, including node inputs and outputs, flow inputs and outputs, condition results, and failure events.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
This is a convenience which creates an instance of the
ListFlowExecutionEventsRequest.Builder
avoiding the need to create one manually viaListFlowExecutionEventsRequest.builder()
- Parameters:
listFlowExecutionEventsRequest
- AConsumer
that will call methods onListFlowExecutionEventsRequest.Builder
to create a request.- Returns:
- Result of the ListFlowExecutionEvents operation returned by the service.
- See Also:
-
listFlowExecutionEventsPaginator
default ListFlowExecutionEventsIterable listFlowExecutionEventsPaginator(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client.listFlowExecutionEventsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client .listFlowExecutionEventsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client.listFlowExecutionEventsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation.- Parameters:
listFlowExecutionEventsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listFlowExecutionEventsPaginator
default ListFlowExecutionEventsIterable listFlowExecutionEventsPaginator(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client.listFlowExecutionEventsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client .listFlowExecutionEventsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsIterable responses = client.listFlowExecutionEventsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest)
operation.
This is a convenience which creates an instance of the
ListFlowExecutionEventsRequest.Builder
avoiding the need to create one manually viaListFlowExecutionEventsRequest.builder()
- Parameters:
listFlowExecutionEventsRequest
- AConsumer
that will call methods onListFlowExecutionEventsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listFlowExecutions
default ListFlowExecutionsResponse listFlowExecutions(ListFlowExecutionsRequest listFlowExecutionsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists all executions of a flow. Results can be paginated and include summary information about each execution, such as status, start and end times, and the execution's Amazon Resource Name (ARN).
Flow executions is in preview release for Amazon Bedrock and is subject to change.
- Parameters:
listFlowExecutionsRequest
-- Returns:
- Result of the ListFlowExecutions operation returned by the service.
- See Also:
-
listFlowExecutions
default ListFlowExecutionsResponse listFlowExecutions(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists all executions of a flow. Results can be paginated and include summary information about each execution, such as status, start and end times, and the execution's Amazon Resource Name (ARN).
Flow executions is in preview release for Amazon Bedrock and is subject to change.
This is a convenience which creates an instance of the
ListFlowExecutionsRequest.Builder
avoiding the need to create one manually viaListFlowExecutionsRequest.builder()
- Parameters:
listFlowExecutionsRequest
- AConsumer
that will call methods onListFlowExecutionsRequest.Builder
to create a request.- Returns:
- Result of the ListFlowExecutions operation returned by the service.
- See Also:
-
listFlowExecutionsPaginator
default ListFlowExecutionsIterable listFlowExecutionsPaginator(ListFlowExecutionsRequest listFlowExecutionsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client.listFlowExecutionsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client .listFlowExecutionsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client.listFlowExecutionsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation.- Parameters:
listFlowExecutionsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listFlowExecutionsPaginator
default ListFlowExecutionsIterable listFlowExecutionsPaginator(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client.listFlowExecutionsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client .listFlowExecutionsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsIterable responses = client.listFlowExecutionsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest)
operation.
This is a convenience which creates an instance of the
ListFlowExecutionsRequest.Builder
avoiding the need to create one manually viaListFlowExecutionsRequest.builder()
- Parameters:
listFlowExecutionsRequest
- AConsumer
that will call methods onListFlowExecutionsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listInvocationSteps
default ListInvocationStepsResponse listInvocationSteps(ListInvocationStepsRequest listInvocationStepsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists 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.
- Parameters:
listInvocationStepsRequest
-- Returns:
- Result of the ListInvocationSteps operation returned by the service.
- See Also:
-
listInvocationSteps
default ListInvocationStepsResponse listInvocationSteps(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists 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.
This is a convenience which creates an instance of the
ListInvocationStepsRequest.Builder
avoiding the need to create one manually viaListInvocationStepsRequest.builder()
- Parameters:
listInvocationStepsRequest
- AConsumer
that will call methods onListInvocationStepsRequest.Builder
to create a request.- Returns:
- Result of the ListInvocationSteps operation returned by the service.
- See Also:
-
listInvocationStepsPaginator
default ListInvocationStepsIterable listInvocationStepsPaginator(ListInvocationStepsRequest listInvocationStepsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client.listInvocationStepsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client .listInvocationStepsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client.listInvocationStepsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation.- Parameters:
listInvocationStepsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listInvocationStepsPaginator
default ListInvocationStepsIterable listInvocationStepsPaginator(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client.listInvocationStepsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client .listInvocationStepsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsIterable responses = client.listInvocationStepsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest)
operation.
This is a convenience which creates an instance of the
ListInvocationStepsRequest.Builder
avoiding the need to create one manually viaListInvocationStepsRequest.builder()
- Parameters:
listInvocationStepsRequest
- AConsumer
that will call methods onListInvocationStepsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listInvocations
default ListInvocationsResponse listInvocations(ListInvocationsRequest listInvocationsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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.
- Parameters:
listInvocationsRequest
-- Returns:
- Result of the ListInvocations operation returned by the service.
- See Also:
-
listInvocations
default ListInvocationsResponse listInvocations(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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.
This is a convenience which creates an instance of the
ListInvocationsRequest.Builder
avoiding the need to create one manually viaListInvocationsRequest.builder()
- Parameters:
listInvocationsRequest
- AConsumer
that will call methods onListInvocationsRequest.Builder
to create a request.- Returns:
- Result of the ListInvocations operation returned by the service.
- See Also:
-
listInvocationsPaginator
default ListInvocationsIterable listInvocationsPaginator(ListInvocationsRequest listInvocationsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client.listInvocationsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client .listInvocationsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client.listInvocationsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation.- Parameters:
listInvocationsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listInvocationsPaginator
default ListInvocationsIterable listInvocationsPaginator(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client.listInvocationsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client .listInvocationsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsIterable responses = client.listInvocationsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest)
operation.
This is a convenience which creates an instance of the
ListInvocationsRequest.Builder
avoiding the need to create one manually viaListInvocationsRequest.builder()
- Parameters:
listInvocationsRequest
- AConsumer
that will call methods onListInvocationsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listSessions
default ListSessionsResponse listSessions(ListSessionsRequest listSessionsRequest) throws ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
- Parameters:
listSessionsRequest
-- Returns:
- Result of the ListSessions operation returned by the service.
- See Also:
-
listSessions
default ListSessionsResponse listSessions(Consumer<ListSessionsRequest.Builder> listSessionsRequest) throws ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Lists all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
This is a convenience which creates an instance of the
ListSessionsRequest.Builder
avoiding the need to create one manually viaListSessionsRequest.builder()
- Parameters:
listSessionsRequest
- AConsumer
that will call methods onListSessionsRequest.Builder
to create a request.- Returns:
- Result of the ListSessions operation returned by the service.
- See Also:
-
listSessionsPaginator
default ListSessionsIterable listSessionsPaginator(ListSessionsRequest listSessionsRequest) throws ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client.listSessionsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client .listSessionsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client.listSessionsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation.- Parameters:
listSessionsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listSessionsPaginator
default ListSessionsIterable listSessionsPaginator(Consumer<ListSessionsRequest.Builder> listSessionsRequest) throws ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client.listSessionsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client .listSessionsPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsIterable responses = client.listSessionsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest)
operation.
This is a convenience which creates an instance of the
ListSessionsRequest.Builder
avoiding the need to create one manually viaListSessionsRequest.builder()
- Parameters:
listSessionsRequest
- AConsumer
that will call methods onListSessionsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException List all the tags for the resource you specify.
- Parameters:
listTagsForResourceRequest
-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException List all the tags for the resource you specify.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
putInvocationStep
default PutInvocationStepResponse putInvocationStep(PutInvocationStepRequest putInvocationStepRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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:
- Parameters:
putInvocationStepRequest
-- Returns:
- Result of the PutInvocationStep operation returned by the service.
- See Also:
-
putInvocationStep
default PutInvocationStepResponse putInvocationStep(Consumer<PutInvocationStepRequest.Builder> putInvocationStepRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException 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:
This is a convenience which creates an instance of the
PutInvocationStepRequest.Builder
avoiding the need to create one manually viaPutInvocationStepRequest.builder()
- Parameters:
putInvocationStepRequest
- AConsumer
that will call methods onPutInvocationStepRequest.Builder
to create a request.- Returns:
- Result of the PutInvocationStep operation returned by the service.
- See Also:
-
rerank
default RerankResponse rerank(RerankRequest rerankRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Reranks the relevance of sources based on queries. For more information, see Improve the relevance of query responses with a reranker model.
- Parameters:
rerankRequest
-- Returns:
- Result of the Rerank operation returned by the service.
- See Also:
-
rerank
default RerankResponse rerank(Consumer<RerankRequest.Builder> rerankRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Reranks the relevance of sources based on queries. For more information, see Improve the relevance of query responses with a reranker model.
This is a convenience which creates an instance of the
RerankRequest.Builder
avoiding the need to create one manually viaRerankRequest.builder()
- Parameters:
rerankRequest
- AConsumer
that will call methods onRerankRequest.Builder
to create a request.- Returns:
- Result of the Rerank operation returned by the service.
- See Also:
-
rerankPaginator
default RerankIterable rerankPaginator(RerankRequest rerankRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation.- Parameters:
rerankRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
rerankPaginator
default RerankIterable rerankPaginator(Consumer<RerankRequest.Builder> rerankRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RerankIterable responses = client.rerankPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest)
operation.
This is a convenience which creates an instance of the
RerankRequest.Builder
avoiding the need to create one manually viaRerankRequest.builder()
- Parameters:
rerankRequest
- AConsumer
that will call methods onRerankRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
retrieve
default RetrieveResponse retrieve(RetrieveRequest retrieveRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Queries a knowledge base and retrieves information from it.
- Parameters:
retrieveRequest
-- Returns:
- Result of the Retrieve operation returned by the service.
- See Also:
-
retrieve
default RetrieveResponse retrieve(Consumer<RetrieveRequest.Builder> retrieveRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Queries a knowledge base and retrieves information from it.
This is a convenience which creates an instance of the
RetrieveRequest.Builder
avoiding the need to create one manually viaRetrieveRequest.builder()
- Parameters:
retrieveRequest
- AConsumer
that will call methods onRetrieveRequest.Builder
to create a request.- Returns:
- Result of the Retrieve operation returned by the service.
- See Also:
-
retrievePaginator
default RetrieveIterable retrievePaginator(RetrieveRequest retrieveRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.- Parameters:
retrieveRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
retrievePaginator
default RetrieveIterable retrievePaginator(Consumer<RetrieveRequest.Builder> retrieveRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException This is a variant of
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.
This is a convenience which creates an instance of the
RetrieveRequest.Builder
avoiding the need to create one manually viaRetrieveRequest.builder()
- Parameters:
retrieveRequest
- AConsumer
that will call methods onRetrieveRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
retrieveAndGenerate
default RetrieveAndGenerateResponse retrieveAndGenerate(RetrieveAndGenerateRequest retrieveAndGenerateRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile. The response only cites sources that are relevant to the query.
- Parameters:
retrieveAndGenerateRequest
-- Returns:
- Result of the RetrieveAndGenerate operation returned by the service.
- See Also:
-
retrieveAndGenerate
default RetrieveAndGenerateResponse retrieveAndGenerate(Consumer<RetrieveAndGenerateRequest.Builder> retrieveAndGenerateRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile. The response only cites sources that are relevant to the query.
This is a convenience which creates an instance of the
RetrieveAndGenerateRequest.Builder
avoiding the need to create one manually viaRetrieveAndGenerateRequest.builder()
- Parameters:
retrieveAndGenerateRequest
- AConsumer
that will call methods onRetrieveAndGenerateRequest.Builder
to create a request.- Returns:
- Result of the RetrieveAndGenerate operation returned by the service.
- See Also:
-
startFlowExecution
default StartFlowExecutionResponse startFlowExecution(StartFlowExecutionRequest startFlowExecutionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Starts an execution of an Amazon Bedrock flow. Unlike flows that run until completion or time out after five minutes, flow executions let you run flows asynchronously for longer durations. Flow executions also yield control so that your application can perform other tasks.
This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow execution.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
- Parameters:
startFlowExecutionRequest
-- Returns:
- Result of the StartFlowExecution operation returned by the service.
- See Also:
-
startFlowExecution
default StartFlowExecutionResponse startFlowExecution(Consumer<StartFlowExecutionRequest.Builder> startFlowExecutionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Starts an execution of an Amazon Bedrock flow. Unlike flows that run until completion or time out after five minutes, flow executions let you run flows asynchronously for longer durations. Flow executions also yield control so that your application can perform other tasks.
This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow execution.
Flow executions is in preview release for Amazon Bedrock and is subject to change.
This is a convenience which creates an instance of the
StartFlowExecutionRequest.Builder
avoiding the need to create one manually viaStartFlowExecutionRequest.builder()
- Parameters:
startFlowExecutionRequest
- AConsumer
that will call methods onStartFlowExecutionRequest.Builder
to create a request.- Returns:
- Result of the StartFlowExecution operation returned by the service.
- See Also:
-
stopFlowExecution
default StopFlowExecutionResponse stopFlowExecution(StopFlowExecutionRequest stopFlowExecutionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Stops an Amazon Bedrock flow's execution. This operation prevents further processing of the flow and changes the execution status to
Aborted
.- Parameters:
stopFlowExecutionRequest
-- Returns:
- Result of the StopFlowExecution operation returned by the service.
- See Also:
-
stopFlowExecution
default StopFlowExecutionResponse stopFlowExecution(Consumer<StopFlowExecutionRequest.Builder> stopFlowExecutionRequest) throws ResourceNotFoundException, ConflictException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Stops an Amazon Bedrock flow's execution. This operation prevents further processing of the flow and changes the execution status to
Aborted
.
This is a convenience which creates an instance of the
StopFlowExecutionRequest.Builder
avoiding the need to create one manually viaStopFlowExecutionRequest.builder()
- Parameters:
stopFlowExecutionRequest
- AConsumer
that will call methods onStopFlowExecutionRequest.Builder
to create a request.- Returns:
- Result of the StopFlowExecution operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
- Parameters:
tagResourceRequest
-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
TagResourceRequest.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Remove tags from a resource.
- Parameters:
untagResourceRequest
-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Remove tags from a resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateSession
default UpdateSessionResponse updateSession(UpdateSessionRequest updateSessionRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
- Parameters:
updateSessionRequest
-- Returns:
- Result of the UpdateSession operation returned by the service.
- See Also:
-
updateSession
default UpdateSessionResponse updateSession(Consumer<UpdateSessionRequest.Builder> updateSessionRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
This is a convenience which creates an instance of the
UpdateSessionRequest.Builder
avoiding the need to create one manually viaUpdateSessionRequest.builder()
- Parameters:
updateSessionRequest
- AConsumer
that will call methods onUpdateSessionRequest.Builder
to create a request.- Returns:
- Result of the UpdateSession operation returned by the service.
- See Also:
-
create
Create aBedrockAgentRuntimeClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aBedrockAgentRuntimeClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-