@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AbstractAmazonBedrock extends Object implements AmazonBedrock
AmazonBedrock
. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException
.ENDPOINT_PREFIX
Modifier and Type | Method and Description |
---|---|
CreateEvaluationJobResult |
createEvaluationJob(CreateEvaluationJobRequest request)
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs
that use human workers.
|
CreateGuardrailResult |
createGuardrail(CreateGuardrailRequest request)
Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
|
CreateGuardrailVersionResult |
createGuardrailVersion(CreateGuardrailVersionRequest request)
Creates a version of the guardrail.
|
CreateModelCustomizationJobResult |
createModelCustomizationJob(CreateModelCustomizationJobRequest request)
Creates a fine-tuning job to customize a base model.
|
CreateProvisionedModelThroughputResult |
createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest request)
Creates dedicated throughput for a base or custom model with the model units and for the duration that you
specify.
|
DeleteCustomModelResult |
deleteCustomModel(DeleteCustomModelRequest request)
Deletes a custom model that you created earlier.
|
DeleteGuardrailResult |
deleteGuardrail(DeleteGuardrailRequest request)
Deletes a guardrail.
|
DeleteModelInvocationLoggingConfigurationResult |
deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest request)
Delete the invocation logging.
|
DeleteProvisionedModelThroughputResult |
deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest request)
Deletes a Provisioned Throughput.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request, typically used for debugging issues
where a service isn't acting as expected.
|
GetCustomModelResult |
getCustomModel(GetCustomModelRequest request)
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.
|
GetEvaluationJobResult |
getEvaluationJob(GetEvaluationJobRequest request)
Retrieves the properties associated with a model evaluation job, including the status of the job.
|
GetFoundationModelResult |
getFoundationModel(GetFoundationModelRequest request)
Get details about a Amazon Bedrock foundation model.
|
GetGuardrailResult |
getGuardrail(GetGuardrailRequest request)
Gets details about a guardrail.
|
GetModelCustomizationJobResult |
getModelCustomizationJob(GetModelCustomizationJobRequest request)
Retrieves the properties associated with a model-customization job, including the status of the job.
|
GetModelInvocationLoggingConfigurationResult |
getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest request)
Get the current configuration values for model invocation logging.
|
GetProvisionedModelThroughputResult |
getProvisionedModelThroughput(GetProvisionedModelThroughputRequest request)
Returns details for a Provisioned Throughput.
|
ListCustomModelsResult |
listCustomModels(ListCustomModelsRequest request)
Returns a list of the custom models that you have created with the
CreateModelCustomizationJob
operation. |
ListEvaluationJobsResult |
listEvaluationJobs(ListEvaluationJobsRequest request)
Lists model evaluation jobs.
|
ListFoundationModelsResult |
listFoundationModels(ListFoundationModelsRequest request)
Lists Amazon Bedrock foundation models that you can use.
|
ListGuardrailsResult |
listGuardrails(ListGuardrailsRequest request)
Lists details about all the guardrails in an account.
|
ListModelCustomizationJobsResult |
listModelCustomizationJobs(ListModelCustomizationJobsRequest request)
Returns a list of model customization jobs that you have submitted.
|
ListProvisionedModelThroughputsResult |
listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest request)
Lists the Provisioned Throughputs in the account.
|
ListTagsForResourceResult |
listTagsForResource(ListTagsForResourceRequest request)
List the tags associated with the specified resource.
|
PutModelInvocationLoggingConfigurationResult |
putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest request)
Set the configuration values for model invocation logging.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held open.
|
StopEvaluationJobResult |
stopEvaluationJob(StopEvaluationJobRequest request)
Stops an in progress model evaluation job.
|
StopModelCustomizationJobResult |
stopModelCustomizationJob(StopModelCustomizationJobRequest request)
Stops an active model customization job.
|
TagResourceResult |
tagResource(TagResourceRequest request)
Associate tags with a resource.
|
UntagResourceResult |
untagResource(UntagResourceRequest request)
Remove one or more tags from a resource.
|
UpdateGuardrailResult |
updateGuardrail(UpdateGuardrailRequest request)
Updates a guardrail with the values you specify.
|
UpdateProvisionedModelThroughputResult |
updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest request)
Updates the name or associated model for a Provisioned Throughput.
|
public CreateEvaluationJobResult createEvaluationJob(CreateEvaluationJobRequest request)
AmazonBedrock
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.
createEvaluationJob
in interface AmazonBedrock
public CreateGuardrailResult createGuardrail(CreateGuardrailRequest request)
AmazonBedrock
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.
createGuardrail
in interface AmazonBedrock
public CreateGuardrailVersionResult createGuardrailVersion(CreateGuardrailVersionRequest request)
AmazonBedrock
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.
createGuardrailVersion
in interface AmazonBedrock
public CreateModelCustomizationJobResult createModelCustomizationJob(CreateModelCustomizationJobRequest request)
AmazonBedrock
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.
createModelCustomizationJob
in interface AmazonBedrock
public CreateProvisionedModelThroughputResult createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest request)
AmazonBedrock
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.
createProvisionedModelThroughput
in interface AmazonBedrock
public DeleteCustomModelResult deleteCustomModel(DeleteCustomModelRequest request)
AmazonBedrock
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
deleteCustomModel
in interface AmazonBedrock
public DeleteGuardrailResult deleteGuardrail(DeleteGuardrailRequest request)
AmazonBedrock
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.
deleteGuardrail
in interface AmazonBedrock
public DeleteModelInvocationLoggingConfigurationResult deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest request)
AmazonBedrock
Delete the invocation logging.
deleteModelInvocationLoggingConfiguration
in interface AmazonBedrock
public DeleteProvisionedModelThroughputResult deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest request)
AmazonBedrock
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.
deleteProvisionedModelThroughput
in interface AmazonBedrock
public GetCustomModelResult getCustomModel(GetCustomModelRequest request)
AmazonBedrock
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.
getCustomModel
in interface AmazonBedrock
public GetEvaluationJobResult getEvaluationJob(GetEvaluationJobRequest request)
AmazonBedrock
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
getEvaluationJob
in interface AmazonBedrock
public GetFoundationModelResult getFoundationModel(GetFoundationModelRequest request)
AmazonBedrock
Get details about a Amazon Bedrock foundation model.
getFoundationModel
in interface AmazonBedrock
public GetGuardrailResult getGuardrail(GetGuardrailRequest request)
AmazonBedrock
Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.
getGuardrail
in interface AmazonBedrock
public GetModelCustomizationJobResult getModelCustomizationJob(GetModelCustomizationJobRequest request)
AmazonBedrock
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.
getModelCustomizationJob
in interface AmazonBedrock
public GetModelInvocationLoggingConfigurationResult getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest request)
AmazonBedrock
Get the current configuration values for model invocation logging.
getModelInvocationLoggingConfiguration
in interface AmazonBedrock
public GetProvisionedModelThroughputResult getProvisionedModelThroughput(GetProvisionedModelThroughputRequest request)
AmazonBedrock
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
getProvisionedModelThroughput
in interface AmazonBedrock
public ListCustomModelsResult listCustomModels(ListCustomModelsRequest request)
AmazonBedrock
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.
listCustomModels
in interface AmazonBedrock
public ListEvaluationJobsResult listEvaluationJobs(ListEvaluationJobsRequest request)
AmazonBedrock
Lists model evaluation jobs.
listEvaluationJobs
in interface AmazonBedrock
public ListFoundationModelsResult listFoundationModels(ListFoundationModelsRequest request)
AmazonBedrock
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.
listFoundationModels
in interface AmazonBedrock
public ListGuardrailsResult listGuardrails(ListGuardrailsRequest request)
AmazonBedrock
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.
listGuardrails
in interface AmazonBedrock
public ListModelCustomizationJobsResult listModelCustomizationJobs(ListModelCustomizationJobsRequest request)
AmazonBedrock
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.
listModelCustomizationJobs
in interface AmazonBedrock
public ListProvisionedModelThroughputsResult listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest request)
AmazonBedrock
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
listProvisionedModelThroughputs
in interface AmazonBedrock
public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request)
AmazonBedrock
List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
listTagsForResource
in interface AmazonBedrock
public PutModelInvocationLoggingConfigurationResult putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest request)
AmazonBedrock
Set the configuration values for model invocation logging.
putModelInvocationLoggingConfiguration
in interface AmazonBedrock
public StopEvaluationJobResult stopEvaluationJob(StopEvaluationJobRequest request)
AmazonBedrock
Stops an in progress model evaluation job.
stopEvaluationJob
in interface AmazonBedrock
public StopModelCustomizationJobResult stopModelCustomizationJob(StopModelCustomizationJobRequest request)
AmazonBedrock
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
stopModelCustomizationJob
in interface AmazonBedrock
public TagResourceResult tagResource(TagResourceRequest request)
AmazonBedrock
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
tagResource
in interface AmazonBedrock
public UntagResourceResult untagResource(UntagResourceRequest request)
AmazonBedrock
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
untagResource
in interface AmazonBedrock
public UpdateGuardrailResult updateGuardrail(UpdateGuardrailRequest request)
AmazonBedrock
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.
updateGuardrail
in interface AmazonBedrock
public UpdateProvisionedModelThroughputResult updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest request)
AmazonBedrock
Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
updateProvisionedModelThroughput
in interface AmazonBedrock
public void shutdown()
AmazonBedrock
shutdown
in interface AmazonBedrock
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
AmazonBedrock
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
getCachedResponseMetadata
in interface AmazonBedrock
request
- The originally executed request.