Interface BedrockAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in
some cases such as credentials retrieval and endpoint discovery as part of the async API call.
Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbatchDeleteEvaluationJob
(Consumer<BatchDeleteEvaluationJobRequest.Builder> batchDeleteEvaluationJobRequest) Creates a batch deletion job.batchDeleteEvaluationJob
(BatchDeleteEvaluationJobRequest batchDeleteEvaluationJobRequest) Creates a batch deletion job.static BedrockAsyncClientBuilder
builder()
Create a builder that can be used to configure and create aBedrockAsyncClient
.static BedrockAsyncClient
create()
Create aBedrockAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.createEvaluationJob
(Consumer<CreateEvaluationJobRequest.Builder> createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.createEvaluationJob
(CreateEvaluationJobRequest createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.default CompletableFuture
<CreateGuardrailResponse> createGuardrail
(Consumer<CreateGuardrailRequest.Builder> createGuardrailRequest) Creates a guardrail to block topics and to implement safeguards for your generative AI applications.default CompletableFuture
<CreateGuardrailResponse> createGuardrail
(CreateGuardrailRequest createGuardrailRequest) Creates a guardrail to block topics and to implement safeguards for your generative AI applications.createGuardrailVersion
(Consumer<CreateGuardrailVersionRequest.Builder> createGuardrailVersionRequest) Creates a version of the guardrail.createGuardrailVersion
(CreateGuardrailVersionRequest createGuardrailVersionRequest) Creates a version of the guardrail.createModelCopyJob
(Consumer<CreateModelCopyJobRequest.Builder> createModelCopyJobRequest) Copies a model to another region so that it can be used there.createModelCopyJob
(CreateModelCopyJobRequest createModelCopyJobRequest) Copies a model to another region so that it can be used there.createModelCustomizationJob
(Consumer<CreateModelCustomizationJobRequest.Builder> createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.createModelCustomizationJob
(CreateModelCustomizationJobRequest createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.createModelImportJob
(Consumer<CreateModelImportJobRequest.Builder> createModelImportJobRequest) Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker.createModelImportJob
(CreateModelImportJobRequest createModelImportJobRequest) Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker.createModelInvocationJob
(Consumer<CreateModelInvocationJobRequest.Builder> createModelInvocationJobRequest) Creates a job to invoke a model on multiple prompts (batch inference).createModelInvocationJob
(CreateModelInvocationJobRequest createModelInvocationJobRequest) Creates a job to invoke a model on multiple prompts (batch inference).createProvisionedModelThroughput
(Consumer<CreateProvisionedModelThroughputRequest.Builder> createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify.createProvisionedModelThroughput
(CreateProvisionedModelThroughputRequest createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify.deleteCustomModel
(Consumer<DeleteCustomModelRequest.Builder> deleteCustomModelRequest) Deletes a custom model that you created earlier.deleteCustomModel
(DeleteCustomModelRequest deleteCustomModelRequest) Deletes a custom model that you created earlier.default CompletableFuture
<DeleteGuardrailResponse> deleteGuardrail
(Consumer<DeleteGuardrailRequest.Builder> deleteGuardrailRequest) Deletes a guardrail.default CompletableFuture
<DeleteGuardrailResponse> deleteGuardrail
(DeleteGuardrailRequest deleteGuardrailRequest) Deletes a guardrail.deleteImportedModel
(Consumer<DeleteImportedModelRequest.Builder> deleteImportedModelRequest) Deletes a custom model that you imported earlier.deleteImportedModel
(DeleteImportedModelRequest deleteImportedModelRequest) Deletes a custom model that you imported earlier.deleteModelInvocationLoggingConfiguration
(Consumer<DeleteModelInvocationLoggingConfigurationRequest.Builder> deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.deleteModelInvocationLoggingConfiguration
(DeleteModelInvocationLoggingConfigurationRequest deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.deleteProvisionedModelThroughput
(Consumer<DeleteProvisionedModelThroughputRequest.Builder> deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput.deleteProvisionedModelThroughput
(DeleteProvisionedModelThroughputRequest deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput.default CompletableFuture
<GetCustomModelResponse> getCustomModel
(Consumer<GetCustomModelRequest.Builder> getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.default CompletableFuture
<GetCustomModelResponse> getCustomModel
(GetCustomModelRequest getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.getEvaluationJob
(Consumer<GetEvaluationJobRequest.Builder> getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job.getEvaluationJob
(GetEvaluationJobRequest getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job.getFoundationModel
(Consumer<GetFoundationModelRequest.Builder> getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.getFoundationModel
(GetFoundationModelRequest getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.default CompletableFuture
<GetGuardrailResponse> getGuardrail
(Consumer<GetGuardrailRequest.Builder> getGuardrailRequest) Gets details about a guardrail.default CompletableFuture
<GetGuardrailResponse> getGuardrail
(GetGuardrailRequest getGuardrailRequest) Gets details about a guardrail.getImportedModel
(Consumer<GetImportedModelRequest.Builder> getImportedModelRequest) Gets properties associated with a customized model you imported.getImportedModel
(GetImportedModelRequest getImportedModelRequest) Gets properties associated with a customized model you imported.default CompletableFuture
<GetModelCopyJobResponse> getModelCopyJob
(Consumer<GetModelCopyJobRequest.Builder> getModelCopyJobRequest) Retrieves information about a model copy job.default CompletableFuture
<GetModelCopyJobResponse> getModelCopyJob
(GetModelCopyJobRequest getModelCopyJobRequest) Retrieves information about a model copy job.getModelCustomizationJob
(Consumer<GetModelCustomizationJobRequest.Builder> getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job.getModelCustomizationJob
(GetModelCustomizationJobRequest getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job.getModelImportJob
(Consumer<GetModelImportJobRequest.Builder> getModelImportJobRequest) Retrieves the properties associated with import model job, including the status of the job.getModelImportJob
(GetModelImportJobRequest getModelImportJobRequest) Retrieves the properties associated with import model job, including the status of the job.getModelInvocationJob
(Consumer<GetModelInvocationJobRequest.Builder> getModelInvocationJobRequest) Gets details about a batch inference job.getModelInvocationJob
(GetModelInvocationJobRequest getModelInvocationJobRequest) Gets details about a batch inference job.getModelInvocationLoggingConfiguration
(Consumer<GetModelInvocationLoggingConfigurationRequest.Builder> getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.getModelInvocationLoggingConfiguration
(GetModelInvocationLoggingConfigurationRequest getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.getProvisionedModelThroughput
(Consumer<GetProvisionedModelThroughputRequest.Builder> getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput.getProvisionedModelThroughput
(GetProvisionedModelThroughputRequest getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput.listCustomModels
(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) Returns a list of the custom models that you have created with theCreateModelCustomizationJob
operation.listCustomModels
(ListCustomModelsRequest listCustomModelsRequest) Returns a list of the custom models that you have created with theCreateModelCustomizationJob
operation.default ListCustomModelsPublisher
listCustomModelsPaginator
(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) This is a variant oflistCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.default ListCustomModelsPublisher
listCustomModelsPaginator
(ListCustomModelsRequest listCustomModelsRequest) This is a variant oflistCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.listEvaluationJobs
(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) Lists model evaluation jobs.listEvaluationJobs
(ListEvaluationJobsRequest listEvaluationJobsRequest) Lists model evaluation jobs.default ListEvaluationJobsPublisher
listEvaluationJobsPaginator
(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) This is a variant oflistEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.default ListEvaluationJobsPublisher
listEvaluationJobsPaginator
(ListEvaluationJobsRequest listEvaluationJobsRequest) This is a variant oflistEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.listFoundationModels
(Consumer<ListFoundationModelsRequest.Builder> listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use.listFoundationModels
(ListFoundationModelsRequest listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use.default CompletableFuture
<ListGuardrailsResponse> listGuardrails
(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) Lists details about all the guardrails in an account.default CompletableFuture
<ListGuardrailsResponse> listGuardrails
(ListGuardrailsRequest listGuardrailsRequest) Lists details about all the guardrails in an account.default ListGuardrailsPublisher
listGuardrailsPaginator
(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) This is a variant oflistGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.default ListGuardrailsPublisher
listGuardrailsPaginator
(ListGuardrailsRequest listGuardrailsRequest) This is a variant oflistGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.listImportedModels
(Consumer<ListImportedModelsRequest.Builder> listImportedModelsRequest) Returns a list of models you've imported.listImportedModels
(ListImportedModelsRequest listImportedModelsRequest) Returns a list of models you've imported.default ListImportedModelsPublisher
listImportedModelsPaginator
(Consumer<ListImportedModelsRequest.Builder> listImportedModelsRequest) This is a variant oflistImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation.default ListImportedModelsPublisher
listImportedModelsPaginator
(ListImportedModelsRequest listImportedModelsRequest) This is a variant oflistImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation.listModelCopyJobs
(Consumer<ListModelCopyJobsRequest.Builder> listModelCopyJobsRequest) Returns a list of model copy jobs that you have submitted.listModelCopyJobs
(ListModelCopyJobsRequest listModelCopyJobsRequest) Returns a list of model copy jobs that you have submitted.default ListModelCopyJobsPublisher
listModelCopyJobsPaginator
(Consumer<ListModelCopyJobsRequest.Builder> listModelCopyJobsRequest) This is a variant oflistModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation.default ListModelCopyJobsPublisher
listModelCopyJobsPaginator
(ListModelCopyJobsRequest listModelCopyJobsRequest) This is a variant oflistModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation.listModelCustomizationJobs
(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted.listModelCustomizationJobs
(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted.listModelCustomizationJobsPaginator
(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) This is a variant oflistModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.listModelCustomizationJobsPaginator
(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) This is a variant oflistModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.listModelImportJobs
(Consumer<ListModelImportJobsRequest.Builder> listModelImportJobsRequest) Returns a list of import jobs you've submitted.listModelImportJobs
(ListModelImportJobsRequest listModelImportJobsRequest) Returns a list of import jobs you've submitted.default ListModelImportJobsPublisher
listModelImportJobsPaginator
(Consumer<ListModelImportJobsRequest.Builder> listModelImportJobsRequest) This is a variant oflistModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation.default ListModelImportJobsPublisher
listModelImportJobsPaginator
(ListModelImportJobsRequest listModelImportJobsRequest) This is a variant oflistModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation.listModelInvocationJobs
(Consumer<ListModelInvocationJobsRequest.Builder> listModelInvocationJobsRequest) Lists all batch inference jobs in the account.listModelInvocationJobs
(ListModelInvocationJobsRequest listModelInvocationJobsRequest) Lists all batch inference jobs in the account.default ListModelInvocationJobsPublisher
listModelInvocationJobsPaginator
(Consumer<ListModelInvocationJobsRequest.Builder> listModelInvocationJobsRequest) This is a variant oflistModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation.default ListModelInvocationJobsPublisher
listModelInvocationJobsPaginator
(ListModelInvocationJobsRequest listModelInvocationJobsRequest) This is a variant oflistModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation.listProvisionedModelThroughputs
(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account.listProvisionedModelThroughputs
(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account.listProvisionedModelThroughputsPaginator
(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) This is a variant oflistProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.listProvisionedModelThroughputsPaginator
(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) This is a variant oflistProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) List the tags associated with the specified resource.listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) List the tags associated with the specified resource.putModelInvocationLoggingConfiguration
(Consumer<PutModelInvocationLoggingConfigurationRequest.Builder> putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.putModelInvocationLoggingConfiguration
(PutModelInvocationLoggingConfigurationRequest putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstopEvaluationJob
(Consumer<StopEvaluationJobRequest.Builder> stopEvaluationJobRequest) Stops an in progress model evaluation job.stopEvaluationJob
(StopEvaluationJobRequest stopEvaluationJobRequest) Stops an in progress model evaluation job.stopModelCustomizationJob
(Consumer<StopModelCustomizationJobRequest.Builder> stopModelCustomizationJobRequest) Stops an active model customization job.stopModelCustomizationJob
(StopModelCustomizationJobRequest stopModelCustomizationJobRequest) Stops an active model customization job.stopModelInvocationJob
(Consumer<StopModelInvocationJobRequest.Builder> stopModelInvocationJobRequest) Stops a batch inference job.stopModelInvocationJob
(StopModelInvocationJobRequest stopModelInvocationJobRequest) Stops a batch inference job.default CompletableFuture
<TagResourceResponse> tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associate tags with a resource.default CompletableFuture
<TagResourceResponse> tagResource
(TagResourceRequest tagResourceRequest) Associate tags with a resource.default CompletableFuture
<UntagResourceResponse> untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Remove one or more tags from a resource.default CompletableFuture
<UntagResourceResponse> untagResource
(UntagResourceRequest untagResourceRequest) Remove one or more tags from a resource.default CompletableFuture
<UpdateGuardrailResponse> updateGuardrail
(Consumer<UpdateGuardrailRequest.Builder> updateGuardrailRequest) Updates a guardrail with the values you specify.default CompletableFuture
<UpdateGuardrailResponse> updateGuardrail
(UpdateGuardrailRequest updateGuardrailRequest) Updates a guardrail with the values you specify.updateProvisionedModelThroughput
(Consumer<UpdateProvisionedModelThroughputRequest.Builder> updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput.updateProvisionedModelThroughput
(UpdateProvisionedModelThroughputRequest updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
batchDeleteEvaluationJob
default CompletableFuture<BatchDeleteEvaluationJobResponse> batchDeleteEvaluationJob(BatchDeleteEvaluationJobRequest batchDeleteEvaluationJobRequest) Creates a batch deletion job. A model evaluation job can only be deleted if it has following status
FAILED
,COMPLETED
, andSTOPPED
. You can request up to 25 model evaluation jobs be deleted in a single request.- Parameters:
batchDeleteEvaluationJobRequest
-- Returns:
- A Java Future containing the result of the BatchDeleteEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
batchDeleteEvaluationJob
default CompletableFuture<BatchDeleteEvaluationJobResponse> batchDeleteEvaluationJob(Consumer<BatchDeleteEvaluationJobRequest.Builder> batchDeleteEvaluationJobRequest) Creates a batch deletion job. A model evaluation job can only be deleted if it has following status
FAILED
,COMPLETED
, andSTOPPED
. You can request up to 25 model evaluation jobs be deleted in a single request.
This is a convenience which creates an instance of the
BatchDeleteEvaluationJobRequest.Builder
avoiding the need to create one manually viaBatchDeleteEvaluationJobRequest.builder()
- Parameters:
batchDeleteEvaluationJobRequest
- AConsumer
that will call methods onBatchDeleteEvaluationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the BatchDeleteEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createEvaluationJob
default CompletableFuture<CreateEvaluationJobResponse> createEvaluationJob(CreateEvaluationJobRequest createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation.
- Parameters:
createEvaluationJobRequest
-- Returns:
- A Java Future containing the result of the CreateEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createEvaluationJob
default CompletableFuture<CreateEvaluationJobResponse> createEvaluationJob(Consumer<CreateEvaluationJobRequest.Builder> createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation.
This is a convenience which creates an instance of the
CreateEvaluationJobRequest.Builder
avoiding the need to create one manually viaCreateEvaluationJobRequest.builder()
- Parameters:
createEvaluationJobRequest
- AConsumer
that will call methods onCreateEvaluationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createGuardrail
default CompletableFuture<CreateGuardrailResponse> createGuardrail(CreateGuardrailRequest createGuardrailRequest) Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
-
Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content.
-
Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses.
-
Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc.
-
Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail.
For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide.
- Parameters:
createGuardrailRequest
-- Returns:
- A Java Future containing the result of the CreateGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
createGuardrail
default CompletableFuture<CreateGuardrailResponse> createGuardrail(Consumer<CreateGuardrailRequest.Builder> createGuardrailRequest) Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
-
Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content.
-
Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses.
-
Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc.
-
Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail.
For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateGuardrailRequest.Builder
avoiding the need to create one manually viaCreateGuardrailRequest.builder()
- Parameters:
createGuardrailRequest
- AConsumer
that will call methods onCreateGuardrailRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
createGuardrailVersion
default CompletableFuture<CreateGuardrailVersionResponse> createGuardrailVersion(CreateGuardrailVersionRequest createGuardrailVersionRequest) Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
- Parameters:
createGuardrailVersionRequest
-- Returns:
- A Java Future containing the result of the CreateGuardrailVersion operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createGuardrailVersion
default CompletableFuture<CreateGuardrailVersionResponse> createGuardrailVersion(Consumer<CreateGuardrailVersionRequest.Builder> createGuardrailVersionRequest) Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
This is a convenience which creates an instance of the
CreateGuardrailVersionRequest.Builder
avoiding the need to create one manually viaCreateGuardrailVersionRequest.builder()
- Parameters:
createGuardrailVersionRequest
- AConsumer
that will call methods onCreateGuardrailVersionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateGuardrailVersion operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelCopyJob
default CompletableFuture<CreateModelCopyJobResponse> createModelCopyJob(CreateModelCopyJobRequest createModelCopyJobRequest) Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
- Parameters:
createModelCopyJobRequest
-- Returns:
- A Java Future containing the result of the CreateModelCopyJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelCopyJob
default CompletableFuture<CreateModelCopyJobResponse> createModelCopyJob(Consumer<CreateModelCopyJobRequest.Builder> createModelCopyJobRequest) Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateModelCopyJobRequest.Builder
avoiding the need to create one manually viaCreateModelCopyJobRequest.builder()
- Parameters:
createModelCopyJobRequest
- AConsumer
that will call methods onCreateModelCopyJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateModelCopyJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelCustomizationJob
default CompletableFuture<CreateModelCustomizationJobResponse> createModelCustomizationJob(CreateModelCustomizationJobRequest createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.
You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.
For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the
GetModelCustomizationJob
operation to retrieve the job status.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
createModelCustomizationJobRequest
-- Returns:
- A Java Future containing the result of the CreateModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelCustomizationJob
default CompletableFuture<CreateModelCustomizationJobResponse> createModelCustomizationJob(Consumer<CreateModelCustomizationJobRequest.Builder> createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.
You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.
For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the
GetModelCustomizationJob
operation to retrieve the job status.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaCreateModelCustomizationJobRequest.builder()
- Parameters:
createModelCustomizationJobRequest
- AConsumer
that will call methods onCreateModelCustomizationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelImportJob
default CompletableFuture<CreateModelImportJobResponse> createModelImportJob(CreateModelImportJobRequest createModelImportJobRequest) Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model
- Parameters:
createModelImportJobRequest
-- Returns:
- A Java Future containing the result of the CreateModelImportJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelImportJob
default CompletableFuture<CreateModelImportJobResponse> createModelImportJob(Consumer<CreateModelImportJobRequest.Builder> createModelImportJobRequest) Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model
This is a convenience which creates an instance of the
CreateModelImportJobRequest.Builder
avoiding the need to create one manually viaCreateModelImportJobRequest.builder()
- Parameters:
createModelImportJobRequest
- AConsumer
that will call methods onCreateModelImportJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateModelImportJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelInvocationJob
default CompletableFuture<CreateModelInvocationJobResponse> createModelInvocationJob(CreateModelInvocationJobRequest createModelInvocationJobRequest) Creates a job to invoke a model on multiple prompts (batch inference). Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Create a batch inference job.
The response returns a
jobArn
that you can use to stop or get details about the job. You can check the status of the job by sending a GetModelCustomizationJob request.- Parameters:
createModelInvocationJobRequest
-- Returns:
- A Java Future containing the result of the CreateModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createModelInvocationJob
default CompletableFuture<CreateModelInvocationJobResponse> createModelInvocationJob(Consumer<CreateModelInvocationJobRequest.Builder> createModelInvocationJobRequest) Creates a job to invoke a model on multiple prompts (batch inference). Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Create a batch inference job.
The response returns a
jobArn
that you can use to stop or get details about the job. You can check the status of the job by sending a GetModelCustomizationJob request.
This is a convenience which creates an instance of the
CreateModelInvocationJobRequest.Builder
avoiding the need to create one manually viaCreateModelInvocationJobRequest.builder()
- Parameters:
createModelInvocationJobRequest
- AConsumer
that will call methods onCreateModelInvocationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createProvisionedModelThroughput
default CompletableFuture<CreateProvisionedModelThroughputResponse> createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
createProvisionedModelThroughputRequest
-- Returns:
- A Java Future containing the result of the CreateProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createProvisionedModelThroughput
default CompletableFuture<CreateProvisionedModelThroughputResponse> createProvisionedModelThroughput(Consumer<CreateProvisionedModelThroughputRequest.Builder> createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaCreateProvisionedModelThroughputRequest.builder()
- Parameters:
createProvisionedModelThroughputRequest
- AConsumer
that will call methods onCreateProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCustomModel
default CompletableFuture<DeleteCustomModelResponse> deleteCustomModel(DeleteCustomModelRequest deleteCustomModelRequest) Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
deleteCustomModelRequest
-- Returns:
- A Java Future containing the result of the DeleteCustomModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCustomModel
default CompletableFuture<DeleteCustomModelResponse> deleteCustomModel(Consumer<DeleteCustomModelRequest.Builder> deleteCustomModelRequest) Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteCustomModelRequest.Builder
avoiding the need to create one manually viaDeleteCustomModelRequest.builder()
- Parameters:
deleteCustomModelRequest
- AConsumer
that will call methods onDeleteCustomModelRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteCustomModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteGuardrail
default CompletableFuture<DeleteGuardrailResponse> deleteGuardrail(DeleteGuardrailRequest deleteGuardrailRequest) Deletes a guardrail.
-
To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifier
field. If you delete a guardrail, all of its versions will be deleted. -
To delete a version of a guardrail, specify the ARN of the guardrail in the
guardrailIdentifier
field and the version in theguardrailVersion
field.
- Parameters:
deleteGuardrailRequest
-- Returns:
- A Java Future containing the result of the DeleteGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
deleteGuardrail
default CompletableFuture<DeleteGuardrailResponse> deleteGuardrail(Consumer<DeleteGuardrailRequest.Builder> deleteGuardrailRequest) Deletes a guardrail.
-
To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifier
field. If you delete a guardrail, all of its versions will be deleted. -
To delete a version of a guardrail, specify the ARN of the guardrail in the
guardrailIdentifier
field and the version in theguardrailVersion
field.
This is a convenience which creates an instance of the
DeleteGuardrailRequest.Builder
avoiding the need to create one manually viaDeleteGuardrailRequest.builder()
- Parameters:
deleteGuardrailRequest
- AConsumer
that will call methods onDeleteGuardrailRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
deleteImportedModel
default CompletableFuture<DeleteImportedModelResponse> deleteImportedModel(DeleteImportedModelRequest deleteImportedModelRequest) Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide.
- Parameters:
deleteImportedModelRequest
-- Returns:
- A Java Future containing the result of the DeleteImportedModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteImportedModel
default CompletableFuture<DeleteImportedModelResponse> deleteImportedModel(Consumer<DeleteImportedModelRequest.Builder> deleteImportedModelRequest) Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteImportedModelRequest.Builder
avoiding the need to create one manually viaDeleteImportedModelRequest.builder()
- Parameters:
deleteImportedModelRequest
- AConsumer
that will call methods onDeleteImportedModelRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteImportedModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteModelInvocationLoggingConfiguration
default CompletableFuture<DeleteModelInvocationLoggingConfigurationResponse> deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.
- Parameters:
deleteModelInvocationLoggingConfigurationRequest
-- Returns:
- A Java Future containing the result of the DeleteModelInvocationLoggingConfiguration operation returned
by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteModelInvocationLoggingConfiguration
default CompletableFuture<DeleteModelInvocationLoggingConfigurationResponse> deleteModelInvocationLoggingConfiguration(Consumer<DeleteModelInvocationLoggingConfigurationRequest.Builder> deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.
This is a convenience which creates an instance of the
DeleteModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaDeleteModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
deleteModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onDeleteModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteModelInvocationLoggingConfiguration operation returned
by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteProvisionedModelThroughput
default CompletableFuture<DeleteProvisionedModelThroughputResponse> deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
deleteProvisionedModelThroughputRequest
-- Returns:
- A Java Future containing the result of the DeleteProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteProvisionedModelThroughput
default CompletableFuture<DeleteProvisionedModelThroughputResponse> deleteProvisionedModelThroughput(Consumer<DeleteProvisionedModelThroughputRequest.Builder> deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaDeleteProvisionedModelThroughputRequest.builder()
- Parameters:
deleteProvisionedModelThroughputRequest
- AConsumer
that will call methods onDeleteProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCustomModel
default CompletableFuture<GetCustomModelResponse> getCustomModel(GetCustomModelRequest getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
getCustomModelRequest
-- Returns:
- A Java Future containing the result of the GetCustomModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCustomModel
default CompletableFuture<GetCustomModelResponse> getCustomModel(Consumer<GetCustomModelRequest.Builder> getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetCustomModelRequest.Builder
avoiding the need to create one manually viaGetCustomModelRequest.builder()
- Parameters:
getCustomModelRequest
- AConsumer
that will call methods onGetCustomModelRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetCustomModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEvaluationJob
default CompletableFuture<GetEvaluationJobResponse> getEvaluationJob(GetEvaluationJobRequest getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.
- Parameters:
getEvaluationJobRequest
-- Returns:
- A Java Future containing the result of the GetEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEvaluationJob
default CompletableFuture<GetEvaluationJobResponse> getEvaluationJob(Consumer<GetEvaluationJobRequest.Builder> getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.
This is a convenience which creates an instance of the
GetEvaluationJobRequest.Builder
avoiding the need to create one manually viaGetEvaluationJobRequest.builder()
- Parameters:
getEvaluationJobRequest
- AConsumer
that will call methods onGetEvaluationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getFoundationModel
default CompletableFuture<GetFoundationModelResponse> getFoundationModel(GetFoundationModelRequest getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.
- Parameters:
getFoundationModelRequest
-- Returns:
- A Java Future containing the result of the GetFoundationModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getFoundationModel
default CompletableFuture<GetFoundationModelResponse> getFoundationModel(Consumer<GetFoundationModelRequest.Builder> getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.
This is a convenience which creates an instance of the
GetFoundationModelRequest.Builder
avoiding the need to create one manually viaGetFoundationModelRequest.builder()
- Parameters:
getFoundationModelRequest
- AConsumer
that will call methods onGetFoundationModelRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetFoundationModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getGuardrail
default CompletableFuture<GetGuardrailResponse> getGuardrail(GetGuardrailRequest getGuardrailRequest) Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.- Parameters:
getGuardrailRequest
-- Returns:
- A Java Future containing the result of the GetGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getGuardrail
default CompletableFuture<GetGuardrailResponse> getGuardrail(Consumer<GetGuardrailRequest.Builder> getGuardrailRequest) Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.
This is a convenience which creates an instance of the
GetGuardrailRequest.Builder
avoiding the need to create one manually viaGetGuardrailRequest.builder()
- Parameters:
getGuardrailRequest
- AConsumer
that will call methods onGetGuardrailRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getImportedModel
default CompletableFuture<GetImportedModelResponse> getImportedModel(GetImportedModelRequest getImportedModelRequest) Gets properties associated with a customized model you imported.
- Parameters:
getImportedModelRequest
-- Returns:
- A Java Future containing the result of the GetImportedModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getImportedModel
default CompletableFuture<GetImportedModelResponse> getImportedModel(Consumer<GetImportedModelRequest.Builder> getImportedModelRequest) Gets properties associated with a customized model you imported.
This is a convenience which creates an instance of the
GetImportedModelRequest.Builder
avoiding the need to create one manually viaGetImportedModelRequest.builder()
- Parameters:
getImportedModelRequest
- AConsumer
that will call methods onGetImportedModelRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetImportedModel operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelCopyJob
default CompletableFuture<GetModelCopyJobResponse> getModelCopyJob(GetModelCopyJobRequest getModelCopyJobRequest) Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
- Parameters:
getModelCopyJobRequest
-- Returns:
- A Java Future containing the result of the GetModelCopyJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelCopyJob
default CompletableFuture<GetModelCopyJobResponse> getModelCopyJob(Consumer<GetModelCopyJobRequest.Builder> getModelCopyJobRequest) Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetModelCopyJobRequest.Builder
avoiding the need to create one manually viaGetModelCopyJobRequest.builder()
- Parameters:
getModelCopyJobRequest
- AConsumer
that will call methods onGetModelCopyJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetModelCopyJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelCustomizationJob
default CompletableFuture<GetModelCustomizationJobResponse> getModelCustomizationJob(GetModelCustomizationJobRequest getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
getModelCustomizationJobRequest
-- Returns:
- A Java Future containing the result of the GetModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelCustomizationJob
default CompletableFuture<GetModelCustomizationJobResponse> getModelCustomizationJob(Consumer<GetModelCustomizationJobRequest.Builder> getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaGetModelCustomizationJobRequest.builder()
- Parameters:
getModelCustomizationJobRequest
- AConsumer
that will call methods onGetModelCustomizationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelImportJob
default CompletableFuture<GetModelImportJobResponse> getModelImportJob(GetModelImportJobRequest getModelImportJobRequest) Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.
- Parameters:
getModelImportJobRequest
-- Returns:
- A Java Future containing the result of the GetModelImportJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelImportJob
default CompletableFuture<GetModelImportJobResponse> getModelImportJob(Consumer<GetModelImportJobRequest.Builder> getModelImportJobRequest) Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetModelImportJobRequest.Builder
avoiding the need to create one manually viaGetModelImportJobRequest.builder()
- Parameters:
getModelImportJobRequest
- AConsumer
that will call methods onGetModelImportJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetModelImportJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelInvocationJob
default CompletableFuture<GetModelInvocationJobResponse> getModelInvocationJob(GetModelInvocationJobRequest getModelInvocationJobRequest) Gets details about a batch inference job. For more information, see View details about a batch inference job
- Parameters:
getModelInvocationJobRequest
-- Returns:
- A Java Future containing the result of the GetModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelInvocationJob
default CompletableFuture<GetModelInvocationJobResponse> getModelInvocationJob(Consumer<GetModelInvocationJobRequest.Builder> getModelInvocationJobRequest) Gets details about a batch inference job. For more information, see View details about a batch inference job
This is a convenience which creates an instance of the
GetModelInvocationJobRequest.Builder
avoiding the need to create one manually viaGetModelInvocationJobRequest.builder()
- Parameters:
getModelInvocationJobRequest
- AConsumer
that will call methods onGetModelInvocationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelInvocationLoggingConfiguration
default CompletableFuture<GetModelInvocationLoggingConfigurationResponse> getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.
- Parameters:
getModelInvocationLoggingConfigurationRequest
-- Returns:
- A Java Future containing the result of the GetModelInvocationLoggingConfiguration operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getModelInvocationLoggingConfiguration
default CompletableFuture<GetModelInvocationLoggingConfigurationResponse> getModelInvocationLoggingConfiguration(Consumer<GetModelInvocationLoggingConfigurationRequest.Builder> getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.
This is a convenience which creates an instance of the
GetModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaGetModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
getModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onGetModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetModelInvocationLoggingConfiguration operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProvisionedModelThroughput
default CompletableFuture<GetProvisionedModelThroughputResponse> getProvisionedModelThroughput(GetProvisionedModelThroughputRequest getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
getProvisionedModelThroughputRequest
-- Returns:
- A Java Future containing the result of the GetProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProvisionedModelThroughput
default CompletableFuture<GetProvisionedModelThroughputResponse> getProvisionedModelThroughput(Consumer<GetProvisionedModelThroughputRequest.Builder> getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaGetProvisionedModelThroughputRequest.builder()
- Parameters:
getProvisionedModelThroughputRequest
- AConsumer
that will call methods onGetProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCustomModels
default CompletableFuture<ListCustomModelsResponse> listCustomModels(ListCustomModelsRequest listCustomModelsRequest) Returns a list of the custom models that you have created with the
CreateModelCustomizationJob
operation.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
listCustomModelsRequest
-- Returns:
- A Java Future containing the result of the ListCustomModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCustomModels
default CompletableFuture<ListCustomModelsResponse> listCustomModels(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) Returns a list of the custom models that you have created with the
CreateModelCustomizationJob
operation.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListCustomModelsRequest.Builder
avoiding the need to create one manually viaListCustomModelsRequest.builder()
- Parameters:
listCustomModelsRequest
- AConsumer
that will call methods onListCustomModelsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListCustomModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCustomModelsPaginator
default ListCustomModelsPublisher listCustomModelsPaginator(ListCustomModelsRequest listCustomModelsRequest) This is a variant of
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsPublisher publisher = client.listCustomModelsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListCustomModelsPublisher publisher = client.listCustomModelsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.- Parameters:
listCustomModelsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCustomModelsPaginator
default ListCustomModelsPublisher listCustomModelsPaginator(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) This is a variant of
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsPublisher publisher = client.listCustomModelsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListCustomModelsPublisher publisher = client.listCustomModelsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.
This is a convenience which creates an instance of the
ListCustomModelsRequest.Builder
avoiding the need to create one manually viaListCustomModelsRequest.builder()
- Parameters:
listCustomModelsRequest
- AConsumer
that will call methods onListCustomModelsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvaluationJobs
default CompletableFuture<ListEvaluationJobsResponse> listEvaluationJobs(ListEvaluationJobsRequest listEvaluationJobsRequest) Lists model evaluation jobs.
- Parameters:
listEvaluationJobsRequest
-- Returns:
- A Java Future containing the result of the ListEvaluationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvaluationJobs
default CompletableFuture<ListEvaluationJobsResponse> listEvaluationJobs(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) Lists model evaluation jobs.
This is a convenience which creates an instance of the
ListEvaluationJobsRequest.Builder
avoiding the need to create one manually viaListEvaluationJobsRequest.builder()
- Parameters:
listEvaluationJobsRequest
- AConsumer
that will call methods onListEvaluationJobsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListEvaluationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvaluationJobsPaginator
default ListEvaluationJobsPublisher listEvaluationJobsPaginator(ListEvaluationJobsRequest listEvaluationJobsRequest) This is a variant of
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsPublisher publisher = client.listEvaluationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsPublisher publisher = client.listEvaluationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.- Parameters:
listEvaluationJobsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEvaluationJobsPaginator
default ListEvaluationJobsPublisher listEvaluationJobsPaginator(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) This is a variant of
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsPublisher publisher = client.listEvaluationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsPublisher publisher = client.listEvaluationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.
This is a convenience which creates an instance of the
ListEvaluationJobsRequest.Builder
avoiding the need to create one manually viaListEvaluationJobsRequest.builder()
- Parameters:
listEvaluationJobsRequest
- AConsumer
that will call methods onListEvaluationJobsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFoundationModels
default CompletableFuture<ListFoundationModelsResponse> listFoundationModels(ListFoundationModelsRequest listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
- Parameters:
listFoundationModelsRequest
-- Returns:
- A Java Future containing the result of the ListFoundationModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listFoundationModels
default CompletableFuture<ListFoundationModelsResponse> listFoundationModels(Consumer<ListFoundationModelsRequest.Builder> listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListFoundationModelsRequest.Builder
avoiding the need to create one manually viaListFoundationModelsRequest.builder()
- Parameters:
listFoundationModelsRequest
- AConsumer
that will call methods onListFoundationModelsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListFoundationModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listGuardrails
default CompletableFuture<ListGuardrailsResponse> listGuardrails(ListGuardrailsRequest listGuardrailsRequest) Lists details about all the guardrails in an account. To list the
DRAFT
version of all your guardrails, don't specify theguardrailIdentifier
field. To list all versions of a guardrail, specify the ARN of the guardrail in theguardrailIdentifier
field.You can set the maximum number of results to return in a response in the
maxResults
field. If there are more results than the number you set, the response returns anextToken
that you can send in anotherListGuardrails
request to see the next batch of results.- Parameters:
listGuardrailsRequest
-- Returns:
- A Java Future containing the result of the ListGuardrails operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listGuardrails
default CompletableFuture<ListGuardrailsResponse> listGuardrails(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) Lists details about all the guardrails in an account. To list the
DRAFT
version of all your guardrails, don't specify theguardrailIdentifier
field. To list all versions of a guardrail, specify the ARN of the guardrail in theguardrailIdentifier
field.You can set the maximum number of results to return in a response in the
maxResults
field. If there are more results than the number you set, the response returns anextToken
that you can send in anotherListGuardrails
request to see the next batch of results.
This is a convenience which creates an instance of the
ListGuardrailsRequest.Builder
avoiding the need to create one manually viaListGuardrailsRequest.builder()
- Parameters:
listGuardrailsRequest
- AConsumer
that will call methods onListGuardrailsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListGuardrails operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listGuardrailsPaginator
default ListGuardrailsPublisher listGuardrailsPaginator(ListGuardrailsRequest listGuardrailsRequest) This is a variant of
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsPublisher publisher = client.listGuardrailsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListGuardrailsPublisher publisher = client.listGuardrailsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.- Parameters:
listGuardrailsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listGuardrailsPaginator
default ListGuardrailsPublisher listGuardrailsPaginator(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) This is a variant of
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsPublisher publisher = client.listGuardrailsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListGuardrailsPublisher publisher = client.listGuardrailsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.
This is a convenience which creates an instance of the
ListGuardrailsRequest.Builder
avoiding the need to create one manually viaListGuardrailsRequest.builder()
- Parameters:
listGuardrailsRequest
- AConsumer
that will call methods onListGuardrailsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listImportedModels
default CompletableFuture<ListImportedModelsResponse> listImportedModels(ListImportedModelsRequest listImportedModelsRequest) Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
- Parameters:
listImportedModelsRequest
-- Returns:
- A Java Future containing the result of the ListImportedModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listImportedModels
default CompletableFuture<ListImportedModelsResponse> listImportedModels(Consumer<ListImportedModelsRequest.Builder> listImportedModelsRequest) Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListImportedModelsRequest.Builder
avoiding the need to create one manually viaListImportedModelsRequest.builder()
- Parameters:
listImportedModelsRequest
- AConsumer
that will call methods onListImportedModelsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListImportedModels operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listImportedModelsPaginator
default ListImportedModelsPublisher listImportedModelsPaginator(ListImportedModelsRequest listImportedModelsRequest) This is a variant of
listImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListImportedModelsPublisher publisher = client.listImportedModelsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListImportedModelsPublisher publisher = client.listImportedModelsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListImportedModelsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListImportedModelsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation.- Parameters:
listImportedModelsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listImportedModelsPaginator
default ListImportedModelsPublisher listImportedModelsPaginator(Consumer<ListImportedModelsRequest.Builder> listImportedModelsRequest) This is a variant of
listImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListImportedModelsPublisher publisher = client.listImportedModelsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListImportedModelsPublisher publisher = client.listImportedModelsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListImportedModelsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListImportedModelsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listImportedModels(software.amazon.awssdk.services.bedrock.model.ListImportedModelsRequest)
operation.
This is a convenience which creates an instance of the
ListImportedModelsRequest.Builder
avoiding the need to create one manually viaListImportedModelsRequest.builder()
- Parameters:
listImportedModelsRequest
- AConsumer
that will call methods onListImportedModelsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCopyJobs
default CompletableFuture<ListModelCopyJobsResponse> listModelCopyJobs(ListModelCopyJobsRequest listModelCopyJobsRequest) Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
- Parameters:
listModelCopyJobsRequest
-- Returns:
- A Java Future containing the result of the ListModelCopyJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCopyJobs
default CompletableFuture<ListModelCopyJobsResponse> listModelCopyJobs(Consumer<ListModelCopyJobsRequest.Builder> listModelCopyJobsRequest) Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListModelCopyJobsRequest.Builder
avoiding the need to create one manually viaListModelCopyJobsRequest.builder()
- Parameters:
listModelCopyJobsRequest
- AConsumer
that will call methods onListModelCopyJobsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListModelCopyJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCopyJobsPaginator
default ListModelCopyJobsPublisher listModelCopyJobsPaginator(ListModelCopyJobsRequest listModelCopyJobsRequest) This is a variant of
listModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCopyJobsPublisher publisher = client.listModelCopyJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelCopyJobsPublisher publisher = client.listModelCopyJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation.- Parameters:
listModelCopyJobsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCopyJobsPaginator
default ListModelCopyJobsPublisher listModelCopyJobsPaginator(Consumer<ListModelCopyJobsRequest.Builder> listModelCopyJobsRequest) This is a variant of
listModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCopyJobsPublisher publisher = client.listModelCopyJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelCopyJobsPublisher publisher = client.listModelCopyJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCopyJobs(software.amazon.awssdk.services.bedrock.model.ListModelCopyJobsRequest)
operation.
This is a convenience which creates an instance of the
ListModelCopyJobsRequest.Builder
avoiding the need to create one manually viaListModelCopyJobsRequest.builder()
- Parameters:
listModelCopyJobsRequest
- AConsumer
that will call methods onListModelCopyJobsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCustomizationJobs
default CompletableFuture<ListModelCustomizationJobsResponse> listModelCustomizationJobs(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
listModelCustomizationJobsRequest
-- Returns:
- A Java Future containing the result of the ListModelCustomizationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCustomizationJobs
default CompletableFuture<ListModelCustomizationJobsResponse> listModelCustomizationJobs(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListModelCustomizationJobsRequest.Builder
avoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()
- Parameters:
listModelCustomizationJobsRequest
- AConsumer
that will call methods onListModelCustomizationJobsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListModelCustomizationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCustomizationJobsPaginator
default ListModelCustomizationJobsPublisher listModelCustomizationJobsPaginator(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) This is a variant of
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsPublisher publisher = client.listModelCustomizationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsPublisher publisher = client.listModelCustomizationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.- Parameters:
listModelCustomizationJobsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelCustomizationJobsPaginator
default ListModelCustomizationJobsPublisher listModelCustomizationJobsPaginator(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) This is a variant of
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsPublisher publisher = client.listModelCustomizationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsPublisher publisher = client.listModelCustomizationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.
This is a convenience which creates an instance of the
ListModelCustomizationJobsRequest.Builder
avoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()
- Parameters:
listModelCustomizationJobsRequest
- AConsumer
that will call methods onListModelCustomizationJobsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelImportJobs
default CompletableFuture<ListModelImportJobsResponse> listModelImportJobs(ListModelImportJobsRequest listModelImportJobsRequest) Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
- Parameters:
listModelImportJobsRequest
-- Returns:
- A Java Future containing the result of the ListModelImportJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelImportJobs
default CompletableFuture<ListModelImportJobsResponse> listModelImportJobs(Consumer<ListModelImportJobsRequest.Builder> listModelImportJobsRequest) Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListModelImportJobsRequest.Builder
avoiding the need to create one manually viaListModelImportJobsRequest.builder()
- Parameters:
listModelImportJobsRequest
- AConsumer
that will call methods onListModelImportJobsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListModelImportJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelImportJobsPaginator
default ListModelImportJobsPublisher listModelImportJobsPaginator(ListModelImportJobsRequest listModelImportJobsRequest) This is a variant of
listModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelImportJobsPublisher publisher = client.listModelImportJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelImportJobsPublisher publisher = client.listModelImportJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelImportJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation.- Parameters:
listModelImportJobsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelImportJobsPaginator
default ListModelImportJobsPublisher listModelImportJobsPaginator(Consumer<ListModelImportJobsRequest.Builder> listModelImportJobsRequest) This is a variant of
listModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelImportJobsPublisher publisher = client.listModelImportJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelImportJobsPublisher publisher = client.listModelImportJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelImportJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelImportJobs(software.amazon.awssdk.services.bedrock.model.ListModelImportJobsRequest)
operation.
This is a convenience which creates an instance of the
ListModelImportJobsRequest.Builder
avoiding the need to create one manually viaListModelImportJobsRequest.builder()
- Parameters:
listModelImportJobsRequest
- AConsumer
that will call methods onListModelImportJobsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelInvocationJobs
default CompletableFuture<ListModelInvocationJobsResponse> listModelInvocationJobs(ListModelInvocationJobsRequest listModelInvocationJobsRequest) Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
- Parameters:
listModelInvocationJobsRequest
-- Returns:
- A Java Future containing the result of the ListModelInvocationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelInvocationJobs
default CompletableFuture<ListModelInvocationJobsResponse> listModelInvocationJobs(Consumer<ListModelInvocationJobsRequest.Builder> listModelInvocationJobsRequest) Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
This is a convenience which creates an instance of the
ListModelInvocationJobsRequest.Builder
avoiding the need to create one manually viaListModelInvocationJobsRequest.builder()
- Parameters:
listModelInvocationJobsRequest
- AConsumer
that will call methods onListModelInvocationJobsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListModelInvocationJobs operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelInvocationJobsPaginator
default ListModelInvocationJobsPublisher listModelInvocationJobsPaginator(ListModelInvocationJobsRequest listModelInvocationJobsRequest) This is a variant of
listModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelInvocationJobsPublisher publisher = client.listModelInvocationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelInvocationJobsPublisher publisher = client.listModelInvocationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation.- Parameters:
listModelInvocationJobsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listModelInvocationJobsPaginator
default ListModelInvocationJobsPublisher listModelInvocationJobsPaginator(Consumer<ListModelInvocationJobsRequest.Builder> listModelInvocationJobsRequest) This is a variant of
listModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListModelInvocationJobsPublisher publisher = client.listModelInvocationJobsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListModelInvocationJobsPublisher publisher = client.listModelInvocationJobsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelInvocationJobs(software.amazon.awssdk.services.bedrock.model.ListModelInvocationJobsRequest)
operation.
This is a convenience which creates an instance of the
ListModelInvocationJobsRequest.Builder
avoiding the need to create one manually viaListModelInvocationJobsRequest.builder()
- Parameters:
listModelInvocationJobsRequest
- AConsumer
that will call methods onListModelInvocationJobsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listProvisionedModelThroughputs
default CompletableFuture<ListProvisionedModelThroughputsResponse> listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
listProvisionedModelThroughputsRequest
-- Returns:
- A Java Future containing the result of the ListProvisionedModelThroughputs operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listProvisionedModelThroughputs
default CompletableFuture<ListProvisionedModelThroughputsResponse> listProvisionedModelThroughputs(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListProvisionedModelThroughputsRequest.Builder
avoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()
- Parameters:
listProvisionedModelThroughputsRequest
- AConsumer
that will call methods onListProvisionedModelThroughputsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListProvisionedModelThroughputs operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listProvisionedModelThroughputsPaginator
default ListProvisionedModelThroughputsPublisher listProvisionedModelThroughputsPaginator(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) This is a variant of
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsPublisher publisher = client.listProvisionedModelThroughputsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsPublisher publisher = client.listProvisionedModelThroughputsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.- Parameters:
listProvisionedModelThroughputsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listProvisionedModelThroughputsPaginator
default ListProvisionedModelThroughputsPublisher listProvisionedModelThroughputsPaginator(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) This is a variant of
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsPublisher publisher = client.listProvisionedModelThroughputsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsPublisher publisher = client.listProvisionedModelThroughputsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse response) { //... }; });
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.
This is a convenience which creates an instance of the
ListProvisionedModelThroughputsRequest.Builder
avoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()
- Parameters:
listProvisionedModelThroughputsRequest
- AConsumer
that will call methods onListProvisionedModelThroughputsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException 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 the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
- 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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException 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 the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- 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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
putModelInvocationLoggingConfiguration
default CompletableFuture<PutModelInvocationLoggingConfigurationResponse> putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.
- Parameters:
putModelInvocationLoggingConfigurationRequest
-- Returns:
- A Java Future containing the result of the PutModelInvocationLoggingConfiguration operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
putModelInvocationLoggingConfiguration
default CompletableFuture<PutModelInvocationLoggingConfigurationResponse> putModelInvocationLoggingConfiguration(Consumer<PutModelInvocationLoggingConfigurationRequest.Builder> putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.
This is a convenience which creates an instance of the
PutModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaPutModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
putModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onPutModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the PutModelInvocationLoggingConfiguration operation returned by
the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopEvaluationJob
default CompletableFuture<StopEvaluationJobResponse> stopEvaluationJob(StopEvaluationJobRequest stopEvaluationJobRequest) Stops an in progress model evaluation job.
- Parameters:
stopEvaluationJobRequest
-- Returns:
- A Java Future containing the result of the StopEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopEvaluationJob
default CompletableFuture<StopEvaluationJobResponse> stopEvaluationJob(Consumer<StopEvaluationJobRequest.Builder> stopEvaluationJobRequest) Stops an in progress model evaluation job.
This is a convenience which creates an instance of the
StopEvaluationJobRequest.Builder
avoiding the need to create one manually viaStopEvaluationJobRequest.builder()
- Parameters:
stopEvaluationJobRequest
- AConsumer
that will call methods onStopEvaluationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StopEvaluationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopModelCustomizationJob
default CompletableFuture<StopModelCustomizationJobResponse> stopModelCustomizationJob(StopModelCustomizationJobRequest stopModelCustomizationJobRequest) Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
stopModelCustomizationJobRequest
-- Returns:
- A Java Future containing the result of the StopModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopModelCustomizationJob
default CompletableFuture<StopModelCustomizationJobResponse> stopModelCustomizationJob(Consumer<StopModelCustomizationJobRequest.Builder> stopModelCustomizationJobRequest) Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
StopModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaStopModelCustomizationJobRequest.builder()
- Parameters:
stopModelCustomizationJobRequest
- AConsumer
that will call methods onStopModelCustomizationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StopModelCustomizationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopModelInvocationJob
default CompletableFuture<StopModelInvocationJobResponse> stopModelInvocationJob(StopModelInvocationJobRequest stopModelInvocationJobRequest) Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.
- Parameters:
stopModelInvocationJobRequest
-- Returns:
- A Java Future containing the result of the StopModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
stopModelInvocationJob
default CompletableFuture<StopModelInvocationJobResponse> stopModelInvocationJob(Consumer<StopModelInvocationJobRequest.Builder> stopModelInvocationJobRequest) Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.
This is a convenience which creates an instance of the
StopModelInvocationJobRequest.Builder
avoiding the need to create one manually viaStopModelInvocationJobRequest.builder()
- Parameters:
stopModelInvocationJobRequest
- AConsumer
that will call methods onStopModelInvocationJobRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StopModelInvocationJob operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException 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 viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- InternalServerException An internal server error occurred. Retry your request.
- TooManyTagsException The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException 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 one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
- 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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException 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 one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- 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 invokeThrowable.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.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateGuardrail
default CompletableFuture<UpdateGuardrailResponse> updateGuardrail(UpdateGuardrailRequest updateGuardrailRequest) Updates a guardrail with the values you specify.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field.
- Parameters:
updateGuardrailRequest
-- Returns:
- A Java Future containing the result of the UpdateGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
updateGuardrail
default CompletableFuture<UpdateGuardrailResponse> updateGuardrail(Consumer<UpdateGuardrailRequest.Builder> updateGuardrailRequest) Updates a guardrail with the values you specify.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field.
This is a convenience which creates an instance of the
UpdateGuardrailRequest.Builder
avoiding the need to create one manually viaUpdateGuardrailRequest.builder()
- Parameters:
updateGuardrailRequest
- AConsumer
that will call methods onUpdateGuardrailRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateGuardrail operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- ValidationException Input validation failed. Check your request parameters and retry the request.
- ConflictException Error occurred because of a conflict while performing an operation.
- InternalServerException An internal server error occurred. Retry your request.
- ServiceQuotaExceededException The number of requests exceeds the service quota. Resubmit your request later.
- ThrottlingException The number of requests exceeds the limit. 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
updateProvisionedModelThroughput
default CompletableFuture<UpdateProvisionedModelThroughputResponse> updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
updateProvisionedModelThroughputRequest
-- Returns:
- A Java Future containing the result of the UpdateProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateProvisionedModelThroughput
default CompletableFuture<UpdateProvisionedModelThroughputResponse> updateProvisionedModelThroughput(Consumer<UpdateProvisionedModelThroughputRequest.Builder> updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
UpdateProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaUpdateProvisionedModelThroughputRequest.builder()
- Parameters:
updateProvisionedModelThroughputRequest
- AConsumer
that will call methods onUpdateProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateProvisionedModelThroughput operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ResourceNotFoundException The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
- AccessDeniedException The request is denied because of missing access permissions.
- 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.
- 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.
- BedrockException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aBedrockAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aBedrockAsyncClient
.
-