Interface BedrockAgentRuntimeClient
-
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface BedrockAgentRuntimeClient extends AwsClient
Service client for accessing Agents for Amazon Bedrock Runtime. This can be created using the staticbuilder()
method.Contains APIs related to model invocation and querying of knowledge bases.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.static String
SERVICE_NAME
-
Method Summary
-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
- Constant Field Values
-
-
Method Detail
-
deleteAgentMemory
default DeleteAgentMemoryResponse deleteAgentMemory(DeleteAgentMemoryRequest deleteAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Deletes memory from the specified memory identifier.
- Parameters:
deleteAgentMemoryRequest
-- Returns:
- Result of the DeleteAgentMemory operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
deleteAgentMemory
default DeleteAgentMemoryResponse deleteAgentMemory(Consumer<DeleteAgentMemoryRequest.Builder> deleteAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Deletes memory from the specified memory identifier.
This is a convenience which creates an instance of the
DeleteAgentMemoryRequest.Builder
avoiding the need to create one manually viaDeleteAgentMemoryRequest.builder()
- Parameters:
deleteAgentMemoryRequest
- AConsumer
that will call methods onDeleteAgentMemoryRequest.Builder
to create a request.- Returns:
- Result of the DeleteAgentMemory operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
getAgentMemory
default GetAgentMemoryResponse getAgentMemory(GetAgentMemoryRequest getAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Gets the sessions stored in the memory of the agent.
- Parameters:
getAgentMemoryRequest
-- Returns:
- Result of the GetAgentMemory operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
getAgentMemory
default GetAgentMemoryResponse getAgentMemory(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Gets the sessions stored in the memory of the agent.
This is a convenience which creates an instance of the
GetAgentMemoryRequest.Builder
avoiding the need to create one manually viaGetAgentMemoryRequest.builder()
- Parameters:
getAgentMemoryRequest
- AConsumer
that will call methods onGetAgentMemoryRequest.Builder
to create a request.- Returns:
- Result of the GetAgentMemory operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
getAgentMemoryPaginator
default GetAgentMemoryIterable getAgentMemoryPaginator(GetAgentMemoryRequest getAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
This is a variant of
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client .getAgentMemoryPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.- Parameters:
getAgentMemoryRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
getAgentMemoryPaginator
default GetAgentMemoryIterable getAgentMemoryPaginator(Consumer<GetAgentMemoryRequest.Builder> getAgentMemoryRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
This is a variant of
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client .getAgentMemoryPaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.GetAgentMemoryIterable responses = client.getAgentMemoryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getAgentMemory(software.amazon.awssdk.services.bedrockagentruntime.model.GetAgentMemoryRequest)
operation.
This is a convenience which creates an instance of the
GetAgentMemoryRequest.Builder
avoiding the need to create one manually viaGetAgentMemoryRequest.builder()
- Parameters:
getAgentMemoryRequest
- AConsumer
that will call methods onGetAgentMemoryRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrieve
default RetrieveResponse retrieve(RetrieveRequest retrieveRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Queries a knowledge base and retrieves information from it.
- Parameters:
retrieveRequest
-- Returns:
- Result of the Retrieve operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrieve
default RetrieveResponse retrieve(Consumer<RetrieveRequest.Builder> retrieveRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Queries a knowledge base and retrieves information from it.
This is a convenience which creates an instance of the
RetrieveRequest.Builder
avoiding the need to create one manually viaRetrieveRequest.builder()
- Parameters:
retrieveRequest
- AConsumer
that will call methods onRetrieveRequest.Builder
to create a request.- Returns:
- Result of the Retrieve operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrievePaginator
default RetrieveIterable retrievePaginator(RetrieveRequest retrieveRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
This is a variant of
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.- Parameters:
retrieveRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrievePaginator
default RetrieveIterable retrievePaginator(Consumer<RetrieveRequest.Builder> retrieveRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
This is a variant of
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); for (software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrockagentruntime.paginators.RetrieveIterable responses = client.retrievePaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
retrieve(software.amazon.awssdk.services.bedrockagentruntime.model.RetrieveRequest)
operation.
This is a convenience which creates an instance of the
RetrieveRequest.Builder
avoiding the need to create one manually viaRetrieveRequest.builder()
- Parameters:
retrieveRequest
- AConsumer
that will call methods onRetrieveRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrieveAndGenerate
default RetrieveAndGenerateResponse retrieveAndGenerate(RetrieveAndGenerateRequest retrieveAndGenerateRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Queries a knowledge base and generates responses based on the retrieved results. The response only cites sources that are relevant to the query.
- Parameters:
retrieveAndGenerateRequest
-- Returns:
- Result of the RetrieveAndGenerate operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
retrieveAndGenerate
default RetrieveAndGenerateResponse retrieveAndGenerate(Consumer<RetrieveAndGenerateRequest.Builder> retrieveAndGenerateRequest) throws ConflictException, ResourceNotFoundException, ValidationException, InternalServerException, DependencyFailedException, BadGatewayException, ThrottlingException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, BedrockAgentRuntimeException
Queries a knowledge base and generates responses based on the retrieved results. The response only cites sources that are relevant to the query.
This is a convenience which creates an instance of the
RetrieveAndGenerateRequest.Builder
avoiding the need to create one manually viaRetrieveAndGenerateRequest.builder()
- Parameters:
retrieveAndGenerateRequest
- AConsumer
that will call methods onRetrieveAndGenerateRequest.Builder
to create a request.- Returns:
- Result of the RetrieveAndGenerate operation returned by the service.
- Throws:
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.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.AwsServiceException
- See Also:
- AWS API Documentation
-
create
static BedrockAgentRuntimeClient create()
Create aBedrockAgentRuntimeClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.
-
builder
static BedrockAgentRuntimeClientBuilder builder()
Create a builder that can be used to configure and create aBedrockAgentRuntimeClient
.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default BedrockAgentRuntimeServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
-
-