Interface BedrockAgentRuntimeAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface BedrockAgentRuntimeAsyncClient extends AwsClient
Service client for accessing Agents for Amazon Bedrock Runtime asynchronously. This can be created using the static 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.

Contains APIs related to model invocation and querying of knowledge bases.

  • Field Details

  • Method Details

    • createInvocation

      default CompletableFuture<CreateInvocationResponse> createInvocation(CreateInvocationRequest createInvocationRequest)

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

      Related APIs

      Parameters:
      createInvocationRequest -
      Returns:
      A Java Future containing the result of the CreateInvocation 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createInvocation

      default CompletableFuture<CreateInvocationResponse> createInvocation(Consumer<CreateInvocationRequest.Builder> createInvocationRequest)

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

      Related APIs


      This is a convenience which creates an instance of the CreateInvocationRequest.Builder avoiding the need to create one manually via CreateInvocationRequest.builder()

      Parameters:
      createInvocationRequest - A Consumer that will call methods on CreateInvocationRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateInvocation 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createSession

      default CompletableFuture<CreateSessionResponse> createSession(CreateSessionRequest createSessionRequest)

      Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      By default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata, or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.

      You use a session to store state and conversation history for generative AI applications built with open-source frameworks. For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the InvokeAgent API operation.

      Related APIs:

      Parameters:
      createSessionRequest -
      Returns:
      A Java Future containing the result of the CreateSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createSession

      default CompletableFuture<CreateSessionResponse> createSession(Consumer<CreateSessionRequest.Builder> createSessionRequest)

      Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      By default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata, or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.

      You use a session to store state and conversation history for generative AI applications built with open-source frameworks. For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the InvokeAgent API operation.

      Related APIs:


      This is a convenience which creates an instance of the CreateSessionRequest.Builder avoiding the need to create one manually via CreateSessionRequest.builder()

      Parameters:
      createSessionRequest - A Consumer that will call methods on CreateSessionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteAgentMemory

      default CompletableFuture<DeleteAgentMemoryResponse> deleteAgentMemory(DeleteAgentMemoryRequest deleteAgentMemoryRequest)

      Deletes memory from the specified memory identifier.

      Parameters:
      deleteAgentMemoryRequest -
      Returns:
      A Java Future containing the result of the DeleteAgentMemory 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteAgentMemory

      default CompletableFuture<DeleteAgentMemoryResponse> deleteAgentMemory(Consumer<DeleteAgentMemoryRequest.Builder> deleteAgentMemoryRequest)

      Deletes memory from the specified memory identifier.


      This is a convenience which creates an instance of the DeleteAgentMemoryRequest.Builder avoiding the need to create one manually via DeleteAgentMemoryRequest.builder()

      Parameters:
      deleteAgentMemoryRequest - A Consumer that will call methods on DeleteAgentMemoryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteAgentMemory 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteSession

      default CompletableFuture<DeleteSessionResponse> deleteSession(DeleteSessionRequest deleteSessionRequest)

      Deletes a session that you ended. You can't delete a session with an ACTIVE status. To delete an active session, you must first end it with the EndSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      deleteSessionRequest -
      Returns:
      A Java Future containing the result of the DeleteSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteSession

      default CompletableFuture<DeleteSessionResponse> deleteSession(Consumer<DeleteSessionRequest.Builder> deleteSessionRequest)

      Deletes a session that you ended. You can't delete a session with an ACTIVE status. To delete an active session, you must first end it with the EndSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the DeleteSessionRequest.Builder avoiding the need to create one manually via DeleteSessionRequest.builder()

      Parameters:
      deleteSessionRequest - A Consumer that will call methods on DeleteSessionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • endSession

      default CompletableFuture<EndSessionResponse> endSession(EndSessionRequest endSessionRequest)

      Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      endSessionRequest -
      Returns:
      A Java Future containing the result of the EndSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • endSession

      default CompletableFuture<EndSessionResponse> endSession(Consumer<EndSessionRequest.Builder> endSessionRequest)

      Ends the session. After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the EndSessionRequest.Builder avoiding the need to create one manually via EndSessionRequest.builder()

      Parameters:
      endSessionRequest - A Consumer that will call methods on EndSessionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the EndSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • generateQuery

      default CompletableFuture<GenerateQueryResponse> generateQuery(GenerateQueryRequest generateQueryRequest)

      Generates an SQL query from a natural language query. For more information, see Generate a query for structured data in the Amazon Bedrock User Guide.

      Parameters:
      generateQueryRequest -
      Returns:
      A Java Future containing the result of the GenerateQuery 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • generateQuery

      default CompletableFuture<GenerateQueryResponse> generateQuery(Consumer<GenerateQueryRequest.Builder> generateQueryRequest)

      Generates an SQL query from a natural language query. For more information, see Generate a query for structured data in the Amazon Bedrock User Guide.


      This is a convenience which creates an instance of the GenerateQueryRequest.Builder avoiding the need to create one manually via GenerateQueryRequest.builder()

      Parameters:
      generateQueryRequest - A Consumer that will call methods on GenerateQueryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GenerateQuery 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getAgentMemory

      default CompletableFuture<GetAgentMemoryResponse> getAgentMemory(GetAgentMemoryRequest getAgentMemoryRequest)

      Gets the sessions stored in the memory of the agent.

      Parameters:
      getAgentMemoryRequest -
      Returns:
      A Java Future containing the result of the GetAgentMemory 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getAgentMemory

      default CompletableFuture<GetAgentMemoryResponse> getAgentMemory(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest)

      Gets the sessions stored in the memory of the agent.


      This is a convenience which creates an instance of the GetAgentMemoryRequest.Builder avoiding the need to create one manually via GetAgentMemoryRequest.builder()

      Parameters:
      getAgentMemoryRequest - A Consumer that will call methods on GetAgentMemoryRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetAgentMemory 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getAgentMemoryPaginator

      default GetAgentMemoryPublisher getAgentMemoryPaginator(GetAgentMemoryRequest getAgentMemoryRequest)

      This is a variant of getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryPublisher publisher = client.getAgentMemoryPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryPublisher publisher = client.getAgentMemoryPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest) operation.

      Parameters:
      getAgentMemoryRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getAgentMemoryPaginator

      default GetAgentMemoryPublisher getAgentMemoryPaginator(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest)

      This is a variant of getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryPublisher publisher = client.getAgentMemoryPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryPublisher publisher = client.getAgentMemoryPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest) operation.


      This is a convenience which creates an instance of the GetAgentMemoryRequest.Builder avoiding the need to create one manually via GetAgentMemoryRequest.builder()

      Parameters:
      getAgentMemoryRequest - A Consumer that will call methods on GetAgentMemoryRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getExecutionFlowSnapshot

      default CompletableFuture<GetExecutionFlowSnapshotResponse> getExecutionFlowSnapshot(GetExecutionFlowSnapshotRequest getExecutionFlowSnapshotRequest)

      Retrieves the flow definition snapshot used for a flow execution. The snapshot represents the flow metadata and definition as it existed at the time the execution was started. Note that even if the flow is edited after an execution starts, the snapshot connected to the execution remains unchanged.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.

      Parameters:
      getExecutionFlowSnapshotRequest -
      Returns:
      A Java Future containing the result of the GetExecutionFlowSnapshot 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getExecutionFlowSnapshot

      default CompletableFuture<GetExecutionFlowSnapshotResponse> getExecutionFlowSnapshot(Consumer<GetExecutionFlowSnapshotRequest.Builder> getExecutionFlowSnapshotRequest)

      Retrieves the flow definition snapshot used for a flow execution. The snapshot represents the flow metadata and definition as it existed at the time the execution was started. Note that even if the flow is edited after an execution starts, the snapshot connected to the execution remains unchanged.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.


      This is a convenience which creates an instance of the GetExecutionFlowSnapshotRequest.Builder avoiding the need to create one manually via GetExecutionFlowSnapshotRequest.builder()

      Parameters:
      getExecutionFlowSnapshotRequest - A Consumer that will call methods on GetExecutionFlowSnapshotRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetExecutionFlowSnapshot 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getFlowExecution

      default CompletableFuture<GetFlowExecutionResponse> getFlowExecution(GetFlowExecutionRequest getFlowExecutionRequest)

      Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.

      Parameters:
      getFlowExecutionRequest -
      Returns:
      A Java Future containing the result of the GetFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getFlowExecution

      default CompletableFuture<GetFlowExecutionResponse> getFlowExecution(Consumer<GetFlowExecutionRequest.Builder> getFlowExecutionRequest)

      Retrieves details about a specific flow execution, including its status, start and end times, and any errors that occurred during execution.


      This is a convenience which creates an instance of the GetFlowExecutionRequest.Builder avoiding the need to create one manually via GetFlowExecutionRequest.builder()

      Parameters:
      getFlowExecutionRequest - A Consumer that will call methods on GetFlowExecutionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getInvocationStep

      default CompletableFuture<GetInvocationStepResponse> getInvocationStep(GetInvocationStepRequest getInvocationStepRequest)

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

      Parameters:
      getInvocationStepRequest -
      Returns:
      A Java Future containing the result of the GetInvocationStep 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getInvocationStep

      default CompletableFuture<GetInvocationStepResponse> getInvocationStep(Consumer<GetInvocationStepRequest.Builder> getInvocationStepRequest)

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


      This is a convenience which creates an instance of the GetInvocationStepRequest.Builder avoiding the need to create one manually via GetInvocationStepRequest.builder()

      Parameters:
      getInvocationStepRequest - A Consumer that will call methods on GetInvocationStepRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetInvocationStep 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getSession

      default CompletableFuture<GetSessionResponse> getSession(GetSessionRequest getSessionRequest)

      Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      getSessionRequest -
      Returns:
      A Java Future containing the result of the GetSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getSession

      default CompletableFuture<GetSessionResponse> getSession(Consumer<GetSessionRequest.Builder> getSessionRequest)

      Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the GetSessionRequest.Builder avoiding the need to create one manually via GetSessionRequest.builder()

      Parameters:
      getSessionRequest - A Consumer that will call methods on GetSessionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeAgent

      default CompletableFuture<Void> invokeAgent(InvokeAgentRequest invokeAgentRequest, InvokeAgentResponseHandler asyncResponseHandler)

      Sends a prompt for the agent to process and respond to. Note the following fields for the request:

      • To continue the same conversation with an agent, use the same sessionId value in the request.

      • To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement.

      • End a conversation by setting endSession to true.

      • In the sessionState object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.

      The response contains both chunk and trace attributes.

      The final response is returned in the bytes field of the chunk object. The InvokeAgent returns one chunk for the entire interaction.

      • The attribution object contains citations for parts of the response.

      • If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response.

      • If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the returnControl field.

      • Errors are also surfaced in the response.

      Parameters:
      invokeAgentRequest -
      Returns:
      A Java Future containing the result of the InvokeAgent 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ModelNotReadyException The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeAgent

      default CompletableFuture<Void> invokeAgent(Consumer<InvokeAgentRequest.Builder> invokeAgentRequest, InvokeAgentResponseHandler asyncResponseHandler)

      Sends a prompt for the agent to process and respond to. Note the following fields for the request:

      • To continue the same conversation with an agent, use the same sessionId value in the request.

      • To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement.

      • End a conversation by setting endSession to true.

      • In the sessionState object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.

      The response contains both chunk and trace attributes.

      The final response is returned in the bytes field of the chunk object. The InvokeAgent returns one chunk for the entire interaction.

      • The attribution object contains citations for parts of the response.

      • If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response.

      • If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the returnControl field.

      • Errors are also surfaced in the response.


      This is a convenience which creates an instance of the InvokeAgentRequest.Builder avoiding the need to create one manually via InvokeAgentRequest.builder()

      Parameters:
      invokeAgentRequest - A Consumer that will call methods on InvokeAgentRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the InvokeAgent 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ModelNotReadyException The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behavior in the AWS SDKs and Tools reference guide.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeFlow

      default CompletableFuture<Void> invokeFlow(InvokeFlowRequest invokeFlowRequest, InvokeFlowResponseHandler asyncResponseHandler)

      Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see Test a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

      The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeFlow.

      Parameters:
      invokeFlowRequest -
      Returns:
      A Java Future containing the result of the InvokeFlow 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeFlow

      default CompletableFuture<Void> invokeFlow(Consumer<InvokeFlowRequest.Builder> invokeFlowRequest, InvokeFlowResponseHandler asyncResponseHandler)

      Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see Test a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

      The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeFlow.


      This is a convenience which creates an instance of the InvokeFlowRequest.Builder avoiding the need to create one manually via InvokeFlowRequest.builder()

      Parameters:
      invokeFlowRequest - A Consumer that will call methods on InvokeFlowRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the InvokeFlow 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeInlineAgent

      default CompletableFuture<Void> invokeInlineAgent(InvokeInlineAgentRequest invokeInlineAgentRequest, InvokeInlineAgentResponseHandler asyncResponseHandler)

      Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.

      • Specify the following fields for security purposes.

        • (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.

        • (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session.

      • To override the default prompt behavior for agent orchestration and to use advanced prompts, include a promptOverrideConfiguration object. For more information, see Advanced prompts.

      • The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.

      Parameters:
      invokeInlineAgentRequest -
      Returns:
      A Java Future containing the result of the InvokeInlineAgent 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • invokeInlineAgent

      default CompletableFuture<Void> invokeInlineAgent(Consumer<InvokeInlineAgentRequest.Builder> invokeInlineAgentRequest, InvokeInlineAgentResponseHandler asyncResponseHandler)

      Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.

      • Specify the following fields for security purposes.

        • (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.

        • (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session.

      • To override the default prompt behavior for agent orchestration and to use advanced prompts, include a promptOverrideConfiguration object. For more information, see Advanced prompts.

      • The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.


      This is a convenience which creates an instance of the InvokeInlineAgentRequest.Builder avoiding the need to create one manually via InvokeInlineAgentRequest.builder()

      Parameters:
      invokeInlineAgentRequest - A Consumer that will call methods on InvokeInlineAgentRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the InvokeInlineAgent 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionEvents

      default CompletableFuture<ListFlowExecutionEventsResponse> listFlowExecutionEvents(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest)

      Lists events that occurred during a flow execution. Events provide detailed information about the execution progress, including node inputs and outputs, flow inputs and outputs, condition results, and failure events.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.

      Parameters:
      listFlowExecutionEventsRequest -
      Returns:
      A Java Future containing the result of the ListFlowExecutionEvents 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionEvents

      default CompletableFuture<ListFlowExecutionEventsResponse> listFlowExecutionEvents(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest)

      Lists events that occurred during a flow execution. Events provide detailed information about the execution progress, including node inputs and outputs, flow inputs and outputs, condition results, and failure events.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.


      This is a convenience which creates an instance of the ListFlowExecutionEventsRequest.Builder avoiding the need to create one manually via ListFlowExecutionEventsRequest.builder()

      Parameters:
      listFlowExecutionEventsRequest - A Consumer that will call methods on ListFlowExecutionEventsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListFlowExecutionEvents 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionEventsPaginator

      default ListFlowExecutionEventsPublisher listFlowExecutionEventsPaginator(ListFlowExecutionEventsRequest listFlowExecutionEventsRequest)

      This is a variant of listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsPublisher publisher = client.listFlowExecutionEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsPublisher publisher = client.listFlowExecutionEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest) operation.

      Parameters:
      listFlowExecutionEventsRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionEventsPaginator

      default ListFlowExecutionEventsPublisher listFlowExecutionEventsPaginator(Consumer<ListFlowExecutionEventsRequest.Builder> listFlowExecutionEventsRequest)

      This is a variant of listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsPublisher publisher = client.listFlowExecutionEventsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionEventsPublisher publisher = client.listFlowExecutionEventsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listFlowExecutionEvents(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionEventsRequest) operation.


      This is a convenience which creates an instance of the ListFlowExecutionEventsRequest.Builder avoiding the need to create one manually via ListFlowExecutionEventsRequest.builder()

      Parameters:
      listFlowExecutionEventsRequest - A Consumer that will call methods on ListFlowExecutionEventsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutions

      default CompletableFuture<ListFlowExecutionsResponse> listFlowExecutions(ListFlowExecutionsRequest listFlowExecutionsRequest)

      Lists all executions of a flow. Results can be paginated and include summary information about each execution, such as status, start and end times, and the execution's Amazon Resource Name (ARN).

      Flow executions is in preview release for Amazon Bedrock and is subject to change.

      Parameters:
      listFlowExecutionsRequest -
      Returns:
      A Java Future containing the result of the ListFlowExecutions 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutions

      default CompletableFuture<ListFlowExecutionsResponse> listFlowExecutions(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest)

      Lists all executions of a flow. Results can be paginated and include summary information about each execution, such as status, start and end times, and the execution's Amazon Resource Name (ARN).

      Flow executions is in preview release for Amazon Bedrock and is subject to change.


      This is a convenience which creates an instance of the ListFlowExecutionsRequest.Builder avoiding the need to create one manually via ListFlowExecutionsRequest.builder()

      Parameters:
      listFlowExecutionsRequest - A Consumer that will call methods on ListFlowExecutionsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListFlowExecutions 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionsPaginator

      default ListFlowExecutionsPublisher listFlowExecutionsPaginator(ListFlowExecutionsRequest listFlowExecutionsRequest)

      This is a variant of listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsPublisher publisher = client.listFlowExecutionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsPublisher publisher = client.listFlowExecutionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest) operation.

      Parameters:
      listFlowExecutionsRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listFlowExecutionsPaginator

      default ListFlowExecutionsPublisher listFlowExecutionsPaginator(Consumer<ListFlowExecutionsRequest.Builder> listFlowExecutionsRequest)

      This is a variant of listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsPublisher publisher = client.listFlowExecutionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListFlowExecutionsPublisher publisher = client.listFlowExecutionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listFlowExecutions(software.amazon.awssdk.services.bedrockagentruntime.model.ListFlowExecutionsRequest) operation.


      This is a convenience which creates an instance of the ListFlowExecutionsRequest.Builder avoiding the need to create one manually via ListFlowExecutionsRequest.builder()

      Parameters:
      listFlowExecutionsRequest - A Consumer that will call methods on ListFlowExecutionsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationSteps

      default CompletableFuture<ListInvocationStepsResponse> listInvocationSteps(ListInvocationStepsRequest listInvocationStepsRequest)

      Lists all invocation steps associated with a session and optionally, an invocation within the session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      listInvocationStepsRequest -
      Returns:
      A Java Future containing the result of the ListInvocationSteps 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationSteps

      default CompletableFuture<ListInvocationStepsResponse> listInvocationSteps(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest)

      Lists all invocation steps associated with a session and optionally, an invocation within the session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the ListInvocationStepsRequest.Builder avoiding the need to create one manually via ListInvocationStepsRequest.builder()

      Parameters:
      listInvocationStepsRequest - A Consumer that will call methods on ListInvocationStepsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListInvocationSteps 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationStepsPaginator

      default ListInvocationStepsPublisher listInvocationStepsPaginator(ListInvocationStepsRequest listInvocationStepsRequest)

      This is a variant of listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsPublisher publisher = client.listInvocationStepsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsPublisher publisher = client.listInvocationStepsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest) operation.

      Parameters:
      listInvocationStepsRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationStepsPaginator

      default ListInvocationStepsPublisher listInvocationStepsPaginator(Consumer<ListInvocationStepsRequest.Builder> listInvocationStepsRequest)

      This is a variant of listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsPublisher publisher = client.listInvocationStepsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationStepsPublisher publisher = client.listInvocationStepsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listInvocationSteps(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationStepsRequest) operation.


      This is a convenience which creates an instance of the ListInvocationStepsRequest.Builder avoiding the need to create one manually via ListInvocationStepsRequest.builder()

      Parameters:
      listInvocationStepsRequest - A Consumer that will call methods on ListInvocationStepsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocations

      default CompletableFuture<ListInvocationsResponse> listInvocations(ListInvocationsRequest listInvocationsRequest)

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

      Parameters:
      listInvocationsRequest -
      Returns:
      A Java Future containing the result of the ListInvocations 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocations

      default CompletableFuture<ListInvocationsResponse> listInvocations(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest)

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


      This is a convenience which creates an instance of the ListInvocationsRequest.Builder avoiding the need to create one manually via ListInvocationsRequest.builder()

      Parameters:
      listInvocationsRequest - A Consumer that will call methods on ListInvocationsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListInvocations 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationsPaginator

      default ListInvocationsPublisher listInvocationsPaginator(ListInvocationsRequest listInvocationsRequest)

      This is a variant of listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsPublisher publisher = client.listInvocationsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsPublisher publisher = client.listInvocationsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest) operation.

      Parameters:
      listInvocationsRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listInvocationsPaginator

      default ListInvocationsPublisher listInvocationsPaginator(Consumer<ListInvocationsRequest.Builder> listInvocationsRequest)

      This is a variant of listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsPublisher publisher = client.listInvocationsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListInvocationsPublisher publisher = client.listInvocationsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listInvocations(software.amazon.awssdk.services.bedrockagentruntime.model.ListInvocationsRequest) operation.


      This is a convenience which creates an instance of the ListInvocationsRequest.Builder avoiding the need to create one manually via ListInvocationsRequest.builder()

      Parameters:
      listInvocationsRequest - A Consumer that will call methods on ListInvocationsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException 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 all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      listSessionsRequest -
      Returns:
      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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException 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 all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the ListSessionsRequest.Builder avoiding the need to create one manually via ListSessionsRequest.builder()

      Parameters:
      listSessionsRequest - A Consumer that will call methods on ListSessionsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listSessionsPaginator

      default ListSessionsPublisher listSessionsPaginator(ListSessionsRequest listSessionsRequest)

      This is a variant of listSessions(software.amazon.awssdk.services.bedrockagentruntime.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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest) operation.

      Parameters:
      listSessionsRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException 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.bedrockagentruntime.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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.ListSessionsPublisher publisher = client.listSessionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listSessions(software.amazon.awssdk.services.bedrockagentruntime.model.ListSessionsRequest) operation.


      This is a convenience which creates an instance of the ListSessionsRequest.Builder avoiding the need to create one manually via ListSessionsRequest.builder()

      Parameters:
      listSessionsRequest - A Consumer that will call methods on ListSessionsRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)

      List all the tags for the resource you specify.

      Parameters:
      listTagsForResourceRequest -
      Returns:
      A Java Future containing the result of the ListTagsForResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listTagsForResource

      default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)

      List all the tags for the resource you specify.


      This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the need to create one manually via ListTagsForResourceRequest.builder()

      Parameters:
      listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListTagsForResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • optimizePrompt

      default CompletableFuture<Void> optimizePrompt(OptimizePromptRequest optimizePromptRequest, OptimizePromptResponseHandler asyncResponseHandler)

      Optimizes a prompt for the task that you specify. For more information, see Optimize a prompt in the Amazon Bedrock User Guide.

      Parameters:
      optimizePromptRequest -
      Returns:
      A Java Future containing the result of the OptimizePrompt 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • optimizePrompt

      default CompletableFuture<Void> optimizePrompt(Consumer<OptimizePromptRequest.Builder> optimizePromptRequest, OptimizePromptResponseHandler asyncResponseHandler)

      Optimizes a prompt for the task that you specify. For more information, see Optimize a prompt in the Amazon Bedrock User Guide.


      This is a convenience which creates an instance of the OptimizePromptRequest.Builder avoiding the need to create one manually via OptimizePromptRequest.builder()

      Parameters:
      optimizePromptRequest - A Consumer that will call methods on OptimizePromptRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the OptimizePrompt 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putInvocationStep

      default CompletableFuture<PutInvocationStepResponse> putInvocationStep(PutInvocationStepRequest putInvocationStepRequest)

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

      Related APIs:

      Parameters:
      putInvocationStepRequest -
      Returns:
      A Java Future containing the result of the PutInvocationStep 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putInvocationStep

      default CompletableFuture<PutInvocationStepResponse> putInvocationStep(Consumer<PutInvocationStepRequest.Builder> putInvocationStepRequest)

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

      Related APIs:


      This is a convenience which creates an instance of the PutInvocationStepRequest.Builder avoiding the need to create one manually via PutInvocationStepRequest.builder()

      Parameters:
      putInvocationStepRequest - A Consumer that will call methods on PutInvocationStepRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the PutInvocationStep 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • rerank

      default CompletableFuture<RerankResponse> rerank(RerankRequest rerankRequest)

      Reranks the relevance of sources based on queries. For more information, see Improve the relevance of query responses with a reranker model.

      Parameters:
      rerankRequest -
      Returns:
      A Java Future containing the result of the Rerank 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • rerank

      Reranks the relevance of sources based on queries. For more information, see Improve the relevance of query responses with a reranker model.


      This is a convenience which creates an instance of the RerankRequest.Builder avoiding the need to create one manually via RerankRequest.builder()

      Parameters:
      rerankRequest - A Consumer that will call methods on RerankRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the Rerank 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • rerankPaginator

      default RerankPublisher rerankPaginator(RerankRequest rerankRequest)

      This is a variant of rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankPublisher publisher = client.rerankPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankPublisher publisher = client.rerankPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest) operation.

      Parameters:
      rerankRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • rerankPaginator

      default RerankPublisher rerankPaginator(Consumer<RerankRequest.Builder> rerankRequest)

      This is a variant of rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankPublisher publisher = client.rerankPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RerankPublisher publisher = client.rerankPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.RerankResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the rerank(software.amazon.awssdk.services.bedrockagentruntime.model.RerankRequest) operation.


      This is a convenience which creates an instance of the RerankRequest.Builder avoiding the need to create one manually via RerankRequest.builder()

      Parameters:
      rerankRequest - A Consumer that will call methods on RerankRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieve

      default CompletableFuture<RetrieveResponse> retrieve(RetrieveRequest retrieveRequest)

      Queries a knowledge base and retrieves information from it.

      Parameters:
      retrieveRequest -
      Returns:
      A Java Future containing the result of the Retrieve 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieve

      Queries a knowledge base and retrieves information from it.


      This is a convenience which creates an instance of the RetrieveRequest.Builder avoiding the need to create one manually via RetrieveRequest.builder()

      Parameters:
      retrieveRequest - A Consumer that will call methods on RetrieveRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the Retrieve 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieveAndGenerate

      default CompletableFuture<RetrieveAndGenerateResponse> retrieveAndGenerate(RetrieveAndGenerateRequest retrieveAndGenerateRequest)

      Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile. The response only cites sources that are relevant to the query.

      Parameters:
      retrieveAndGenerateRequest -
      Returns:
      A Java Future containing the result of the RetrieveAndGenerate 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieveAndGenerate

      default CompletableFuture<RetrieveAndGenerateResponse> retrieveAndGenerate(Consumer<RetrieveAndGenerateRequest.Builder> retrieveAndGenerateRequest)

      Queries a knowledge base and generates responses based on the retrieved results and using the specified foundation model or inference profile. The response only cites sources that are relevant to the query.


      This is a convenience which creates an instance of the RetrieveAndGenerateRequest.Builder avoiding the need to create one manually via RetrieveAndGenerateRequest.builder()

      Parameters:
      retrieveAndGenerateRequest - A Consumer that will call methods on RetrieveAndGenerateRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the RetrieveAndGenerate 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieveAndGenerateStream

      default CompletableFuture<Void> retrieveAndGenerateStream(RetrieveAndGenerateStreamRequest retrieveAndGenerateStreamRequest, RetrieveAndGenerateStreamResponseHandler asyncResponseHandler)

      Queries a knowledge base and generates responses based on the retrieved results, with output in streaming format.

      The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream.

      This operation requires permission for the bedrock:RetrieveAndGenerate action.

      Parameters:
      retrieveAndGenerateStreamRequest -
      Returns:
      A Java Future containing the result of the RetrieveAndGenerateStream 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrieveAndGenerateStream

      default CompletableFuture<Void> retrieveAndGenerateStream(Consumer<RetrieveAndGenerateStreamRequest.Builder> retrieveAndGenerateStreamRequest, RetrieveAndGenerateStreamResponseHandler asyncResponseHandler)

      Queries a knowledge base and generates responses based on the retrieved results, with output in streaming format.

      The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream.

      This operation requires permission for the bedrock:RetrieveAndGenerate action.


      This is a convenience which creates an instance of the RetrieveAndGenerateStreamRequest.Builder avoiding the need to create one manually via RetrieveAndGenerateStreamRequest.builder()

      Parameters:
      retrieveAndGenerateStreamRequest - A Consumer that will call methods on RetrieveAndGenerateStreamRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the RetrieveAndGenerateStream 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrievePaginator

      default RetrievePublisher retrievePaginator(RetrieveRequest retrieveRequest)

      This is a variant of retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrievePublisher publisher = client.retrievePaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrievePublisher publisher = client.retrievePaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest) operation.

      Parameters:
      retrieveRequest -
      Returns:
      A custom 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • retrievePaginator

      default RetrievePublisher retrievePaginator(Consumer<RetrieveRequest.Builder> retrieveRequest)

      This is a variant of retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest) 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 new Subscription 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 method
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrievePublisher publisher = client.retrievePaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrievePublisher publisher = client.retrievePaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest) operation.


      This is a convenience which creates an instance of the RetrieveRequest.Builder avoiding the need to create one manually via RetrieveRequest.builder()

      Parameters:
      retrieveRequest - A Consumer that will call methods on RetrieveRequest.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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • startFlowExecution

      default CompletableFuture<StartFlowExecutionResponse> startFlowExecution(StartFlowExecutionRequest startFlowExecutionRequest)

      Starts an execution of an Amazon Bedrock flow. Unlike flows that run until completion or time out after five minutes, flow executions let you run flows asynchronously for longer durations. Flow executions also yield control so that your application can perform other tasks.

      This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow execution.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.

      Parameters:
      startFlowExecutionRequest -
      Returns:
      A Java Future containing the result of the StartFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • startFlowExecution

      default CompletableFuture<StartFlowExecutionResponse> startFlowExecution(Consumer<StartFlowExecutionRequest.Builder> startFlowExecutionRequest)

      Starts an execution of an Amazon Bedrock flow. Unlike flows that run until completion or time out after five minutes, flow executions let you run flows asynchronously for longer durations. Flow executions also yield control so that your application can perform other tasks.

      This operation returns an Amazon Resource Name (ARN) that you can use to track and manage your flow execution.

      Flow executions is in preview release for Amazon Bedrock and is subject to change.


      This is a convenience which creates an instance of the StartFlowExecutionRequest.Builder avoiding the need to create one manually via StartFlowExecutionRequest.builder()

      Parameters:
      startFlowExecutionRequest - A Consumer that will call methods on StartFlowExecutionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the StartFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • stopFlowExecution

      default CompletableFuture<StopFlowExecutionResponse> stopFlowExecution(StopFlowExecutionRequest stopFlowExecutionRequest)

      Stops an Amazon Bedrock flow's execution. This operation prevents further processing of the flow and changes the execution status to Aborted.

      Parameters:
      stopFlowExecutionRequest -
      Returns:
      A Java Future containing the result of the StopFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • stopFlowExecution

      default CompletableFuture<StopFlowExecutionResponse> stopFlowExecution(Consumer<StopFlowExecutionRequest.Builder> stopFlowExecutionRequest)

      Stops an Amazon Bedrock flow's execution. This operation prevents further processing of the flow and changes the execution status to Aborted.


      This is a convenience which creates an instance of the StopFlowExecutionRequest.Builder avoiding the need to create one manually via StopFlowExecutionRequest.builder()

      Parameters:
      stopFlowExecutionRequest - A Consumer that will call methods on StopFlowExecutionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the StopFlowExecution 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • DependencyFailedException There was an issue with a dependency. Check the resource configurations and retry the request.
      • BadGatewayException There was an issue with a dependency due to a server issue. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)

      Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

      Parameters:
      tagResourceRequest -
      Returns:
      A Java Future containing the result of the TagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • tagResource

      default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)

      Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.


      This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to create one manually via TagResourceRequest.builder()

      Parameters:
      tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the TagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)

      Remove tags from a resource.

      Parameters:
      untagResourceRequest -
      Returns:
      A Java Future containing the result of the UntagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • untagResource

      default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)

      Remove tags from a resource.


      This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to create one manually via UntagResourceRequest.builder()

      Parameters:
      untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UntagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateSession

      default CompletableFuture<UpdateSessionResponse> updateSession(UpdateSessionRequest updateSessionRequest)

      Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

      Parameters:
      updateSessionRequest -
      Returns:
      A Java Future containing the result of the UpdateSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateSession

      default CompletableFuture<UpdateSessionResponse> updateSession(Consumer<UpdateSessionRequest.Builder> updateSessionRequest)

      Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.


      This is a convenience which creates an instance of the UpdateSessionRequest.Builder avoiding the need to create one manually via UpdateSessionRequest.builder()

      Parameters:
      updateSessionRequest - A Consumer that will call methods on UpdateSessionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UpdateSession 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ConflictException There was a conflict performing an operation. Resolve the conflict and retry your request.
      • ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      • ValidationException Input validation failed. Check your request parameters and retry the request.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The number of requests exceeds the limit. Resubmit your request later.
      • AccessDeniedException The request is denied because of missing access permissions. Check your permissions and retry your request.
      • 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.
      • BedrockAgentRuntimeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default BedrockAgentRuntimeServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      Create a BedrockAgentRuntimeAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a BedrockAgentRuntimeAsyncClient.