Interface BedrockAgentCoreAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
Amazon Bedrock AgentCore is in preview release and is subject to change.
Data plane operations for Amazon Bedrock AgentCore.
-
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 aBedrockAgentCoreAsyncClient
.static BedrockAgentCoreAsyncClient
create()
Create aBedrockAgentCoreAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<CreateEventResponse> createEvent
(Consumer<CreateEventRequest.Builder> createEventRequest) Creates an event in a memory store.default CompletableFuture
<CreateEventResponse> createEvent
(CreateEventRequest createEventRequest) Creates an event in a memory store.default CompletableFuture
<DeleteEventResponse> deleteEvent
(Consumer<DeleteEventRequest.Builder> deleteEventRequest) Deletes an event from a memory store.default CompletableFuture
<DeleteEventResponse> deleteEvent
(DeleteEventRequest deleteEventRequest) Deletes an event from a memory store.deleteMemoryRecord
(Consumer<DeleteMemoryRecordRequest.Builder> deleteMemoryRecordRequest) Deletes a memory record from a memory store.deleteMemoryRecord
(DeleteMemoryRecordRequest deleteMemoryRecordRequest) Deletes a memory record from a memory store.getBrowserSession
(Consumer<GetBrowserSessionRequest.Builder> getBrowserSessionRequest) Retrieves detailed information about a specific browser session in Amazon Bedrock.getBrowserSession
(GetBrowserSessionRequest getBrowserSessionRequest) Retrieves detailed information about a specific browser session in Amazon Bedrock.getCodeInterpreterSession
(Consumer<GetCodeInterpreterSessionRequest.Builder> getCodeInterpreterSessionRequest) Retrieves detailed information about a specific code interpreter session in Amazon Bedrock.getCodeInterpreterSession
(GetCodeInterpreterSessionRequest getCodeInterpreterSessionRequest) Retrieves detailed information about a specific code interpreter session in Amazon Bedrock.default CompletableFuture
<GetEventResponse> getEvent
(Consumer<GetEventRequest.Builder> getEventRequest) Retrieves information about a specific event in a memory store.default CompletableFuture
<GetEventResponse> getEvent
(GetEventRequest getEventRequest) Retrieves information about a specific event in a memory store.default CompletableFuture
<GetMemoryRecordResponse> getMemoryRecord
(Consumer<GetMemoryRecordRequest.Builder> getMemoryRecordRequest) Retrieves a specific memory record from a memory store.default CompletableFuture
<GetMemoryRecordResponse> getMemoryRecord
(GetMemoryRecordRequest getMemoryRecordRequest) Retrieves a specific memory record from a memory store.getResourceApiKey
(Consumer<GetResourceApiKeyRequest.Builder> getResourceApiKeyRequest) Retrieves an API Key associated with an API Key Credential ProvidergetResourceApiKey
(GetResourceApiKeyRequest getResourceApiKeyRequest) Retrieves an API Key associated with an API Key Credential ProvidergetResourceOauth2Token
(Consumer<GetResourceOauth2TokenRequest.Builder> getResourceOauth2TokenRequest) Reaturns the Oauth2Token of the provided resourcegetResourceOauth2Token
(GetResourceOauth2TokenRequest getResourceOauth2TokenRequest) Reaturns the Oauth2Token of the provided resourcegetWorkloadAccessToken
(Consumer<GetWorkloadAccessTokenRequest.Builder> getWorkloadAccessTokenRequest) Obtains an Workload access token for agentic workloads not acting on behalf of user.getWorkloadAccessToken
(GetWorkloadAccessTokenRequest getWorkloadAccessTokenRequest) Obtains an Workload access token for agentic workloads not acting on behalf of user.getWorkloadAccessTokenForJWT
(Consumer<GetWorkloadAccessTokenForJwtRequest.Builder> getWorkloadAccessTokenForJwtRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with JWT tokengetWorkloadAccessTokenForJWT
(GetWorkloadAccessTokenForJwtRequest getWorkloadAccessTokenForJwtRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with JWT tokengetWorkloadAccessTokenForUserId
(Consumer<GetWorkloadAccessTokenForUserIdRequest.Builder> getWorkloadAccessTokenForUserIdRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.getWorkloadAccessTokenForUserId
(GetWorkloadAccessTokenForUserIdRequest getWorkloadAccessTokenForUserIdRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.invokeAgentRuntime
(Consumer<InvokeAgentRuntimeRequest.Builder> invokeAgentRuntimeRequest, Path destinationPath) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.default <ReturnT> CompletableFuture
<ReturnT> invokeAgentRuntime
(Consumer<InvokeAgentRuntimeRequest.Builder> invokeAgentRuntimeRequest, AsyncResponseTransformer<InvokeAgentRuntimeResponse, ReturnT> asyncResponseTransformer) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.invokeAgentRuntime
(InvokeAgentRuntimeRequest invokeAgentRuntimeRequest, Path destinationPath) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.default <ReturnT> CompletableFuture
<ReturnT> invokeAgentRuntime
(InvokeAgentRuntimeRequest invokeAgentRuntimeRequest, AsyncResponseTransformer<InvokeAgentRuntimeResponse, ReturnT> asyncResponseTransformer) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.default CompletableFuture
<Void> invokeCodeInterpreter
(Consumer<InvokeCodeInterpreterRequest.Builder> invokeCodeInterpreterRequest, InvokeCodeInterpreterResponseHandler asyncResponseHandler) Executes code within an active code interpreter session in Amazon Bedrock.default CompletableFuture
<Void> invokeCodeInterpreter
(InvokeCodeInterpreterRequest invokeCodeInterpreterRequest, InvokeCodeInterpreterResponseHandler asyncResponseHandler) Executes code within an active code interpreter session in Amazon Bedrock.default CompletableFuture
<ListActorsResponse> listActors
(Consumer<ListActorsRequest.Builder> listActorsRequest) Lists all actors in a memory store.default CompletableFuture
<ListActorsResponse> listActors
(ListActorsRequest listActorsRequest) Lists all actors in a memory store.default ListActorsPublisher
listActorsPaginator
(Consumer<ListActorsRequest.Builder> listActorsRequest) This is a variant oflistActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation.default ListActorsPublisher
listActorsPaginator
(ListActorsRequest listActorsRequest) This is a variant oflistActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation.listBrowserSessions
(Consumer<ListBrowserSessionsRequest.Builder> listBrowserSessionsRequest) Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria.listBrowserSessions
(ListBrowserSessionsRequest listBrowserSessionsRequest) Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria.listCodeInterpreterSessions
(Consumer<ListCodeInterpreterSessionsRequest.Builder> listCodeInterpreterSessionsRequest) Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria.listCodeInterpreterSessions
(ListCodeInterpreterSessionsRequest listCodeInterpreterSessionsRequest) Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria.default CompletableFuture
<ListEventsResponse> listEvents
(Consumer<ListEventsRequest.Builder> listEventsRequest) Lists events in a memory store based on specified criteria.default CompletableFuture
<ListEventsResponse> listEvents
(ListEventsRequest listEventsRequest) Lists events in a memory store based on specified criteria.default ListEventsPublisher
listEventsPaginator
(Consumer<ListEventsRequest.Builder> listEventsRequest) This is a variant oflistEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation.default ListEventsPublisher
listEventsPaginator
(ListEventsRequest listEventsRequest) This is a variant oflistEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation.listMemoryRecords
(Consumer<ListMemoryRecordsRequest.Builder> listMemoryRecordsRequest) Lists memory records in a memory store based on specified criteria.listMemoryRecords
(ListMemoryRecordsRequest listMemoryRecordsRequest) Lists memory records in a memory store based on specified criteria.default ListMemoryRecordsPublisher
listMemoryRecordsPaginator
(Consumer<ListMemoryRecordsRequest.Builder> listMemoryRecordsRequest) This is a variant oflistMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation.default ListMemoryRecordsPublisher
listMemoryRecordsPaginator
(ListMemoryRecordsRequest listMemoryRecordsRequest) This is a variant oflistMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation.default CompletableFuture
<ListSessionsResponse> listSessions
(Consumer<ListSessionsRequest.Builder> listSessionsRequest) Lists sessions in a memory store based on specified criteria.default CompletableFuture
<ListSessionsResponse> listSessions
(ListSessionsRequest listSessionsRequest) Lists sessions in a memory store based on specified criteria.default ListSessionsPublisher
listSessionsPaginator
(Consumer<ListSessionsRequest.Builder> listSessionsRequest) This is a variant oflistSessions(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsRequest)
operation.default ListSessionsPublisher
listSessionsPaginator
(ListSessionsRequest listSessionsRequest) This is a variant oflistSessions(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsRequest)
operation.retrieveMemoryRecords
(Consumer<RetrieveMemoryRecordsRequest.Builder> retrieveMemoryRecordsRequest) Searches for and retrieves memory records from a memory store based on specified search criteria.retrieveMemoryRecords
(RetrieveMemoryRecordsRequest retrieveMemoryRecordsRequest) Searches for and retrieves memory records from a memory store based on specified search criteria.default RetrieveMemoryRecordsPublisher
retrieveMemoryRecordsPaginator
(Consumer<RetrieveMemoryRecordsRequest.Builder> retrieveMemoryRecordsRequest) This is a variant ofretrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation.default RetrieveMemoryRecordsPublisher
retrieveMemoryRecordsPaginator
(RetrieveMemoryRecordsRequest retrieveMemoryRecordsRequest) This is a variant ofretrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartBrowserSession
(Consumer<StartBrowserSessionRequest.Builder> startBrowserSessionRequest) Creates and initializes a browser session in Amazon Bedrock.startBrowserSession
(StartBrowserSessionRequest startBrowserSessionRequest) Creates and initializes a browser session in Amazon Bedrock.startCodeInterpreterSession
(Consumer<StartCodeInterpreterSessionRequest.Builder> startCodeInterpreterSessionRequest) Creates and initializes a code interpreter session in Amazon Bedrock.startCodeInterpreterSession
(StartCodeInterpreterSessionRequest startCodeInterpreterSessionRequest) Creates and initializes a code interpreter session in Amazon Bedrock.stopBrowserSession
(Consumer<StopBrowserSessionRequest.Builder> stopBrowserSessionRequest) Terminates an active browser session in Amazon Bedrock.stopBrowserSession
(StopBrowserSessionRequest stopBrowserSessionRequest) Terminates an active browser session in Amazon Bedrock.stopCodeInterpreterSession
(Consumer<StopCodeInterpreterSessionRequest.Builder> stopCodeInterpreterSessionRequest) Terminates an active code interpreter session in Amazon Bedrock.stopCodeInterpreterSession
(StopCodeInterpreterSessionRequest stopCodeInterpreterSessionRequest) Terminates an active code interpreter session in Amazon Bedrock.updateBrowserStream
(Consumer<UpdateBrowserStreamRequest.Builder> updateBrowserStreamRequest) Updates a browser stream.updateBrowserStream
(UpdateBrowserStreamRequest updateBrowserStreamRequest) Updates a browser stream.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
-
createEvent
Creates an event in a memory store. Events represent interactions or activities that occur within a session and are associated with specific actors.
To use this operation, you must have the
genesismemory:CreateEvent
permission.This operation is subject to request rate limiting.
- Parameters:
createEventRequest
-- Returns:
- A Java Future containing the result of the CreateEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createEvent
default CompletableFuture<CreateEventResponse> createEvent(Consumer<CreateEventRequest.Builder> createEventRequest) Creates an event in a memory store. Events represent interactions or activities that occur within a session and are associated with specific actors.
To use this operation, you must have the
genesismemory:CreateEvent
permission.This operation is subject to request rate limiting.
This is a convenience which creates an instance of the
CreateEventRequest.Builder
avoiding the need to create one manually viaCreateEventRequest.builder()
- Parameters:
createEventRequest
- AConsumer
that will call methods onCreateEventRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteEvent
Deletes an event from a memory store. When you delete an event, it is permanently removed.
To use this operation, you must have the
genesismemory:DeleteEvent
permission.- Parameters:
deleteEventRequest
-- Returns:
- A Java Future containing the result of the DeleteEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteEvent
default CompletableFuture<DeleteEventResponse> deleteEvent(Consumer<DeleteEventRequest.Builder> deleteEventRequest) Deletes an event from a memory store. When you delete an event, it is permanently removed.
To use this operation, you must have the
genesismemory:DeleteEvent
permission.
This is a convenience which creates an instance of the
DeleteEventRequest.Builder
avoiding the need to create one manually viaDeleteEventRequest.builder()
- Parameters:
deleteEventRequest
- AConsumer
that will call methods onDeleteEventRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMemoryRecord
default CompletableFuture<DeleteMemoryRecordResponse> deleteMemoryRecord(DeleteMemoryRecordRequest deleteMemoryRecordRequest) Deletes a memory record from a memory store. When you delete a memory record, it is permanently removed.
To use this operation, you must have the
genesismemory:DeleteMemoryRecord
permission.- Parameters:
deleteMemoryRecordRequest
-- Returns:
- A Java Future containing the result of the DeleteMemoryRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMemoryRecord
default CompletableFuture<DeleteMemoryRecordResponse> deleteMemoryRecord(Consumer<DeleteMemoryRecordRequest.Builder> deleteMemoryRecordRequest) Deletes a memory record from a memory store. When you delete a memory record, it is permanently removed.
To use this operation, you must have the
genesismemory:DeleteMemoryRecord
permission.
This is a convenience which creates an instance of the
DeleteMemoryRecordRequest.Builder
avoiding the need to create one manually viaDeleteMemoryRecordRequest.builder()
- Parameters:
deleteMemoryRecordRequest
- AConsumer
that will call methods onDeleteMemoryRecordRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteMemoryRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getBrowserSession
default CompletableFuture<GetBrowserSessionResponse> getBrowserSession(GetBrowserSessionRequest getBrowserSessionRequest) Retrieves detailed information about a specific browser session in Amazon Bedrock. This operation returns the session's configuration, current status, associated streams, and metadata.
To get a browser session, you must specify both the browser identifier and the session ID. The response includes information about the session's viewport configuration, timeout settings, and stream endpoints.
The following operations are related to
GetBrowserSession
:- Parameters:
getBrowserSessionRequest
-- Returns:
- A Java Future containing the result of the GetBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getBrowserSession
default CompletableFuture<GetBrowserSessionResponse> getBrowserSession(Consumer<GetBrowserSessionRequest.Builder> getBrowserSessionRequest) Retrieves detailed information about a specific browser session in Amazon Bedrock. This operation returns the session's configuration, current status, associated streams, and metadata.
To get a browser session, you must specify both the browser identifier and the session ID. The response includes information about the session's viewport configuration, timeout settings, and stream endpoints.
The following operations are related to
GetBrowserSession
:
This is a convenience which creates an instance of the
GetBrowserSessionRequest.Builder
avoiding the need to create one manually viaGetBrowserSessionRequest.builder()
- Parameters:
getBrowserSessionRequest
- AConsumer
that will call methods onGetBrowserSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCodeInterpreterSession
default CompletableFuture<GetCodeInterpreterSessionResponse> getCodeInterpreterSession(GetCodeInterpreterSessionRequest getCodeInterpreterSessionRequest) Retrieves detailed information about a specific code interpreter session in Amazon Bedrock. This operation returns the session's configuration, current status, and metadata.
To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session's timeout settings and current status.
The following operations are related to
GetCodeInterpreterSession
:- Parameters:
getCodeInterpreterSessionRequest
-- Returns:
- A Java Future containing the result of the GetCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCodeInterpreterSession
default CompletableFuture<GetCodeInterpreterSessionResponse> getCodeInterpreterSession(Consumer<GetCodeInterpreterSessionRequest.Builder> getCodeInterpreterSessionRequest) Retrieves detailed information about a specific code interpreter session in Amazon Bedrock. This operation returns the session's configuration, current status, and metadata.
To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session's timeout settings and current status.
The following operations are related to
GetCodeInterpreterSession
:
This is a convenience which creates an instance of the
GetCodeInterpreterSessionRequest.Builder
avoiding the need to create one manually viaGetCodeInterpreterSessionRequest.builder()
- Parameters:
getCodeInterpreterSessionRequest
- AConsumer
that will call methods onGetCodeInterpreterSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEvent
Retrieves information about a specific event in a memory store.
To use this operation, you must have the
genesismemory:GetEvent
permission.- Parameters:
getEventRequest
-- Returns:
- A Java Future containing the result of the GetEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEvent
default CompletableFuture<GetEventResponse> getEvent(Consumer<GetEventRequest.Builder> getEventRequest) Retrieves information about a specific event in a memory store.
To use this operation, you must have the
genesismemory:GetEvent
permission.
This is a convenience which creates an instance of the
GetEventRequest.Builder
avoiding the need to create one manually viaGetEventRequest.builder()
- Parameters:
getEventRequest
- AConsumer
that will call methods onGetEventRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getMemoryRecord
default CompletableFuture<GetMemoryRecordResponse> getMemoryRecord(GetMemoryRecordRequest getMemoryRecordRequest) Retrieves a specific memory record from a memory store.
To use this operation, you must have the
genesismemory:GetMemoryRecord
permission.- Parameters:
getMemoryRecordRequest
-- Returns:
- A Java Future containing the result of the GetMemoryRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getMemoryRecord
default CompletableFuture<GetMemoryRecordResponse> getMemoryRecord(Consumer<GetMemoryRecordRequest.Builder> getMemoryRecordRequest) Retrieves a specific memory record from a memory store.
To use this operation, you must have the
genesismemory:GetMemoryRecord
permission.
This is a convenience which creates an instance of the
GetMemoryRecordRequest.Builder
avoiding the need to create one manually viaGetMemoryRecordRequest.builder()
- Parameters:
getMemoryRecordRequest
- AConsumer
that will call methods onGetMemoryRecordRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetMemoryRecord operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getResourceApiKey
default CompletableFuture<GetResourceApiKeyResponse> getResourceApiKey(GetResourceApiKeyRequest getResourceApiKeyRequest) Retrieves an API Key associated with an API Key Credential Provider
- Parameters:
getResourceApiKeyRequest
-- Returns:
- A Java Future containing the result of the GetResourceApiKey operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getResourceApiKey
default CompletableFuture<GetResourceApiKeyResponse> getResourceApiKey(Consumer<GetResourceApiKeyRequest.Builder> getResourceApiKeyRequest) Retrieves an API Key associated with an API Key Credential Provider
This is a convenience which creates an instance of the
GetResourceApiKeyRequest.Builder
avoiding the need to create one manually viaGetResourceApiKeyRequest.builder()
- Parameters:
getResourceApiKeyRequest
- AConsumer
that will call methods onGetResourceApiKeyRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetResourceApiKey operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getResourceOauth2Token
default CompletableFuture<GetResourceOauth2TokenResponse> getResourceOauth2Token(GetResourceOauth2TokenRequest getResourceOauth2TokenRequest) Reaturns the Oauth2Token of the provided resource
- Parameters:
getResourceOauth2TokenRequest
-- Returns:
- A Java Future containing the result of the GetResourceOauth2Token operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getResourceOauth2Token
default CompletableFuture<GetResourceOauth2TokenResponse> getResourceOauth2Token(Consumer<GetResourceOauth2TokenRequest.Builder> getResourceOauth2TokenRequest) Reaturns the Oauth2Token of the provided resource
This is a convenience which creates an instance of the
GetResourceOauth2TokenRequest.Builder
avoiding the need to create one manually viaGetResourceOauth2TokenRequest.builder()
- Parameters:
getResourceOauth2TokenRequest
- AConsumer
that will call methods onGetResourceOauth2TokenRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetResourceOauth2Token operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessToken
default CompletableFuture<GetWorkloadAccessTokenResponse> getWorkloadAccessToken(GetWorkloadAccessTokenRequest getWorkloadAccessTokenRequest) Obtains an Workload access token for agentic workloads not acting on behalf of user.
- Parameters:
getWorkloadAccessTokenRequest
-- Returns:
- A Java Future containing the result of the GetWorkloadAccessToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessToken
default CompletableFuture<GetWorkloadAccessTokenResponse> getWorkloadAccessToken(Consumer<GetWorkloadAccessTokenRequest.Builder> getWorkloadAccessTokenRequest) Obtains an Workload access token for agentic workloads not acting on behalf of user.
This is a convenience which creates an instance of the
GetWorkloadAccessTokenRequest.Builder
avoiding the need to create one manually viaGetWorkloadAccessTokenRequest.builder()
- Parameters:
getWorkloadAccessTokenRequest
- AConsumer
that will call methods onGetWorkloadAccessTokenRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetWorkloadAccessToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessTokenForJWT
default CompletableFuture<GetWorkloadAccessTokenForJwtResponse> getWorkloadAccessTokenForJWT(GetWorkloadAccessTokenForJwtRequest getWorkloadAccessTokenForJwtRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token
- Parameters:
getWorkloadAccessTokenForJwtRequest
-- Returns:
- A Java Future containing the result of the GetWorkloadAccessTokenForJWT operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessTokenForJWT
default CompletableFuture<GetWorkloadAccessTokenForJwtResponse> getWorkloadAccessTokenForJWT(Consumer<GetWorkloadAccessTokenForJwtRequest.Builder> getWorkloadAccessTokenForJwtRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token
This is a convenience which creates an instance of the
GetWorkloadAccessTokenForJwtRequest.Builder
avoiding the need to create one manually viaGetWorkloadAccessTokenForJwtRequest.builder()
- Parameters:
getWorkloadAccessTokenForJwtRequest
- AConsumer
that will call methods onGetWorkloadAccessTokenForJwtRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetWorkloadAccessTokenForJWT operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessTokenForUserId
default CompletableFuture<GetWorkloadAccessTokenForUserIdResponse> getWorkloadAccessTokenForUserId(GetWorkloadAccessTokenForUserIdRequest getWorkloadAccessTokenForUserIdRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
- Parameters:
getWorkloadAccessTokenForUserIdRequest
-- Returns:
- A Java Future containing the result of the GetWorkloadAccessTokenForUserId operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getWorkloadAccessTokenForUserId
default CompletableFuture<GetWorkloadAccessTokenForUserIdResponse> getWorkloadAccessTokenForUserId(Consumer<GetWorkloadAccessTokenForUserIdRequest.Builder> getWorkloadAccessTokenForUserIdRequest) Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
This is a convenience which creates an instance of the
GetWorkloadAccessTokenForUserIdRequest.Builder
avoiding the need to create one manually viaGetWorkloadAccessTokenForUserIdRequest.builder()
- Parameters:
getWorkloadAccessTokenForUserIdRequest
- AConsumer
that will call methods onGetWorkloadAccessTokenForUserIdRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetWorkloadAccessTokenForUserId operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- UnauthorizedException This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeAgentRuntime
default <ReturnT> CompletableFuture<ReturnT> invokeAgentRuntime(InvokeAgentRuntimeRequest invokeAgentRuntimeRequest, AsyncResponseTransformer<InvokeAgentRuntimeResponse, ReturnT> asyncResponseTransformer) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
- Parameters:
invokeAgentRuntimeRequest
-asyncResponseTransformer
- The response transformer for processing the streaming response in a non-blocking manner. SeeAsyncResponseTransformer
for details on how this callback should be implemented and for links to precanned implementations for common scenarios like downloading to a file. The service documentation for the response content is as follows 'The response data from the agent runtime. The format of this data depends on the specific agent configuration and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's request.
'.- Returns:
- A future to the transformed result of the AsyncResponseTransformer.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- RuntimeClientErrorException The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeAgentRuntime
default <ReturnT> CompletableFuture<ReturnT> invokeAgentRuntime(Consumer<InvokeAgentRuntimeRequest.Builder> invokeAgentRuntimeRequest, AsyncResponseTransformer<InvokeAgentRuntimeResponse, ReturnT> asyncResponseTransformer) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
This is a convenience which creates an instance of the
InvokeAgentRuntimeRequest.Builder
avoiding the need to create one manually viaInvokeAgentRuntimeRequest.builder()
- Parameters:
invokeAgentRuntimeRequest
- AConsumer
that will call methods onInvokeAgentRuntimeRequest.Builder
to create a request.asyncResponseTransformer
- The response transformer for processing the streaming response in a non-blocking manner. SeeAsyncResponseTransformer
for details on how this callback should be implemented and for links to precanned implementations for common scenarios like downloading to a file. The service documentation for the response content is as follows 'The response data from the agent runtime. The format of this data depends on the specific agent configuration and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's request.
'.- Returns:
- A future to the transformed result of the AsyncResponseTransformer.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- RuntimeClientErrorException The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeAgentRuntime
default CompletableFuture<InvokeAgentRuntimeResponse> invokeAgentRuntime(InvokeAgentRuntimeRequest invokeAgentRuntimeRequest, Path destinationPath) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
- Parameters:
invokeAgentRuntimeRequest
-destinationPath
-Path
to file that response contents will be written to. The file must not exist or this method will throw an exception. If the file is not writable by the current user then an exception will be thrown. The service documentation for the response content is as follows 'The response data from the agent runtime. The format of this data depends on the specific agent configuration and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's request.
'.- Returns:
- A future to the transformed result of the AsyncResponseTransformer.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- RuntimeClientErrorException The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeAgentRuntime
default CompletableFuture<InvokeAgentRuntimeResponse> invokeAgentRuntime(Consumer<InvokeAgentRuntimeRequest.Builder> invokeAgentRuntimeRequest, Path destinationPath) Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
This is a convenience which creates an instance of the
InvokeAgentRuntimeRequest.Builder
avoiding the need to create one manually viaInvokeAgentRuntimeRequest.builder()
- Parameters:
invokeAgentRuntimeRequest
- AConsumer
that will call methods onInvokeAgentRuntimeRequest.Builder
to create a request.destinationPath
-Path
to file that response contents will be written to. The file must not exist or this method will throw an exception. If the file is not writable by the current user then an exception will be thrown. The service documentation for the response content is as follows 'The response data from the agent runtime. The format of this data depends on the specific agent configuration and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's request.
'.- Returns:
- A future to the transformed result of the AsyncResponseTransformer.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- RuntimeClientErrorException The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeCodeInterpreter
default CompletableFuture<Void> invokeCodeInterpreter(InvokeCodeInterpreterRequest invokeCodeInterpreterRequest, InvokeCodeInterpreterResponseHandler asyncResponseHandler) Executes code within an active code interpreter session in Amazon Bedrock. This operation processes the provided code, runs it in a secure environment, and returns the execution results including output, errors, and generated visualizations.
To execute code, you must specify the code interpreter identifier, session ID, and the code to run in the arguments parameter. The operation returns a stream containing the execution results, which can include text output, error messages, and data visualizations.
This operation is subject to request rate limiting based on your account's service quotas.
The following operations are related to
InvokeCodeInterpreter
:- Parameters:
invokeCodeInterpreterRequest
-- Returns:
- A Java Future containing the result of the InvokeCodeInterpreter operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeCodeInterpreter
default CompletableFuture<Void> invokeCodeInterpreter(Consumer<InvokeCodeInterpreterRequest.Builder> invokeCodeInterpreterRequest, InvokeCodeInterpreterResponseHandler asyncResponseHandler) Executes code within an active code interpreter session in Amazon Bedrock. This operation processes the provided code, runs it in a secure environment, and returns the execution results including output, errors, and generated visualizations.
To execute code, you must specify the code interpreter identifier, session ID, and the code to run in the arguments parameter. The operation returns a stream containing the execution results, which can include text output, error messages, and data visualizations.
This operation is subject to request rate limiting based on your account's service quotas.
The following operations are related to
InvokeCodeInterpreter
:
This is a convenience which creates an instance of the
InvokeCodeInterpreterRequest.Builder
avoiding the need to create one manually viaInvokeCodeInterpreterRequest.builder()
- Parameters:
invokeCodeInterpreterRequest
- AConsumer
that will call methods onInvokeCodeInterpreterRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the InvokeCodeInterpreter operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listActors
Lists all actors in a memory store. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListActors
permission.- Parameters:
listActorsRequest
-- Returns:
- A Java Future containing the result of the ListActors operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listActors
default CompletableFuture<ListActorsResponse> listActors(Consumer<ListActorsRequest.Builder> listActorsRequest) Lists all actors in a memory store. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListActors
permission.
This is a convenience which creates an instance of the
ListActorsRequest.Builder
avoiding the need to create one manually viaListActorsRequest.builder()
- Parameters:
listActorsRequest
- AConsumer
that will call methods onListActorsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListActors operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listActorsPaginator
This is a variant of
listActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListActorsPublisher publisher = client.listActorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListActorsPublisher publisher = client.listActorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListActorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsResponse response) { //... }; });
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
listActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation.- Parameters:
listActorsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listActorsPaginator
default ListActorsPublisher listActorsPaginator(Consumer<ListActorsRequest.Builder> listActorsRequest) This is a variant of
listActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListActorsPublisher publisher = client.listActorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListActorsPublisher publisher = client.listActorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListActorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsResponse response) { //... }; });
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
listActors(software.amazon.awssdk.services.bedrockagentcore.model.ListActorsRequest)
operation.
This is a convenience which creates an instance of the
ListActorsRequest.Builder
avoiding the need to create one manually viaListActorsRequest.builder()
- Parameters:
listActorsRequest
- AConsumer
that will call methods onListActorsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listBrowserSessions
default CompletableFuture<ListBrowserSessionsResponse> listBrowserSessions(ListBrowserSessionsRequest listBrowserSessionsRequest) Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by browser identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to
ListBrowserSessions
:- Parameters:
listBrowserSessionsRequest
-- Returns:
- A Java Future containing the result of the ListBrowserSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listBrowserSessions
default CompletableFuture<ListBrowserSessionsResponse> listBrowserSessions(Consumer<ListBrowserSessionsRequest.Builder> listBrowserSessionsRequest) Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by browser identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to
ListBrowserSessions
:
This is a convenience which creates an instance of the
ListBrowserSessionsRequest.Builder
avoiding the need to create one manually viaListBrowserSessionsRequest.builder()
- Parameters:
listBrowserSessionsRequest
- AConsumer
that will call methods onListBrowserSessionsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListBrowserSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCodeInterpreterSessions
default CompletableFuture<ListCodeInterpreterSessionsResponse> listCodeInterpreterSessions(ListCodeInterpreterSessionsRequest listCodeInterpreterSessionsRequest) Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to
ListCodeInterpreterSessions
:- Parameters:
listCodeInterpreterSessionsRequest
-- Returns:
- A Java Future containing the result of the ListCodeInterpreterSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCodeInterpreterSessions
default CompletableFuture<ListCodeInterpreterSessionsResponse> listCodeInterpreterSessions(Consumer<ListCodeInterpreterSessionsRequest.Builder> listCodeInterpreterSessionsRequest) Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to
ListCodeInterpreterSessions
:
This is a convenience which creates an instance of the
ListCodeInterpreterSessionsRequest.Builder
avoiding the need to create one manually viaListCodeInterpreterSessionsRequest.builder()
- Parameters:
listCodeInterpreterSessionsRequest
- AConsumer
that will call methods onListCodeInterpreterSessionsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListCodeInterpreterSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvents
Lists events in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListEvents
permission.- Parameters:
listEventsRequest
-- Returns:
- A Java Future containing the result of the ListEvents operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvents
default CompletableFuture<ListEventsResponse> listEvents(Consumer<ListEventsRequest.Builder> listEventsRequest) Lists events in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListEvents
permission.
This is a convenience which creates an instance of the
ListEventsRequest.Builder
avoiding the need to create one manually viaListEventsRequest.builder()
- Parameters:
listEventsRequest
- AConsumer
that will call methods onListEventsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListEvents operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEventsPaginator
This is a variant of
listEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListEventsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsResponse response) { //... }; });
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
listEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation.- Parameters:
listEventsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEventsPaginator
default ListEventsPublisher listEventsPaginator(Consumer<ListEventsRequest.Builder> listEventsRequest) This is a variant of
listEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListEventsPublisher publisher = client.listEventsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListEventsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsResponse response) { //... }; });
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
listEvents(software.amazon.awssdk.services.bedrockagentcore.model.ListEventsRequest)
operation.
This is a convenience which creates an instance of the
ListEventsRequest.Builder
avoiding the need to create one manually viaListEventsRequest.builder()
- Parameters:
listEventsRequest
- AConsumer
that will call methods onListEventsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMemoryRecords
default CompletableFuture<ListMemoryRecordsResponse> listMemoryRecords(ListMemoryRecordsRequest listMemoryRecordsRequest) Lists memory records in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListMemoryRecords
permission.- Parameters:
listMemoryRecordsRequest
-- Returns:
- A Java Future containing the result of the ListMemoryRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMemoryRecords
default CompletableFuture<ListMemoryRecordsResponse> listMemoryRecords(Consumer<ListMemoryRecordsRequest.Builder> listMemoryRecordsRequest) Lists memory records in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListMemoryRecords
permission.
This is a convenience which creates an instance of the
ListMemoryRecordsRequest.Builder
avoiding the need to create one manually viaListMemoryRecordsRequest.builder()
- Parameters:
listMemoryRecordsRequest
- AConsumer
that will call methods onListMemoryRecordsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListMemoryRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMemoryRecordsPaginator
default ListMemoryRecordsPublisher listMemoryRecordsPaginator(ListMemoryRecordsRequest listMemoryRecordsRequest) This is a variant of
listMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListMemoryRecordsPublisher publisher = client.listMemoryRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListMemoryRecordsPublisher publisher = client.listMemoryRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsResponse response) { //... }; });
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
listMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation.- Parameters:
listMemoryRecordsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMemoryRecordsPaginator
default ListMemoryRecordsPublisher listMemoryRecordsPaginator(Consumer<ListMemoryRecordsRequest.Builder> listMemoryRecordsRequest) This is a variant of
listMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListMemoryRecordsPublisher publisher = client.listMemoryRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListMemoryRecordsPublisher publisher = client.listMemoryRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsResponse response) { //... }; });
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
listMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.ListMemoryRecordsRequest)
operation.
This is a convenience which creates an instance of the
ListMemoryRecordsRequest.Builder
avoiding the need to create one manually viaListMemoryRecordsRequest.builder()
- Parameters:
listMemoryRecordsRequest
- AConsumer
that will call methods onListMemoryRecordsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSessions
default CompletableFuture<ListSessionsResponse> listSessions(ListSessionsRequest listSessionsRequest) Lists sessions in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListSessions
permission.- Parameters:
listSessionsRequest
-- Returns:
- A Java Future containing the result of the ListSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSessions
default CompletableFuture<ListSessionsResponse> listSessions(Consumer<ListSessionsRequest.Builder> listSessionsRequest) Lists sessions in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListSessions
permission.
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 Java Future containing the result of the ListSessions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSessionsPaginator
This is a variant of
listSessions(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsResponse response) { //... }; });
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.bedrockagentcore.model.ListSessionsRequest)
operation.- Parameters:
listSessionsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSessionsPaginator
default ListSessionsPublisher listSessionsPaginator(Consumer<ListSessionsRequest.Builder> listSessionsRequest) This is a variant of
listSessions(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.ListSessionsResponse response) { //... }; });
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.bedrockagentcore.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 publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
retrieveMemoryRecords
default CompletableFuture<RetrieveMemoryRecordsResponse> retrieveMemoryRecords(RetrieveMemoryRecordsRequest retrieveMemoryRecordsRequest) Searches for and retrieves memory records from a memory store based on specified search criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:RetrieveMemoryRecords
permission.- Parameters:
retrieveMemoryRecordsRequest
-- Returns:
- A Java Future containing the result of the RetrieveMemoryRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
retrieveMemoryRecords
default CompletableFuture<RetrieveMemoryRecordsResponse> retrieveMemoryRecords(Consumer<RetrieveMemoryRecordsRequest.Builder> retrieveMemoryRecordsRequest) Searches for and retrieves memory records from a memory store based on specified search criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:RetrieveMemoryRecords
permission.
This is a convenience which creates an instance of the
RetrieveMemoryRecordsRequest.Builder
avoiding the need to create one manually viaRetrieveMemoryRecordsRequest.builder()
- Parameters:
retrieveMemoryRecordsRequest
- AConsumer
that will call methods onRetrieveMemoryRecordsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the RetrieveMemoryRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
retrieveMemoryRecordsPaginator
default RetrieveMemoryRecordsPublisher retrieveMemoryRecordsPaginator(RetrieveMemoryRecordsRequest retrieveMemoryRecordsRequest) This is a variant of
retrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.RetrieveMemoryRecordsPublisher publisher = client.retrieveMemoryRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.RetrieveMemoryRecordsPublisher publisher = client.retrieveMemoryRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsResponse response) { //... }; });
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
retrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation.- Parameters:
retrieveMemoryRecordsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
retrieveMemoryRecordsPaginator
default RetrieveMemoryRecordsPublisher retrieveMemoryRecordsPaginator(Consumer<RetrieveMemoryRecordsRequest.Builder> retrieveMemoryRecordsRequest) This is a variant of
retrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrockagentcore.paginators.RetrieveMemoryRecordsPublisher publisher = client.retrieveMemoryRecordsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrockagentcore.paginators.RetrieveMemoryRecordsPublisher publisher = client.retrieveMemoryRecordsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsResponse response) { //... }; });
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
retrieveMemoryRecords(software.amazon.awssdk.services.bedrockagentcore.model.RetrieveMemoryRecordsRequest)
operation.
This is a convenience which creates an instance of the
RetrieveMemoryRecordsRequest.Builder
avoiding the need to create one manually viaRetrieveMemoryRecordsRequest.builder()
- Parameters:
retrieveMemoryRecordsRequest
- AConsumer
that will call methods onRetrieveMemoryRecordsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- InvalidInputException The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottledException The request was denied due to request throttling. Reduce the frequency of requests and try again.
- ServiceException The service encountered an internal error. Try your request again later.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startBrowserSession
default CompletableFuture<StartBrowserSessionResponse> startBrowserSession(StartBrowserSessionRequest startBrowserSessionRequest) Creates and initializes a browser session in Amazon Bedrock. The session enables agents to navigate and interact with web content, extract information from websites, and perform web-based tasks as part of their response generation.
To create a session, you must specify a browser identifier and a name. You can also configure the viewport dimensions to control the visible area of web content. The session remains active until it times out or you explicitly stop it using the
StopBrowserSession
operation.The following operations are related to
StartBrowserSession
:- Parameters:
startBrowserSessionRequest
-- Returns:
- A Java Future containing the result of the StartBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startBrowserSession
default CompletableFuture<StartBrowserSessionResponse> startBrowserSession(Consumer<StartBrowserSessionRequest.Builder> startBrowserSessionRequest) Creates and initializes a browser session in Amazon Bedrock. The session enables agents to navigate and interact with web content, extract information from websites, and perform web-based tasks as part of their response generation.
To create a session, you must specify a browser identifier and a name. You can also configure the viewport dimensions to control the visible area of web content. The session remains active until it times out or you explicitly stop it using the
StopBrowserSession
operation.The following operations are related to
StartBrowserSession
:
This is a convenience which creates an instance of the
StartBrowserSessionRequest.Builder
avoiding the need to create one manually viaStartBrowserSessionRequest.builder()
- Parameters:
startBrowserSessionRequest
- AConsumer
that will call methods onStartBrowserSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCodeInterpreterSession
default CompletableFuture<StartCodeInterpreterSessionResponse> startCodeInterpreterSession(StartCodeInterpreterSessionRequest startCodeInterpreterSessionRequest) Creates and initializes a code interpreter session in Amazon Bedrock. The session enables agents to execute code as part of their response generation, supporting programming languages such as Python for data analysis, visualization, and computation tasks.
To create a session, you must specify a code interpreter identifier and a name. The session remains active until it times out or you explicitly stop it using the
StopCodeInterpreterSession
operation.The following operations are related to
StartCodeInterpreterSession
:- Parameters:
startCodeInterpreterSessionRequest
-- Returns:
- A Java Future containing the result of the StartCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCodeInterpreterSession
default CompletableFuture<StartCodeInterpreterSessionResponse> startCodeInterpreterSession(Consumer<StartCodeInterpreterSessionRequest.Builder> startCodeInterpreterSessionRequest) Creates and initializes a code interpreter session in Amazon Bedrock. The session enables agents to execute code as part of their response generation, supporting programming languages such as Python for data analysis, visualization, and computation tasks.
To create a session, you must specify a code interpreter identifier and a name. The session remains active until it times out or you explicitly stop it using the
StopCodeInterpreterSession
operation.The following operations are related to
StartCodeInterpreterSession
:
This is a convenience which creates an instance of the
StartCodeInterpreterSessionRequest.Builder
avoiding the need to create one manually viaStartCodeInterpreterSessionRequest.builder()
- Parameters:
startCodeInterpreterSessionRequest
- AConsumer
that will call methods onStartCodeInterpreterSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopBrowserSession
default CompletableFuture<StopBrowserSessionResponse> stopBrowserSession(StopBrowserSessionRequest stopBrowserSessionRequest) Terminates an active browser session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a browser session, you must specify both the browser identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using
StartBrowserSession
.The following operations are related to
StopBrowserSession
:- Parameters:
stopBrowserSessionRequest
-- Returns:
- A Java Future containing the result of the StopBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopBrowserSession
default CompletableFuture<StopBrowserSessionResponse> stopBrowserSession(Consumer<StopBrowserSessionRequest.Builder> stopBrowserSessionRequest) Terminates an active browser session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a browser session, you must specify both the browser identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using
StartBrowserSession
.The following operations are related to
StopBrowserSession
:
This is a convenience which creates an instance of the
StopBrowserSessionRequest.Builder
avoiding the need to create one manually viaStopBrowserSessionRequest.builder()
- Parameters:
stopBrowserSessionRequest
- AConsumer
that will call methods onStopBrowserSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StopBrowserSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopCodeInterpreterSession
default CompletableFuture<StopCodeInterpreterSessionResponse> stopCodeInterpreterSession(StopCodeInterpreterSessionRequest stopCodeInterpreterSessionRequest) Terminates an active code interpreter session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a code interpreter session, you must specify both the code interpreter identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using
StartCodeInterpreterSession
.The following operations are related to
StopCodeInterpreterSession
:- Parameters:
stopCodeInterpreterSessionRequest
-- Returns:
- A Java Future containing the result of the StopCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopCodeInterpreterSession
default CompletableFuture<StopCodeInterpreterSessionResponse> stopCodeInterpreterSession(Consumer<StopCodeInterpreterSessionRequest.Builder> stopCodeInterpreterSessionRequest) Terminates an active code interpreter session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a code interpreter session, you must specify both the code interpreter identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using
StartCodeInterpreterSession
.The following operations are related to
StopCodeInterpreterSession
:
This is a convenience which creates an instance of the
StopCodeInterpreterSessionRequest.Builder
avoiding the need to create one manually viaStopCodeInterpreterSessionRequest.builder()
- Parameters:
stopCodeInterpreterSessionRequest
- AConsumer
that will call methods onStopCodeInterpreterSessionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StopCodeInterpreterSession operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateBrowserStream
default CompletableFuture<UpdateBrowserStreamResponse> updateBrowserStream(UpdateBrowserStreamRequest updateBrowserStreamRequest) Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.
- Parameters:
updateBrowserStreamRequest
-- Returns:
- A Java Future containing the result of the UpdateBrowserStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateBrowserStream
default CompletableFuture<UpdateBrowserStreamResponse> updateBrowserStream(Consumer<UpdateBrowserStreamRequest.Builder> updateBrowserStreamRequest) Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.
This is a convenience which creates an instance of the
UpdateBrowserStreamRequest.Builder
avoiding the need to create one manually viaUpdateBrowserStreamRequest.builder()
- Parameters:
updateBrowserStreamRequest
- AConsumer
that will call methods onUpdateBrowserStreamRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateBrowserStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ServiceQuotaExceededException The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
- AccessDeniedException The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
- ConflictException The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
- ValidationException The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
- ResourceNotFoundException The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
- ThrottlingException The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
- InternalServerException The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- BedrockAgentCoreException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
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
-
create
Create aBedrockAgentCoreAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aBedrockAgentCoreAsyncClient
.
-