aws-sdk
Version:
AWS SDK for JavaScript
633 lines • 145 kB
TypeScript
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config-base';
interface Blob {}
declare class Bedrock extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: Bedrock.Types.ClientConfiguration)
config: Config & Bedrock.Types.ClientConfiguration;
/**
* Creates a batch deletion job. A model evaluation job can only be deleted if it has following status FAILED, COMPLETED, and STOPPED. You can request up to 25 model evaluation jobs be deleted in a single request.
*/
batchDeleteEvaluationJob(params: Bedrock.Types.BatchDeleteEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.BatchDeleteEvaluationJobResponse) => void): Request<Bedrock.Types.BatchDeleteEvaluationJobResponse, AWSError>;
/**
* Creates a batch deletion job. A model evaluation job can only be deleted if it has following status FAILED, COMPLETED, and STOPPED. You can request up to 25 model evaluation jobs be deleted in a single request.
*/
batchDeleteEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.BatchDeleteEvaluationJobResponse) => void): Request<Bedrock.Types.BatchDeleteEvaluationJobResponse, AWSError>;
/**
* API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation.
*/
createEvaluationJob(params: Bedrock.Types.CreateEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateEvaluationJobResponse) => void): Request<Bedrock.Types.CreateEvaluationJobResponse, AWSError>;
/**
* API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation.
*/
createEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.CreateEvaluationJobResponse) => void): Request<Bedrock.Types.CreateEvaluationJobResponse, AWSError>;
/**
* Creates a guardrail to block topics and to implement safeguards for your generative AI applications. You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection. Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content. Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses. Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc. Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses. In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail. For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide.
*/
createGuardrail(params: Bedrock.Types.CreateGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailResponse) => void): Request<Bedrock.Types.CreateGuardrailResponse, AWSError>;
/**
* Creates a guardrail to block topics and to implement safeguards for your generative AI applications. You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection. Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content. Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses. Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc. Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses. In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail. For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide.
*/
createGuardrail(callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailResponse) => void): Request<Bedrock.Types.CreateGuardrailResponse, AWSError>;
/**
* Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
*/
createGuardrailVersion(params: Bedrock.Types.CreateGuardrailVersionRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailVersionResponse) => void): Request<Bedrock.Types.CreateGuardrailVersionResponse, AWSError>;
/**
* Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
*/
createGuardrailVersion(callback?: (err: AWSError, data: Bedrock.Types.CreateGuardrailVersionResponse) => void): Request<Bedrock.Types.CreateGuardrailVersionResponse, AWSError>;
/**
* Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
createModelCopyJob(params: Bedrock.Types.CreateModelCopyJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateModelCopyJobResponse) => void): Request<Bedrock.Types.CreateModelCopyJobResponse, AWSError>;
/**
* Copies a model to another region so that it can be used there. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
createModelCopyJob(callback?: (err: AWSError, data: Bedrock.Types.CreateModelCopyJobResponse) => void): Request<Bedrock.Types.CreateModelCopyJobResponse, AWSError>;
/**
* Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
createModelCustomizationJob(params: Bedrock.Types.CreateModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateModelCustomizationJobResponse) => void): Request<Bedrock.Types.CreateModelCustomizationJobResponse, AWSError>;
/**
* Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
createModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.CreateModelCustomizationJobResponse) => void): Request<Bedrock.Types.CreateModelCustomizationJobResponse, AWSError>;
/**
* Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model
*/
createModelImportJob(params: Bedrock.Types.CreateModelImportJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateModelImportJobResponse) => void): Request<Bedrock.Types.CreateModelImportJobResponse, AWSError>;
/**
* Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model
*/
createModelImportJob(callback?: (err: AWSError, data: Bedrock.Types.CreateModelImportJobResponse) => void): Request<Bedrock.Types.CreateModelImportJobResponse, AWSError>;
/**
* Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference. The response returns a jobArn that you can use to stop or get details about the job.
*/
createModelInvocationJob(params: Bedrock.Types.CreateModelInvocationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateModelInvocationJobResponse) => void): Request<Bedrock.Types.CreateModelInvocationJobResponse, AWSError>;
/**
* Creates a batch inference job to invoke a model on multiple prompts. Format your data according to Format your inference data and upload it to an Amazon S3 bucket. For more information, see Process multiple prompts with batch inference. The response returns a jobArn that you can use to stop or get details about the job.
*/
createModelInvocationJob(callback?: (err: AWSError, data: Bedrock.Types.CreateModelInvocationJobResponse) => void): Request<Bedrock.Types.CreateModelInvocationJobResponse, AWSError>;
/**
* Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
createProvisionedModelThroughput(params: Bedrock.Types.CreateProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.CreateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.CreateProvisionedModelThroughputResponse, AWSError>;
/**
* Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify. For pricing details, see Amazon Bedrock Pricing. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
createProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.CreateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.CreateProvisionedModelThroughputResponse, AWSError>;
/**
* Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
deleteCustomModel(params: Bedrock.Types.DeleteCustomModelRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteCustomModelResponse) => void): Request<Bedrock.Types.DeleteCustomModelResponse, AWSError>;
/**
* Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
deleteCustomModel(callback?: (err: AWSError, data: Bedrock.Types.DeleteCustomModelResponse) => void): Request<Bedrock.Types.DeleteCustomModelResponse, AWSError>;
/**
* Deletes a guardrail. To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. If you delete a guardrail, all of its versions will be deleted. To delete a version of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field and the version in the guardrailVersion field.
*/
deleteGuardrail(params: Bedrock.Types.DeleteGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteGuardrailResponse) => void): Request<Bedrock.Types.DeleteGuardrailResponse, AWSError>;
/**
* Deletes a guardrail. To delete a guardrail, only specify the ARN of the guardrail in the guardrailIdentifier field. If you delete a guardrail, all of its versions will be deleted. To delete a version of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field and the version in the guardrailVersion field.
*/
deleteGuardrail(callback?: (err: AWSError, data: Bedrock.Types.DeleteGuardrailResponse) => void): Request<Bedrock.Types.DeleteGuardrailResponse, AWSError>;
/**
* Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
deleteImportedModel(params: Bedrock.Types.DeleteImportedModelRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteImportedModelResponse) => void): Request<Bedrock.Types.DeleteImportedModelResponse, AWSError>;
/**
* Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
deleteImportedModel(callback?: (err: AWSError, data: Bedrock.Types.DeleteImportedModelResponse) => void): Request<Bedrock.Types.DeleteImportedModelResponse, AWSError>;
/**
* Delete the invocation logging.
*/
deleteModelInvocationLoggingConfiguration(params: Bedrock.Types.DeleteModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Delete the invocation logging.
*/
deleteModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.DeleteModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
deleteProvisionedModelThroughput(params: Bedrock.Types.DeleteProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.DeleteProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.DeleteProvisionedModelThroughputResponse, AWSError>;
/**
* Deletes a Provisioned Throughput. You can't delete a Provisioned Throughput before the commitment term is over. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
deleteProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.DeleteProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.DeleteProvisionedModelThroughputResponse, AWSError>;
/**
* Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
*/
getCustomModel(params: Bedrock.Types.GetCustomModelRequest, callback?: (err: AWSError, data: Bedrock.Types.GetCustomModelResponse) => void): Request<Bedrock.Types.GetCustomModelResponse, AWSError>;
/**
* Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
*/
getCustomModel(callback?: (err: AWSError, data: Bedrock.Types.GetCustomModelResponse) => void): Request<Bedrock.Types.GetCustomModelResponse, AWSError>;
/**
* Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.
*/
getEvaluationJob(params: Bedrock.Types.GetEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetEvaluationJobResponse) => void): Request<Bedrock.Types.GetEvaluationJobResponse, AWSError>;
/**
* Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.
*/
getEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.GetEvaluationJobResponse) => void): Request<Bedrock.Types.GetEvaluationJobResponse, AWSError>;
/**
* Get details about a Amazon Bedrock foundation model.
*/
getFoundationModel(params: Bedrock.Types.GetFoundationModelRequest, callback?: (err: AWSError, data: Bedrock.Types.GetFoundationModelResponse) => void): Request<Bedrock.Types.GetFoundationModelResponse, AWSError>;
/**
* Get details about a Amazon Bedrock foundation model.
*/
getFoundationModel(callback?: (err: AWSError, data: Bedrock.Types.GetFoundationModelResponse) => void): Request<Bedrock.Types.GetFoundationModelResponse, AWSError>;
/**
* Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.
*/
getGuardrail(params: Bedrock.Types.GetGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.GetGuardrailResponse) => void): Request<Bedrock.Types.GetGuardrailResponse, AWSError>;
/**
* Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.
*/
getGuardrail(callback?: (err: AWSError, data: Bedrock.Types.GetGuardrailResponse) => void): Request<Bedrock.Types.GetGuardrailResponse, AWSError>;
/**
* Gets properties associated with a customized model you imported.
*/
getImportedModel(params: Bedrock.Types.GetImportedModelRequest, callback?: (err: AWSError, data: Bedrock.Types.GetImportedModelResponse) => void): Request<Bedrock.Types.GetImportedModelResponse, AWSError>;
/**
* Gets properties associated with a customized model you imported.
*/
getImportedModel(callback?: (err: AWSError, data: Bedrock.Types.GetImportedModelResponse) => void): Request<Bedrock.Types.GetImportedModelResponse, AWSError>;
/**
* Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.
*/
getInferenceProfile(params: Bedrock.Types.GetInferenceProfileRequest, callback?: (err: AWSError, data: Bedrock.Types.GetInferenceProfileResponse) => void): Request<Bedrock.Types.GetInferenceProfileResponse, AWSError>;
/**
* Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.
*/
getInferenceProfile(callback?: (err: AWSError, data: Bedrock.Types.GetInferenceProfileResponse) => void): Request<Bedrock.Types.GetInferenceProfileResponse, AWSError>;
/**
* Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
getModelCopyJob(params: Bedrock.Types.GetModelCopyJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelCopyJobResponse) => void): Request<Bedrock.Types.GetModelCopyJobResponse, AWSError>;
/**
* Retrieves information about a model copy job. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
getModelCopyJob(callback?: (err: AWSError, data: Bedrock.Types.GetModelCopyJobResponse) => void): Request<Bedrock.Types.GetModelCopyJobResponse, AWSError>;
/**
* Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
getModelCustomizationJob(params: Bedrock.Types.GetModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelCustomizationJobResponse) => void): Request<Bedrock.Types.GetModelCustomizationJobResponse, AWSError>;
/**
* Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
getModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.GetModelCustomizationJobResponse) => void): Request<Bedrock.Types.GetModelCustomizationJobResponse, AWSError>;
/**
* Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
getModelImportJob(params: Bedrock.Types.GetModelImportJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelImportJobResponse) => void): Request<Bedrock.Types.GetModelImportJobResponse, AWSError>;
/**
* Retrieves the properties associated with import model job, including the status of the job. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
getModelImportJob(callback?: (err: AWSError, data: Bedrock.Types.GetModelImportJobResponse) => void): Request<Bedrock.Types.GetModelImportJobResponse, AWSError>;
/**
* Gets details about a batch inference job. For more information, see View details about a batch inference job
*/
getModelInvocationJob(params: Bedrock.Types.GetModelInvocationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationJobResponse) => void): Request<Bedrock.Types.GetModelInvocationJobResponse, AWSError>;
/**
* Gets details about a batch inference job. For more information, see View details about a batch inference job
*/
getModelInvocationJob(callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationJobResponse) => void): Request<Bedrock.Types.GetModelInvocationJobResponse, AWSError>;
/**
* Get the current configuration values for model invocation logging.
*/
getModelInvocationLoggingConfiguration(params: Bedrock.Types.GetModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.GetModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Get the current configuration values for model invocation logging.
*/
getModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.GetModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.GetModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
getProvisionedModelThroughput(params: Bedrock.Types.GetProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.GetProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.GetProvisionedModelThroughputResponse, AWSError>;
/**
* Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
getProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.GetProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.GetProvisionedModelThroughputResponse, AWSError>;
/**
* Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
listCustomModels(params: Bedrock.Types.ListCustomModelsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListCustomModelsResponse) => void): Request<Bedrock.Types.ListCustomModelsResponse, AWSError>;
/**
* Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
listCustomModels(callback?: (err: AWSError, data: Bedrock.Types.ListCustomModelsResponse) => void): Request<Bedrock.Types.ListCustomModelsResponse, AWSError>;
/**
* Lists model evaluation jobs.
*/
listEvaluationJobs(params: Bedrock.Types.ListEvaluationJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListEvaluationJobsResponse) => void): Request<Bedrock.Types.ListEvaluationJobsResponse, AWSError>;
/**
* Lists model evaluation jobs.
*/
listEvaluationJobs(callback?: (err: AWSError, data: Bedrock.Types.ListEvaluationJobsResponse) => void): Request<Bedrock.Types.ListEvaluationJobsResponse, AWSError>;
/**
* Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
*/
listFoundationModels(params: Bedrock.Types.ListFoundationModelsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListFoundationModelsResponse) => void): Request<Bedrock.Types.ListFoundationModelsResponse, AWSError>;
/**
* Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
*/
listFoundationModels(callback?: (err: AWSError, data: Bedrock.Types.ListFoundationModelsResponse) => void): Request<Bedrock.Types.ListFoundationModelsResponse, AWSError>;
/**
* Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field. You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
*/
listGuardrails(params: Bedrock.Types.ListGuardrailsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListGuardrailsResponse) => void): Request<Bedrock.Types.ListGuardrailsResponse, AWSError>;
/**
* Lists details about all the guardrails in an account. To list the DRAFT version of all your guardrails, don't specify the guardrailIdentifier field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier field. You can set the maximum number of results to return in a response in the maxResults field. If there are more results than the number you set, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.
*/
listGuardrails(callback?: (err: AWSError, data: Bedrock.Types.ListGuardrailsResponse) => void): Request<Bedrock.Types.ListGuardrailsResponse, AWSError>;
/**
* Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
listImportedModels(params: Bedrock.Types.ListImportedModelsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListImportedModelsResponse) => void): Request<Bedrock.Types.ListImportedModelsResponse, AWSError>;
/**
* Returns a list of models you've imported. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
listImportedModels(callback?: (err: AWSError, data: Bedrock.Types.ListImportedModelsResponse) => void): Request<Bedrock.Types.ListImportedModelsResponse, AWSError>;
/**
* Returns a list of inference profiles that you can use.
*/
listInferenceProfiles(params: Bedrock.Types.ListInferenceProfilesRequest, callback?: (err: AWSError, data: Bedrock.Types.ListInferenceProfilesResponse) => void): Request<Bedrock.Types.ListInferenceProfilesResponse, AWSError>;
/**
* Returns a list of inference profiles that you can use.
*/
listInferenceProfiles(callback?: (err: AWSError, data: Bedrock.Types.ListInferenceProfilesResponse) => void): Request<Bedrock.Types.ListInferenceProfilesResponse, AWSError>;
/**
* Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
listModelCopyJobs(params: Bedrock.Types.ListModelCopyJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListModelCopyJobsResponse) => void): Request<Bedrock.Types.ListModelCopyJobsResponse, AWSError>;
/**
* Returns a list of model copy jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Copy models to be used in other regions in the Amazon Bedrock User Guide.
*/
listModelCopyJobs(callback?: (err: AWSError, data: Bedrock.Types.ListModelCopyJobsResponse) => void): Request<Bedrock.Types.ListModelCopyJobsResponse, AWSError>;
/**
* Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
listModelCustomizationJobs(params: Bedrock.Types.ListModelCustomizationJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListModelCustomizationJobsResponse) => void): Request<Bedrock.Types.ListModelCustomizationJobsResponse, AWSError>;
/**
* Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
listModelCustomizationJobs(callback?: (err: AWSError, data: Bedrock.Types.ListModelCustomizationJobsResponse) => void): Request<Bedrock.Types.ListModelCustomizationJobsResponse, AWSError>;
/**
* Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
listModelImportJobs(params: Bedrock.Types.ListModelImportJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListModelImportJobsResponse) => void): Request<Bedrock.Types.ListModelImportJobsResponse, AWSError>;
/**
* Returns a list of import jobs you've submitted. You can filter the results to return based on one or more criteria. For more information, see Import a customized model in the Amazon Bedrock User Guide.
*/
listModelImportJobs(callback?: (err: AWSError, data: Bedrock.Types.ListModelImportJobsResponse) => void): Request<Bedrock.Types.ListModelImportJobsResponse, AWSError>;
/**
* Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
*/
listModelInvocationJobs(params: Bedrock.Types.ListModelInvocationJobsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListModelInvocationJobsResponse) => void): Request<Bedrock.Types.ListModelInvocationJobsResponse, AWSError>;
/**
* Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.
*/
listModelInvocationJobs(callback?: (err: AWSError, data: Bedrock.Types.ListModelInvocationJobsResponse) => void): Request<Bedrock.Types.ListModelInvocationJobsResponse, AWSError>;
/**
* Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
listProvisionedModelThroughputs(params: Bedrock.Types.ListProvisionedModelThroughputsRequest, callback?: (err: AWSError, data: Bedrock.Types.ListProvisionedModelThroughputsResponse) => void): Request<Bedrock.Types.ListProvisionedModelThroughputsResponse, AWSError>;
/**
* Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
listProvisionedModelThroughputs(callback?: (err: AWSError, data: Bedrock.Types.ListProvisionedModelThroughputsResponse) => void): Request<Bedrock.Types.ListProvisionedModelThroughputsResponse, AWSError>;
/**
* List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
listTagsForResource(params: Bedrock.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.ListTagsForResourceResponse) => void): Request<Bedrock.Types.ListTagsForResourceResponse, AWSError>;
/**
* List the tags associated with the specified resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
listTagsForResource(callback?: (err: AWSError, data: Bedrock.Types.ListTagsForResourceResponse) => void): Request<Bedrock.Types.ListTagsForResourceResponse, AWSError>;
/**
* Set the configuration values for model invocation logging.
*/
putModelInvocationLoggingConfiguration(params: Bedrock.Types.PutModelInvocationLoggingConfigurationRequest, callback?: (err: AWSError, data: Bedrock.Types.PutModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.PutModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Set the configuration values for model invocation logging.
*/
putModelInvocationLoggingConfiguration(callback?: (err: AWSError, data: Bedrock.Types.PutModelInvocationLoggingConfigurationResponse) => void): Request<Bedrock.Types.PutModelInvocationLoggingConfigurationResponse, AWSError>;
/**
* Stops an in progress model evaluation job.
*/
stopEvaluationJob(params: Bedrock.Types.StopEvaluationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.StopEvaluationJobResponse) => void): Request<Bedrock.Types.StopEvaluationJobResponse, AWSError>;
/**
* Stops an in progress model evaluation job.
*/
stopEvaluationJob(callback?: (err: AWSError, data: Bedrock.Types.StopEvaluationJobResponse) => void): Request<Bedrock.Types.StopEvaluationJobResponse, AWSError>;
/**
* Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
stopModelCustomizationJob(params: Bedrock.Types.StopModelCustomizationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.StopModelCustomizationJobResponse) => void): Request<Bedrock.Types.StopModelCustomizationJobResponse, AWSError>;
/**
* Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.
*/
stopModelCustomizationJob(callback?: (err: AWSError, data: Bedrock.Types.StopModelCustomizationJobResponse) => void): Request<Bedrock.Types.StopModelCustomizationJobResponse, AWSError>;
/**
* Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.
*/
stopModelInvocationJob(params: Bedrock.Types.StopModelInvocationJobRequest, callback?: (err: AWSError, data: Bedrock.Types.StopModelInvocationJobResponse) => void): Request<Bedrock.Types.StopModelInvocationJobResponse, AWSError>;
/**
* Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.
*/
stopModelInvocationJob(callback?: (err: AWSError, data: Bedrock.Types.StopModelInvocationJobResponse) => void): Request<Bedrock.Types.StopModelInvocationJobResponse, AWSError>;
/**
* Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
tagResource(params: Bedrock.Types.TagResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.TagResourceResponse) => void): Request<Bedrock.Types.TagResourceResponse, AWSError>;
/**
* Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
tagResource(callback?: (err: AWSError, data: Bedrock.Types.TagResourceResponse) => void): Request<Bedrock.Types.TagResourceResponse, AWSError>;
/**
* Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
untagResource(params: Bedrock.Types.UntagResourceRequest, callback?: (err: AWSError, data: Bedrock.Types.UntagResourceResponse) => void): Request<Bedrock.Types.UntagResourceResponse, AWSError>;
/**
* Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
*/
untagResource(callback?: (err: AWSError, data: Bedrock.Types.UntagResourceResponse) => void): Request<Bedrock.Types.UntagResourceResponse, AWSError>;
/**
* Updates a guardrail with the values you specify. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field.
*/
updateGuardrail(params: Bedrock.Types.UpdateGuardrailRequest, callback?: (err: AWSError, data: Bedrock.Types.UpdateGuardrailResponse) => void): Request<Bedrock.Types.UpdateGuardrailResponse, AWSError>;
/**
* Updates a guardrail with the values you specify. Specify a name and optional description. Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields. Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic. Give a name and description so that the guardrail can properly identify the topic. Specify DENY in the type field. (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list. Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig. Specify the category in the type field. Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig. (Optional) For security, include the ARN of a KMS key in the kmsKeyId field.
*/
updateGuardrail(callback?: (err: AWSError, data: Bedrock.Types.UpdateGuardrailResponse) => void): Request<Bedrock.Types.UpdateGuardrailResponse, AWSError>;
/**
* Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
updateProvisionedModelThroughput(params: Bedrock.Types.UpdateProvisionedModelThroughputRequest, callback?: (err: AWSError, data: Bedrock.Types.UpdateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.UpdateProvisionedModelThroughputResponse, AWSError>;
/**
* Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
*/
updateProvisionedModelThroughput(callback?: (err: AWSError, data: Bedrock.Types.UpdateProvisionedModelThroughputResponse) => void): Request<Bedrock.Types.UpdateProvisionedModelThroughputResponse, AWSError>;
}
declare namespace Bedrock {
export type AccountId = string;
export interface AutomatedEvaluationConfig {
/**
* Specifies the required elements for an automatic model evaluation job.
*/
datasetMetricConfigs: EvaluationDatasetMetricConfigs;
}
export type BaseModelIdentifier = string;
export interface BatchDeleteEvaluationJobError {
/**
* The ARN of the model evaluation job being deleted.
*/
jobIdentifier: EvaluationJobIdentifier;
/**
* A HTTP status code of the model evaluation job being deleted.
*/
code: String;
/**
* A status message about the model evaluation job deletion.
*/
message?: String;
}
export type BatchDeleteEvaluationJobErrors = BatchDeleteEvaluationJobError[];
export interface BatchDeleteEvaluationJobItem {
/**
* The ARN of model evaluation job to be deleted.
*/
jobIdentifier: EvaluationJobIdentifier;
/**
* The status of the job's deletion.
*/
jobStatus: EvaluationJobStatus;
}
export type BatchDeleteEvaluationJobItems = BatchDeleteEvaluationJobItem[];
export interface BatchDeleteEvaluationJobRequest {
/**
* An array of model evaluation job ARNs to be deleted.
*/
jobIdentifiers: EvaluationJobIdentifiers;
}
export interface BatchDeleteEvaluationJobResponse {
/**
* A JSON object containing the HTTP status codes and the ARNs of model evaluation jobs that failed to be deleted.
*/
errors: BatchDeleteEvaluationJobErrors;
/**
* The list of model evaluation jobs to be deleted.
*/
evaluationJobs: BatchDeleteEvaluationJobItems;
}
export type BedrockModelId = string;
export type Boolean = boolean;
export type BrandedName = string;
export type BucketName = string;
export interface CloudWatchConfig {
/**
* The log group name.
*/
logGroupName: LogGroupName;
/**
* The role Amazon Resource Name (ARN).
*/
roleArn: RoleArn;
/**
* S3 configuration for delivering a large amount of data.
*/
largeDataDeliveryS3Config?: S3Config;
}
export type CommitmentDuration = "OneMonth"|"SixMonths"|string;
export interface CreateEvaluationJobRequest {
/**
* The name of the model evaluation job. Model evaluation job names must unique with your AWS account, and your account's AWS region.
*/
jobName: EvaluationJobName;
/**
* A description of the model evaluation job.
*/
jobDescription?: EvaluationJobDescription;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
*/
clientRequestToken?: IdempotencyToken;
/**
* The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. The service role must have Amazon Bedrock as the service principal, and provide access to any Amazon S3 buckets specified in the EvaluationConfig object. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission. To learn more about the required permissions, see Required permissions.
*/
roleArn: RoleArn;
/**
* Specify your customer managed key ARN that will be used to encrypt your model evaluation job.
*/
customerEncryptionKeyId?: KmsKeyId;
/**
* Tags to attach to the model evaluation job.
*/
jobTags?: TagList;
/**
* Specifies whether the model evaluation job is automatic or uses human worker.
*/
evaluationConfig: EvaluationConfig;
/**
* Specify the models you want to use in your model evaluation job. Automatic model evaluation jobs support a single model, and model evaluation job that use human workers support two models.
*/
inferenceConfig: EvaluationInferenceConfig;
/**
* An object that defines where the results of model evaluation job will be saved in Amazon S3.
*/
outputDataConfig: EvaluationOutputDataConfig;
}
export interface CreateEvaluationJobResponse {
/**
* The ARN of the model evaluation job.
*/
jobArn: EvaluationJobArn;
}
export interface CreateGuardrailRequest {
/**
* The name to give the guardrail.
*/
name: GuardrailName;
/**
* A description of the guardrail.
*/
description?: GuardrailDescription;
/**
* The topic policies to configure for the guardrail.
*/
topicPolicyConfig?: GuardrailTopicPolicyConfig;
/**
* The content filter policies to configure for the guardrail.
*/
contentPolicyConfig?: GuardrailContentPolicyConfig;
/**
* The word policy you configure for the guardrail.
*/
wordPolicyConfig?: GuardrailWordPolicyConfig;
/**
* The sensitive information policy to configure for the guardrail.
*/
sensitiveInformationPolicyConfig?: GuardrailSensitiveInformationPolicyConfig;
/**
* The contextual grounding policy configuration used to create a guardrail.
*/
contextualGroundingPolicyConfig?: GuardrailContextualGroundingPolicyConfig;
/**
* The message to return when the guardrail blocks a prompt.
*/
blockedInputMessaging: GuardrailBlockedMessaging;
/**
* The message to return when the guardrail blocks a model response.
*/
blockedOutputsMessaging: GuardrailBlockedMessaging;
/**
* The ARN of the KMS key that you use to encrypt the guardrail.
*/
kmsKeyId?: KmsKeyId;
/**
* The tags that you want to attach to the guardrail.
*/
tags?: TagList;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
*/
clientRequestToken?: IdempotencyToken;
}
export interface CreateGuardrailResponse {
/**
* The unique identifier of the guardrail that was created.
*/
guardrailId: GuardrailId;
/**
* The ARN of the guardrail.
*/
guardrailArn: GuardrailArn;
/**
* The version of the guardrail that was created. This value will always be DRAFT.
*/
version: GuardrailDraftVersion;
/**
* The time at which the guardrail was created.
*/
createdAt: Timestamp;
}
export interface CreateGuardrailVersionRequest {
/**
* The unique identifier of the guardrail. This can be an ID or the ARN.
*/
guardrailIdentifier: GuardrailIdentifier;
/**
* A description of the guardrail version.
*/
description?: GuardrailDescription;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency in the Amazon S3 User Guide.
*/
clientRequestToken?: IdempotencyToken;
}
export interface CreateGuardrailVersionResponse {
/**
* The unique identifier of the guardrail.
*/
guardrailId: GuardrailId;
/**
* The number of the version of the guardrail.
*/
version: GuardrailNumericalVersion;
}
export interface CreateModelCopyJobRequest {
/**
* The Amazon Resource Name (ARN) of the model to be copied.
*/
sourceModelArn: ModelArn;
/**
* A name for the copied model.
*/
targetModelName: CustomModelName;
/**
* The ARN of the KMS key that you use to encrypt the model copy.
*/
modelKmsKeyId?: KmsKeyId;
/**
* Tags to associate with the target model. For more information, see Tag resources in the Amazon Bedrock User Guide.
*/
targetModelTags?: TagList;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
*/
clientRequestToken?: IdempotencyToken;
}
export interface CreateModelCopyJobResponse {
/**
* The Amazon Resource Name (ARN) of the model copy job.
*/
jobArn: ModelCopyJobArn;
}
export interface CreateModelCustomizationJobRequest {
/**
* A name for the fine-tuning job.
*/
jobName: JobName;
/**
* A name for the resulting custom model.
*/
customModelName: CustomModelName;
/**
* The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.
*/
roleArn: RoleArn;
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
*/
clientRequestToken?: I