@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AmazonBedrockClient extends AmazonWebServiceClient implements AmazonBedrock
Describes the API operations for creating and managing Bedrock models.
| Modifier and Type | Field and Description |
|---|---|
protected static ClientConfigurationFactory |
configFactory
Client configuration factory providing ClientConfigurations tailored to this client
|
client, clientConfiguration, endpoint, isEndpointOverridden, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffsetENDPOINT_PREFIXaddRequestHandler, addRequestHandler, beforeClientExecution, beforeMarshalling, calculateCRC32FromCompressedData, checkMutability, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, createSignerProvider, endClientExecution, endClientExecution, getClientConfiguration, getClientId, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerOverride, getSignerProvider, getSignerRegionOverride, getSigningRegion, getTimeOffset, isCsmEnabled, isEndpointOverridden, isProfilingEnabled, isRequestMetricsEnabled, makeImmutable, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shouldGenerateClientSideMonitoringEvents, useStrictHostNameVerification, withEndpoint, withRegion, withRegion, withTimeOffsetprotected static final ClientConfigurationFactory configFactory
public static AmazonBedrockClientBuilder builder()
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. Training data contains input and output text for each record in a JSONL format. Optionally, you can specify validation data in the same format as the training data. Bedrock returns validation loss metrics and output generations after the job completes.
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 Bedrock User Guide.
createModelCustomizationJob in interface AmazonBedrockcreateModelCustomizationJobRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 a provisioned throughput with dedicated capacity for a foundation model or a fine-tuned model.
For more information, see Provisioned throughput in the Bedrock User Guide.
createProvisionedModelThroughput in interface AmazonBedrockcreateProvisionedModelThroughputRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock User Guide.
deleteCustomModel in interface AmazonBedrockdeleteCustomModelRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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. For more information, see Provisioned throughput in the Bedrock User Guide.
deleteProvisionedModelThroughput in interface AmazonBedrockdeleteProvisionedModelThroughputRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock custom model that you have created.For more information, see Custom models in the Bedrock User Guide.
getCustomModel in interface AmazonBedrockgetCustomModelRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock foundation model.
getFoundationModel in interface AmazonBedrockgetFoundationModelRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock User Guide.
getModelCustomizationJob in interface AmazonBedrockgetModelCustomizationJobRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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)
Get details for a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
getProvisionedModelThroughput in interface AmazonBedrockgetProvisionedModelThroughputRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 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 ListFoundationModelsResult listFoundationModels(ListFoundationModelsRequest request)
List of Bedrock foundation models that you can use. For more information, see Foundation models in the 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 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 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)
List the provisioned capacities. For more information, see Provisioned throughput in the 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 Bedrock User Guide.
listTagsForResource in interface AmazonBedrocklistTagsForResourceRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 StopModelCustomizationJobResult stopModelCustomizationJob(StopModelCustomizationJobRequest request)
Stops an active model customization job. For more information, see Custom models in the Bedrock User Guide.
stopModelCustomizationJob in interface AmazonBedrockstopModelCustomizationJobRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock User Guide.
tagResource in interface AmazonBedrocktagResourceRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 Bedrock User Guide.
untagResource in interface AmazonBedrockuntagResourceRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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 UpdateProvisionedModelThroughputResult updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest request)
Update a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
updateProvisionedModelThroughput in interface AmazonBedrockupdateProvisionedModelThroughputRequest - ResourceNotFoundException - The specified resource ARN was not found. Check the 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()
AmazonBedrockshutdown in interface AmazonBedrockshutdown in class AmazonWebServiceClientCopyright © 2023. All rights reserved.