@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonBedrockAsyncClient extends AmazonBedrockClient implements AmazonBedrockAsync
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
builder, createEvaluationJob, createGuardrail, createGuardrailVersion, createModelCustomizationJob, createProvisionedModelThroughput, deleteCustomModel, deleteGuardrail, deleteModelInvocationLoggingConfiguration, deleteProvisionedModelThroughput, getCachedResponseMetadata, getCustomModel, getEvaluationJob, getFoundationModel, getGuardrail, getModelCustomizationJob, getModelInvocationLoggingConfiguration, getProvisionedModelThroughput, listCustomModels, listEvaluationJobs, listFoundationModels, listGuardrails, listModelCustomizationJobs, listProvisionedModelThroughputs, listTagsForResource, putModelInvocationLoggingConfiguration, stopEvaluationJob, stopModelCustomizationJob, tagResource, untagResource, updateGuardrail, updateProvisionedModelThroughput
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createEvaluationJob, createGuardrail, createGuardrailVersion, createModelCustomizationJob, createProvisionedModelThroughput, deleteCustomModel, deleteGuardrail, deleteModelInvocationLoggingConfiguration, deleteProvisionedModelThroughput, getCachedResponseMetadata, getCustomModel, getEvaluationJob, getFoundationModel, getGuardrail, getModelCustomizationJob, getModelInvocationLoggingConfiguration, getProvisionedModelThroughput, listCustomModels, listEvaluationJobs, listFoundationModels, listGuardrails, listModelCustomizationJobs, listProvisionedModelThroughputs, listTagsForResource, putModelInvocationLoggingConfiguration, stopEvaluationJob, stopModelCustomizationJob, tagResource, untagResource, updateGuardrail, updateProvisionedModelThroughput
public static AmazonBedrockAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<CreateEvaluationJobResult> createEvaluationJobAsync(CreateEvaluationJobRequest request)
AmazonBedrockAsync
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 evaluations.
createEvaluationJobAsync
in interface AmazonBedrockAsync
public Future<CreateEvaluationJobResult> createEvaluationJobAsync(CreateEvaluationJobRequest request, AsyncHandler<CreateEvaluationJobRequest,CreateEvaluationJobResult> asyncHandler)
AmazonBedrockAsync
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 evaluations.
createEvaluationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<CreateGuardrailResult> createGuardrailAsync(CreateGuardrailRequest request)
AmazonBedrockAsync
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.
createGuardrailAsync
in interface AmazonBedrockAsync
public Future<CreateGuardrailResult> createGuardrailAsync(CreateGuardrailRequest request, AsyncHandler<CreateGuardrailRequest,CreateGuardrailResult> asyncHandler)
AmazonBedrockAsync
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.
createGuardrailAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<CreateGuardrailVersionResult> createGuardrailVersionAsync(CreateGuardrailVersionRequest request)
AmazonBedrockAsync
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.
createGuardrailVersionAsync
in interface AmazonBedrockAsync
public Future<CreateGuardrailVersionResult> createGuardrailVersionAsync(CreateGuardrailVersionRequest request, AsyncHandler<CreateGuardrailVersionRequest,CreateGuardrailVersionResult> asyncHandler)
AmazonBedrockAsync
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.
createGuardrailVersionAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<CreateModelCustomizationJobResult> createModelCustomizationJobAsync(CreateModelCustomizationJobRequest request)
AmazonBedrockAsync
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.
createModelCustomizationJobAsync
in interface AmazonBedrockAsync
public Future<CreateModelCustomizationJobResult> createModelCustomizationJobAsync(CreateModelCustomizationJobRequest request, AsyncHandler<CreateModelCustomizationJobRequest,CreateModelCustomizationJobResult> asyncHandler)
AmazonBedrockAsync
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.
createModelCustomizationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<CreateProvisionedModelThroughputResult> createProvisionedModelThroughputAsync(CreateProvisionedModelThroughputRequest request)
AmazonBedrockAsync
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.
createProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
public Future<CreateProvisionedModelThroughputResult> createProvisionedModelThroughputAsync(CreateProvisionedModelThroughputRequest request, AsyncHandler<CreateProvisionedModelThroughputRequest,CreateProvisionedModelThroughputResult> asyncHandler)
AmazonBedrockAsync
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.
createProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteCustomModelResult> deleteCustomModelAsync(DeleteCustomModelRequest request)
AmazonBedrockAsync
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
deleteCustomModelAsync
in interface AmazonBedrockAsync
public Future<DeleteCustomModelResult> deleteCustomModelAsync(DeleteCustomModelRequest request, AsyncHandler<DeleteCustomModelRequest,DeleteCustomModelResult> asyncHandler)
AmazonBedrockAsync
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
deleteCustomModelAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteGuardrailResult> deleteGuardrailAsync(DeleteGuardrailRequest request)
AmazonBedrockAsync
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 the guardrailVersion
field.
deleteGuardrailAsync
in interface AmazonBedrockAsync
public Future<DeleteGuardrailResult> deleteGuardrailAsync(DeleteGuardrailRequest request, AsyncHandler<DeleteGuardrailRequest,DeleteGuardrailResult> asyncHandler)
AmazonBedrockAsync
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 the guardrailVersion
field.
deleteGuardrailAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteModelInvocationLoggingConfigurationResult> deleteModelInvocationLoggingConfigurationAsync(DeleteModelInvocationLoggingConfigurationRequest request)
AmazonBedrockAsync
Delete the invocation logging.
deleteModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
public Future<DeleteModelInvocationLoggingConfigurationResult> deleteModelInvocationLoggingConfigurationAsync(DeleteModelInvocationLoggingConfigurationRequest request, AsyncHandler<DeleteModelInvocationLoggingConfigurationRequest,DeleteModelInvocationLoggingConfigurationResult> asyncHandler)
AmazonBedrockAsync
Delete the invocation logging.
deleteModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<DeleteProvisionedModelThroughputResult> deleteProvisionedModelThroughputAsync(DeleteProvisionedModelThroughputRequest request)
AmazonBedrockAsync
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.
deleteProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
public Future<DeleteProvisionedModelThroughputResult> deleteProvisionedModelThroughputAsync(DeleteProvisionedModelThroughputRequest request, AsyncHandler<DeleteProvisionedModelThroughputRequest,DeleteProvisionedModelThroughputResult> asyncHandler)
AmazonBedrockAsync
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.
deleteProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetCustomModelResult> getCustomModelAsync(GetCustomModelRequest request)
AmazonBedrockAsync
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.
getCustomModelAsync
in interface AmazonBedrockAsync
public Future<GetCustomModelResult> getCustomModelAsync(GetCustomModelRequest request, AsyncHandler<GetCustomModelRequest,GetCustomModelResult> asyncHandler)
AmazonBedrockAsync
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.
getCustomModelAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetEvaluationJobResult> getEvaluationJobAsync(GetEvaluationJobRequest request)
AmazonBedrockAsync
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
getEvaluationJobAsync
in interface AmazonBedrockAsync
public Future<GetEvaluationJobResult> getEvaluationJobAsync(GetEvaluationJobRequest request, AsyncHandler<GetEvaluationJobRequest,GetEvaluationJobResult> asyncHandler)
AmazonBedrockAsync
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
getEvaluationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetFoundationModelResult> getFoundationModelAsync(GetFoundationModelRequest request)
AmazonBedrockAsync
Get details about a Amazon Bedrock foundation model.
getFoundationModelAsync
in interface AmazonBedrockAsync
public Future<GetFoundationModelResult> getFoundationModelAsync(GetFoundationModelRequest request, AsyncHandler<GetFoundationModelRequest,GetFoundationModelResult> asyncHandler)
AmazonBedrockAsync
Get details about a Amazon Bedrock foundation model.
getFoundationModelAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetGuardrailResult> getGuardrailAsync(GetGuardrailRequest request)
AmazonBedrockAsync
Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.
getGuardrailAsync
in interface AmazonBedrockAsync
public Future<GetGuardrailResult> getGuardrailAsync(GetGuardrailRequest request, AsyncHandler<GetGuardrailRequest,GetGuardrailResult> asyncHandler)
AmazonBedrockAsync
Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.
getGuardrailAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetModelCustomizationJobResult> getModelCustomizationJobAsync(GetModelCustomizationJobRequest request)
AmazonBedrockAsync
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.
getModelCustomizationJobAsync
in interface AmazonBedrockAsync
public Future<GetModelCustomizationJobResult> getModelCustomizationJobAsync(GetModelCustomizationJobRequest request, AsyncHandler<GetModelCustomizationJobRequest,GetModelCustomizationJobResult> asyncHandler)
AmazonBedrockAsync
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.
getModelCustomizationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetModelInvocationLoggingConfigurationResult> getModelInvocationLoggingConfigurationAsync(GetModelInvocationLoggingConfigurationRequest request)
AmazonBedrockAsync
Get the current configuration values for model invocation logging.
getModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
public Future<GetModelInvocationLoggingConfigurationResult> getModelInvocationLoggingConfigurationAsync(GetModelInvocationLoggingConfigurationRequest request, AsyncHandler<GetModelInvocationLoggingConfigurationRequest,GetModelInvocationLoggingConfigurationResult> asyncHandler)
AmazonBedrockAsync
Get the current configuration values for model invocation logging.
getModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetProvisionedModelThroughputResult> getProvisionedModelThroughputAsync(GetProvisionedModelThroughputRequest request)
AmazonBedrockAsync
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
getProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
public Future<GetProvisionedModelThroughputResult> getProvisionedModelThroughputAsync(GetProvisionedModelThroughputRequest request, AsyncHandler<GetProvisionedModelThroughputRequest,GetProvisionedModelThroughputResult> asyncHandler)
AmazonBedrockAsync
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
getProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListCustomModelsResult> listCustomModelsAsync(ListCustomModelsRequest request)
AmazonBedrockAsync
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.
listCustomModelsAsync
in interface AmazonBedrockAsync
public Future<ListCustomModelsResult> listCustomModelsAsync(ListCustomModelsRequest request, AsyncHandler<ListCustomModelsRequest,ListCustomModelsResult> asyncHandler)
AmazonBedrockAsync
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.
listCustomModelsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListEvaluationJobsResult> listEvaluationJobsAsync(ListEvaluationJobsRequest request)
AmazonBedrockAsync
Lists model evaluation jobs.
listEvaluationJobsAsync
in interface AmazonBedrockAsync
public Future<ListEvaluationJobsResult> listEvaluationJobsAsync(ListEvaluationJobsRequest request, AsyncHandler<ListEvaluationJobsRequest,ListEvaluationJobsResult> asyncHandler)
AmazonBedrockAsync
Lists model evaluation jobs.
listEvaluationJobsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListFoundationModelsResult> listFoundationModelsAsync(ListFoundationModelsRequest request)
AmazonBedrockAsync
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.
listFoundationModelsAsync
in interface AmazonBedrockAsync
public Future<ListFoundationModelsResult> listFoundationModelsAsync(ListFoundationModelsRequest request, AsyncHandler<ListFoundationModelsRequest,ListFoundationModelsResult> asyncHandler)
AmazonBedrockAsync
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.
listFoundationModelsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListGuardrailsResult> listGuardrailsAsync(ListGuardrailsRequest request)
AmazonBedrockAsync
Lists details about all the guardrails in an account. To list the DRAFT
version of all your
guardrails, don't specify the guardrailIdentifier
field. To list all versions of a guardrail,
specify the ARN of the guardrail in the guardrailIdentifier
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 a nextToken
that you can send in
another ListGuardrails
request to see the next batch of results.
listGuardrailsAsync
in interface AmazonBedrockAsync
public Future<ListGuardrailsResult> listGuardrailsAsync(ListGuardrailsRequest request, AsyncHandler<ListGuardrailsRequest,ListGuardrailsResult> asyncHandler)
AmazonBedrockAsync
Lists details about all the guardrails in an account. To list the DRAFT
version of all your
guardrails, don't specify the guardrailIdentifier
field. To list all versions of a guardrail,
specify the ARN of the guardrail in the guardrailIdentifier
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 a nextToken
that you can send in
another ListGuardrails
request to see the next batch of results.
listGuardrailsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListModelCustomizationJobsResult> listModelCustomizationJobsAsync(ListModelCustomizationJobsRequest request)
AmazonBedrockAsync
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.
listModelCustomizationJobsAsync
in interface AmazonBedrockAsync
public Future<ListModelCustomizationJobsResult> listModelCustomizationJobsAsync(ListModelCustomizationJobsRequest request, AsyncHandler<ListModelCustomizationJobsRequest,ListModelCustomizationJobsResult> asyncHandler)
AmazonBedrockAsync
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.
listModelCustomizationJobsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListProvisionedModelThroughputsResult> listProvisionedModelThroughputsAsync(ListProvisionedModelThroughputsRequest request)
AmazonBedrockAsync
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
listProvisionedModelThroughputsAsync
in interface AmazonBedrockAsync
public Future<ListProvisionedModelThroughputsResult> listProvisionedModelThroughputsAsync(ListProvisionedModelThroughputsRequest request, AsyncHandler<ListProvisionedModelThroughputsRequest,ListProvisionedModelThroughputsResult> asyncHandler)
AmazonBedrockAsync
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
listProvisionedModelThroughputsAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request)
AmazonBedrockAsync
List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
listTagsForResourceAsync
in interface AmazonBedrockAsync
public Future<ListTagsForResourceResult> listTagsForResourceAsync(ListTagsForResourceRequest request, AsyncHandler<ListTagsForResourceRequest,ListTagsForResourceResult> asyncHandler)
AmazonBedrockAsync
List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
listTagsForResourceAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<PutModelInvocationLoggingConfigurationResult> putModelInvocationLoggingConfigurationAsync(PutModelInvocationLoggingConfigurationRequest request)
AmazonBedrockAsync
Set the configuration values for model invocation logging.
putModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
public Future<PutModelInvocationLoggingConfigurationResult> putModelInvocationLoggingConfigurationAsync(PutModelInvocationLoggingConfigurationRequest request, AsyncHandler<PutModelInvocationLoggingConfigurationRequest,PutModelInvocationLoggingConfigurationResult> asyncHandler)
AmazonBedrockAsync
Set the configuration values for model invocation logging.
putModelInvocationLoggingConfigurationAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<StopEvaluationJobResult> stopEvaluationJobAsync(StopEvaluationJobRequest request)
AmazonBedrockAsync
Stops an in progress model evaluation job.
stopEvaluationJobAsync
in interface AmazonBedrockAsync
public Future<StopEvaluationJobResult> stopEvaluationJobAsync(StopEvaluationJobRequest request, AsyncHandler<StopEvaluationJobRequest,StopEvaluationJobResult> asyncHandler)
AmazonBedrockAsync
Stops an in progress model evaluation job.
stopEvaluationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<StopModelCustomizationJobResult> stopModelCustomizationJobAsync(StopModelCustomizationJobRequest request)
AmazonBedrockAsync
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
stopModelCustomizationJobAsync
in interface AmazonBedrockAsync
public Future<StopModelCustomizationJobResult> stopModelCustomizationJobAsync(StopModelCustomizationJobRequest request, AsyncHandler<StopModelCustomizationJobRequest,StopModelCustomizationJobResult> asyncHandler)
AmazonBedrockAsync
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
stopModelCustomizationJobAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<TagResourceResult> tagResourceAsync(TagResourceRequest request)
AmazonBedrockAsync
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
tagResourceAsync
in interface AmazonBedrockAsync
public Future<TagResourceResult> tagResourceAsync(TagResourceRequest request, AsyncHandler<TagResourceRequest,TagResourceResult> asyncHandler)
AmazonBedrockAsync
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
tagResourceAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request)
AmazonBedrockAsync
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
untagResourceAsync
in interface AmazonBedrockAsync
public Future<UntagResourceResult> untagResourceAsync(UntagResourceRequest request, AsyncHandler<UntagResourceRequest,UntagResourceResult> asyncHandler)
AmazonBedrockAsync
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
untagResourceAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UpdateGuardrailResult> updateGuardrailAsync(UpdateGuardrailRequest request)
AmazonBedrockAsync
Updates a guardrail with the values you specify.
Specify a name
and optional description
.
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
and blockedOutputsMessaging
fields.
Specify topics for the guardrail to deny in the topicPolicyConfig
object. Each GuardrailTopicConfig object in the topicsConfig
list pertains to one topic.
Give a name
and description
so that the guardrail can properly identify the topic.
Specify DENY
in the type
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 the filtersConfig
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
the strength
field of the GuardrailContentFilterConfig.
(Optional) For security, include the ARN of a KMS key in the kmsKeyId
field.
updateGuardrailAsync
in interface AmazonBedrockAsync
public Future<UpdateGuardrailResult> updateGuardrailAsync(UpdateGuardrailRequest request, AsyncHandler<UpdateGuardrailRequest,UpdateGuardrailResult> asyncHandler)
AmazonBedrockAsync
Updates a guardrail with the values you specify.
Specify a name
and optional description
.
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
and blockedOutputsMessaging
fields.
Specify topics for the guardrail to deny in the topicPolicyConfig
object. Each GuardrailTopicConfig object in the topicsConfig
list pertains to one topic.
Give a name
and description
so that the guardrail can properly identify the topic.
Specify DENY
in the type
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 the filtersConfig
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
the strength
field of the GuardrailContentFilterConfig.
(Optional) For security, include the ARN of a KMS key in the kmsKeyId
field.
updateGuardrailAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UpdateProvisionedModelThroughputResult> updateProvisionedModelThroughputAsync(UpdateProvisionedModelThroughputRequest request)
AmazonBedrockAsync
Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
updateProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
public Future<UpdateProvisionedModelThroughputResult> updateProvisionedModelThroughputAsync(UpdateProvisionedModelThroughputRequest request, AsyncHandler<UpdateProvisionedModelThroughputRequest,UpdateProvisionedModelThroughputResult> asyncHandler)
AmazonBedrockAsync
Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
updateProvisionedModelThroughputAsync
in interface AmazonBedrockAsync
asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public void shutdown()
getExecutorService().shutdown()
followed by getExecutorService().awaitTermination()
prior to
calling this method.shutdown
in interface AmazonBedrock
shutdown
in class AmazonBedrockClient