Interface BedrockClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface BedrockClient extends AwsClient
Service client for accessing Amazon Bedrock. This can be created using the staticbuilder()method.Describes the API operations for creating and managing Amazon Bedrock models.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
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. 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. Amazon 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
GetModelCustomizationJoboperation to retrieve the job status.For more information, see Custom models in the Bedrock User Guide.
- Parameters:
createModelCustomizationJobRequest-- Returns:
- Result of the CreateModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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. 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. Amazon 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
GetModelCustomizationJoboperation to retrieve the job status.For more information, see Custom models in the Bedrock User Guide.
This is a convenience which creates an instance of the
CreateModelCustomizationJobRequest.Builderavoiding the need to create one manually viaCreateModelCustomizationJobRequest.builder()- Parameters:
createModelCustomizationJobRequest- AConsumerthat will call methods onCreateModelCustomizationJobRequest.Builderto create a request.- Returns:
- Result of the CreateModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createProvisionedModelThroughput
default CreateProvisionedModelThroughputResponse createProvisionedModelThroughput(CreateProvisionedModelThroughputRequest createProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
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.
- Parameters:
createProvisionedModelThroughputRequest-- Returns:
- Result of the CreateProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createProvisionedModelThroughput
default CreateProvisionedModelThroughputResponse createProvisionedModelThroughput(Consumer<CreateProvisionedModelThroughputRequest.Builder> createProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, TooManyTagsException, ServiceQuotaExceededException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
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.
This is a convenience which creates an instance of the
CreateProvisionedModelThroughputRequest.Builderavoiding the need to create one manually viaCreateProvisionedModelThroughputRequest.builder()- Parameters:
createProvisionedModelThroughputRequest- AConsumerthat will call methods onCreateProvisionedModelThroughputRequest.Builderto create a request.- Returns:
- Result of the CreateProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
deleteCustomModelRequest-- Returns:
- Result of the DeleteCustomModel operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteCustomModelRequest.Builderavoiding the need to create one manually viaDeleteCustomModelRequest.builder()- Parameters:
deleteCustomModelRequest- AConsumerthat will call methods onDeleteCustomModelRequest.Builderto create a request.- Returns:
- Result of the DeleteCustomModel operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaDeleteModelInvocationLoggingConfigurationRequest.builder()- Parameters:
deleteModelInvocationLoggingConfigurationRequest- AConsumerthat will call methods onDeleteModelInvocationLoggingConfigurationRequest.Builderto create a request.- Returns:
- Result of the DeleteModelInvocationLoggingConfiguration operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteProvisionedModelThroughput
default DeleteProvisionedModelThroughputResponse deleteProvisionedModelThroughput(DeleteProvisionedModelThroughputRequest deleteProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Deletes a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
- Parameters:
deleteProvisionedModelThroughputRequest-- Returns:
- Result of the DeleteProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteProvisionedModelThroughput
default DeleteProvisionedModelThroughputResponse deleteProvisionedModelThroughput(Consumer<DeleteProvisionedModelThroughputRequest.Builder> deleteProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, ConflictException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Deletes a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
This is a convenience which creates an instance of the
DeleteProvisionedModelThroughputRequest.Builderavoiding the need to create one manually viaDeleteProvisionedModelThroughputRequest.builder()- Parameters:
deleteProvisionedModelThroughputRequest- AConsumerthat will call methods onDeleteProvisionedModelThroughputRequest.Builderto create a request.- Returns:
- Result of the DeleteProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
getCustomModelRequest-- Returns:
- Result of the GetCustomModel operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
GetCustomModelRequest.Builderavoiding the need to create one manually viaGetCustomModelRequest.builder()- Parameters:
getCustomModelRequest- AConsumerthat will call methods onGetCustomModelRequest.Builderto create a request.- Returns:
- Result of the GetCustomModel operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaGetFoundationModelRequest.builder()- Parameters:
getFoundationModelRequest- AConsumerthat will call methods onGetFoundationModelRequest.Builderto create a request.- Returns:
- Result of the GetFoundationModel operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
getModelCustomizationJobRequest-- Returns:
- Result of the GetModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
GetModelCustomizationJobRequest.Builderavoiding the need to create one manually viaGetModelCustomizationJobRequest.builder()- Parameters:
getModelCustomizationJobRequest- AConsumerthat will call methods onGetModelCustomizationJobRequest.Builderto create a request.- Returns:
- Result of the GetModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaGetModelInvocationLoggingConfigurationRequest.builder()- Parameters:
getModelInvocationLoggingConfigurationRequest- AConsumerthat will call methods onGetModelInvocationLoggingConfigurationRequest.Builderto create a request.- Returns:
- Result of the GetModelInvocationLoggingConfiguration operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getProvisionedModelThroughput
default GetProvisionedModelThroughputResponse getProvisionedModelThroughput(GetProvisionedModelThroughputRequest getProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Get details for a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
- Parameters:
getProvisionedModelThroughputRequest-- Returns:
- Result of the GetProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getProvisionedModelThroughput
default GetProvisionedModelThroughputResponse getProvisionedModelThroughput(Consumer<GetProvisionedModelThroughputRequest.Builder> getProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Get details for a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
This is a convenience which creates an instance of the
GetProvisionedModelThroughputRequest.Builderavoiding the need to create one manually viaGetProvisionedModelThroughputRequest.builder()- Parameters:
getProvisionedModelThroughputRequest- AConsumerthat will call methods onGetProvisionedModelThroughputRequest.Builderto create a request.- Returns:
- Result of the GetProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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
CreateModelCustomizationJoboperation.For more information, see Custom models in the Bedrock User Guide.
- Parameters:
listCustomModelsRequest-- Returns:
- Result of the ListCustomModels operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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
CreateModelCustomizationJoboperation.For more information, see Custom models in the Bedrock User Guide.
This is a convenience which creates an instance of the
ListCustomModelsRequest.Builderavoiding the need to create one manually viaListCustomModelsRequest.builder()- Parameters:
listCustomModelsRequest- AConsumerthat will call methods onListCustomModelsRequest.Builderto create a request.- Returns:
- Result of the ListCustomModels operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListCustomModelsRequest.builder()- Parameters:
listCustomModelsRequest- AConsumerthat will call methods onListCustomModelsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listFoundationModels
default ListFoundationModelsResponse listFoundationModels(ListFoundationModelsRequest listFoundationModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
List of Amazon Bedrock foundation models that you can use. For more information, see Foundation models in the Bedrock User Guide.
- Parameters:
listFoundationModelsRequest-- Returns:
- Result of the ListFoundationModels operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listFoundationModels
default ListFoundationModelsResponse listFoundationModels(Consumer<ListFoundationModelsRequest.Builder> listFoundationModelsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
List of Amazon Bedrock foundation models that you can use. For more information, see Foundation models in the Bedrock User Guide.
This is a convenience which creates an instance of the
ListFoundationModelsRequest.Builderavoiding the need to create one manually viaListFoundationModelsRequest.builder()- Parameters:
listFoundationModelsRequest- AConsumerthat will call methods onListFoundationModelsRequest.Builderto create a request.- Returns:
- Result of the ListFoundationModels operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
listModelCustomizationJobsRequest-- Returns:
- Result of the ListModelCustomizationJobs operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
ListModelCustomizationJobsRequest.Builderavoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()- Parameters:
listModelCustomizationJobsRequest- AConsumerthat will call methods onListModelCustomizationJobsRequest.Builderto create a request.- Returns:
- Result of the ListModelCustomizationJobs operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListModelCustomizationJobsRequest.builder()- Parameters:
listModelCustomizationJobsRequest- AConsumerthat will call methods onListModelCustomizationJobsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listProvisionedModelThroughputs
default ListProvisionedModelThroughputsResponse listProvisionedModelThroughputs(ListProvisionedModelThroughputsRequest listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
List the provisioned capacities. For more information, see Provisioned throughput in the Bedrock User Guide.
- Parameters:
listProvisionedModelThroughputsRequest-- Returns:
- Result of the ListProvisionedModelThroughputs operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listProvisionedModelThroughputs
default ListProvisionedModelThroughputsResponse listProvisionedModelThroughputs(Consumer<ListProvisionedModelThroughputsRequest.Builder> listProvisionedModelThroughputsRequest) throws AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
List the provisioned capacities. For more information, see Provisioned throughput in the Bedrock User Guide.
This is a convenience which creates an instance of the
ListProvisionedModelThroughputsRequest.Builderavoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()- Parameters:
listProvisionedModelThroughputsRequest- AConsumerthat will call methods onListProvisionedModelThroughputsRequest.Builderto create a request.- Returns:
- Result of the ListProvisionedModelThroughputs operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListProvisionedModelThroughputsRequest.builder()- Parameters:
listProvisionedModelThroughputsRequest- AConsumerthat will call methods onListProvisionedModelThroughputsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaPutModelInvocationLoggingConfigurationRequest.builder()- Parameters:
putModelInvocationLoggingConfigurationRequest- AConsumerthat will call methods onPutModelInvocationLoggingConfigurationRequest.Builderto create a request.- Returns:
- Result of the PutModelInvocationLoggingConfiguration operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
stopModelCustomizationJobRequest-- Returns:
- Result of the StopModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
StopModelCustomizationJobRequest.Builderavoiding the need to create one manually viaStopModelCustomizationJobRequest.builder()- Parameters:
stopModelCustomizationJobRequest- AConsumerthat will call methods onStopModelCustomizationJobRequest.Builderto create a request.- Returns:
- Result of the StopModelCustomizationJob operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
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 Bedrock User Guide.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateProvisionedModelThroughput
default UpdateProvisionedModelThroughputResponse updateProvisionedModelThroughput(UpdateProvisionedModelThroughputRequest updateProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Update a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
- Parameters:
updateProvisionedModelThroughputRequest-- Returns:
- Result of the UpdateProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateProvisionedModelThroughput
default UpdateProvisionedModelThroughputResponse updateProvisionedModelThroughput(Consumer<UpdateProvisionedModelThroughputRequest.Builder> updateProvisionedModelThroughputRequest) throws ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, ThrottlingException, AwsServiceException, SdkClientException, BedrockException
Update a provisioned throughput. For more information, see Provisioned throughput in the Bedrock User Guide.
This is a convenience which creates an instance of the
UpdateProvisionedModelThroughputRequest.Builderavoiding the need to create one manually viaUpdateProvisionedModelThroughputRequest.builder()- Parameters:
updateProvisionedModelThroughputRequest- AConsumerthat will call methods onUpdateProvisionedModelThroughputRequest.Builderto create a request.- Returns:
- Result of the UpdateProvisionedModelThroughput operation returned by the service.
- Throws:
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.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.BedrockException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static BedrockClient create()
Create aBedrockClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static BedrockClientBuilder builder()
Create a builder that can be used to configure and create aBedrockClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default BedrockServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-