SDK for PHP 3.x

Client: Aws\Bedrock\BedrockClient
Service ID: bedrock
Version: 2023-04-20

This page describes the parameters and results for the operations of the Amazon Bedrock (2023-04-20), and shows how to use the Aws\Bedrock\BedrockClient object to call the described operations. This documentation is specific to the 2023-04-20 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

BatchDeleteEvaluationJob ( array $params = [] )
Creates a batch deletion job.
CreateEvaluationJob ( array $params = [] )
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers.
CreateGuardrail ( array $params = [] )
Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
CreateGuardrailVersion ( array $params = [] )
Creates a version of the guardrail.
CreateModelCopyJob ( array $params = [] )
Copies a model to another region so that it can be used there.
CreateModelCustomizationJob ( array $params = [] )
Creates a fine-tuning job to customize a base model.
CreateModelImportJob ( array $params = [] )
Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker.
CreateModelInvocationJob ( array $params = [] )
Creates a batch inference job to invoke a model on multiple prompts.
CreateProvisionedModelThroughput ( array $params = [] )
Creates dedicated throughput for a base or custom model with the model units and for the duration that you specify.
DeleteCustomModel ( array $params = [] )
Deletes a custom model that you created earlier.
DeleteGuardrail ( array $params = [] )
Deletes a guardrail.
DeleteImportedModel ( array $params = [] )
Deletes a custom model that you imported earlier.
DeleteModelInvocationLoggingConfiguration ( array $params = [] )
Delete the invocation logging.
DeleteProvisionedModelThroughput ( array $params = [] )
Deletes a Provisioned Throughput.
GetCustomModel ( array $params = [] )
Get the properties associated with a Amazon Bedrock custom model that you have created.
GetEvaluationJob ( array $params = [] )
Retrieves the properties associated with a model evaluation job, including the status of the job.
GetFoundationModel ( array $params = [] )
Get details about a Amazon Bedrock foundation model.
GetGuardrail ( array $params = [] )
Gets details about a guardrail.
GetImportedModel ( array $params = [] )
Gets properties associated with a customized model you imported.
GetInferenceProfile ( array $params = [] )
Gets information about an inference profile.
GetModelCopyJob ( array $params = [] )
Retrieves information about a model copy job.
GetModelCustomizationJob ( array $params = [] )
Retrieves the properties associated with a model-customization job, including the status of the job.
GetModelImportJob ( array $params = [] )
Retrieves the properties associated with import model job, including the status of the job.
GetModelInvocationJob ( array $params = [] )
Gets details about a batch inference job.
GetModelInvocationLoggingConfiguration ( array $params = [] )
Get the current configuration values for model invocation logging.
GetProvisionedModelThroughput ( array $params = [] )
Returns details for a Provisioned Throughput.
ListCustomModels ( array $params = [] )
Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation.
ListEvaluationJobs ( array $params = [] )
Lists model evaluation jobs.
ListFoundationModels ( array $params = [] )
Lists Amazon Bedrock foundation models that you can use.
ListGuardrails ( array $params = [] )
Lists details about all the guardrails in an account.
ListImportedModels ( array $params = [] )
Returns a list of models you've imported.
ListInferenceProfiles ( array $params = [] )
Returns a list of inference profiles that you can use.
ListModelCopyJobs ( array $params = [] )
Returns a list of model copy jobs that you have submitted.
ListModelCustomizationJobs ( array $params = [] )
Returns a list of model customization jobs that you have submitted.
ListModelImportJobs ( array $params = [] )
Returns a list of import jobs you've submitted.
ListModelInvocationJobs ( array $params = [] )
Lists all batch inference jobs in the account.
ListProvisionedModelThroughputs ( array $params = [] )
Lists the Provisioned Throughputs in the account.
ListTagsForResource ( array $params = [] )
List the tags associated with the specified resource.
PutModelInvocationLoggingConfiguration ( array $params = [] )
Set the configuration values for model invocation logging.
StopEvaluationJob ( array $params = [] )
Stops an in progress model evaluation job.
StopModelCustomizationJob ( array $params = [] )
Stops an active model customization job.
StopModelInvocationJob ( array $params = [] )
Stops a batch inference job.
TagResource ( array $params = [] )
Associate tags with a resource.
UntagResource ( array $params = [] )
Remove one or more tags from a resource.
UpdateGuardrail ( array $params = [] )
Updates a guardrail with the values you specify.
UpdateProvisionedModelThroughput ( array $params = [] )
Updates the name or associated model for a Provisioned Throughput.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListCustomModels
ListEvaluationJobs
ListGuardrails
ListImportedModels
ListInferenceProfiles
ListModelCopyJobs
ListModelCustomizationJobs
ListModelImportJobs
ListModelInvocationJobs
ListProvisionedModelThroughputs

Operations

BatchDeleteEvaluationJob

$result = $client->batchDeleteEvaluationJob([/* ... */]);
$promise = $client->batchDeleteEvaluationJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->batchDeleteEvaluationJob([
    'jobIdentifiers' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
jobIdentifiers
Required: Yes
Type: Array of strings

An array of model evaluation job ARNs to be deleted.

Result Syntax

[
    'errors' => [
        [
            'code' => '<string>',
            'jobIdentifier' => '<string>',
            'message' => '<string>',
        ],
        // ...
    ],
    'evaluationJobs' => [
        [
            'jobIdentifier' => '<string>',
            'jobStatus' => 'InProgress|Completed|Failed|Stopping|Stopped|Deleting',
        ],
        // ...
    ],
]

Result Details

Members
errors
Required: Yes
Type: Array of BatchDeleteEvaluationJobError structures

A JSON object containing the HTTP status codes and the ARNs of model evaluation jobs that failed to be deleted.

evaluationJobs
Required: Yes
Type: Array of BatchDeleteEvaluationJobItem structures

The list of model evaluation jobs to be deleted.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateEvaluationJob

$result = $client->createEvaluationJob([/* ... */]);
$promise = $client->createEvaluationJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createEvaluationJob([
    'clientRequestToken' => '<string>',
    'customerEncryptionKeyId' => '<string>',
    'evaluationConfig' => [ // REQUIRED
        'automated' => [
            'datasetMetricConfigs' => [ // REQUIRED
                [
                    'dataset' => [ // REQUIRED
                        'datasetLocation' => [
                            's3Uri' => '<string>',
                        ],
                        'name' => '<string>', // REQUIRED
                    ],
                    'metricNames' => ['<string>', ...], // REQUIRED
                    'taskType' => 'Summarization|Classification|QuestionAndAnswer|Generation|Custom', // REQUIRED
                ],
                // ...
            ],
        ],
        'human' => [
            'customMetrics' => [
                [
                    'description' => '<string>',
                    'name' => '<string>', // REQUIRED
                    'ratingMethod' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'datasetMetricConfigs' => [ // REQUIRED
                [
                    'dataset' => [ // REQUIRED
                        'datasetLocation' => [
                            's3Uri' => '<string>',
                        ],
                        'name' => '<string>', // REQUIRED
                    ],
                    'metricNames' => ['<string>', ...], // REQUIRED
                    'taskType' => 'Summarization|Classification|QuestionAndAnswer|Generation|Custom', // REQUIRED
                ],
                // ...
            ],
            'humanWorkflowConfig' => [
                'flowDefinitionArn' => '<string>', // REQUIRED
                'instructions' => '<string>',
            ],
        ],
    ],
    'inferenceConfig' => [ // REQUIRED
        'models' => [
            [
                'bedrockModel' => [
                    'inferenceParams' => '<string>', // REQUIRED
                    'modelIdentifier' => '<string>', // REQUIRED
                ],
            ],
            // ...
        ],
    ],
    'jobDescription' => '<string>',
    'jobName' => '<string>', // REQUIRED
    'jobTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'outputDataConfig' => [ // REQUIRED
        's3Uri' => '<string>', // REQUIRED
    ],
    'roleArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientRequestToken
Type: string

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.

customerEncryptionKeyId
Type: string

Specify your customer managed key ARN that will be used to encrypt your model evaluation job.

evaluationConfig
Required: Yes
Type: EvaluationConfig structure

Specifies whether the model evaluation job is automatic or uses human worker.

inferenceConfig
Required: Yes
Type: EvaluationInferenceConfig structure

Specify the models you want to use in your model evaluation job. Automatic model evaluation jobs support a single model or inference profile, and model evaluation job that use human workers support two models or inference profiles.

jobDescription
Type: string

A description of the model evaluation job.

jobName
Required: Yes
Type: string

The name of the model evaluation job. Model evaluation job names must unique with your AWS account, and your account's AWS region.

jobTags
Type: Array of Tag structures

Tags to attach to the model evaluation job.

outputDataConfig
Required: Yes
Type: EvaluationOutputDataConfig structure

An object that defines where the results of model evaluation job will be saved in Amazon S3.

roleArn
Required: Yes
Type: string

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.

Result Syntax

[
    'jobArn' => '<string>',
]

Result Details

Members
jobArn
Required: Yes
Type: string

The ARN of the model evaluation job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateGuardrail

$result = $client->createGuardrail([/* ... */]);
$promise = $client->createGuardrailAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createGuardrail([
    'blockedInputMessaging' => '<string>', // REQUIRED
    'blockedOutputsMessaging' => '<string>', // REQUIRED
    'clientRequestToken' => '<string>',
    'contentPolicyConfig' => [
        'filtersConfig' => [ // REQUIRED
            [
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'outputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'type' => 'SEXUAL|VIOLENCE|HATE|INSULTS|MISCONDUCT|PROMPT_ATTACK', // REQUIRED
            ],
            // ...
        ],
    ],
    'contextualGroundingPolicyConfig' => [
        'filtersConfig' => [ // REQUIRED
            [
                'threshold' => <float>, // REQUIRED
                'type' => 'GROUNDING|RELEVANCE', // REQUIRED
            ],
            // ...
        ],
    ],
    'description' => '<string>',
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'sensitiveInformationPolicyConfig' => [
        'piiEntitiesConfig' => [
            [
                'action' => 'BLOCK|ANONYMIZE', // REQUIRED
                'type' => 'ADDRESS|AGE|AWS_ACCESS_KEY|AWS_SECRET_KEY|CA_HEALTH_NUMBER|CA_SOCIAL_INSURANCE_NUMBER|CREDIT_DEBIT_CARD_CVV|CREDIT_DEBIT_CARD_EXPIRY|CREDIT_DEBIT_CARD_NUMBER|DRIVER_ID|EMAIL|INTERNATIONAL_BANK_ACCOUNT_NUMBER|IP_ADDRESS|LICENSE_PLATE|MAC_ADDRESS|NAME|PASSWORD|PHONE|PIN|SWIFT_CODE|UK_NATIONAL_HEALTH_SERVICE_NUMBER|UK_NATIONAL_INSURANCE_NUMBER|UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER|URL|USERNAME|US_BANK_ACCOUNT_NUMBER|US_BANK_ROUTING_NUMBER|US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER|US_PASSPORT_NUMBER|US_SOCIAL_SECURITY_NUMBER|VEHICLE_IDENTIFICATION_NUMBER', // REQUIRED
            ],
            // ...
        ],
        'regexesConfig' => [
            [
                'action' => 'BLOCK|ANONYMIZE', // REQUIRED
                'description' => '<string>',
                'name' => '<string>', // REQUIRED
                'pattern' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
    'tags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'topicPolicyConfig' => [
        'topicsConfig' => [ // REQUIRED
            [
                'definition' => '<string>', // REQUIRED
                'examples' => ['<string>', ...],
                'name' => '<string>', // REQUIRED
                'type' => 'DENY', // REQUIRED
            ],
            // ...
        ],
    ],
    'wordPolicyConfig' => [
        'managedWordListsConfig' => [
            [
                'type' => 'PROFANITY', // REQUIRED
            ],
            // ...
        ],
        'wordsConfig' => [
            [
                'text' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
]);

Parameter Details

Members
blockedInputMessaging
Required: Yes
Type: string

The message to return when the guardrail blocks a prompt.

blockedOutputsMessaging
Required: Yes
Type: string

The message to return when the guardrail blocks a model response.

clientRequestToken
Type: string

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.

contentPolicyConfig

The content filter policies to configure for the guardrail.

contextualGroundingPolicyConfig

The contextual grounding policy configuration used to create a guardrail.

description
Type: string

A description of the guardrail.

kmsKeyId
Type: string

The ARN of the KMS key that you use to encrypt the guardrail.

name
Required: Yes
Type: string

The name to give the guardrail.

sensitiveInformationPolicyConfig

The sensitive information policy to configure for the guardrail.

tags
Type: Array of Tag structures

The tags that you want to attach to the guardrail.

topicPolicyConfig
Type: GuardrailTopicPolicyConfig structure

The topic policies to configure for the guardrail.

wordPolicyConfig
Type: GuardrailWordPolicyConfig structure

The word policy you configure for the guardrail.

Result Syntax

[
    'createdAt' => <DateTime>,
    'guardrailArn' => '<string>',
    'guardrailId' => '<string>',
    'version' => '<string>',
]

Result Details

Members
createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the guardrail was created.

guardrailArn
Required: Yes
Type: string

The ARN of the guardrail.

guardrailId
Required: Yes
Type: string

The unique identifier of the guardrail that was created.

version
Required: Yes
Type: string

The version of the guardrail that was created. This value will always be DRAFT.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

TooManyTagsException:

The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateGuardrailVersion

$result = $client->createGuardrailVersion([/* ... */]);
$promise = $client->createGuardrailVersionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createGuardrailVersion([
    'clientRequestToken' => '<string>',
    'description' => '<string>',
    'guardrailIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientRequestToken
Type: string

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.

description
Type: string

A description of the guardrail version.

guardrailIdentifier
Required: Yes
Type: string

The unique identifier of the guardrail. This can be an ID or the ARN.

Result Syntax

[
    'guardrailId' => '<string>',
    'version' => '<string>',
]

Result Details

Members
guardrailId
Required: Yes
Type: string

The unique identifier of the guardrail.

version
Required: Yes
Type: string

The number of the version of the guardrail.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateModelCopyJob

$result = $client->createModelCopyJob([/* ... */]);
$promise = $client->createModelCopyJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createModelCopyJob([
    'clientRequestToken' => '<string>',
    'modelKmsKeyId' => '<string>',
    'sourceModelArn' => '<string>', // REQUIRED
    'targetModelName' => '<string>', // REQUIRED
    'targetModelTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
clientRequestToken
Type: string

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.

modelKmsKeyId
Type: string

The ARN of the KMS key that you use to encrypt the model copy.

sourceModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model to be copied.

targetModelName
Required: Yes
Type: string

A name for the copied model.

targetModelTags
Type: Array of Tag structures

Tags to associate with the target model. For more information, see Tag resources in the Amazon Bedrock User Guide.

Result Syntax

[
    'jobArn' => '<string>',
]

Result Details

Members
jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model copy job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

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.

CreateModelCustomizationJob

$result = $client->createModelCustomizationJob([/* ... */]);
$promise = $client->createModelCustomizationJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createModelCustomizationJob([
    'baseModelIdentifier' => '<string>', // REQUIRED
    'clientRequestToken' => '<string>',
    'customModelKmsKeyId' => '<string>',
    'customModelName' => '<string>', // REQUIRED
    'customModelTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
    'hyperParameters' => ['<string>', ...], // REQUIRED
    'jobName' => '<string>', // REQUIRED
    'jobTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'outputDataConfig' => [ // REQUIRED
        's3Uri' => '<string>', // REQUIRED
    ],
    'roleArn' => '<string>', // REQUIRED
    'trainingDataConfig' => [ // REQUIRED
        's3Uri' => '<string>', // REQUIRED
    ],
    'validationDataConfig' => [
        'validators' => [ // REQUIRED
            [
                's3Uri' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...], // REQUIRED
        'subnetIds' => ['<string>', ...], // REQUIRED
    ],
]);

Parameter Details

Members
baseModelIdentifier
Required: Yes
Type: string

Name of the base model.

clientRequestToken
Type: string

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.

customModelKmsKeyId
Type: string

The custom model is encrypted at rest using this key.

customModelName
Required: Yes
Type: string

A name for the resulting custom model.

customModelTags
Type: Array of Tag structures

Tags to attach to the resulting custom model.

customizationType
Type: string

The customization type.

hyperParameters
Required: Yes
Type: Associative array of custom strings keys (String) to strings

Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters.

jobName
Required: Yes
Type: string

A name for the fine-tuning job.

jobTags
Type: Array of Tag structures

Tags to attach to the job.

outputDataConfig
Required: Yes
Type: OutputDataConfig structure

S3 location for the output data.

roleArn
Required: Yes
Type: string

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.

trainingDataConfig
Required: Yes
Type: TrainingDataConfig structure

Information about the training dataset.

validationDataConfig
Type: ValidationDataConfig structure

Information about the validation dataset.

vpcConfig
Type: VpcConfig structure

The configuration of the Virtual Private Cloud (VPC) that contains the resources that you're using for this job. For more information, see Protect your model customization jobs using a VPC.

Result Syntax

[
    'jobArn' => '<string>',
]

Result Details

Members
jobArn
Required: Yes
Type: string

Amazon Resource Name (ARN) of the fine tuning job

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

TooManyTagsException:

The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateModelImportJob

$result = $client->createModelImportJob([/* ... */]);
$promise = $client->createModelImportJobAsync([/* ... */]);

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

Parameter Syntax

$result = $client->createModelImportJob([
    'clientRequestToken' => '<string>',
    'importedModelKmsKeyId' => '<string>',
    'importedModelName' => '<string>', // REQUIRED
    'importedModelTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'jobName' => '<string>', // REQUIRED
    'jobTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'modelDataSource' => [ // REQUIRED
        's3DataSource' => [
            's3Uri' => '<string>', // REQUIRED
        ],
    ],
    'roleArn' => '<string>', // REQUIRED
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...], // REQUIRED
        'subnetIds' => ['<string>', ...], // REQUIRED
    ],
]);

Parameter Details

Members
clientRequestToken
Type: string

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.

importedModelKmsKeyId
Type: string

The imported model is encrypted at rest using this key.

importedModelName
Required: Yes
Type: string

The name of the imported model.

importedModelTags
Type: Array of Tag structures

Tags to attach to the imported model.

jobName
Required: Yes
Type: string

The name of the import job.

jobTags
Type: Array of Tag structures

Tags to attach to this import job.

modelDataSource
Required: Yes
Type: ModelDataSource structure

The data source for the imported model.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model import job.

vpcConfig
Type: VpcConfig structure

VPC configuration parameters for the private Virtual Private Cloud (VPC) that contains the resources you are using for the import job.

Result Syntax

[
    'jobArn' => '<string>',
]

Result Details

Members
jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model import job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

TooManyTagsException:

The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateModelInvocationJob

$result = $client->createModelInvocationJob([/* ... */]);
$promise = $client->createModelInvocationJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createModelInvocationJob([
    'clientRequestToken' => '<string>',
    'inputDataConfig' => [ // REQUIRED
        's3InputDataConfig' => [
            's3BucketOwner' => '<string>',
            's3InputFormat' => 'JSONL',
            's3Uri' => '<string>', // REQUIRED
        ],
    ],
    'jobName' => '<string>', // REQUIRED
    'modelId' => '<string>', // REQUIRED
    'outputDataConfig' => [ // REQUIRED
        's3OutputDataConfig' => [
            's3BucketOwner' => '<string>',
            's3EncryptionKeyId' => '<string>',
            's3Uri' => '<string>', // REQUIRED
        ],
    ],
    'roleArn' => '<string>', // REQUIRED
    'tags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'timeoutDurationInHours' => <integer>,
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...], // REQUIRED
        'subnetIds' => ['<string>', ...], // REQUIRED
    ],
]);

Parameter Details

Members
clientRequestToken
Type: string

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.

inputDataConfig
Required: Yes
Type: ModelInvocationJobInputDataConfig structure

Details about the location of the input to the batch inference job.

jobName
Required: Yes
Type: string

A name to give the batch inference job.

modelId
Required: Yes
Type: string

The unique identifier of the foundation model to use for the batch inference job.

outputDataConfig
Required: Yes
Type: ModelInvocationJobOutputDataConfig structure

Details about the location of the output of the batch inference job.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference.

tags
Type: Array of Tag structures

Any tags to associate with the batch inference job. For more information, see Tagging Amazon Bedrock resources.

timeoutDurationInHours
Type: int

The number of hours after which to force the batch inference job to time out.

vpcConfig
Type: VpcConfig structure

The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC.

Result Syntax

[
    'jobArn' => '<string>',
]

Result Details

Members
jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the batch inference job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

CreateProvisionedModelThroughput

$result = $client->createProvisionedModelThroughput([/* ... */]);
$promise = $client->createProvisionedModelThroughputAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createProvisionedModelThroughput([
    'clientRequestToken' => '<string>',
    'commitmentDuration' => 'OneMonth|SixMonths',
    'modelId' => '<string>', // REQUIRED
    'modelUnits' => <integer>, // REQUIRED
    'provisionedModelName' => '<string>', // REQUIRED
    'tags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
clientRequestToken
Type: string

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 in the Amazon S3 User Guide.

commitmentDuration
Type: string

The commitment duration requested for the Provisioned Throughput. Billing occurs hourly and is discounted for longer commitment terms. To request a no-commit Provisioned Throughput, omit this field.

Custom models support all levels of commitment. To see which base models support no commitment, see Supported regions and models for Provisioned Throughput in the Amazon Bedrock User Guide

modelId
Required: Yes
Type: string

The Amazon Resource Name (ARN) or name of the model to associate with this Provisioned Throughput. For a list of models for which you can purchase Provisioned Throughput, see Amazon Bedrock model IDs for purchasing Provisioned Throughput in the Amazon Bedrock User Guide.

modelUnits
Required: Yes
Type: int

Number of model units to allocate. A model unit delivers a specific throughput level for the specified model. The throughput level of a model unit specifies the total number of input and output tokens that it can process and generate within a span of one minute. By default, your account has no model units for purchasing Provisioned Throughputs with commitment. You must first visit the Amazon Web Services support center to request MUs.

For model unit quotas, see Provisioned Throughput quotas in the Amazon Bedrock User Guide.

For more information about what an MU specifies, contact your Amazon Web Services account manager.

provisionedModelName
Required: Yes
Type: string

The name for this Provisioned Throughput.

tags
Type: Array of Tag structures

Tags to associate with this Provisioned Throughput.

Result Syntax

[
    'provisionedModelArn' => '<string>',
]

Result Details

Members
provisionedModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) for this Provisioned Throughput.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

TooManyTagsException:

The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

DeleteCustomModel

$result = $client->deleteCustomModel([/* ... */]);
$promise = $client->deleteCustomModelAsync([/* ... */]);

Deletes a custom model that you created earlier. For more information, see Custom models in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->deleteCustomModel([
    'modelIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
modelIdentifier
Required: Yes
Type: string

Name of the model to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

DeleteGuardrail

$result = $client->deleteGuardrail([/* ... */]);
$promise = $client->deleteGuardrailAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteGuardrail([
    'guardrailIdentifier' => '<string>', // REQUIRED
    'guardrailVersion' => '<string>',
]);

Parameter Details

Members
guardrailIdentifier
Required: Yes
Type: string

The unique identifier of the guardrail. This can be an ID or the ARN.

guardrailVersion
Type: string

The version of the guardrail.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

DeleteImportedModel

$result = $client->deleteImportedModel([/* ... */]);
$promise = $client->deleteImportedModelAsync([/* ... */]);

Deletes a custom model that you imported earlier. For more information, see Import a customized model in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->deleteImportedModel([
    'modelIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
modelIdentifier
Required: Yes
Type: string

Name of the imported model to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

DeleteModelInvocationLoggingConfiguration

$result = $client->deleteModelInvocationLoggingConfiguration([/* ... */]);
$promise = $client->deleteModelInvocationLoggingConfigurationAsync([/* ... */]);

Delete the invocation logging.

Parameter Syntax

$result = $client->deleteModelInvocationLoggingConfiguration([
]);

Parameter Details

Members

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

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.

DeleteProvisionedModelThroughput

$result = $client->deleteProvisionedModelThroughput([/* ... */]);
$promise = $client->deleteProvisionedModelThroughputAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteProvisionedModelThroughput([
    'provisionedModelId' => '<string>', // REQUIRED
]);

Parameter Details

Members
provisionedModelId
Required: Yes
Type: string

The Amazon Resource Name (ARN) or name of the Provisioned Throughput.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetCustomModel

$result = $client->getCustomModel([/* ... */]);
$promise = $client->getCustomModelAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getCustomModel([
    'modelIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
modelIdentifier
Required: Yes
Type: string

Name or Amazon Resource Name (ARN) of the custom model.

Result Syntax

[
    'baseModelArn' => '<string>',
    'creationTime' => <DateTime>,
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
    'hyperParameters' => ['<string>', ...],
    'jobArn' => '<string>',
    'jobName' => '<string>',
    'modelArn' => '<string>',
    'modelKmsKeyArn' => '<string>',
    'modelName' => '<string>',
    'outputDataConfig' => [
        's3Uri' => '<string>',
    ],
    'trainingDataConfig' => [
        's3Uri' => '<string>',
    ],
    'trainingMetrics' => [
        'trainingLoss' => <float>,
    ],
    'validationDataConfig' => [
        'validators' => [
            [
                's3Uri' => '<string>',
            ],
            // ...
        ],
    ],
    'validationMetrics' => [
        [
            'validationLoss' => <float>,
        ],
        // ...
    ],
]

Result Details

Members
baseModelArn
Required: Yes
Type: string

Amazon Resource Name (ARN) of the base model.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation time of the model.

customizationType
Type: string

The type of model customization.

hyperParameters
Type: Associative array of custom strings keys (String) to strings

Hyperparameter values associated with this model. For details on the format for different models, see Custom model hyperparameters.

jobArn
Required: Yes
Type: string

Job Amazon Resource Name (ARN) associated with this model.

jobName
Type: string

Job name associated with this model.

modelArn
Required: Yes
Type: string

Amazon Resource Name (ARN) associated with this model.

modelKmsKeyArn
Type: string

The custom model is encrypted at rest using this key.

modelName
Required: Yes
Type: string

Model name associated with this model.

outputDataConfig
Required: Yes
Type: OutputDataConfig structure

Output data configuration associated with this custom model.

trainingDataConfig
Required: Yes
Type: TrainingDataConfig structure

Contains information about the training dataset.

trainingMetrics
Type: TrainingMetrics structure

Contains training metrics from the job creation.

validationDataConfig
Type: ValidationDataConfig structure

Contains information about the validation dataset.

validationMetrics
Type: Array of ValidatorMetric structures

The validation metrics from the job creation.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetEvaluationJob

$result = $client->getEvaluationJob([/* ... */]);
$promise = $client->getEvaluationJobAsync([/* ... */]);

Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.

Parameter Syntax

$result = $client->getEvaluationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model evaluation job.

Result Syntax

[
    'creationTime' => <DateTime>,
    'customerEncryptionKeyId' => '<string>',
    'evaluationConfig' => [
        'automated' => [
            'datasetMetricConfigs' => [
                [
                    'dataset' => [
                        'datasetLocation' => [
                            's3Uri' => '<string>',
                        ],
                        'name' => '<string>',
                    ],
                    'metricNames' => ['<string>', ...],
                    'taskType' => 'Summarization|Classification|QuestionAndAnswer|Generation|Custom',
                ],
                // ...
            ],
        ],
        'human' => [
            'customMetrics' => [
                [
                    'description' => '<string>',
                    'name' => '<string>',
                    'ratingMethod' => '<string>',
                ],
                // ...
            ],
            'datasetMetricConfigs' => [
                [
                    'dataset' => [
                        'datasetLocation' => [
                            's3Uri' => '<string>',
                        ],
                        'name' => '<string>',
                    ],
                    'metricNames' => ['<string>', ...],
                    'taskType' => 'Summarization|Classification|QuestionAndAnswer|Generation|Custom',
                ],
                // ...
            ],
            'humanWorkflowConfig' => [
                'flowDefinitionArn' => '<string>',
                'instructions' => '<string>',
            ],
        ],
    ],
    'failureMessages' => ['<string>', ...],
    'inferenceConfig' => [
        'models' => [
            [
                'bedrockModel' => [
                    'inferenceParams' => '<string>',
                    'modelIdentifier' => '<string>',
                ],
            ],
            // ...
        ],
    ],
    'jobArn' => '<string>',
    'jobDescription' => '<string>',
    'jobName' => '<string>',
    'jobType' => 'Human|Automated',
    'lastModifiedTime' => <DateTime>,
    'outputDataConfig' => [
        's3Uri' => '<string>',
    ],
    'roleArn' => '<string>',
    'status' => 'InProgress|Completed|Failed|Stopping|Stopped|Deleting',
]

Result Details

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the model evaluation job was created.

customerEncryptionKeyId
Type: string

The Amazon Resource Name (ARN) of the customer managed key specified when the model evaluation job was created.

evaluationConfig
Required: Yes
Type: EvaluationConfig structure

Contains details about the type of model evaluation job, the metrics used, the task type selected, the datasets used, and any custom metrics you defined.

failureMessages
Type: Array of strings

An array of strings the specify why the model evaluation job has failed.

inferenceConfig
Required: Yes
Type: EvaluationInferenceConfig structure

Details about the models you specified in your model evaluation job.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model evaluation job.

jobDescription
Type: string

The description of the model evaluation job.

jobName
Required: Yes
Type: string

The name of the model evaluation job.

jobType
Required: Yes
Type: string

The type of model evaluation job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the model evaluation job was last modified.

outputDataConfig
Required: Yes
Type: EvaluationOutputDataConfig structure

Amazon S3 location for where output data is saved.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the IAM service role used in the model evaluation job.

status
Required: Yes
Type: string

The status of the model evaluation job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetFoundationModel

$result = $client->getFoundationModel([/* ... */]);
$promise = $client->getFoundationModelAsync([/* ... */]);

Get details about a Amazon Bedrock foundation model.

Parameter Syntax

$result = $client->getFoundationModel([
    'modelIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
modelIdentifier
Required: Yes
Type: string

The model identifier.

Result Syntax

[
    'modelDetails' => [
        'customizationsSupported' => ['<string>', ...],
        'inferenceTypesSupported' => ['<string>', ...],
        'inputModalities' => ['<string>', ...],
        'modelArn' => '<string>',
        'modelId' => '<string>',
        'modelLifecycle' => [
            'status' => 'ACTIVE|LEGACY',
        ],
        'modelName' => '<string>',
        'outputModalities' => ['<string>', ...],
        'providerName' => '<string>',
        'responseStreamingSupported' => true || false,
    ],
]

Result Details

Members
modelDetails
Type: FoundationModelDetails structure

Information about the foundation model.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetGuardrail

$result = $client->getGuardrail([/* ... */]);
$promise = $client->getGuardrailAsync([/* ... */]);

Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT version.

Parameter Syntax

$result = $client->getGuardrail([
    'guardrailIdentifier' => '<string>', // REQUIRED
    'guardrailVersion' => '<string>',
]);

Parameter Details

Members
guardrailIdentifier
Required: Yes
Type: string

The unique identifier of the guardrail for which to get details. This can be an ID or the ARN.

guardrailVersion
Type: string

The version of the guardrail for which to get details. If you don't specify a version, the response returns details for the DRAFT version.

Result Syntax

[
    'blockedInputMessaging' => '<string>',
    'blockedOutputsMessaging' => '<string>',
    'contentPolicy' => [
        'filters' => [
            [
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH',
                'outputStrength' => 'NONE|LOW|MEDIUM|HIGH',
                'type' => 'SEXUAL|VIOLENCE|HATE|INSULTS|MISCONDUCT|PROMPT_ATTACK',
            ],
            // ...
        ],
    ],
    'contextualGroundingPolicy' => [
        'filters' => [
            [
                'threshold' => <float>,
                'type' => 'GROUNDING|RELEVANCE',
            ],
            // ...
        ],
    ],
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'failureRecommendations' => ['<string>', ...],
    'guardrailArn' => '<string>',
    'guardrailId' => '<string>',
    'kmsKeyArn' => '<string>',
    'name' => '<string>',
    'sensitiveInformationPolicy' => [
        'piiEntities' => [
            [
                'action' => 'BLOCK|ANONYMIZE',
                'type' => 'ADDRESS|AGE|AWS_ACCESS_KEY|AWS_SECRET_KEY|CA_HEALTH_NUMBER|CA_SOCIAL_INSURANCE_NUMBER|CREDIT_DEBIT_CARD_CVV|CREDIT_DEBIT_CARD_EXPIRY|CREDIT_DEBIT_CARD_NUMBER|DRIVER_ID|EMAIL|INTERNATIONAL_BANK_ACCOUNT_NUMBER|IP_ADDRESS|LICENSE_PLATE|MAC_ADDRESS|NAME|PASSWORD|PHONE|PIN|SWIFT_CODE|UK_NATIONAL_HEALTH_SERVICE_NUMBER|UK_NATIONAL_INSURANCE_NUMBER|UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER|URL|USERNAME|US_BANK_ACCOUNT_NUMBER|US_BANK_ROUTING_NUMBER|US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER|US_PASSPORT_NUMBER|US_SOCIAL_SECURITY_NUMBER|VEHICLE_IDENTIFICATION_NUMBER',
            ],
            // ...
        ],
        'regexes' => [
            [
                'action' => 'BLOCK|ANONYMIZE',
                'description' => '<string>',
                'name' => '<string>',
                'pattern' => '<string>',
            ],
            // ...
        ],
    ],
    'status' => 'CREATING|UPDATING|VERSIONING|READY|FAILED|DELETING',
    'statusReasons' => ['<string>', ...],
    'topicPolicy' => [
        'topics' => [
            [
                'definition' => '<string>',
                'examples' => ['<string>', ...],
                'name' => '<string>',
                'type' => 'DENY',
            ],
            // ...
        ],
    ],
    'updatedAt' => <DateTime>,
    'version' => '<string>',
    'wordPolicy' => [
        'managedWordLists' => [
            [
                'type' => 'PROFANITY',
            ],
            // ...
        ],
        'words' => [
            [
                'text' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
blockedInputMessaging
Required: Yes
Type: string

The message that the guardrail returns when it blocks a prompt.

blockedOutputsMessaging
Required: Yes
Type: string

The message that the guardrail returns when it blocks a model response.

contentPolicy
Type: GuardrailContentPolicy structure

The content policy that was configured for the guardrail.

contextualGroundingPolicy

The contextual grounding policy used in the guardrail.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the guardrail was created.

description
Type: string

The description of the guardrail.

failureRecommendations
Type: Array of strings

Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.

guardrailArn
Required: Yes
Type: string

The ARN of the guardrail.

guardrailId
Required: Yes
Type: string

The unique identifier of the guardrail.

kmsKeyArn
Type: string

The ARN of the KMS key that encrypts the guardrail.

name
Required: Yes
Type: string

The name of the guardrail.

sensitiveInformationPolicy

The sensitive information policy that was configured for the guardrail.

status
Required: Yes
Type: string

The status of the guardrail.

statusReasons
Type: Array of strings

Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.

topicPolicy
Type: GuardrailTopicPolicy structure

The topic policy that was configured for the guardrail.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the guardrail was updated.

version
Required: Yes
Type: string

The version of the guardrail.

wordPolicy
Type: GuardrailWordPolicy structure

The word policy that was configured for the guardrail.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetImportedModel

$result = $client->getImportedModel([/* ... */]);
$promise = $client->getImportedModelAsync([/* ... */]);

Gets properties associated with a customized model you imported.

Parameter Syntax

$result = $client->getImportedModel([
    'modelIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
modelIdentifier
Required: Yes
Type: string

Name or Amazon Resource Name (ARN) of the imported model.

Result Syntax

[
    'creationTime' => <DateTime>,
    'jobArn' => '<string>',
    'jobName' => '<string>',
    'modelArchitecture' => '<string>',
    'modelArn' => '<string>',
    'modelDataSource' => [
        's3DataSource' => [
            's3Uri' => '<string>',
        ],
    ],
    'modelKmsKeyArn' => '<string>',
    'modelName' => '<string>',
]

Result Details

Members
creationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation time of the imported model.

jobArn
Type: string

Job Amazon Resource Name (ARN) associated with the imported model.

jobName
Type: string

Job name associated with the imported model.

modelArchitecture
Type: string

The architecture of the imported model.

modelArn
Type: string

The Amazon Resource Name (ARN) associated with this imported model.

modelDataSource
Type: ModelDataSource structure

The data source for this imported model.

modelKmsKeyArn
Type: string

The imported model is encrypted at rest using this key.

modelName
Type: string

The name of the imported model.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetInferenceProfile

$result = $client->getInferenceProfile([/* ... */]);
$promise = $client->getInferenceProfileAsync([/* ... */]);

Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->getInferenceProfile([
    'inferenceProfileIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
inferenceProfileIdentifier
Required: Yes
Type: string

The unique identifier of the inference profile.

Result Syntax

[
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'inferenceProfileArn' => '<string>',
    'inferenceProfileId' => '<string>',
    'inferenceProfileName' => '<string>',
    'models' => [
        [
            'modelArn' => '<string>',
        ],
        // ...
    ],
    'status' => 'ACTIVE',
    'type' => 'SYSTEM_DEFINED',
    'updatedAt' => <DateTime>,
]

Result Details

Members
createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the inference profile was created.

description
Type: string

The description of the inference profile.

inferenceProfileArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the inference profile.

inferenceProfileId
Required: Yes
Type: string

The unique identifier of the inference profile.

inferenceProfileName
Required: Yes
Type: string

The name of the inference profile.

models
Required: Yes
Type: Array of InferenceProfileModel structures

A list of information about each model in the inference profile.

status
Required: Yes
Type: string

The status of the inference profile. ACTIVE means that the inference profile is available to use.

type
Required: Yes
Type: string

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the inference profile was last updated.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetModelCopyJob

$result = $client->getModelCopyJob([/* ... */]);
$promise = $client->getModelCopyJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getModelCopyJob([
    'jobArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model copy job.

Result Syntax

[
    'creationTime' => <DateTime>,
    'failureMessage' => '<string>',
    'jobArn' => '<string>',
    'sourceAccountId' => '<string>',
    'sourceModelArn' => '<string>',
    'sourceModelName' => '<string>',
    'status' => 'InProgress|Completed|Failed',
    'targetModelArn' => '<string>',
    'targetModelKmsKeyArn' => '<string>',
    'targetModelName' => '<string>',
    'targetModelTags' => [
        [
            'key' => '<string>',
            'value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the model copy job was created.

failureMessage
Type: string

An error message for why the model copy job failed.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model copy job.

sourceAccountId
Required: Yes
Type: string

The unique identifier of the account that the model being copied originated from.

sourceModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the original model being copied.

sourceModelName
Type: string

The name of the original model being copied.

status
Required: Yes
Type: string

The status of the model copy job.

targetModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the copied model.

targetModelKmsKeyArn
Type: string

The Amazon Resource Name (ARN) of the KMS key encrypting the copied model.

targetModelName
Type: string

The name of the copied model.

targetModelTags
Type: Array of Tag structures

The tags associated with the copied model.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetModelCustomizationJob

$result = $client->getModelCustomizationJob([/* ... */]);
$promise = $client->getModelCustomizationJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getModelCustomizationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

Identifier for the customization job.

Result Syntax

[
    'baseModelArn' => '<string>',
    'clientRequestToken' => '<string>',
    'creationTime' => <DateTime>,
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
    'endTime' => <DateTime>,
    'failureMessage' => '<string>',
    'hyperParameters' => ['<string>', ...],
    'jobArn' => '<string>',
    'jobName' => '<string>',
    'lastModifiedTime' => <DateTime>,
    'outputDataConfig' => [
        's3Uri' => '<string>',
    ],
    'outputModelArn' => '<string>',
    'outputModelKmsKeyArn' => '<string>',
    'outputModelName' => '<string>',
    'roleArn' => '<string>',
    'status' => 'InProgress|Completed|Failed|Stopping|Stopped',
    'trainingDataConfig' => [
        's3Uri' => '<string>',
    ],
    'trainingMetrics' => [
        'trainingLoss' => <float>,
    ],
    'validationDataConfig' => [
        'validators' => [
            [
                's3Uri' => '<string>',
            ],
            // ...
        ],
    ],
    'validationMetrics' => [
        [
            'validationLoss' => <float>,
        ],
        // ...
    ],
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...],
        'subnetIds' => ['<string>', ...],
    ],
]

Result Details

Members
baseModelArn
Required: Yes
Type: string

Amazon Resource Name (ARN) of the base model.

clientRequestToken
Type: string

The token that you specified in the CreateCustomizationJob request.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the resource was created.

customizationType
Type: string

The type of model customization.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the resource transitioned to terminal state.

failureMessage
Type: string

Information about why the job failed.

hyperParameters
Required: Yes
Type: Associative array of custom strings keys (String) to strings

The hyperparameter values for the job. For details on the format for different models, see Custom model hyperparameters.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the customization job.

jobName
Required: Yes
Type: string

The name of the customization job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the resource was last modified.

outputDataConfig
Required: Yes
Type: OutputDataConfig structure

Output data configuration

outputModelArn
Type: string

The Amazon Resource Name (ARN) of the output model.

outputModelKmsKeyArn
Type: string

The custom model is encrypted at rest using this key.

outputModelName
Required: Yes
Type: string

The name of the output model.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the IAM role.

status
Type: string

The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use. If the job failed, the failure message contains information about why the job failed.

trainingDataConfig
Required: Yes
Type: TrainingDataConfig structure

Contains information about the training dataset.

trainingMetrics
Type: TrainingMetrics structure

Contains training metrics from the job creation.

validationDataConfig
Required: Yes
Type: ValidationDataConfig structure

Contains information about the validation dataset.

validationMetrics
Type: Array of ValidatorMetric structures

The loss metric for each validator that you provided in the createjob request.

vpcConfig
Type: VpcConfig structure

VPC configuration for the custom model job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetModelImportJob

$result = $client->getModelImportJob([/* ... */]);
$promise = $client->getModelImportJobAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getModelImportJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The identifier of the import job.

Result Syntax

[
    'creationTime' => <DateTime>,
    'endTime' => <DateTime>,
    'failureMessage' => '<string>',
    'importedModelArn' => '<string>',
    'importedModelKmsKeyArn' => '<string>',
    'importedModelName' => '<string>',
    'jobArn' => '<string>',
    'jobName' => '<string>',
    'lastModifiedTime' => <DateTime>,
    'modelDataSource' => [
        's3DataSource' => [
            's3Uri' => '<string>',
        ],
    ],
    'roleArn' => '<string>',
    'status' => 'InProgress|Completed|Failed',
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...],
        'subnetIds' => ['<string>', ...],
    ],
]

Result Details

Members
creationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time the resource was created.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the resource transitioned to terminal state.

failureMessage
Type: string

Information about why the import job failed.

importedModelArn
Type: string

The Amazon Resource Name (ARN) of the imported model.

importedModelKmsKeyArn
Type: string

The imported model is encrypted at rest using this key.

importedModelName
Type: string

The name of the imported model.

jobArn
Type: string

The Amazon Resource Name (ARN) of the import job.

jobName
Type: string

The name of the import job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time the resource was last modified.

modelDataSource
Type: ModelDataSource structure

The data source for the imported model.

roleArn
Type: string

The Amazon Resource Name (ARN) of the IAM role associated with this job.

status
Type: string

The status of the job. A successful job transitions from in-progress to completed when the imported model is ready to use. If the job failed, the failure message contains information about why the job failed.

vpcConfig
Type: VpcConfig structure

The Virtual Private Cloud (VPC) configuration of the import model job.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetModelInvocationJob

$result = $client->getModelInvocationJob([/* ... */]);
$promise = $client->getModelInvocationJobAsync([/* ... */]);

Gets details about a batch inference job. For more information, see View details about a batch inference job

Parameter Syntax

$result = $client->getModelInvocationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the batch inference job.

Result Syntax

[
    'clientRequestToken' => '<string>',
    'endTime' => <DateTime>,
    'inputDataConfig' => [
        's3InputDataConfig' => [
            's3BucketOwner' => '<string>',
            's3InputFormat' => 'JSONL',
            's3Uri' => '<string>',
        ],
    ],
    'jobArn' => '<string>',
    'jobExpirationTime' => <DateTime>,
    'jobName' => '<string>',
    'lastModifiedTime' => <DateTime>,
    'message' => '<string>',
    'modelId' => '<string>',
    'outputDataConfig' => [
        's3OutputDataConfig' => [
            's3BucketOwner' => '<string>',
            's3EncryptionKeyId' => '<string>',
            's3Uri' => '<string>',
        ],
    ],
    'roleArn' => '<string>',
    'status' => 'Submitted|InProgress|Completed|Failed|Stopping|Stopped|PartiallyCompleted|Expired|Validating|Scheduled',
    'submitTime' => <DateTime>,
    'timeoutDurationInHours' => <integer>,
    'vpcConfig' => [
        'securityGroupIds' => ['<string>', ...],
        'subnetIds' => ['<string>', ...],
    ],
]

Result Details

Members
clientRequestToken
Type: string

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.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job ended.

inputDataConfig
Required: Yes
Type: ModelInvocationJobInputDataConfig structure

Details about the location of the input to the batch inference job.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the batch inference job.

jobExpirationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job times or timed out.

jobName
Type: string

The name of the batch inference job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job was last modified.

message
Type: string

If the batch inference job failed, this field contains a message describing why the job failed.

modelId
Required: Yes
Type: string

The unique identifier of the foundation model used for model inference.

outputDataConfig
Required: Yes
Type: ModelInvocationJobOutputDataConfig structure

Details about the location of the output of the batch inference job.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference.

status
Type: string

The status of the batch inference job.

submitTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job was submitted.

timeoutDurationInHours
Type: int

The number of hours after which batch inference job was set to time out.

vpcConfig
Type: VpcConfig structure

The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

GetModelInvocationLoggingConfiguration

$result = $client->getModelInvocationLoggingConfiguration([/* ... */]);
$promise = $client->getModelInvocationLoggingConfigurationAsync([/* ... */]);

Get the current configuration values for model invocation logging.

Parameter Syntax

$result = $client->getModelInvocationLoggingConfiguration([
]);

Parameter Details

Members

Result Syntax

[
    'loggingConfig' => [
        'cloudWatchConfig' => [
            'largeDataDeliveryS3Config' => [
                'bucketName' => '<string>',
                'keyPrefix' => '<string>',
            ],
            'logGroupName' => '<string>',
            'roleArn' => '<string>',
        ],
        'embeddingDataDeliveryEnabled' => true || false,
        'imageDataDeliveryEnabled' => true || false,
        's3Config' => [
            'bucketName' => '<string>',
            'keyPrefix' => '<string>',
        ],
        'textDataDeliveryEnabled' => true || false,
    ],
]

Result Details

Members
loggingConfig
Type: LoggingConfig structure

The current configuration values.

Errors

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.

GetProvisionedModelThroughput

$result = $client->getProvisionedModelThroughput([/* ... */]);
$promise = $client->getProvisionedModelThroughputAsync([/* ... */]);

Returns details for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->getProvisionedModelThroughput([
    'provisionedModelId' => '<string>', // REQUIRED
]);

Parameter Details

Members
provisionedModelId
Required: Yes
Type: string

The Amazon Resource Name (ARN) or name of the Provisioned Throughput.

Result Syntax

[
    'commitmentDuration' => 'OneMonth|SixMonths',
    'commitmentExpirationTime' => <DateTime>,
    'creationTime' => <DateTime>,
    'desiredModelArn' => '<string>',
    'desiredModelUnits' => <integer>,
    'failureMessage' => '<string>',
    'foundationModelArn' => '<string>',
    'lastModifiedTime' => <DateTime>,
    'modelArn' => '<string>',
    'modelUnits' => <integer>,
    'provisionedModelArn' => '<string>',
    'provisionedModelName' => '<string>',
    'status' => 'Creating|InService|Updating|Failed',
]

Result Details

Members
commitmentDuration
Type: string

Commitment duration of the Provisioned Throughput.

commitmentExpirationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp for when the commitment term for the Provisioned Throughput expires.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp of the creation time for this Provisioned Throughput.

desiredModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the modelArn if updating hasn't completed.

desiredModelUnits
Required: Yes
Type: int

The number of model units that was requested for this Provisioned Throughput.

failureMessage
Type: string

A failure message for any issues that occurred during creation, updating, or deletion of the Provisioned Throughput.

foundationModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized.

lastModifiedTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp of the last time that this Provisioned Throughput was modified.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model associated with this Provisioned Throughput.

modelUnits
Required: Yes
Type: int

The number of model units allocated to this Provisioned Throughput.

provisionedModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Provisioned Throughput.

provisionedModelName
Required: Yes
Type: string

The name of the Provisioned Throughput.

status
Required: Yes
Type: string

The status of the Provisioned Throughput.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

ListCustomModels

$result = $client->listCustomModels([/* ... */]);
$promise = $client->listCustomModelsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listCustomModels([
    'baseModelArnEquals' => '<string>',
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'foundationModelArnEquals' => '<string>',
    'isOwned' => true || false,
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
]);

Parameter Details

Members
baseModelArnEquals
Type: string

Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter.

creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return custom models created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return custom models created before the specified time.

foundationModelArnEquals
Type: string

Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter.

isOwned
Type: boolean

Return custom models depending on if the current account owns them (true) or if they were shared with the current account (false).

maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nameContains
Type: string

Return custom models only if the job name contains these characters.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

sortBy
Type: string

The field to sort by in the returned list of models.

sortOrder
Type: string

The sort order of the results.

Result Syntax

[
    'modelSummaries' => [
        [
            'baseModelArn' => '<string>',
            'baseModelName' => '<string>',
            'creationTime' => <DateTime>,
            'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
            'modelArn' => '<string>',
            'modelName' => '<string>',
            'ownerAccountId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
modelSummaries
Type: Array of CustomModelSummary structures

Model summaries.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Errors

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.

ListEvaluationJobs

$result = $client->listEvaluationJobs([/* ... */]);
$promise = $client->listEvaluationJobsAsync([/* ... */]);

Lists model evaluation jobs.

Parameter Syntax

$result = $client->listEvaluationJobs([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'statusEquals' => 'InProgress|Completed|Failed|Stopping|Stopped|Deleting',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

A filter that includes model evaluation jobs created after the time specified.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

A filter that includes model evaluation jobs created prior to the time specified.

maxResults
Type: int

The maximum number of results to return.

nameContains
Type: string

Query parameter string for model evaluation job names.

nextToken
Type: string

Continuation token from the previous response, for Amazon Bedrock to list the next set of results.

sortBy
Type: string

Allows you to sort model evaluation jobs by when they were created.

sortOrder
Type: string

How you want the order of jobs sorted.

statusEquals
Type: string

Only return jobs where the status condition is met.

Result Syntax

[
    'jobSummaries' => [
        [
            'creationTime' => <DateTime>,
            'evaluationTaskTypes' => ['<string>', ...],
            'jobArn' => '<string>',
            'jobName' => '<string>',
            'jobType' => 'Human|Automated',
            'modelIdentifiers' => ['<string>', ...],
            'status' => 'InProgress|Completed|Failed|Stopping|Stopped|Deleting',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
jobSummaries
Type: Array of EvaluationSummary structures

A summary of the model evaluation jobs.

nextToken
Type: string

Continuation token from the previous response, for Amazon Bedrock to list the next set of results.

Errors

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.

ListFoundationModels

$result = $client->listFoundationModels([/* ... */]);
$promise = $client->listFoundationModelsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listFoundationModels([
    'byCustomizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
    'byInferenceType' => 'ON_DEMAND|PROVISIONED',
    'byOutputModality' => 'TEXT|IMAGE|EMBEDDING',
    'byProvider' => '<string>',
]);

Parameter Details

Members
byCustomizationType
Type: string

Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide.

byInferenceType
Type: string

Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

byOutputModality
Type: string

Return models that support the output modality that you specify.

byProvider
Type: string

Return models belonging to the model provider that you specify.

Result Syntax

[
    'modelSummaries' => [
        [
            'customizationsSupported' => ['<string>', ...],
            'inferenceTypesSupported' => ['<string>', ...],
            'inputModalities' => ['<string>', ...],
            'modelArn' => '<string>',
            'modelId' => '<string>',
            'modelLifecycle' => [
                'status' => 'ACTIVE|LEGACY',
            ],
            'modelName' => '<string>',
            'outputModalities' => ['<string>', ...],
            'providerName' => '<string>',
            'responseStreamingSupported' => true || false,
        ],
        // ...
    ],
]

Result Details

Members
modelSummaries
Type: Array of FoundationModelSummary structures

A list of Amazon Bedrock foundation models.

Errors

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.

ListGuardrails

$result = $client->listGuardrails([/* ... */]);
$promise = $client->listGuardrailsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listGuardrails([
    'guardrailIdentifier' => '<string>',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
guardrailIdentifier
Type: string

The unique identifier of the guardrail. This can be an ID or the ARN.

maxResults
Type: int

The maximum number of results to return in the response.

nextToken
Type: string

If there are more results than were returned in the response, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.

Result Syntax

[
    'guardrails' => [
        [
            'arn' => '<string>',
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'id' => '<string>',
            'name' => '<string>',
            'status' => 'CREATING|UPDATING|VERSIONING|READY|FAILED|DELETING',
            'updatedAt' => <DateTime>,
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
guardrails
Required: Yes
Type: Array of GuardrailSummary structures

A list of objects, each of which contains details about a guardrail.

nextToken
Type: string

If there are more results than were returned in the response, the response returns a nextToken that you can send in another ListGuardrails request to see the next batch of results.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

ListImportedModels

$result = $client->listImportedModels([/* ... */]);
$promise = $client->listImportedModelsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listImportedModels([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return imported models that were created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return imported models that created before the specified time.

maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nameContains
Type: string

Return imported models only if the model name contains these characters.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

sortBy
Type: string

The field to sort by in the returned list of imported models.

sortOrder
Type: string

Specifies whetehr to sort the results in ascending or descending order.

Result Syntax

[
    'modelSummaries' => [
        [
            'creationTime' => <DateTime>,
            'modelArn' => '<string>',
            'modelName' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
modelSummaries
Type: Array of ImportedModelSummary structures

Model summaries.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Errors

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.

ListInferenceProfiles

$result = $client->listInferenceProfiles([/* ... */]);
$promise = $client->listInferenceProfilesAsync([/* ... */]);

Returns a list of inference profiles that you can use.

Parameter Syntax

$result = $client->listInferenceProfiles([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

Result Syntax

[
    'inferenceProfileSummaries' => [
        [
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'inferenceProfileArn' => '<string>',
            'inferenceProfileId' => '<string>',
            'inferenceProfileName' => '<string>',
            'models' => [
                [
                    'modelArn' => '<string>',
                ],
                // ...
            ],
            'status' => 'ACTIVE',
            'type' => 'SYSTEM_DEFINED',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
inferenceProfileSummaries
Type: Array of InferenceProfileSummary structures

A list of information about each inference profile that you can use.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Errors

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.

ListModelCopyJobs

$result = $client->listModelCopyJobs([/* ... */]);
$promise = $client->listModelCopyJobsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listModelCopyJobs([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'sourceAccountEquals' => '<string>',
    'sourceModelArnEquals' => '<string>',
    'statusEquals' => 'InProgress|Completed|Failed',
    'targetModelNameContains' => '<string>',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Filters for model copy jobs created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Filters for model copy jobs created before the specified time.

maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

sortBy
Type: string

The field to sort by in the returned list of model copy jobs.

sortOrder
Type: string

Specifies whether to sort the results in ascending or descending order.

sourceAccountEquals
Type: string

Filters for model copy jobs in which the account that the source model belongs to is equal to the value that you specify.

sourceModelArnEquals
Type: string

Filters for model copy jobs in which the Amazon Resource Name (ARN) of the source model to is equal to the value that you specify.

statusEquals
Type: string

Filters for model copy jobs whose status matches the value that you specify.

targetModelNameContains
Type: string

Filters for model copy jobs in which the name of the copied model contains the string that you specify.

Result Syntax

[
    'modelCopyJobSummaries' => [
        [
            'creationTime' => <DateTime>,
            'failureMessage' => '<string>',
            'jobArn' => '<string>',
            'sourceAccountId' => '<string>',
            'sourceModelArn' => '<string>',
            'sourceModelName' => '<string>',
            'status' => 'InProgress|Completed|Failed',
            'targetModelArn' => '<string>',
            'targetModelKmsKeyArn' => '<string>',
            'targetModelName' => '<string>',
            'targetModelTags' => [
                [
                    'key' => '<string>',
                    'value' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
modelCopyJobSummaries
Type: Array of ModelCopyJobSummary structures

A list of information about each model copy job.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

ListModelCustomizationJobs

$result = $client->listModelCustomizationJobs([/* ... */]);
$promise = $client->listModelCustomizationJobsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listModelCustomizationJobs([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'statusEquals' => 'InProgress|Completed|Failed|Stopping|Stopped',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return customization jobs created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return customization jobs created before the specified time.

maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nameContains
Type: string

Return customization jobs only if the job name contains these characters.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

sortBy
Type: string

The field to sort by in the returned list of jobs.

sortOrder
Type: string

The sort order of the results.

statusEquals
Type: string

Return customization jobs with the specified status.

Result Syntax

[
    'modelCustomizationJobSummaries' => [
        [
            'baseModelArn' => '<string>',
            'creationTime' => <DateTime>,
            'customModelArn' => '<string>',
            'customModelName' => '<string>',
            'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING',
            'endTime' => <DateTime>,
            'jobArn' => '<string>',
            'jobName' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'status' => 'InProgress|Completed|Failed|Stopping|Stopped',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
modelCustomizationJobSummaries
Type: Array of ModelCustomizationJobSummary structures

Job summaries.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Errors

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.

ListModelImportJobs

$result = $client->listModelImportJobs([/* ... */]);
$promise = $client->listModelImportJobsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listModelImportJobs([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'statusEquals' => 'InProgress|Completed|Failed',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return import jobs that were created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Return import jobs that were created before the specified time.

maxResults
Type: int

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

nameContains
Type: string

Return imported jobs only if the job name contains these characters.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

sortBy
Type: string

The field to sort by in the returned list of imported jobs.

sortOrder
Type: string

Specifies whether to sort the results in ascending or descending order.

statusEquals
Type: string

Return imported jobs with the specified status.

Result Syntax

[
    'modelImportJobSummaries' => [
        [
            'creationTime' => <DateTime>,
            'endTime' => <DateTime>,
            'importedModelArn' => '<string>',
            'importedModelName' => '<string>',
            'jobArn' => '<string>',
            'jobName' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'status' => 'InProgress|Completed|Failed',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
modelImportJobSummaries
Type: Array of ModelImportJobSummary structures

Import job summaries.

nextToken
Type: string

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

Errors

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.

ListModelInvocationJobs

$result = $client->listModelInvocationJobs([/* ... */]);
$promise = $client->listModelInvocationJobsAsync([/* ... */]);

Lists all batch inference jobs in the account. For more information, see View details about a batch inference job.

Parameter Syntax

$result = $client->listModelInvocationJobs([
    'maxResults' => <integer>,
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'statusEquals' => 'Submitted|InProgress|Completed|Failed|Stopping|Stopped|PartiallyCompleted|Expired|Validating|Scheduled',
    'submitTimeAfter' => <integer || string || DateTime>,
    'submitTimeBefore' => <integer || string || DateTime>,
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return. If there are more results than the number that you specify, a nextToken value is returned. Use the nextToken in a request to return the next batch of results.

nameContains
Type: string

Specify a string to filter for batch inference jobs whose names contain the string.

nextToken
Type: string

If there were more results than the value you specified in the maxResults field in a previous ListModelInvocationJobs request, the response would have returned a nextToken value. To see the next batch of results, send the nextToken value in another request.

sortBy
Type: string

An attribute by which to sort the results.

sortOrder
Type: string

Specifies whether to sort the results by ascending or descending order.

statusEquals
Type: string

Specify a status to filter for batch inference jobs whose statuses match the string you specify.

submitTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

Specify a time to filter for batch inference jobs that were submitted after the time you specify.

submitTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

Specify a time to filter for batch inference jobs that were submitted before the time you specify.

Result Syntax

[
    'invocationJobSummaries' => [
        [
            'clientRequestToken' => '<string>',
            'endTime' => <DateTime>,
            'inputDataConfig' => [
                's3InputDataConfig' => [
                    's3BucketOwner' => '<string>',
                    's3InputFormat' => 'JSONL',
                    's3Uri' => '<string>',
                ],
            ],
            'jobArn' => '<string>',
            'jobExpirationTime' => <DateTime>,
            'jobName' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'message' => '<string>',
            'modelId' => '<string>',
            'outputDataConfig' => [
                's3OutputDataConfig' => [
                    's3BucketOwner' => '<string>',
                    's3EncryptionKeyId' => '<string>',
                    's3Uri' => '<string>',
                ],
            ],
            'roleArn' => '<string>',
            'status' => 'Submitted|InProgress|Completed|Failed|Stopping|Stopped|PartiallyCompleted|Expired|Validating|Scheduled',
            'submitTime' => <DateTime>,
            'timeoutDurationInHours' => <integer>,
            'vpcConfig' => [
                'securityGroupIds' => ['<string>', ...],
                'subnetIds' => ['<string>', ...],
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
invocationJobSummaries
Type: Array of ModelInvocationJobSummary structures

A list of items, each of which contains a summary about a batch inference job.

nextToken
Type: string

If there are more results than can fit in the response, a nextToken is returned. Use the nextToken in a request to return the next batch of results.

Errors

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.

ListProvisionedModelThroughputs

$result = $client->listProvisionedModelThroughputs([/* ... */]);
$promise = $client->listProvisionedModelThroughputsAsync([/* ... */]);

Lists the Provisioned Throughputs in the account. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->listProvisionedModelThroughputs([
    'creationTimeAfter' => <integer || string || DateTime>,
    'creationTimeBefore' => <integer || string || DateTime>,
    'maxResults' => <integer>,
    'modelArnEquals' => '<string>',
    'nameContains' => '<string>',
    'nextToken' => '<string>',
    'sortBy' => 'CreationTime',
    'sortOrder' => 'Ascending|Descending',
    'statusEquals' => 'Creating|InService|Updating|Failed',
]);

Parameter Details

Members
creationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

A filter that returns Provisioned Throughputs created after the specified time.

creationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

A filter that returns Provisioned Throughputs created before the specified time.

maxResults
Type: int

THe maximum number of results to return in the response. If there are more results than the number you specified, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another list request.

modelArnEquals
Type: string

A filter that returns Provisioned Throughputs whose model Amazon Resource Name (ARN) is equal to the value that you specify.

nameContains
Type: string

A filter that returns Provisioned Throughputs if their name contains the expression that you specify.

nextToken
Type: string

If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, specify the nextToken value in this field.

sortBy
Type: string

The field by which to sort the returned list of Provisioned Throughputs.

sortOrder
Type: string

The sort order of the results.

statusEquals
Type: string

A filter that returns Provisioned Throughputs if their statuses matches the value that you specify.

Result Syntax

[
    'nextToken' => '<string>',
    'provisionedModelSummaries' => [
        [
            'commitmentDuration' => 'OneMonth|SixMonths',
            'commitmentExpirationTime' => <DateTime>,
            'creationTime' => <DateTime>,
            'desiredModelArn' => '<string>',
            'desiredModelUnits' => <integer>,
            'foundationModelArn' => '<string>',
            'lastModifiedTime' => <DateTime>,
            'modelArn' => '<string>',
            'modelUnits' => <integer>,
            'provisionedModelArn' => '<string>',
            'provisionedModelName' => '<string>',
            'status' => 'Creating|InService|Updating|Failed',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

If there are more results than the number you specified in the maxResults field, this value is returned. To see the next batch of results, include this value in the nextToken field in another list request.

provisionedModelSummaries
Type: Array of ProvisionedModelSummary structures

A list of summaries, one for each Provisioned Throughput in the response.

Errors

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.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

List the tags associated with the specified resource.

For more information, see Tagging resources in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceARN' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceARN
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource.

Result Syntax

[
    'tags' => [
        [
            'key' => '<string>',
            'value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
tags
Type: Array of Tag structures

An array of the tags associated with this resource.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

PutModelInvocationLoggingConfiguration

$result = $client->putModelInvocationLoggingConfiguration([/* ... */]);
$promise = $client->putModelInvocationLoggingConfigurationAsync([/* ... */]);

Set the configuration values for model invocation logging.

Parameter Syntax

$result = $client->putModelInvocationLoggingConfiguration([
    'loggingConfig' => [ // REQUIRED
        'cloudWatchConfig' => [
            'largeDataDeliveryS3Config' => [
                'bucketName' => '<string>', // REQUIRED
                'keyPrefix' => '<string>',
            ],
            'logGroupName' => '<string>', // REQUIRED
            'roleArn' => '<string>', // REQUIRED
        ],
        'embeddingDataDeliveryEnabled' => true || false,
        'imageDataDeliveryEnabled' => true || false,
        's3Config' => [
            'bucketName' => '<string>', // REQUIRED
            'keyPrefix' => '<string>',
        ],
        'textDataDeliveryEnabled' => true || false,
    ],
]);

Parameter Details

Members
loggingConfig
Required: Yes
Type: LoggingConfig structure

The logging configuration values to set.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

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.

StopEvaluationJob

$result = $client->stopEvaluationJob([/* ... */]);
$promise = $client->stopEvaluationJobAsync([/* ... */]);

Stops an in progress model evaluation job.

Parameter Syntax

$result = $client->stopEvaluationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The ARN of the model evaluation job you want to stop.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

StopModelCustomizationJob

$result = $client->stopModelCustomizationJob([/* ... */]);
$promise = $client->stopModelCustomizationJobAsync([/* ... */]);

Stops an active model customization job. For more information, see Custom models in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->stopModelCustomizationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

Job identifier of the job to stop.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

StopModelInvocationJob

$result = $client->stopModelInvocationJob([/* ... */]);
$promise = $client->stopModelInvocationJobAsync([/* ... */]);

Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.

Parameter Syntax

$result = $client->stopModelInvocationJob([
    'jobIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the batch inference job to stop.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->tagResource([
    'resourceARN' => '<string>', // REQUIRED
    'tags' => [ // REQUIRED
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
resourceARN
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource to tag.

tags
Required: Yes
Type: Array of Tag structures

Tags to associate with the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

TooManyTagsException:

The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Remove one or more tags from a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->untagResource([
    'resourceARN' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceARN
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource to untag.

tagKeys
Required: Yes
Type: Array of strings

Tag keys of the tags to remove from the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

UpdateGuardrail

$result = $client->updateGuardrail([/* ... */]);
$promise = $client->updateGuardrailAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateGuardrail([
    'blockedInputMessaging' => '<string>', // REQUIRED
    'blockedOutputsMessaging' => '<string>', // REQUIRED
    'contentPolicyConfig' => [
        'filtersConfig' => [ // REQUIRED
            [
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'outputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'type' => 'SEXUAL|VIOLENCE|HATE|INSULTS|MISCONDUCT|PROMPT_ATTACK', // REQUIRED
            ],
            // ...
        ],
    ],
    'contextualGroundingPolicyConfig' => [
        'filtersConfig' => [ // REQUIRED
            [
                'threshold' => <float>, // REQUIRED
                'type' => 'GROUNDING|RELEVANCE', // REQUIRED
            ],
            // ...
        ],
    ],
    'description' => '<string>',
    'guardrailIdentifier' => '<string>', // REQUIRED
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'sensitiveInformationPolicyConfig' => [
        'piiEntitiesConfig' => [
            [
                'action' => 'BLOCK|ANONYMIZE', // REQUIRED
                'type' => 'ADDRESS|AGE|AWS_ACCESS_KEY|AWS_SECRET_KEY|CA_HEALTH_NUMBER|CA_SOCIAL_INSURANCE_NUMBER|CREDIT_DEBIT_CARD_CVV|CREDIT_DEBIT_CARD_EXPIRY|CREDIT_DEBIT_CARD_NUMBER|DRIVER_ID|EMAIL|INTERNATIONAL_BANK_ACCOUNT_NUMBER|IP_ADDRESS|LICENSE_PLATE|MAC_ADDRESS|NAME|PASSWORD|PHONE|PIN|SWIFT_CODE|UK_NATIONAL_HEALTH_SERVICE_NUMBER|UK_NATIONAL_INSURANCE_NUMBER|UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER|URL|USERNAME|US_BANK_ACCOUNT_NUMBER|US_BANK_ROUTING_NUMBER|US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER|US_PASSPORT_NUMBER|US_SOCIAL_SECURITY_NUMBER|VEHICLE_IDENTIFICATION_NUMBER', // REQUIRED
            ],
            // ...
        ],
        'regexesConfig' => [
            [
                'action' => 'BLOCK|ANONYMIZE', // REQUIRED
                'description' => '<string>',
                'name' => '<string>', // REQUIRED
                'pattern' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
    'topicPolicyConfig' => [
        'topicsConfig' => [ // REQUIRED
            [
                'definition' => '<string>', // REQUIRED
                'examples' => ['<string>', ...],
                'name' => '<string>', // REQUIRED
                'type' => 'DENY', // REQUIRED
            ],
            // ...
        ],
    ],
    'wordPolicyConfig' => [
        'managedWordListsConfig' => [
            [
                'type' => 'PROFANITY', // REQUIRED
            ],
            // ...
        ],
        'wordsConfig' => [
            [
                'text' => '<string>', // REQUIRED
            ],
            // ...
        ],
    ],
]);

Parameter Details

Members
blockedInputMessaging
Required: Yes
Type: string

The message to return when the guardrail blocks a prompt.

blockedOutputsMessaging
Required: Yes
Type: string

The message to return when the guardrail blocks a model response.

contentPolicyConfig

The content policy to configure for the guardrail.

contextualGroundingPolicyConfig

The contextual grounding policy configuration used to update a guardrail.

description
Type: string

A description of the guardrail.

guardrailIdentifier
Required: Yes
Type: string

The unique identifier of the guardrail. This can be an ID or the ARN.

kmsKeyId
Type: string

The ARN of the KMS key with which to encrypt the guardrail.

name
Required: Yes
Type: string

A name for the guardrail.

sensitiveInformationPolicyConfig

The sensitive information policy to configure for the guardrail.

topicPolicyConfig
Type: GuardrailTopicPolicyConfig structure

The topic policy to configure for the guardrail.

wordPolicyConfig
Type: GuardrailWordPolicyConfig structure

The word policy to configure for the guardrail.

Result Syntax

[
    'guardrailArn' => '<string>',
    'guardrailId' => '<string>',
    'updatedAt' => <DateTime>,
    'version' => '<string>',
]

Result Details

Members
guardrailArn
Required: Yes
Type: string

The ARN of the guardrail.

guardrailId
Required: Yes
Type: string

The unique identifier of the guardrail

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the guardrail was updated.

version
Required: Yes
Type: string

The version of the guardrail.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

ConflictException:

Error occurred because of a conflict while performing an operation.

InternalServerException:

An internal server error occurred. Retry your request.

ServiceQuotaExceededException:

The number of requests exceeds the service quota. Resubmit your request later.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

UpdateProvisionedModelThroughput

$result = $client->updateProvisionedModelThroughput([/* ... */]);
$promise = $client->updateProvisionedModelThroughputAsync([/* ... */]);

Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->updateProvisionedModelThroughput([
    'desiredModelId' => '<string>',
    'desiredProvisionedModelName' => '<string>',
    'provisionedModelId' => '<string>', // REQUIRED
]);

Parameter Details

Members
desiredModelId
Type: string

The Amazon Resource Name (ARN) of the new model to associate with this Provisioned Throughput. You can't specify this field if this Provisioned Throughput is associated with a base model.

If this Provisioned Throughput is associated with a custom model, you can specify one of the following options:

  • The base model from which the custom model was customized.

  • Another custom model that was customized from the same base model as the custom model.

desiredProvisionedModelName
Type: string

The new name for this Provisioned Throughput.

provisionedModelId
Required: Yes
Type: string

The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ResourceNotFoundException:

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

AccessDeniedException:

The request is denied because of missing access permissions.

ValidationException:

Input validation failed. Check your request parameters and retry the request.

InternalServerException:

An internal server error occurred. Retry your request.

ThrottlingException:

The number of requests exceeds the limit. Resubmit your request later.

Shapes

AccessDeniedException

Description

The request is denied because of missing access permissions.

Members
message
Type: string

AutomatedEvaluationConfig

Description

Use to specify a automatic model evaluation job. The EvaluationDatasetMetricConfig object is used to specify the prompt datasets, task type, and metric names.

Members
datasetMetricConfigs
Required: Yes
Type: Array of EvaluationDatasetMetricConfig structures

Specifies the required elements for an automatic model evaluation job.

BatchDeleteEvaluationJobError

Description

A JSON array that provides the status of the model evaluation jobs being deleted.

Members
code
Required: Yes
Type: string

A HTTP status code of the model evaluation job being deleted.

jobIdentifier
Required: Yes
Type: string

The ARN of the model evaluation job being deleted.

message
Type: string

A status message about the model evaluation job deletion.

BatchDeleteEvaluationJobItem

Description

An array of model evaluation jobs to be deleted, and their associated statuses.

Members
jobIdentifier
Required: Yes
Type: string

The ARN of model evaluation job to be deleted.

jobStatus
Required: Yes
Type: string

The status of the job's deletion.

CloudWatchConfig

Description

CloudWatch logging configuration.

Members
largeDataDeliveryS3Config
Type: S3Config structure

S3 configuration for delivering a large amount of data.

logGroupName
Required: Yes
Type: string

The log group name.

roleArn
Required: Yes
Type: string

The role Amazon Resource Name (ARN).

ConflictException

Description

Error occurred because of a conflict while performing an operation.

Members
message
Type: string

CustomModelSummary

Description

Summary information for a custom model.

Members
baseModelArn
Required: Yes
Type: string

The base model Amazon Resource Name (ARN).

baseModelName
Required: Yes
Type: string

The base model name.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation time of the model.

customizationType
Type: string

Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the custom model.

modelName
Required: Yes
Type: string

The name of the custom model.

ownerAccountId
Type: string

The unique identifier of the account that owns the model.

EvaluationBedrockModel

Description

Contains the ARN of the Amazon Bedrock model or inference profile specified in your model evaluation job. Each Amazon Bedrock model supports different inferenceParams. To learn more about supported inference parameters for Amazon Bedrock models, see Inference parameters for foundation models.

The inferenceParams are specified using JSON. To successfully insert JSON as string make sure that all quotations are properly escaped. For example, "temperature":"0.25" key value pair would need to be formatted as \"temperature\":\"0.25\" to successfully accepted in the request.

Members
inferenceParams
Required: Yes
Type: string

Each Amazon Bedrock support different inference parameters that change how the model behaves during inference.

modelIdentifier
Required: Yes
Type: string

The ARN of the Amazon Bedrock model or inference profile specified.

EvaluationConfig

Description

Used to specify either a AutomatedEvaluationConfig or HumanEvaluationConfig object.

Members
automated
Type: AutomatedEvaluationConfig structure

Used to specify an automated model evaluation job. See AutomatedEvaluationConfig to view the required parameters.

human
Type: HumanEvaluationConfig structure

Used to specify a model evaluation job that uses human workers.See HumanEvaluationConfig to view the required parameters.

EvaluationDataset

Description

Used to specify the name of a built-in prompt dataset and optionally, the Amazon S3 bucket where a custom prompt dataset is saved.

Members
datasetLocation
Type: EvaluationDatasetLocation structure

For custom prompt datasets, you must specify the location in Amazon S3 where the prompt dataset is saved.

name
Required: Yes
Type: string

Used to specify supported built-in prompt datasets. Valid values are Builtin.Bold, Builtin.BoolQ, Builtin.NaturalQuestions, Builtin.Gigaword, Builtin.RealToxicityPrompts, Builtin.TriviaQA, Builtin.T-Rex, Builtin.WomensEcommerceClothingReviews and Builtin.Wikitext2.

EvaluationDatasetLocation

Description

The location in Amazon S3 where your prompt dataset is stored.

Members
s3Uri
Type: string

The S3 URI of the S3 bucket specified in the job.

EvaluationDatasetMetricConfig

Description

Defines the built-in prompt datasets, built-in metric names and custom metric names, and the task type.

Members
dataset
Required: Yes
Type: EvaluationDataset structure

Specifies the prompt dataset.

metricNames
Required: Yes
Type: Array of strings

The names of the metrics used. For automated model evaluation jobs valid values are "Builtin.Accuracy", "Builtin.Robustness", and "Builtin.Toxicity". In human-based model evaluation jobs the array of strings must match the name parameter specified in HumanEvaluationCustomMetric.

taskType
Required: Yes
Type: string

The task type you want the model to carry out.

EvaluationInferenceConfig

Description

Used to define the models you want used in your model evaluation job. Automated model evaluation jobs support only a single model. In a human-based model evaluation job, your annotator can compare the responses for up to two different models.

Members
models
Type: Array of EvaluationModelConfig structures

Used to specify the models.

EvaluationModelConfig

Description

Defines the models used in the model evaluation job.

Members
bedrockModel
Type: EvaluationBedrockModel structure

Defines the Amazon Bedrock model or inference profile and inference parameters you want used.

EvaluationOutputDataConfig

Description

The Amazon S3 location where the results of your model evaluation job are saved.

Members
s3Uri
Required: Yes
Type: string

The Amazon S3 URI where the results of model evaluation job are saved.

EvaluationSummary

Description

A summary of the model evaluation job.

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

When the model evaluation job was created.

evaluationTaskTypes
Required: Yes
Type: Array of strings

What task type was used in the model evaluation job.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model evaluation job.

jobName
Required: Yes
Type: string

The name of the model evaluation job.

jobType
Required: Yes
Type: string

The type, either human or automatic, of model evaluation job.

modelIdentifiers
Required: Yes
Type: Array of strings

The Amazon Resource Names (ARNs) of the model(s) used in the model evaluation job.

status
Required: Yes
Type: string

The current status of the model evaluation job.

FoundationModelDetails

Description

Information about a foundation model.

Members
customizationsSupported
Type: Array of strings

The customization that the model supports.

inferenceTypesSupported
Type: Array of strings

The inference types that the model supports.

inputModalities
Type: Array of strings

The input modalities that the model supports.

modelArn
Required: Yes
Type: string

The model Amazon Resource Name (ARN).

modelId
Required: Yes
Type: string

The model identifier.

modelLifecycle
Type: FoundationModelLifecycle structure

Contains details about whether a model version is available or deprecated

modelName
Type: string

The model name.

outputModalities
Type: Array of strings

The output modalities that the model supports.

providerName
Type: string

The model's provider name.

responseStreamingSupported
Type: boolean

Indicates whether the model supports streaming.

FoundationModelLifecycle

Description

Details about whether a model version is available or deprecated.

Members
status
Required: Yes
Type: string

Specifies whether a model version is available (ACTIVE) or deprecated (LEGACY.

FoundationModelSummary

Description

Summary information for a foundation model.

Members
customizationsSupported
Type: Array of strings

Whether the model supports fine-tuning or continual pre-training.

inferenceTypesSupported
Type: Array of strings

The inference types that the model supports.

inputModalities
Type: Array of strings

The input modalities that the model supports.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the foundation model.

modelId
Required: Yes
Type: string

The model ID of the foundation model.

modelLifecycle
Type: FoundationModelLifecycle structure

Contains details about whether a model version is available or deprecated.

modelName
Type: string

The name of the model.

outputModalities
Type: Array of strings

The output modalities that the model supports.

providerName
Type: string

The model's provider name.

responseStreamingSupported
Type: boolean

Indicates whether the model supports streaming.

GuardrailContentFilter

Description

Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

  • Hate – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

  • Insults – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

  • Sexual – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

  • Violence – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing.

Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

For more information, see Guardrails content filters.

This data type is used in the following API operations:

Members
inputStrength
Required: Yes
Type: string

The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

outputStrength
Required: Yes
Type: string

The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

type
Required: Yes
Type: string

The harmful category that the content filter is applied to.

GuardrailContentFilterConfig

Description

Contains filter strengths for harmful content. Guardrails support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

  • Hate – Describes language or a statement that discriminates, criticizes, insults, denounces, or dehumanizes a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

  • Insults – Describes language or a statement that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

  • Sexual – Describes language or a statement that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

  • Violence – Describes language or a statement that includes glorification of or threats to inflict physical pain, hurt, or injury toward a person, group or thing.

Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

For more information, see Guardrails content filters.

Members
inputStrength
Required: Yes
Type: string

The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

outputStrength
Required: Yes
Type: string

The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

type
Required: Yes
Type: string

The harmful category that the content filter is applied to.

GuardrailContentPolicy

Description

Contains details about how to handle harmful content.

This data type is used in the following API operations:

Members
filters
Type: Array of GuardrailContentFilter structures

Contains the type of the content filter and how strongly it should apply to prompts and model responses.

GuardrailContentPolicyConfig

Description

Contains details about how to handle harmful content.

Members
filtersConfig
Required: Yes
Type: Array of GuardrailContentFilterConfig structures

Contains the type of the content filter and how strongly it should apply to prompts and model responses.

GuardrailContextualGroundingFilter

Description

The details for the guardrails contextual grounding filter.

Members
threshold
Required: Yes
Type: double

The threshold details for the guardrails contextual grounding filter.

type
Required: Yes
Type: string

The filter type details for the guardrails contextual grounding filter.

GuardrailContextualGroundingFilterConfig

Description

The filter configuration details for the guardrails contextual grounding filter.

Members
threshold
Required: Yes
Type: double

The threshold details for the guardrails contextual grounding filter.

type
Required: Yes
Type: string

The filter details for the guardrails contextual grounding filter.

GuardrailContextualGroundingPolicy

Description

The details for the guardrails contextual grounding policy.

Members
filters
Required: Yes
Type: Array of GuardrailContextualGroundingFilter structures

The filter details for the guardrails contextual grounding policy.

GuardrailContextualGroundingPolicyConfig

Description

The policy configuration details for the guardrails contextual grounding policy.

Members
filtersConfig
Required: Yes
Type: Array of GuardrailContextualGroundingFilterConfig structures

The filter configuration details for the guardrails contextual grounding policy.

GuardrailManagedWords

Description

The managed word list that was configured for the guardrail. (This is a list of words that are pre-defined and managed by guardrails only.)

Members
type
Required: Yes
Type: string

ManagedWords$type The managed word type that was configured for the guardrail. (For now, we only offer profanity word list)

GuardrailManagedWordsConfig

Description

The managed word list to configure for the guardrail.

Members
type
Required: Yes
Type: string

The managed word type to configure for the guardrail.

GuardrailPiiEntity

Description

The PII entity configured for the guardrail.

Members
action
Required: Yes
Type: string

The configured guardrail action when PII entity is detected.

type
Required: Yes
Type: string

The type of PII entity. For exampvle, Social Security Number.

GuardrailPiiEntityConfig

Description

The PII entity to configure for the guardrail.

Members
action
Required: Yes
Type: string

Configure guardrail action when the PII entity is detected.

type
Required: Yes
Type: string

Configure guardrail type when the PII entity is detected.

The following PIIs are used to block or mask sensitive information:

  • General

    • ADDRESS

      A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

    • AGE

      An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

    • NAME

      An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. guardrails doesn't apply this entity type to names that are part of organizations or addresses. For example, guardrails recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

    • EMAIL

      An email address, such as marymajor@email.com.

    • PHONE

      A phone number. This entity type also includes fax and pager numbers.

    • USERNAME

      A user name that identifies an account, such as a login name, screen name, nick name, or handle.

    • PASSWORD

      An alphanumeric string that is used as a password, such as "*very20special#pass*".

    • DRIVER_ID

      The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

    • LICENSE_PLATE

      A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

    • VEHICLE_IDENTIFICATION_NUMBER

      A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

  • Finance

    • REDIT_DEBIT_CARD_CVV

      A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

    • CREDIT_DEBIT_CARD_EXPIRY

      The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. Guardrails recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

    • CREDIT_DEBIT_CARD_NUMBER

      The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

    • PIN

      A four-digit personal identification number (PIN) with which you can access your bank account.

    • INTERNATIONAL_BANK_ACCOUNT_NUMBER

      An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

    • SWIFT_CODE

      A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers.

      SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

  • IT

    • IP_ADDRESS

      An IPv4 address, such as 198.51.100.0.

    • MAC_ADDRESS

      A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

    • URL

      A web address, such as www.example.com.

    • AWS_ACCESS_KEY

      A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

    • AWS_SECRET_KEY

      A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

  • USA specific

    • US_BANK_ACCOUNT_NUMBER

      A US bank account number, which is typically 10 to 12 digits long.

    • US_BANK_ROUTING_NUMBER

      A US bank account routing number. These are typically nine digits long,

    • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER

      A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

    • US_PASSPORT_NUMBER

      A US passport number. Passport numbers range from six to nine alphanumeric characters.

    • US_SOCIAL_SECURITY_NUMBER

      A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

  • Canada specific

    • CA_HEALTH_NUMBER

      A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

    • CA_SOCIAL_INSURANCE_NUMBER

      A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits.

      The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm.

  • UK Specific

    • UK_NATIONAL_HEALTH_SERVICE_NUMBER

      A UK National Health Service Number is a 10-17 digit number, such as 485 777 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

    • UK_NATIONAL_INSURANCE_NUMBER

      A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system.

      The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

    • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER

      A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

  • Custom

    • Regex filter - You can use a regular expressions to define patterns for a guardrail to recognize and act upon such as serial number, booking ID etc..

GuardrailRegex

Description

The regular expression configured for the guardrail.

Members
action
Required: Yes
Type: string

The action taken when a match to the regular expression is detected.

description
Type: string

The description of the regular expression for the guardrail.

name
Required: Yes
Type: string

The name of the regular expression for the guardrail.

pattern
Required: Yes
Type: string

The pattern of the regular expression configured for the guardrail.

GuardrailRegexConfig

Description

The regular expression to configure for the guardrail.

Members
action
Required: Yes
Type: string

The guardrail action to configure when matching regular expression is detected.

description
Type: string

The description of the regular expression to configure for the guardrail.

name
Required: Yes
Type: string

The name of the regular expression to configure for the guardrail.

pattern
Required: Yes
Type: string

The regular expression pattern to configure for the guardrail.

GuardrailSensitiveInformationPolicy

Description

Contains details about PII entities and regular expressions configured for the guardrail.

Members
piiEntities
Type: Array of GuardrailPiiEntity structures

The list of PII entities configured for the guardrail.

regexes
Type: Array of GuardrailRegex structures

The list of regular expressions configured for the guardrail.

GuardrailSensitiveInformationPolicyConfig

Description

Contains details about PII entities and regular expressions to configure for the guardrail.

Members
piiEntitiesConfig
Type: Array of GuardrailPiiEntityConfig structures

A list of PII entities to configure to the guardrail.

regexesConfig
Type: Array of GuardrailRegexConfig structures

A list of regular expressions to configure to the guardrail.

GuardrailSummary

Description

Contains details about a guardrail.

This data type is used in the following API operations:

Members
arn
Required: Yes
Type: string

The ARN of the guardrail.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the guardrail was created.

description
Type: string

A description of the guardrail.

id
Required: Yes
Type: string

The unique identifier of the guardrail.

name
Required: Yes
Type: string

The name of the guardrail.

status
Required: Yes
Type: string

The status of the guardrail.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time at which the guardrail was last updated.

version
Required: Yes
Type: string

The version of the guardrail.

GuardrailTopic

Description

Details about topics for the guardrail to identify and deny.

This data type is used in the following API operations:

Members
definition
Required: Yes
Type: string

A definition of the topic to deny.

examples
Type: Array of strings

A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

name
Required: Yes
Type: string

The name of the topic to deny.

type
Type: string

Specifies to deny the topic.

GuardrailTopicConfig

Description

Details about topics for the guardrail to identify and deny.

Members
definition
Required: Yes
Type: string

A definition of the topic to deny.

examples
Type: Array of strings

A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

name
Required: Yes
Type: string

The name of the topic to deny.

type
Required: Yes
Type: string

Specifies to deny the topic.

GuardrailTopicPolicy

Description

Contains details about topics that the guardrail should identify and deny.

This data type is used in the following API operations:

Members
topics
Required: Yes
Type: Array of GuardrailTopic structures

A list of policies related to topics that the guardrail should deny.

GuardrailTopicPolicyConfig

Description

Contains details about topics that the guardrail should identify and deny.

Members
topicsConfig
Required: Yes
Type: Array of GuardrailTopicConfig structures

A list of policies related to topics that the guardrail should deny.

GuardrailWord

Description

A word configured for the guardrail.

Members
text
Required: Yes
Type: string

Text of the word configured for the guardrail to block.

GuardrailWordConfig

Description

A word to configure for the guardrail.

Members
text
Required: Yes
Type: string

Text of the word configured for the guardrail to block.

GuardrailWordPolicy

Description

Contains details about the word policy configured for the guardrail.

Members
managedWordLists
Type: Array of GuardrailManagedWords structures

A list of managed words configured for the guardrail.

words
Type: Array of GuardrailWord structures

A list of words configured for the guardrail.

GuardrailWordPolicyConfig

Description

Contains details about the word policy to configured for the guardrail.

Members
managedWordListsConfig
Type: Array of GuardrailManagedWordsConfig structures

A list of managed words to configure for the guardrail.

wordsConfig
Type: Array of GuardrailWordConfig structures

A list of words to configure for the guardrail.

HumanEvaluationConfig

Description

Specifies the custom metrics, how tasks will be rated, the flow definition ARN, and your custom prompt datasets. Model evaluation jobs use human workers only support the use of custom prompt datasets. To learn more about custom prompt datasets and the required format, see Custom prompt datasets.

When you create custom metrics in HumanEvaluationCustomMetric you must specify the metric's name. The list of names specified in the HumanEvaluationCustomMetric array, must match the metricNames array of strings specified in EvaluationDatasetMetricConfig. For example, if in the HumanEvaluationCustomMetric array your specified the names "accuracy", "toxicity", "readability" as custom metrics then the metricNames array would need to look like the following ["accuracy", "toxicity", "readability"] in EvaluationDatasetMetricConfig.

Members
customMetrics
Type: Array of HumanEvaluationCustomMetric structures

A HumanEvaluationCustomMetric object. It contains the names the metrics, how the metrics are to be evaluated, an optional description.

datasetMetricConfigs
Required: Yes
Type: Array of EvaluationDatasetMetricConfig structures

Use to specify the metrics, task, and prompt dataset to be used in your model evaluation job.

humanWorkflowConfig
Type: HumanWorkflowConfig structure

The parameters of the human workflow.

HumanEvaluationCustomMetric

Description

In a model evaluation job that uses human workers you must define the name of the metric, and how you want that metric rated ratingMethod, and an optional description of the metric.

Members
description
Type: string

An optional description of the metric. Use this parameter to provide more details about the metric.

name
Required: Yes
Type: string

The name of the metric. Your human evaluators will see this name in the evaluation UI.

ratingMethod
Required: Yes
Type: string

Choose how you want your human workers to evaluation your model. Valid values for rating methods are ThumbsUpDown, IndividualLikertScale,ComparisonLikertScale, ComparisonChoice, and ComparisonRank

HumanWorkflowConfig

Description

Contains SageMakerFlowDefinition object. The object is used to specify the prompt dataset, task type, rating method and metric names.

Members
flowDefinitionArn
Required: Yes
Type: string

The Amazon Resource Number (ARN) for the flow definition

instructions
Type: string

Instructions for the flow definition

ImportedModelSummary

Description

Information about tne imported model.

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation time of the imported model.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the imported model.

modelName
Required: Yes
Type: string

Name of the imported model.

InferenceProfileModel

Description

Contains information about a model.

Members
modelArn
Type: string

The Amazon Resource Name (ARN) of the model.

InferenceProfileSummary

Description

Contains information about an inference profile.

Members
createdAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the inference profile was created.

description
Type: string

The description of the inference profile.

inferenceProfileArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the inference profile.

inferenceProfileId
Required: Yes
Type: string

The unique identifier of the inference profile.

inferenceProfileName
Required: Yes
Type: string

The name of the inference profile.

models
Required: Yes
Type: Array of InferenceProfileModel structures

A list of information about each model in the inference profile.

status
Required: Yes
Type: string

The status of the inference profile. ACTIVE means that the inference profile is available to use.

type
Required: Yes
Type: string

The type of the inference profile. SYSTEM_DEFINED means that the inference profile is defined by Amazon Bedrock.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the inference profile was last updated.

InternalServerException

Description

An internal server error occurred. Retry your request.

Members
message
Type: string

LoggingConfig

Description

Configuration fields for invocation logging.

Members
cloudWatchConfig
Type: CloudWatchConfig structure

CloudWatch logging configuration.

embeddingDataDeliveryEnabled
Type: boolean

Set to include embeddings data in the log delivery.

imageDataDeliveryEnabled
Type: boolean

Set to include image data in the log delivery.

s3Config
Type: S3Config structure

S3 configuration for storing log data.

textDataDeliveryEnabled
Type: boolean

Set to include text data in the log delivery.

ModelCopyJobSummary

Description

Contains details about each model copy job.

This data type is used in the following API operations:

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the model copy job was created.

failureMessage
Type: string

If a model fails to be copied, a message describing why the job failed is included here.

jobArn
Required: Yes
Type: string

The Amazon Resoource Name (ARN) of the model copy job.

sourceAccountId
Required: Yes
Type: string

The unique identifier of the account that the model being copied originated from.

sourceModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the original model being copied.

sourceModelName
Type: string

The name of the original model being copied.

status
Required: Yes
Type: string

The status of the model copy job.

targetModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the copied model.

targetModelKmsKeyArn
Type: string

The Amazon Resource Name (ARN) of the KMS key used to encrypt the copied model.

targetModelName
Type: string

The name of the copied model.

targetModelTags
Type: Array of Tag structures

Tags associated with the copied model.

ModelCustomizationJobSummary

Description

Information about one customization job

Members
baseModelArn
Required: Yes
Type: string

Amazon Resource Name (ARN) of the base model.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

Creation time of the custom model.

customModelArn
Type: string

Amazon Resource Name (ARN) of the custom model.

customModelName
Type: string

Name of the custom model.

customizationType
Type: string

Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the customization job ended.

jobArn
Required: Yes
Type: string

Amazon Resource Name (ARN) of the customization job.

jobName
Required: Yes
Type: string

Name of the customization job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

Time that the customization job was last modified.

status
Required: Yes
Type: string

Status of the customization job.

ModelDataSource

Description

Data source for the imported model.

Members
s3DataSource
Type: S3DataSource structure

The Amazon S3 data source of the imported model.

ModelImportJobSummary

Description

Information about the import job.

Members
creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time import job was created.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when import job ended.

importedModelArn
Type: string

The Amazon resource Name (ARN) of the imported model.

importedModelName
Type: string

The name of the imported model.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the import job.

jobName
Required: Yes
Type: string

The name of the import job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the import job was last modified.

status
Required: Yes
Type: string

The status of the imported job.

ModelInvocationJobInputDataConfig

Description

Details about the location of the input to the batch inference job.

Members
s3InputDataConfig

Contains the configuration of the S3 location of the input data.

ModelInvocationJobOutputDataConfig

Description

Contains the configuration of the S3 location of the output data.

Members
s3OutputDataConfig

Contains the configuration of the S3 location of the output data.

ModelInvocationJobS3InputDataConfig

Description

Contains the configuration of the S3 location of the input data.

Members
s3BucketOwner
Type: string

The ID of the Amazon Web Services account that owns the S3 bucket containing the input data.

s3InputFormat
Type: string

The format of the input data.

s3Uri
Required: Yes
Type: string

The S3 location of the input data.

ModelInvocationJobS3OutputDataConfig

Description

Contains the configuration of the S3 location of the output data.

Members
s3BucketOwner
Type: string

The ID of the Amazon Web Services account that owns the S3 bucket containing the output data.

s3EncryptionKeyId
Type: string

The unique identifier of the key that encrypts the S3 location of the output data.

s3Uri
Required: Yes
Type: string

The S3 location of the output data.

ModelInvocationJobSummary

Description

A summary of a batch inference job.

Members
clientRequestToken
Type: string

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.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job ended.

inputDataConfig
Required: Yes
Type: ModelInvocationJobInputDataConfig structure

Details about the location of the input to the batch inference job.

jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the batch inference job.

jobExpirationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job times or timed out.

jobName
Required: Yes
Type: string

The name of the batch inference job.

lastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job was last modified.

message
Type: string

If the batch inference job failed, this field contains a message describing why the job failed.

modelId
Required: Yes
Type: string

The unique identifier of the foundation model used for model inference.

outputDataConfig
Required: Yes
Type: ModelInvocationJobOutputDataConfig structure

Details about the location of the output of the batch inference job.

roleArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the service role with permissions to carry out and manage batch inference. You can use the console to create a default service role or follow the steps at Create a service role for batch inference.

status
Type: string

The status of the batch inference job.

submitTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the batch inference job was submitted.

timeoutDurationInHours
Type: int

The number of hours after which the batch inference job was set to time out.

vpcConfig
Type: VpcConfig structure

The configuration of the Virtual Private Cloud (VPC) for the data in the batch inference job. For more information, see Protect batch inference jobs using a VPC.

OutputDataConfig

Description

S3 Location of the output data.

Members
s3Uri
Required: Yes
Type: string

The S3 URI where the output data is stored.

ProvisionedModelSummary

Description

A summary of information about a Provisioned Throughput.

This data type is used in the following API operations:

Members
commitmentDuration
Type: string

The duration for which the Provisioned Throughput was committed.

commitmentExpirationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp for when the commitment term of the Provisioned Throughput expires.

creationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the Provisioned Throughput was created.

desiredModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model requested to be associated to this Provisioned Throughput. This value differs from the modelArn if updating hasn't completed.

desiredModelUnits
Required: Yes
Type: int

The number of model units that was requested to be allocated to the Provisioned Throughput.

foundationModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the base model for which the Provisioned Throughput was created, or of the base model that the custom model for which the Provisioned Throughput was created was customized.

lastModifiedTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the Provisioned Throughput was last modified.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the model associated with the Provisioned Throughput.

modelUnits
Required: Yes
Type: int

The number of model units allocated to the Provisioned Throughput.

provisionedModelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Provisioned Throughput.

provisionedModelName
Required: Yes
Type: string

The name of the Provisioned Throughput.

status
Required: Yes
Type: string

The status of the Provisioned Throughput.

ResourceNotFoundException

Description

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

Members
message
Type: string

S3Config

Description

S3 configuration for storing log data.

Members
bucketName
Required: Yes
Type: string

S3 bucket name.

keyPrefix
Type: string

S3 prefix.

S3DataSource

Description

The Amazon S3 data source of the imported job.

Members
s3Uri
Required: Yes
Type: string

The URI of the Amazon S3 data source.

ServiceQuotaExceededException

Description

The number of requests exceeds the service quota. Resubmit your request later.

Members
message
Type: string

Tag

Description

Definition of the key/value pair for a tag.

Members
key
Required: Yes
Type: string

Key for the tag.

value
Required: Yes
Type: string

Value for the tag.

ThrottlingException

Description

The number of requests exceeds the limit. Resubmit your request later.

Members
message
Type: string

TooManyTagsException

Description

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.

Members
message
Type: string
resourceName
Type: string

The name of the resource with too many tags.

TrainingDataConfig

Description

S3 Location of the training data.

Members
s3Uri
Required: Yes
Type: string

The S3 URI where the training data is stored.

TrainingMetrics

Description

Metrics associated with the custom job.

Members
trainingLoss
Type: float

Loss metric associated with the custom job.

ValidationDataConfig

Description

Array of up to 10 validators.

Members
validators
Required: Yes
Type: Array of Validator structures

Information about the validators.

ValidationException

Description

Input validation failed. Check your request parameters and retry the request.

Members
message
Type: string

Validator

Description

Information about a validator.

Members
s3Uri
Required: Yes
Type: string

The S3 URI where the validation data is stored.

ValidatorMetric

Description

The metric for the validator.

Members
validationLoss
Type: float

The validation loss associated with this validator.