@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonBedrockClient extends AmazonWebServiceClient implements AmazonBedrock
Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.
LOGGING_AWS_REQUEST_METRICENDPOINT_PREFIX| Modifier and Type | Method and Description |
|---|---|
static AmazonBedrockClientBuilder |
builder() |
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.
|
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffsetpublic static AmazonBedrockClientBuilder builder()
public CreateEvaluationJobResult createEvaluationJob(CreateEvaluationJobRequest request)
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 AmazonBedrockcreateEvaluationJobRequest - 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.public CreateGuardrailResult createGuardrail(CreateGuardrailRequest request)
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 AmazonBedrockcreateGuardrailRequest - 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.public CreateGuardrailVersionResult createGuardrailVersion(CreateGuardrailVersionRequest request)
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 AmazonBedrockcreateGuardrailVersionRequest - 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.public CreateModelCustomizationJobResult createModelCustomizationJob(CreateModelCustomizationJobRequest request)
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 AmazonBedrockcreateModelCustomizationJobRequest - 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.public CreateProvisionedModelThroughputResult createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest request)
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 AmazonBedrockcreateProvisionedModelThroughputRequest - 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.public DeleteCustomModelResult deleteCustomModel(DeleteCustomModelRequest request)
Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
deleteCustomModel in interface AmazonBedrockdeleteCustomModelRequest - 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.public DeleteGuardrailResult deleteGuardrail(DeleteGuardrailRequest request)
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 AmazonBedrockdeleteGuardrailRequest - 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.public DeleteModelInvocationLoggingConfigurationResult deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest request)
Delete the invocation logging.
deleteModelInvocationLoggingConfiguration in interface AmazonBedrockdeleteModelInvocationLoggingConfigurationRequest - 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.public DeleteProvisionedModelThroughputResult deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest request)
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 AmazonBedrockdeleteProvisionedModelThroughputRequest - 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.public 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.
getCustomModel in interface AmazonBedrockgetCustomModelRequest - 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.public GetEvaluationJobResult getEvaluationJob(GetEvaluationJobRequest request)
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
getEvaluationJob in interface AmazonBedrockgetEvaluationJobRequest - 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.public GetFoundationModelResult getFoundationModel(GetFoundationModelRequest request)
Get details about a Amazon Bedrock foundation model.
getFoundationModel in interface AmazonBedrockgetFoundationModelRequest - 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.public GetGuardrailResult getGuardrail(GetGuardrailRequest request)
Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT version.
getGuardrail in interface AmazonBedrockgetGuardrailRequest - 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.public GetModelCustomizationJobResult getModelCustomizationJob(GetModelCustomizationJobRequest request)
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 AmazonBedrockgetModelCustomizationJobRequest - 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.public GetModelInvocationLoggingConfigurationResult getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest request)
Get the current configuration values for model invocation logging.
getModelInvocationLoggingConfiguration in interface AmazonBedrockgetModelInvocationLoggingConfigurationRequest - 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.public GetProvisionedModelThroughputResult getProvisionedModelThroughput(GetProvisionedModelThroughputRequest request)
Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
getProvisionedModelThroughput in interface AmazonBedrockgetProvisionedModelThroughputRequest - 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.public ListCustomModelsResult listCustomModels(ListCustomModelsRequest request)
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 AmazonBedrocklistCustomModelsRequest - 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.public ListEvaluationJobsResult listEvaluationJobs(ListEvaluationJobsRequest request)
Lists model evaluation jobs.
listEvaluationJobs in interface AmazonBedrocklistEvaluationJobsRequest - 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.public ListFoundationModelsResult listFoundationModels(ListFoundationModelsRequest request)
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 AmazonBedrocklistFoundationModelsRequest - 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.public ListGuardrailsResult listGuardrails(ListGuardrailsRequest request)
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 AmazonBedrocklistGuardrailsRequest - 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.public ListModelCustomizationJobsResult listModelCustomizationJobs(ListModelCustomizationJobsRequest request)
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 AmazonBedrocklistModelCustomizationJobsRequest - 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.public ListProvisionedModelThroughputsResult listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest request)
Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
listProvisionedModelThroughputs in interface AmazonBedrocklistProvisionedModelThroughputsRequest - 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.public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request)
List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
listTagsForResource in interface AmazonBedrocklistTagsForResourceRequest - 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.public PutModelInvocationLoggingConfigurationResult putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest request)
Set the configuration values for model invocation logging.
putModelInvocationLoggingConfiguration in interface AmazonBedrockputModelInvocationLoggingConfigurationRequest - 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.public StopEvaluationJobResult stopEvaluationJob(StopEvaluationJobRequest request)
Stops an in progress model evaluation job.
stopEvaluationJob in interface AmazonBedrockstopEvaluationJobRequest - 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.public StopModelCustomizationJobResult stopModelCustomizationJob(StopModelCustomizationJobRequest request)
Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
stopModelCustomizationJob in interface AmazonBedrockstopModelCustomizationJobRequest - 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.public TagResourceResult tagResource(TagResourceRequest request)
Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
tagResource in interface AmazonBedrocktagResourceRequest - 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.public UntagResourceResult untagResource(UntagResourceRequest request)
Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
untagResource in interface AmazonBedrockuntagResourceRequest - 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.public UpdateGuardrailResult updateGuardrail(UpdateGuardrailRequest request)
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 AmazonBedrockupdateGuardrailRequest - 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.public UpdateProvisionedModelThroughputResult updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest request)
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 AmazonBedrockupdateProvisionedModelThroughputRequest - 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.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
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 the request.
getCachedResponseMetadata in interface AmazonBedrockrequest - The originally executed requestpublic void shutdown()
AmazonWebServiceClientshutdown in interface AmazonBedrockshutdown in class AmazonWebServiceClient