Interface BedrockClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
Describes the API operations for creating, managing, fine-turning, and evaluating Amazon Bedrock models.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic BedrockClientBuilder
builder()
Create a builder that can be used to configure and create aBedrockClient
.static BedrockClient
create()
Create aBedrockClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CreateEvaluationJobResponse
createEvaluationJob
(Consumer<CreateEvaluationJobRequest.Builder> createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.default CreateEvaluationJobResponse
createEvaluationJob
(CreateEvaluationJobRequest createEvaluationJobRequest) API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.default CreateGuardrailResponse
createGuardrail
(Consumer<CreateGuardrailRequest.Builder> createGuardrailRequest) Creates a guardrail to block topics and to filter out harmful content.default CreateGuardrailResponse
createGuardrail
(CreateGuardrailRequest createGuardrailRequest) Creates a guardrail to block topics and to filter out harmful content.default CreateGuardrailVersionResponse
createGuardrailVersion
(Consumer<CreateGuardrailVersionRequest.Builder> createGuardrailVersionRequest) Creates a version of the guardrail.default CreateGuardrailVersionResponse
createGuardrailVersion
(CreateGuardrailVersionRequest createGuardrailVersionRequest) Creates a version of the guardrail.createModelCustomizationJob
(Consumer<CreateModelCustomizationJobRequest.Builder> createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.createModelCustomizationJob
(CreateModelCustomizationJobRequest createModelCustomizationJobRequest) Creates a fine-tuning job to customize a base model.createProvisionedModelThroughput
(Consumer<CreateProvisionedModelThroughputRequest.Builder> createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify.createProvisionedModelThroughput
(CreateProvisionedModelThroughputRequest createProvisionedModelThroughputRequest) Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify.default DeleteCustomModelResponse
deleteCustomModel
(Consumer<DeleteCustomModelRequest.Builder> deleteCustomModelRequest) Deletes a custom model that you created earlier.default DeleteCustomModelResponse
deleteCustomModel
(DeleteCustomModelRequest deleteCustomModelRequest) Deletes a custom model that you created earlier.default DeleteGuardrailResponse
deleteGuardrail
(Consumer<DeleteGuardrailRequest.Builder> deleteGuardrailRequest) Deletes a guardrail.default DeleteGuardrailResponse
deleteGuardrail
(DeleteGuardrailRequest deleteGuardrailRequest) Deletes a guardrail.deleteModelInvocationLoggingConfiguration
(Consumer<DeleteModelInvocationLoggingConfigurationRequest.Builder> deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.deleteModelInvocationLoggingConfiguration
(DeleteModelInvocationLoggingConfigurationRequest deleteModelInvocationLoggingConfigurationRequest) Delete the invocation logging.deleteProvisionedModelThroughput
(Consumer<DeleteProvisionedModelThroughputRequest.Builder> deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput.deleteProvisionedModelThroughput
(DeleteProvisionedModelThroughputRequest deleteProvisionedModelThroughputRequest) Deletes a Provisioned Throughput.default GetCustomModelResponse
getCustomModel
(Consumer<GetCustomModelRequest.Builder> getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.default GetCustomModelResponse
getCustomModel
(GetCustomModelRequest getCustomModelRequest) Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.default GetEvaluationJobResponse
getEvaluationJob
(Consumer<GetEvaluationJobRequest.Builder> getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job.default GetEvaluationJobResponse
getEvaluationJob
(GetEvaluationJobRequest getEvaluationJobRequest) Retrieves the properties associated with a model evaluation job, including the status of the job.default GetFoundationModelResponse
getFoundationModel
(Consumer<GetFoundationModelRequest.Builder> getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.default GetFoundationModelResponse
getFoundationModel
(GetFoundationModelRequest getFoundationModelRequest) Get details about a Amazon Bedrock foundation model.default GetGuardrailResponse
getGuardrail
(Consumer<GetGuardrailRequest.Builder> getGuardrailRequest) Gets details about a guardrail.default GetGuardrailResponse
getGuardrail
(GetGuardrailRequest getGuardrailRequest) Gets details about a guardrail.default GetModelCustomizationJobResponse
getModelCustomizationJob
(Consumer<GetModelCustomizationJobRequest.Builder> getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job.default GetModelCustomizationJobResponse
getModelCustomizationJob
(GetModelCustomizationJobRequest getModelCustomizationJobRequest) Retrieves the properties associated with a model-customization job, including the status of the job.getModelInvocationLoggingConfiguration
(Consumer<GetModelInvocationLoggingConfigurationRequest.Builder> getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.getModelInvocationLoggingConfiguration
(GetModelInvocationLoggingConfigurationRequest getModelInvocationLoggingConfigurationRequest) Get the current configuration values for model invocation logging.getProvisionedModelThroughput
(Consumer<GetProvisionedModelThroughputRequest.Builder> getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput.getProvisionedModelThroughput
(GetProvisionedModelThroughputRequest getProvisionedModelThroughputRequest) Returns details for a Provisioned Throughput.default ListCustomModelsResponse
listCustomModels
(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) Returns a list of the custom models that you have created with theCreateModelCustomizationJob
operation.default ListCustomModelsResponse
listCustomModels
(ListCustomModelsRequest listCustomModelsRequest) Returns a list of the custom models that you have created with theCreateModelCustomizationJob
operation.default ListCustomModelsIterable
listCustomModelsPaginator
(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) This is a variant oflistCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.default ListCustomModelsIterable
listCustomModelsPaginator
(ListCustomModelsRequest listCustomModelsRequest) This is a variant oflistCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.default ListEvaluationJobsResponse
listEvaluationJobs
(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) Lists model evaluation jobs.default ListEvaluationJobsResponse
listEvaluationJobs
(ListEvaluationJobsRequest listEvaluationJobsRequest) Lists model evaluation jobs.default ListEvaluationJobsIterable
listEvaluationJobsPaginator
(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) This is a variant oflistEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.default ListEvaluationJobsIterable
listEvaluationJobsPaginator
(ListEvaluationJobsRequest listEvaluationJobsRequest) This is a variant oflistEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.default ListFoundationModelsResponse
listFoundationModels
(Consumer<ListFoundationModelsRequest.Builder> listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use.default ListFoundationModelsResponse
listFoundationModels
(ListFoundationModelsRequest listFoundationModelsRequest) Lists Amazon Bedrock foundation models that you can use.default ListGuardrailsResponse
listGuardrails
(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) Lists details about all the guardrails in an account.default ListGuardrailsResponse
listGuardrails
(ListGuardrailsRequest listGuardrailsRequest) Lists details about all the guardrails in an account.default ListGuardrailsIterable
listGuardrailsPaginator
(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) This is a variant oflistGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.default ListGuardrailsIterable
listGuardrailsPaginator
(ListGuardrailsRequest listGuardrailsRequest) This is a variant oflistGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.listModelCustomizationJobs
(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted.listModelCustomizationJobs
(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) Returns a list of model customization jobs that you have submitted.listModelCustomizationJobsPaginator
(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) This is a variant oflistModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.listModelCustomizationJobsPaginator
(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) This is a variant oflistModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.listProvisionedModelThroughputs
(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account.listProvisionedModelThroughputs
(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) Lists the Provisioned Throughputs in the account.listProvisionedModelThroughputsPaginator
(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) This is a variant oflistProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.listProvisionedModelThroughputsPaginator
(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) This is a variant oflistProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.default ListTagsForResourceResponse
listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) List the tags associated with the specified resource.default ListTagsForResourceResponse
listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) List the tags associated with the specified resource.putModelInvocationLoggingConfiguration
(Consumer<PutModelInvocationLoggingConfigurationRequest.Builder> putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.putModelInvocationLoggingConfiguration
(PutModelInvocationLoggingConfigurationRequest putModelInvocationLoggingConfigurationRequest) Set the configuration values for model invocation logging.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
default StopEvaluationJobResponse
stopEvaluationJob
(Consumer<StopEvaluationJobRequest.Builder> stopEvaluationJobRequest) Stops an in progress model evaluation job.default StopEvaluationJobResponse
stopEvaluationJob
(StopEvaluationJobRequest stopEvaluationJobRequest) Stops an in progress model evaluation job.stopModelCustomizationJob
(Consumer<StopModelCustomizationJobRequest.Builder> stopModelCustomizationJobRequest) Stops an active model customization job.stopModelCustomizationJob
(StopModelCustomizationJobRequest stopModelCustomizationJobRequest) Stops an active model customization job.default TagResourceResponse
tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associate tags with a resource.default TagResourceResponse
tagResource
(TagResourceRequest tagResourceRequest) Associate tags with a resource.default UntagResourceResponse
untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Remove one or more tags from a resource.default UntagResourceResponse
untagResource
(UntagResourceRequest untagResourceRequest) Remove one or more tags from a resource.default UpdateGuardrailResponse
updateGuardrail
(Consumer<UpdateGuardrailRequest.Builder> updateGuardrailRequest) Updates a guardrail with the values you specify.default UpdateGuardrailResponse
updateGuardrail
(UpdateGuardrailRequest updateGuardrailRequest) Updates a guardrail with the values you specify.updateProvisionedModelThroughput
(Consumer<UpdateProvisionedModelThroughputRequest.Builder> updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput.updateProvisionedModelThroughput
(UpdateProvisionedModelThroughputRequest updateProvisionedModelThroughputRequest) Updates the name or associated model for a Provisioned Throughput.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
createEvaluationJob
default CreateEvaluationJobResponse createEvaluationJob(CreateEvaluationJobRequest createEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException 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.
- Parameters:
createEvaluationJobRequest
-- Returns:
- Result of the CreateEvaluationJob operation returned by the service.
- See Also:
-
createEvaluationJob
default CreateEvaluationJobResponse createEvaluationJob(Consumer<CreateEvaluationJobRequest.Builder> createEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException 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.
This is a convenience which creates an instance of the
CreateEvaluationJobRequest.Builder
avoiding the need to create one manually viaCreateEvaluationJobRequest.builder()
- Parameters:
createEvaluationJobRequest
- AConsumer
that will call methods onCreateEvaluationJobRequest.Builder
to create a request.- Returns:
- Result of the CreateEvaluationJob operation returned by the service.
- See Also:
-
createGuardrail
default CreateGuardrailResponse createGuardrail(CreateGuardrailRequest createGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a guardrail to block topics and to filter out harmful content.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field. -
(Optional) Attach any tags to the guardrail in the
tags
object. For more information, see Tag resources.
- Parameters:
createGuardrailRequest
-- Returns:
- Result of the CreateGuardrail operation returned by the service.
- See Also:
-
-
createGuardrail
default CreateGuardrailResponse createGuardrail(Consumer<CreateGuardrailRequest.Builder> createGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a guardrail to block topics and to filter out harmful content.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field. -
(Optional) Attach any tags to the guardrail in the
tags
object. For more information, see Tag resources.
This is a convenience which creates an instance of the
CreateGuardrailRequest.Builder
avoiding the need to create one manually viaCreateGuardrailRequest.builder()
- Parameters:
createGuardrailRequest
- AConsumer
that will call methods onCreateGuardrailRequest.Builder
to create a request.- Returns:
- Result of the CreateGuardrail operation returned by the service.
- See Also:
-
-
createGuardrailVersion
default CreateGuardrailVersionResponse createGuardrailVersion(CreateGuardrailVersionRequest createGuardrailVersionRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
- Parameters:
createGuardrailVersionRequest
-- Returns:
- Result of the CreateGuardrailVersion operation returned by the service.
- See Also:
-
createGuardrailVersion
default CreateGuardrailVersionResponse createGuardrailVersion(Consumer<CreateGuardrailVersionRequest.Builder> createGuardrailVersionRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
This is a convenience which creates an instance of the
CreateGuardrailVersionRequest.Builder
avoiding the need to create one manually viaCreateGuardrailVersionRequest.builder()
- Parameters:
createGuardrailVersionRequest
- AConsumer
that will call methods onCreateGuardrailVersionRequest.Builder
to create a request.- Returns:
- Result of the CreateGuardrailVersion operation returned by the service.
- See Also:
-
createModelCustomizationJob
default CreateModelCustomizationJobResponse createModelCustomizationJob(CreateModelCustomizationJobRequest createModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a fine-tuning job to customize a base model.
You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.
For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the
GetModelCustomizationJob
operation to retrieve the job status.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
createModelCustomizationJobRequest
-- Returns:
- Result of the CreateModelCustomizationJob operation returned by the service.
- See Also:
-
createModelCustomizationJob
default CreateModelCustomizationJobResponse createModelCustomizationJob(Consumer<CreateModelCustomizationJobRequest.Builder> createModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates a fine-tuning job to customize a base model.
You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.
For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the
GetModelCustomizationJob
operation to retrieve the job status.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaCreateModelCustomizationJobRequest.builder()
- Parameters:
createModelCustomizationJobRequest
- AConsumer
that will call methods onCreateModelCustomizationJobRequest.Builder
to create a request.- Returns:
- Result of the CreateModelCustomizationJob operation returned by the service.
- See Also:
-
createProvisionedModelThroughput
default CreateProvisionedModelThroughputResponse createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest createProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
createProvisionedModelThroughputRequest
-- Returns:
- Result of the CreateProvisionedModelThroughput operation returned by the service.
- See Also:
-
createProvisionedModelThroughput
default CreateProvisionedModelThroughputResponse createProvisionedModelThroughput(Consumer<CreateProvisionedModelThroughputRequest.Builder> createProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
CreateProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaCreateProvisionedModelThroughputRequest.builder()
- Parameters:
createProvisionedModelThroughputRequest
- AConsumer
that will call methods onCreateProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- Result of the CreateProvisionedModelThroughput operation returned by the service.
- See Also:
-
deleteCustomModel
default DeleteCustomModelResponse deleteCustomModel(DeleteCustomModelRequest deleteCustomModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
deleteCustomModelRequest
-- Returns:
- Result of the DeleteCustomModel operation returned by the service.
- See Also:
-
deleteCustomModel
default DeleteCustomModelResponse deleteCustomModel(Consumer<DeleteCustomModelRequest.Builder> deleteCustomModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteCustomModelRequest.Builder
avoiding the need to create one manually viaDeleteCustomModelRequest.builder()
- Parameters:
deleteCustomModelRequest
- AConsumer
that will call methods onDeleteCustomModelRequest.Builder
to create a request.- Returns:
- Result of the DeleteCustomModel operation returned by the service.
- See Also:
-
deleteGuardrail
default DeleteGuardrailResponse deleteGuardrail(DeleteGuardrailRequest deleteGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a guardrail.
-
To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifier
field. If you delete a guardrail, all of its versions will be deleted. -
To delete a version of a guardrail, specify the ARN of the guardrail in the
guardrailIdentifier
field and the version in theguardrailVersion
field.
- Parameters:
deleteGuardrailRequest
-- Returns:
- Result of the DeleteGuardrail operation returned by the service.
- See Also:
-
-
deleteGuardrail
default DeleteGuardrailResponse deleteGuardrail(Consumer<DeleteGuardrailRequest.Builder> deleteGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a guardrail.
-
To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifier
field. If you delete a guardrail, all of its versions will be deleted. -
To delete a version of a guardrail, specify the ARN of the guardrail in the
guardrailIdentifier
field and the version in theguardrailVersion
field.
This is a convenience which creates an instance of the
DeleteGuardrailRequest.Builder
avoiding the need to create one manually viaDeleteGuardrailRequest.builder()
- Parameters:
deleteGuardrailRequest
- AConsumer
that will call methods onDeleteGuardrailRequest.Builder
to create a request.- Returns:
- Result of the DeleteGuardrail operation returned by the service.
- See Also:
-
-
deleteModelInvocationLoggingConfiguration
default DeleteModelInvocationLoggingConfigurationResponse deleteModelInvocationLoggingConfiguration(DeleteModelInvocationLoggingConfigurationRequest deleteModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Delete the invocation logging.
- Parameters:
deleteModelInvocationLoggingConfigurationRequest
-- Returns:
- Result of the DeleteModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
deleteModelInvocationLoggingConfiguration
default DeleteModelInvocationLoggingConfigurationResponse deleteModelInvocationLoggingConfiguration(Consumer<DeleteModelInvocationLoggingConfigurationRequest.Builder> deleteModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Delete the invocation logging.
This is a convenience which creates an instance of the
DeleteModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaDeleteModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
deleteModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onDeleteModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- Result of the DeleteModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
deleteProvisionedModelThroughput
default DeleteProvisionedModelThroughputResponse deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest deleteProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
deleteProvisionedModelThroughputRequest
-- Returns:
- Result of the DeleteProvisionedModelThroughput operation returned by the service.
- See Also:
-
deleteProvisionedModelThroughput
default DeleteProvisionedModelThroughputResponse deleteProvisionedModelThroughput(Consumer<DeleteProvisionedModelThroughputRequest.Builder> deleteProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaDeleteProvisionedModelThroughputRequest.builder()
- Parameters:
deleteProvisionedModelThroughputRequest
- AConsumer
that will call methods onDeleteProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- Result of the DeleteProvisionedModelThroughput operation returned by the service.
- See Also:
-
getCustomModel
default GetCustomModelResponse getCustomModel(GetCustomModelRequest getCustomModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
getCustomModelRequest
-- Returns:
- Result of the GetCustomModel operation returned by the service.
- See Also:
-
getCustomModel
default GetCustomModelResponse getCustomModel(Consumer<GetCustomModelRequest.Builder> getCustomModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetCustomModelRequest.Builder
avoiding the need to create one manually viaGetCustomModelRequest.builder()
- Parameters:
getCustomModelRequest
- AConsumer
that will call methods onGetCustomModelRequest.Builder
to create a request.- Returns:
- Result of the GetCustomModel operation returned by the service.
- See Also:
-
getEvaluationJob
default GetEvaluationJobResponse getEvaluationJob(GetEvaluationJobRequest getEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
- Parameters:
getEvaluationJobRequest
-- Returns:
- Result of the GetEvaluationJob operation returned by the service.
- See Also:
-
getEvaluationJob
default GetEvaluationJobResponse getEvaluationJob(Consumer<GetEvaluationJobRequest.Builder> getEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluations.
This is a convenience which creates an instance of the
GetEvaluationJobRequest.Builder
avoiding the need to create one manually viaGetEvaluationJobRequest.builder()
- Parameters:
getEvaluationJobRequest
- AConsumer
that will call methods onGetEvaluationJobRequest.Builder
to create a request.- Returns:
- Result of the GetEvaluationJob operation returned by the service.
- See Also:
-
getFoundationModel
default GetFoundationModelResponse getFoundationModel(GetFoundationModelRequest getFoundationModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get details about a Amazon Bedrock foundation model.
- Parameters:
getFoundationModelRequest
-- Returns:
- Result of the GetFoundationModel operation returned by the service.
- See Also:
-
getFoundationModel
default GetFoundationModelResponse getFoundationModel(Consumer<GetFoundationModelRequest.Builder> getFoundationModelRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get details about a Amazon Bedrock foundation model.
This is a convenience which creates an instance of the
GetFoundationModelRequest.Builder
avoiding the need to create one manually viaGetFoundationModelRequest.builder()
- Parameters:
getFoundationModelRequest
- AConsumer
that will call methods onGetFoundationModelRequest.Builder
to create a request.- Returns:
- Result of the GetFoundationModel operation returned by the service.
- See Also:
-
getGuardrail
default GetGuardrailResponse getGuardrail(GetGuardrailRequest getGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.- Parameters:
getGuardrailRequest
-- Returns:
- Result of the GetGuardrail operation returned by the service.
- See Also:
-
getGuardrail
default GetGuardrailResponse getGuardrail(Consumer<GetGuardrailRequest.Builder> getGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Gets details about a guardrail. If you don't specify a version, the response returns details for the
DRAFT
version.
This is a convenience which creates an instance of the
GetGuardrailRequest.Builder
avoiding the need to create one manually viaGetGuardrailRequest.builder()
- Parameters:
getGuardrailRequest
- AConsumer
that will call methods onGetGuardrailRequest.Builder
to create a request.- Returns:
- Result of the GetGuardrail operation returned by the service.
- See Also:
-
getModelCustomizationJob
default GetModelCustomizationJobResponse getModelCustomizationJob(GetModelCustomizationJobRequest getModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
getModelCustomizationJobRequest
-- Returns:
- Result of the GetModelCustomizationJob operation returned by the service.
- See Also:
-
getModelCustomizationJob
default GetModelCustomizationJobResponse getModelCustomizationJob(Consumer<GetModelCustomizationJobRequest.Builder> getModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaGetModelCustomizationJobRequest.builder()
- Parameters:
getModelCustomizationJobRequest
- AConsumer
that will call methods onGetModelCustomizationJobRequest.Builder
to create a request.- Returns:
- Result of the GetModelCustomizationJob operation returned by the service.
- See Also:
-
getModelInvocationLoggingConfiguration
default GetModelInvocationLoggingConfigurationResponse getModelInvocationLoggingConfiguration(GetModelInvocationLoggingConfigurationRequest getModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get the current configuration values for model invocation logging.
- Parameters:
getModelInvocationLoggingConfigurationRequest
-- Returns:
- Result of the GetModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
getModelInvocationLoggingConfiguration
default GetModelInvocationLoggingConfigurationResponse getModelInvocationLoggingConfiguration(Consumer<GetModelInvocationLoggingConfigurationRequest.Builder> getModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Get the current configuration values for model invocation logging.
This is a convenience which creates an instance of the
GetModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaGetModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
getModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onGetModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- Result of the GetModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
getProvisionedModelThroughput
default GetProvisionedModelThroughputResponse getProvisionedModelThroughput(GetProvisionedModelThroughputRequest getProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
getProvisionedModelThroughputRequest
-- Returns:
- Result of the GetProvisionedModelThroughput operation returned by the service.
- See Also:
-
getProvisionedModelThroughput
default GetProvisionedModelThroughputResponse getProvisionedModelThroughput(Consumer<GetProvisionedModelThroughputRequest.Builder> getProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
GetProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaGetProvisionedModelThroughputRequest.builder()
- Parameters:
getProvisionedModelThroughputRequest
- AConsumer
that will call methods onGetProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- Result of the GetProvisionedModelThroughput operation returned by the service.
- See Also:
-
listCustomModels
default ListCustomModelsResponse listCustomModels(ListCustomModelsRequest listCustomModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns a list of the custom models that you have created with the
CreateModelCustomizationJob
operation.For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
listCustomModelsRequest
-- Returns:
- Result of the ListCustomModels operation returned by the service.
- See Also:
-
listCustomModels
default ListCustomModelsResponse listCustomModels(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns a list of the custom models that you have created with the
CreateModelCustomizationJob
operation.For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListCustomModelsRequest.Builder
avoiding the need to create one manually viaListCustomModelsRequest.builder()
- Parameters:
listCustomModelsRequest
- AConsumer
that will call methods onListCustomModelsRequest.Builder
to create a request.- Returns:
- Result of the ListCustomModels operation returned by the service.
- See Also:
-
listCustomModelsPaginator
default ListCustomModelsIterable listCustomModelsPaginator(ListCustomModelsRequest listCustomModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client.listCustomModelsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client .listCustomModelsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client.listCustomModelsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.- Parameters:
listCustomModelsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listCustomModelsPaginator
default ListCustomModelsIterable listCustomModelsPaginator(Consumer<ListCustomModelsRequest.Builder> listCustomModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client.listCustomModelsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client .listCustomModelsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListCustomModelsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListCustomModelsIterable responses = client.listCustomModelsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listCustomModels(software.amazon.awssdk.services.bedrock.model.ListCustomModelsRequest)
operation.
This is a convenience which creates an instance of the
ListCustomModelsRequest.Builder
avoiding the need to create one manually viaListCustomModelsRequest.builder()
- Parameters:
listCustomModelsRequest
- AConsumer
that will call methods onListCustomModelsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listEvaluationJobs
default ListEvaluationJobsResponse listEvaluationJobs(ListEvaluationJobsRequest listEvaluationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists model evaluation jobs.
- Parameters:
listEvaluationJobsRequest
-- Returns:
- Result of the ListEvaluationJobs operation returned by the service.
- See Also:
-
listEvaluationJobs
default ListEvaluationJobsResponse listEvaluationJobs(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists model evaluation jobs.
This is a convenience which creates an instance of the
ListEvaluationJobsRequest.Builder
avoiding the need to create one manually viaListEvaluationJobsRequest.builder()
- Parameters:
listEvaluationJobsRequest
- AConsumer
that will call methods onListEvaluationJobsRequest.Builder
to create a request.- Returns:
- Result of the ListEvaluationJobs operation returned by the service.
- See Also:
-
listEvaluationJobsPaginator
default ListEvaluationJobsIterable listEvaluationJobsPaginator(ListEvaluationJobsRequest listEvaluationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client.listEvaluationJobsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client .listEvaluationJobsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client.listEvaluationJobsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.- Parameters:
listEvaluationJobsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listEvaluationJobsPaginator
default ListEvaluationJobsIterable listEvaluationJobsPaginator(Consumer<ListEvaluationJobsRequest.Builder> listEvaluationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client.listEvaluationJobsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client .listEvaluationJobsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListEvaluationJobsIterable responses = client.listEvaluationJobsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEvaluationJobs(software.amazon.awssdk.services.bedrock.model.ListEvaluationJobsRequest)
operation.
This is a convenience which creates an instance of the
ListEvaluationJobsRequest.Builder
avoiding the need to create one manually viaListEvaluationJobsRequest.builder()
- Parameters:
listEvaluationJobsRequest
- AConsumer
that will call methods onListEvaluationJobsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listFoundationModels
default ListFoundationModelsResponse listFoundationModels(ListFoundationModelsRequest listFoundationModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
- Parameters:
listFoundationModelsRequest
-- Returns:
- Result of the ListFoundationModels operation returned by the service.
- See Also:
-
listFoundationModels
default ListFoundationModelsResponse listFoundationModels(Consumer<ListFoundationModelsRequest.Builder> listFoundationModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListFoundationModelsRequest.Builder
avoiding the need to create one manually viaListFoundationModelsRequest.builder()
- Parameters:
listFoundationModelsRequest
- AConsumer
that will call methods onListFoundationModelsRequest.Builder
to create a request.- Returns:
- Result of the ListFoundationModels operation returned by the service.
- See Also:
-
listGuardrails
default ListGuardrailsResponse listGuardrails(ListGuardrailsRequest listGuardrailsRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists details about all the guardrails in an account. To list the
DRAFT
version of all your guardrails, don't specify theguardrailIdentifier
field. To list all versions of a guardrail, specify the ARN of the guardrail in theguardrailIdentifier
field.You can set the maximum number of results to return in a response in the
maxResults
field. If there are more results than the number you set, the response returns anextToken
that you can send in anotherListGuardrails
request to see the next batch of results.- Parameters:
listGuardrailsRequest
-- Returns:
- Result of the ListGuardrails operation returned by the service.
- See Also:
-
listGuardrails
default ListGuardrailsResponse listGuardrails(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists details about all the guardrails in an account. To list the
DRAFT
version of all your guardrails, don't specify theguardrailIdentifier
field. To list all versions of a guardrail, specify the ARN of the guardrail in theguardrailIdentifier
field.You can set the maximum number of results to return in a response in the
maxResults
field. If there are more results than the number you set, the response returns anextToken
that you can send in anotherListGuardrails
request to see the next batch of results.
This is a convenience which creates an instance of the
ListGuardrailsRequest.Builder
avoiding the need to create one manually viaListGuardrailsRequest.builder()
- Parameters:
listGuardrailsRequest
- AConsumer
that will call methods onListGuardrailsRequest.Builder
to create a request.- Returns:
- Result of the ListGuardrails operation returned by the service.
- See Also:
-
listGuardrailsPaginator
default ListGuardrailsIterable listGuardrailsPaginator(ListGuardrailsRequest listGuardrailsRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.- Parameters:
listGuardrailsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGuardrailsPaginator
default ListGuardrailsIterable listGuardrailsPaginator(Consumer<ListGuardrailsRequest.Builder> listGuardrailsRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListGuardrailsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListGuardrailsIterable responses = client.listGuardrailsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listGuardrails(software.amazon.awssdk.services.bedrock.model.ListGuardrailsRequest)
operation.
This is a convenience which creates an instance of the
ListGuardrailsRequest.Builder
avoiding the need to create one manually viaListGuardrailsRequest.builder()
- Parameters:
listGuardrailsRequest
- AConsumer
that will call methods onListGuardrailsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listModelCustomizationJobs
default ListModelCustomizationJobsResponse listModelCustomizationJobs(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
listModelCustomizationJobsRequest
-- Returns:
- Result of the ListModelCustomizationJobs operation returned by the service.
- See Also:
-
listModelCustomizationJobs
default ListModelCustomizationJobsResponse listModelCustomizationJobs(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListModelCustomizationJobsRequest.Builder
avoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()
- Parameters:
listModelCustomizationJobsRequest
- AConsumer
that will call methods onListModelCustomizationJobsRequest.Builder
to create a request.- Returns:
- Result of the ListModelCustomizationJobs operation returned by the service.
- See Also:
-
listModelCustomizationJobsPaginator
default ListModelCustomizationJobsIterable listModelCustomizationJobsPaginator(ListModelCustomizationJobsRequest listModelCustomizationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client.listModelCustomizationJobsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client .listModelCustomizationJobsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client.listModelCustomizationJobsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.- Parameters:
listModelCustomizationJobsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listModelCustomizationJobsPaginator
default ListModelCustomizationJobsIterable listModelCustomizationJobsPaginator(Consumer<ListModelCustomizationJobsRequest.Builder> listModelCustomizationJobsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client.listModelCustomizationJobsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client .listModelCustomizationJobsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListModelCustomizationJobsIterable responses = client.listModelCustomizationJobsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listModelCustomizationJobs(software.amazon.awssdk.services.bedrock.model.ListModelCustomizationJobsRequest)
operation.
This is a convenience which creates an instance of the
ListModelCustomizationJobsRequest.Builder
avoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()
- Parameters:
listModelCustomizationJobsRequest
- AConsumer
that will call methods onListModelCustomizationJobsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listProvisionedModelThroughputs
default ListProvisionedModelThroughputsResponse listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
listProvisionedModelThroughputsRequest
-- Returns:
- Result of the ListProvisionedModelThroughputs operation returned by the service.
- See Also:
-
listProvisionedModelThroughputs
default ListProvisionedModelThroughputsResponse listProvisionedModelThroughputs(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListProvisionedModelThroughputsRequest.Builder
avoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()
- Parameters:
listProvisionedModelThroughputsRequest
- AConsumer
that will call methods onListProvisionedModelThroughputsRequest.Builder
to create a request.- Returns:
- Result of the ListProvisionedModelThroughputs operation returned by the service.
- See Also:
-
listProvisionedModelThroughputsPaginator
default ListProvisionedModelThroughputsIterable listProvisionedModelThroughputsPaginator(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client.listProvisionedModelThroughputsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client .listProvisionedModelThroughputsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client.listProvisionedModelThroughputsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.- Parameters:
listProvisionedModelThroughputsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listProvisionedModelThroughputsPaginator
default ListProvisionedModelThroughputsIterable listProvisionedModelThroughputsPaginator(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException This is a variant of
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client.listProvisionedModelThroughputsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client .listProvisionedModelThroughputsPaginator(request); for (software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.bedrock.paginators.ListProvisionedModelThroughputsIterable responses = client.listProvisionedModelThroughputsPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listProvisionedModelThroughputs(software.amazon.awssdk.services.bedrock.model.ListProvisionedModelThroughputsRequest)
operation.
This is a convenience which creates an instance of the
ListProvisionedModelThroughputsRequest.Builder
avoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()
- Parameters:
listProvisionedModelThroughputsRequest
- AConsumer
that will call methods onListProvisionedModelThroughputsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
- Parameters:
listTagsForResourceRequest
-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException List the tags associated with the specified resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
putModelInvocationLoggingConfiguration
default PutModelInvocationLoggingConfigurationResponse putModelInvocationLoggingConfiguration(PutModelInvocationLoggingConfigurationRequest putModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Set the configuration values for model invocation logging.
- Parameters:
putModelInvocationLoggingConfigurationRequest
-- Returns:
- Result of the PutModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
putModelInvocationLoggingConfiguration
default PutModelInvocationLoggingConfigurationResponse putModelInvocationLoggingConfiguration(Consumer<PutModelInvocationLoggingConfigurationRequest.Builder> putModelInvocationLoggingConfigurationRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Set the configuration values for model invocation logging.
This is a convenience which creates an instance of the
PutModelInvocationLoggingConfigurationRequest.Builder
avoiding the need to create one manually viaPutModelInvocationLoggingConfigurationRequest.builder()
- Parameters:
putModelInvocationLoggingConfigurationRequest
- AConsumer
that will call methods onPutModelInvocationLoggingConfigurationRequest.Builder
to create a request.- Returns:
- Result of the PutModelInvocationLoggingConfiguration operation returned by the service.
- See Also:
-
stopEvaluationJob
default StopEvaluationJobResponse stopEvaluationJob(StopEvaluationJobRequest stopEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Stops an in progress model evaluation job.
- Parameters:
stopEvaluationJobRequest
-- Returns:
- Result of the StopEvaluationJob operation returned by the service.
- See Also:
-
stopEvaluationJob
default StopEvaluationJobResponse stopEvaluationJob(Consumer<StopEvaluationJobRequest.Builder> stopEvaluationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Stops an in progress model evaluation job.
This is a convenience which creates an instance of the
StopEvaluationJobRequest.Builder
avoiding the need to create one manually viaStopEvaluationJobRequest.builder()
- Parameters:
stopEvaluationJobRequest
- AConsumer
that will call methods onStopEvaluationJobRequest.Builder
to create a request.- Returns:
- Result of the StopEvaluationJob operation returned by the service.
- See Also:
-
stopModelCustomizationJob
default StopModelCustomizationJobResponse stopModelCustomizationJob(StopModelCustomizationJobRequest stopModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
- Parameters:
stopModelCustomizationJobRequest
-- Returns:
- Result of the StopModelCustomizationJob operation returned by the service.
- See Also:
-
stopModelCustomizationJob
default StopModelCustomizationJobResponse stopModelCustomizationJob(Consumer<StopModelCustomizationJobRequest.Builder> stopModelCustomizationJobRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
StopModelCustomizationJobRequest.Builder
avoiding the need to create one manually viaStopModelCustomizationJobRequest.builder()
- Parameters:
stopModelCustomizationJobRequest
- AConsumer
that will call methods onStopModelCustomizationJobRequest.Builder
to create a request.- Returns:
- Result of the StopModelCustomizationJob operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
- Parameters:
tagResourceRequest
-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
TagResourceRequest.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
- Parameters:
untagResourceRequest
-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateGuardrail
default UpdateGuardrailResponse updateGuardrail(UpdateGuardrailRequest updateGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Updates a guardrail with the values you specify.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field. -
(Optional) Attach any tags to the guardrail in the
tags
object. For more information, see Tag resources.
- Parameters:
updateGuardrailRequest
-- Returns:
- Result of the UpdateGuardrail operation returned by the service.
- See Also:
-
-
updateGuardrail
default UpdateGuardrailResponse updateGuardrail(Consumer<UpdateGuardrailRequest.Builder> updateGuardrailRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Updates a guardrail with the values you specify.
-
Specify a
name
and optionaldescription
. -
Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. -
Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.-
Give a
name
anddescription
so that the guardrail can properly identify the topic. -
Specify
DENY
in thetype
field. -
(Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
-
-
Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.-
Specify the category in the
type
field. -
Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
-
-
(Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field. -
(Optional) Attach any tags to the guardrail in the
tags
object. For more information, see Tag resources.
This is a convenience which creates an instance of the
UpdateGuardrailRequest.Builder
avoiding the need to create one manually viaUpdateGuardrailRequest.builder()
- Parameters:
updateGuardrailRequest
- AConsumer
that will call methods onUpdateGuardrailRequest.Builder
to create a request.- Returns:
- Result of the UpdateGuardrail operation returned by the service.
- See Also:
-
-
updateProvisionedModelThroughput
default UpdateProvisionedModelThroughputResponse updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest updateProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
- Parameters:
updateProvisionedModelThroughputRequest
-- Returns:
- Result of the UpdateProvisionedModelThroughput operation returned by the service.
- See Also:
-
updateProvisionedModelThroughput
default UpdateProvisionedModelThroughputResponse updateProvisionedModelThroughput(Consumer<UpdateProvisionedModelThroughputRequest.Builder> updateProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
This is a convenience which creates an instance of the
UpdateProvisionedModelThroughputRequest.Builder
avoiding the need to create one manually viaUpdateProvisionedModelThroughputRequest.builder()
- Parameters:
updateProvisionedModelThroughputRequest
- AConsumer
that will call methods onUpdateProvisionedModelThroughputRequest.Builder
to create a request.- Returns:
- Result of the UpdateProvisionedModelThroughput operation returned by the service.
- See Also:
-
create
Create aBedrockClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aBedrockClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-