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 = [] )
Deletes a batch of evaluation jobs.
CreateEvaluationJob ( array $params = [] )
Creates an evaluation job.
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.
CreateInferenceProfile ( array $params = [] )
Creates an application inference profile to track metrics and costs when invoking a model.
CreateMarketplaceModelEndpoint ( array $params = [] )
Creates an endpoint for a model from Amazon Bedrock Marketplace.
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.
DeleteInferenceProfile ( array $params = [] )
Deletes an application inference profile.
DeleteMarketplaceModelEndpoint ( array $params = [] )
Deletes an endpoint for a model from Amazon Bedrock Marketplace.
DeleteModelInvocationLoggingConfiguration ( array $params = [] )
Delete the invocation logging.
DeleteProvisionedModelThroughput ( array $params = [] )
Deletes a Provisioned Throughput.
DeregisterMarketplaceModelEndpoint ( array $params = [] )
Deregisters an endpoint for a model from Amazon Bedrock Marketplace.
GetCustomModel ( array $params = [] )
Get the properties associated with a Amazon Bedrock custom model that you have created.
GetEvaluationJob ( array $params = [] )
Gets information about an evaluation job, such as 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.
GetMarketplaceModelEndpoint ( array $params = [] )
Retrieves details about a specific endpoint for a model from Amazon Bedrock Marketplace.
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.
GetPromptRouter ( array $params = [] )
Retrieves details about a prompt router.
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 all existing 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.
ListMarketplaceModelEndpoints ( array $params = [] )
Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account.
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.
ListPromptRouters ( array $params = [] )
Retrieves a list of prompt routers.
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.
RegisterMarketplaceModelEndpoint ( array $params = [] )
Registers an existing Amazon SageMaker endpoint with Amazon Bedrock Marketplace, allowing it to be used with Amazon Bedrock APIs.
StopEvaluationJob ( array $params = [] )
Stops an evaluation job that is current being created or running.
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.
UpdateMarketplaceModelEndpoint ( array $params = [] )
Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace.
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
ListMarketplaceModelEndpoints
ListModelCopyJobs
ListModelCustomizationJobs
ListModelImportJobs
ListModelInvocationJobs
ListPromptRouters
ListProvisionedModelThroughputs

Operations

BatchDeleteEvaluationJob

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

Deletes a batch of evaluation jobs. An 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

A list of one or more evaluation job Amazon Resource Names (ARNs) you want to delete.

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 evaluation jobs that failed to be deleted.

evaluationJobs
Required: Yes
Type: Array of BatchDeleteEvaluationJobItem structures

The list of evaluation jobs for deletion.

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([/* ... */]);

Creates an evaluation job.

Parameter Syntax

$result = $client->createEvaluationJob([
    'applicationType' => 'ModelEvaluation|RagEvaluation',
    '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
                ],
                // ...
            ],
            'evaluatorModelConfig' => [
                'bedrockEvaluatorModels' => [
                    [
                        'modelIdentifier' => '<string>', // 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>',
                    'modelIdentifier' => '<string>', // REQUIRED
                ],
            ],
            // ...
        ],
        'ragConfigs' => [
            [
                'knowledgeBaseConfig' => [
                    'retrieveAndGenerateConfig' => [
                        'externalSourcesConfiguration' => [
                            'generationConfiguration' => [
                                'additionalModelRequestFields' => [
                                    '<AdditionalModelRequestFieldsKey>' => [
                                    ],
                                    // ...
                                ],
                                'guardrailConfiguration' => [
                                    'guardrailId' => '<string>', // REQUIRED
                                    'guardrailVersion' => '<string>', // REQUIRED
                                ],
                                'kbInferenceConfig' => [
                                    'textInferenceConfig' => [
                                        'maxTokens' => <integer>,
                                        'stopSequences' => ['<string>', ...],
                                        'temperature' => <float>,
                                        'topP' => <float>,
                                    ],
                                ],
                                'promptTemplate' => [
                                    'textPromptTemplate' => '<string>',
                                ],
                            ],
                            'modelArn' => '<string>', // REQUIRED
                            'sources' => [ // REQUIRED
                                [
                                    'byteContent' => [
                                        'contentType' => '<string>', // REQUIRED
                                        'data' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
                                        'identifier' => '<string>', // REQUIRED
                                    ],
                                    's3Location' => [
                                        'uri' => '<string>', // REQUIRED
                                    ],
                                    'sourceType' => 'S3|BYTE_CONTENT', // REQUIRED
                                ],
                                // ...
                            ],
                        ],
                        'knowledgeBaseConfiguration' => [
                            'generationConfiguration' => [
                                'additionalModelRequestFields' => [
                                    '<AdditionalModelRequestFieldsKey>' => [
                                    ],
                                    // ...
                                ],
                                'guardrailConfiguration' => [
                                    'guardrailId' => '<string>', // REQUIRED
                                    'guardrailVersion' => '<string>', // REQUIRED
                                ],
                                'kbInferenceConfig' => [
                                    'textInferenceConfig' => [
                                        'maxTokens' => <integer>,
                                        'stopSequences' => ['<string>', ...],
                                        'temperature' => <float>,
                                        'topP' => <float>,
                                    ],
                                ],
                                'promptTemplate' => [
                                    'textPromptTemplate' => '<string>',
                                ],
                            ],
                            'knowledgeBaseId' => '<string>', // REQUIRED
                            'modelArn' => '<string>', // REQUIRED
                            'orchestrationConfiguration' => [
                                'queryTransformationConfiguration' => [ // REQUIRED
                                    'type' => 'QUERY_DECOMPOSITION', // REQUIRED
                                ],
                            ],
                            'retrievalConfiguration' => [
                                'vectorSearchConfiguration' => [ // REQUIRED
                                    'filter' => [
                                        'andAll' => [
                                            [...], // RECURSIVE
                                            // ...
                                        ],
                                        'equals' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'greaterThan' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'greaterThanOrEquals' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'in' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'lessThan' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'lessThanOrEquals' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'listContains' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'notEquals' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'notIn' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'orAll' => [
                                            [...], // RECURSIVE
                                            // ...
                                        ],
                                        'startsWith' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                        'stringContains' => [
                                            'key' => '<string>', // REQUIRED
                                            'value' => [ // REQUIRED
                                            ],
                                        ],
                                    ],
                                    'numberOfResults' => <integer>,
                                    'overrideSearchType' => 'HYBRID|SEMANTIC',
                                ],
                            ],
                        ],
                        'type' => 'KNOWLEDGE_BASE|EXTERNAL_SOURCES', // REQUIRED
                    ],
                    'retrieveConfig' => [
                        'knowledgeBaseId' => '<string>', // REQUIRED
                        'knowledgeBaseRetrievalConfiguration' => [ // REQUIRED
                            'vectorSearchConfiguration' => [ // REQUIRED
                                'filter' => [
                                    'andAll' => [
                                        [...], // RECURSIVE
                                        // ...
                                    ],
                                    'equals' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'greaterThan' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'greaterThanOrEquals' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'in' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'lessThan' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'lessThanOrEquals' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'listContains' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'notEquals' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'notIn' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'orAll' => [
                                        [...], // RECURSIVE
                                        // ...
                                    ],
                                    'startsWith' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                    'stringContains' => [
                                        'key' => '<string>', // REQUIRED
                                        'value' => [ // REQUIRED
                                        ],
                                    ],
                                ],
                                'numberOfResults' => <integer>,
                                'overrideSearchType' => 'HYBRID|SEMANTIC',
                            ],
                        ],
                    ],
                ],
            ],
            // ...
        ],
    ],
    'jobDescription' => '<string>',
    'jobName' => '<string>', // REQUIRED
    'jobTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'outputDataConfig' => [ // REQUIRED
        's3Uri' => '<string>', // REQUIRED
    ],
    'roleArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
applicationType
Type: string

Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation).

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 encryption key Amazon Resource Name (ARN) that will be used to encrypt your evaluation job.

evaluationConfig
Required: Yes
Type: EvaluationConfig structure

Contains the configuration details of either an automated or human-based evaluation job.

inferenceConfig
Required: Yes
Type: EvaluationInferenceConfig structure

Contains the configuration details of the inference model for the evaluation job.

For model evaluation jobs, automated jobs support a single model or inference profile, and jobs that use human workers support two models or inference profiles.

jobDescription
Type: string

A description of the evaluation job.

jobName
Required: Yes
Type: string

A name for the evaluation job. Names must unique with your Amazon Web Services account, and your account's Amazon Web Services region.

jobTags
Type: Array of Tag structures

Tags to attach to the model evaluation job.

outputDataConfig
Required: Yes
Type: EvaluationOutputDataConfig structure

Contains the configuration details of the Amazon S3 bucket for storing the results of the evaluation job.

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. To learn more about the required permissions, see Required permissions for model evaluations.

Result Syntax

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

Result Details

Members
jobArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the 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 Amazon Bedrock Guardrails in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->createGuardrail([
    'blockedInputMessaging' => '<string>', // REQUIRED
    'blockedOutputsMessaging' => '<string>', // REQUIRED
    'clientRequestToken' => '<string>',
    'contentPolicyConfig' => [
        'filtersConfig' => [ // REQUIRED
            [
                'inputModalities' => ['<string>', ...],
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'outputModalities' => ['<string>', ...],
                '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.

CreateInferenceProfile

$result = $client->createInferenceProfile([/* ... */]);
$promise = $client->createInferenceProfileAsync([/* ... */]);

Creates an application inference profile to track metrics and costs when invoking a model. To create an application inference profile for a foundation model in one region, specify the ARN of the model in that region. To create an application inference profile for a foundation model across multiple regions, specify the ARN of the system-defined inference profile that contains the regions that you want to route requests to. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

Parameter Syntax

$result = $client->createInferenceProfile([
    'clientRequestToken' => '<string>',
    'description' => '<string>',
    'inferenceProfileName' => '<string>', // REQUIRED
    'modelSource' => [ // REQUIRED
        'copyFrom' => '<string>',
    ],
    '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.

description
Type: string

A description for the inference profile.

inferenceProfileName
Required: Yes
Type: string

A name for the inference profile.

modelSource
Required: Yes
Type: InferenceProfileModelSource structure

The foundation model or system-defined inference profile that the inference profile will track metrics and costs for.

tags
Type: Array of Tag structures

An array of objects, each of which contains a tag and its value. For more information, see Tagging resources in the Amazon Bedrock User Guide.

Result Syntax

[
    'inferenceProfileArn' => '<string>',
    'status' => 'ACTIVE',
]

Result Details

Members
inferenceProfileArn
Required: Yes
Type: string

The ARN of the inference profile that you created.

status
Type: string

The status of the inference profile. ACTIVE means that the inference profile is ready to be used.

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.

CreateMarketplaceModelEndpoint

$result = $client->createMarketplaceModelEndpoint([/* ... */]);
$promise = $client->createMarketplaceModelEndpointAsync([/* ... */]);

Creates an endpoint for a model from Amazon Bedrock Marketplace. The endpoint is hosted by Amazon SageMaker.

Parameter Syntax

$result = $client->createMarketplaceModelEndpoint([
    'acceptEula' => true || false,
    'clientRequestToken' => '<string>',
    'endpointConfig' => [ // REQUIRED
        'sageMaker' => [
            'executionRole' => '<string>', // REQUIRED
            'initialInstanceCount' => <integer>, // REQUIRED
            'instanceType' => '<string>', // REQUIRED
            'kmsEncryptionKey' => '<string>',
            'vpc' => [
                'securityGroupIds' => ['<string>', ...], // REQUIRED
                'subnetIds' => ['<string>', ...], // REQUIRED
            ],
        ],
    ],
    'endpointName' => '<string>', // REQUIRED
    'modelSourceIdentifier' => '<string>', // REQUIRED
    'tags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
acceptEula
Type: boolean

Indicates whether you accept the end-user license agreement (EULA) for the model. Set to true to accept the EULA.

clientRequestToken
Type: string

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail.

endpointConfig
Required: Yes
Type: EndpointConfig structure

The configuration for the endpoint, including the number and type of instances to use.

endpointName
Required: Yes
Type: string

The name of the endpoint. This name must be unique within your Amazon Web Services account and region.

modelSourceIdentifier
Required: Yes
Type: string

The ARN of the model from Amazon Bedrock Marketplace that you want to deploy to the endpoint.

tags
Type: Array of Tag structures

An array of key-value pairs to apply to the underlying Amazon SageMaker endpoint. You can use these tags to organize and identify your Amazon Web Services resources.

Result Syntax

[
    'marketplaceModelEndpoint' => [
        'createdAt' => <DateTime>,
        'endpointArn' => '<string>',
        'endpointConfig' => [
            'sageMaker' => [
                'executionRole' => '<string>',
                'initialInstanceCount' => <integer>,
                'instanceType' => '<string>',
                'kmsEncryptionKey' => '<string>',
                'vpc' => [
                    'securityGroupIds' => ['<string>', ...],
                    'subnetIds' => ['<string>', ...],
                ],
            ],
        ],
        'endpointStatus' => '<string>',
        'endpointStatusMessage' => '<string>',
        'modelSourceIdentifier' => '<string>',
        'status' => 'REGISTERED|INCOMPATIBLE_ENDPOINT',
        'statusMessage' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
marketplaceModelEndpoint
Required: Yes
Type: MarketplaceModelEndpoint structure

Details about the created endpoint.

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
        ],
        // ...
    ],
    'customizationConfig' => [
        'distillationConfig' => [
            'teacherModelConfig' => [ // REQUIRED
                'maxResponseLengthForInference' => <integer>,
                'teacherModelIdentifier' => '<string>', // REQUIRED
            ],
        ],
    ],
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING|DISTILLATION',
    'hyperParameters' => ['<string>', ...],
    'jobName' => '<string>', // REQUIRED
    'jobTags' => [
        [
            'key' => '<string>', // REQUIRED
            'value' => '<string>', // REQUIRED
        ],
        // ...
    ],
    'outputDataConfig' => [ // REQUIRED
        's3Uri' => '<string>', // REQUIRED
    ],
    'roleArn' => '<string>', // REQUIRED
    'trainingDataConfig' => [ // REQUIRED
        'invocationLogsConfig' => [
            'invocationLogSource' => [ // REQUIRED
                's3Uri' => '<string>',
            ],
            'requestMetadataFilters' => [
                'andAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
                'equals' => ['<string>', ...],
                'notEquals' => ['<string>', ...],
                'orAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
            ],
            'usePromptResponse' => true || false,
        ],
        's3Uri' => '<string>',
    ],
    '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.

customizationConfig
Type: CustomizationConfig structure

The customization configuration for the model customization job.

customizationType
Type: string

The customization type.

hyperParameters
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.

DeleteInferenceProfile

$result = $client->deleteInferenceProfile([/* ... */]);
$promise = $client->deleteInferenceProfileAsync([/* ... */]);

Deletes an application inference profile. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

Parameter Syntax

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

Parameter Details

Members
inferenceProfileIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) or ID of the application inference profile 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.

DeleteMarketplaceModelEndpoint

$result = $client->deleteMarketplaceModelEndpoint([/* ... */]);
$promise = $client->deleteMarketplaceModelEndpointAsync([/* ... */]);

Deletes an endpoint for a model from Amazon Bedrock Marketplace.

Parameter Syntax

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

Parameter Details

Members
endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint you want 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.

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.

DeregisterMarketplaceModelEndpoint

$result = $client->deregisterMarketplaceModelEndpoint([/* ... */]);
$promise = $client->deregisterMarketplaceModelEndpointAsync([/* ... */]);

Deregisters an endpoint for a model from Amazon Bedrock Marketplace. This operation removes the endpoint's association with Amazon Bedrock but does not delete the underlying Amazon SageMaker endpoint.

Parameter Syntax

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

Parameter Details

Members
endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint you want to deregister.

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.

ServiceUnavailableException:

Returned if the service cannot complete the request.

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.

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>,
    'customizationConfig' => [
        'distillationConfig' => [
            'teacherModelConfig' => [
                'maxResponseLengthForInference' => <integer>,
                'teacherModelIdentifier' => '<string>',
            ],
        ],
    ],
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING|DISTILLATION',
    'hyperParameters' => ['<string>', ...],
    'jobArn' => '<string>',
    'jobName' => '<string>',
    'modelArn' => '<string>',
    'modelKmsKeyArn' => '<string>',
    'modelName' => '<string>',
    'outputDataConfig' => [
        's3Uri' => '<string>',
    ],
    'trainingDataConfig' => [
        'invocationLogsConfig' => [
            'invocationLogSource' => [
                's3Uri' => '<string>',
            ],
            'requestMetadataFilters' => [
                'andAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
                'equals' => ['<string>', ...],
                'notEquals' => ['<string>', ...],
                'orAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
            ],
            'usePromptResponse' => true || false,
        ],
        '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.

customizationConfig
Type: CustomizationConfig structure

The customization configuration for the custom 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([/* ... */]);

Gets information about an evaluation job, such as the status of the job.

Parameter Syntax

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

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the evaluation job you want get information on.

Result Syntax

[
    'applicationType' => 'ModelEvaluation|RagEvaluation',
    'creationTime' => <DateTime>,
    'customerEncryptionKeyId' => '<string>',
    'evaluationConfig' => [
        'automated' => [
            'datasetMetricConfigs' => [
                [
                    'dataset' => [
                        'datasetLocation' => [
                            's3Uri' => '<string>',
                        ],
                        'name' => '<string>',
                    ],
                    'metricNames' => ['<string>', ...],
                    'taskType' => 'Summarization|Classification|QuestionAndAnswer|Generation|Custom',
                ],
                // ...
            ],
            'evaluatorModelConfig' => [
                'bedrockEvaluatorModels' => [
                    [
                        'modelIdentifier' => '<string>',
                    ],
                    // ...
                ],
            ],
        ],
        '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>',
                ],
            ],
            // ...
        ],
        'ragConfigs' => [
            [
                'knowledgeBaseConfig' => [
                    'retrieveAndGenerateConfig' => [
                        'externalSourcesConfiguration' => [
                            'generationConfiguration' => [
                                'additionalModelRequestFields' => [
                                    '<AdditionalModelRequestFieldsKey>' => [
                                    ],
                                    // ...
                                ],
                                'guardrailConfiguration' => [
                                    'guardrailId' => '<string>',
                                    'guardrailVersion' => '<string>',
                                ],
                                'kbInferenceConfig' => [
                                    'textInferenceConfig' => [
                                        'maxTokens' => <integer>,
                                        'stopSequences' => ['<string>', ...],
                                        'temperature' => <float>,
                                        'topP' => <float>,
                                    ],
                                ],
                                'promptTemplate' => [
                                    'textPromptTemplate' => '<string>',
                                ],
                            ],
                            'modelArn' => '<string>',
                            'sources' => [
                                [
                                    'byteContent' => [
                                        'contentType' => '<string>',
                                        'data' => <string || resource || Psr\Http\Message\StreamInterface>,
                                        'identifier' => '<string>',
                                    ],
                                    's3Location' => [
                                        'uri' => '<string>',
                                    ],
                                    'sourceType' => 'S3|BYTE_CONTENT',
                                ],
                                // ...
                            ],
                        ],
                        'knowledgeBaseConfiguration' => [
                            'generationConfiguration' => [
                                'additionalModelRequestFields' => [
                                    '<AdditionalModelRequestFieldsKey>' => [
                                    ],
                                    // ...
                                ],
                                'guardrailConfiguration' => [
                                    'guardrailId' => '<string>',
                                    'guardrailVersion' => '<string>',
                                ],
                                'kbInferenceConfig' => [
                                    'textInferenceConfig' => [
                                        'maxTokens' => <integer>,
                                        'stopSequences' => ['<string>', ...],
                                        'temperature' => <float>,
                                        'topP' => <float>,
                                    ],
                                ],
                                'promptTemplate' => [
                                    'textPromptTemplate' => '<string>',
                                ],
                            ],
                            'knowledgeBaseId' => '<string>',
                            'modelArn' => '<string>',
                            'orchestrationConfiguration' => [
                                'queryTransformationConfiguration' => [
                                    'type' => 'QUERY_DECOMPOSITION',
                                ],
                            ],
                            'retrievalConfiguration' => [
                                'vectorSearchConfiguration' => [
                                    'filter' => [
                                        'andAll' => [
                                            [...], // RECURSIVE
                                            // ...
                                        ],
                                        'equals' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'greaterThan' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'greaterThanOrEquals' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'in' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'lessThan' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'lessThanOrEquals' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'listContains' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'notEquals' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'notIn' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'orAll' => [
                                            [...], // RECURSIVE
                                            // ...
                                        ],
                                        'startsWith' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                        'stringContains' => [
                                            'key' => '<string>',
                                            'value' => [
                                            ],
                                        ],
                                    ],
                                    'numberOfResults' => <integer>,
                                    'overrideSearchType' => 'HYBRID|SEMANTIC',
                                ],
                            ],
                        ],
                        'type' => 'KNOWLEDGE_BASE|EXTERNAL_SOURCES',
                    ],
                    'retrieveConfig' => [
                        'knowledgeBaseId' => '<string>',
                        'knowledgeBaseRetrievalConfiguration' => [
                            'vectorSearchConfiguration' => [
                                'filter' => [
                                    'andAll' => [
                                        [...], // RECURSIVE
                                        // ...
                                    ],
                                    'equals' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'greaterThan' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'greaterThanOrEquals' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'in' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'lessThan' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'lessThanOrEquals' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'listContains' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'notEquals' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'notIn' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'orAll' => [
                                        [...], // RECURSIVE
                                        // ...
                                    ],
                                    'startsWith' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                    'stringContains' => [
                                        'key' => '<string>',
                                        'value' => [
                                        ],
                                    ],
                                ],
                                'numberOfResults' => <integer>,
                                'overrideSearchType' => 'HYBRID|SEMANTIC',
                            ],
                        ],
                    ],
                ],
            ],
            // ...
        ],
    ],
    '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
applicationType
Type: string

Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation).

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

The time the evaluation job was created.

customerEncryptionKeyId
Type: string

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

evaluationConfig
Required: Yes
Type: EvaluationConfig structure

Contains the configuration details of either an automated or human-based evaluation job.

failureMessages
Type: Array of strings

A list of strings that specify why the evaluation job failed to create.

inferenceConfig
Required: Yes
Type: EvaluationInferenceConfig structure

Contains the configuration details of the inference model used for the evaluation job.

jobArn
Required: Yes
Type: string

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

jobDescription
Type: string

The description of the evaluation job.

jobName
Required: Yes
Type: string

The name for the evaluation job.

jobType
Required: Yes
Type: string

Specifies whether the evaluation job is automated or human-based.

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

The time the evaluation job was last modified.

outputDataConfig
Required: Yes
Type: EvaluationOutputDataConfig structure

Contains the configuration details of the Amazon S3 bucket for storing the results of the evaluation job.

roleArn
Required: Yes
Type: string

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

status
Required: Yes
Type: string

The current status of the 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' => [
            [
                'inputModalities' => ['<string>', ...],
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH',
                'outputModalities' => ['<string>', ...],
                '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>,
    'instructSupported' => true || false,
    '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.

instructSupported
Type: boolean

Specifies if the imported model supports converse.

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 Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

Parameter Syntax

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

Parameter Details

Members
inferenceProfileIdentifier
Required: Yes
Type: string

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

Result Syntax

[
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'inferenceProfileArn' => '<string>',
    'inferenceProfileId' => '<string>',
    'inferenceProfileName' => '<string>',
    'models' => [
        [
            'modelArn' => '<string>',
        ],
        // ...
    ],
    'status' => 'ACTIVE',
    'type' => 'SYSTEM_DEFINED|APPLICATION',
    '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 ready to be used.

type
Required: Yes
Type: string

The type of the inference profile. The following types are possible:

  • SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

  • APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

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.

GetMarketplaceModelEndpoint

$result = $client->getMarketplaceModelEndpoint([/* ... */]);
$promise = $client->getMarketplaceModelEndpointAsync([/* ... */]);

Retrieves details about a specific endpoint for a model from Amazon Bedrock Marketplace.

Parameter Syntax

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

Parameter Details

Members
endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint you want to get information about.

Result Syntax

[
    'marketplaceModelEndpoint' => [
        'createdAt' => <DateTime>,
        'endpointArn' => '<string>',
        'endpointConfig' => [
            'sageMaker' => [
                'executionRole' => '<string>',
                'initialInstanceCount' => <integer>,
                'instanceType' => '<string>',
                'kmsEncryptionKey' => '<string>',
                'vpc' => [
                    'securityGroupIds' => ['<string>', ...],
                    'subnetIds' => ['<string>', ...],
                ],
            ],
        ],
        'endpointStatus' => '<string>',
        'endpointStatusMessage' => '<string>',
        'modelSourceIdentifier' => '<string>',
        'status' => 'REGISTERED|INCOMPATIBLE_ENDPOINT',
        'statusMessage' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
marketplaceModelEndpoint
Type: MarketplaceModelEndpoint structure

Details about the requested endpoint.

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>,
    'customizationConfig' => [
        'distillationConfig' => [
            'teacherModelConfig' => [
                'maxResponseLengthForInference' => <integer>,
                'teacherModelIdentifier' => '<string>',
            ],
        ],
    ],
    'customizationType' => 'FINE_TUNING|CONTINUED_PRE_TRAINING|DISTILLATION',
    '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' => [
        'invocationLogsConfig' => [
            'invocationLogSource' => [
                's3Uri' => '<string>',
            ],
            'requestMetadataFilters' => [
                'andAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
                'equals' => ['<string>', ...],
                'notEquals' => ['<string>', ...],
                'orAll' => [
                    [
                        'equals' => ['<string>', ...],
                        'notEquals' => ['<string>', ...],
                    ],
                    // ...
                ],
            ],
            'usePromptResponse' => true || false,
        ],
        '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.

customizationConfig
Type: CustomizationConfig structure

The customization configuration for the model customization job.

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
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 Monitor batch inference jobs

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.

The following statuses are possible:

  • Submitted – This job has been submitted to a queue for validation.

  • Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following:

    • Your IAM service role has access to the Amazon S3 buckets containing your files.

    • Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model.

    • Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock.

  • Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn.

  • Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request.

  • InProgress – This job has begun. You can start viewing the results in the output S3 location.

  • Completed – This job has successfully completed. View the output files in the output S3 location.

  • PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location.

  • Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center.

  • Stopped – This job was stopped by a user.

  • Stopping – This job is being stopped by a user.

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,
        'videoDataDeliveryEnabled' => 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.

GetPromptRouter

$result = $client->getPromptRouter([/* ... */]);
$promise = $client->getPromptRouterAsync([/* ... */]);

Retrieves details about a prompt router.

Parameter Syntax

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

Parameter Details

Members
promptRouterArn
Required: Yes
Type: string

The prompt router's ARN

Result Syntax

[
    'createdAt' => <DateTime>,
    'description' => '<string>',
    'fallbackModel' => [
        'modelArn' => '<string>',
    ],
    'models' => [
        [
            'modelArn' => '<string>',
        ],
        // ...
    ],
    'promptRouterArn' => '<string>',
    'promptRouterName' => '<string>',
    'routingCriteria' => [
        'responseQualityDifference' => <float>,
    ],
    'status' => 'AVAILABLE',
    'type' => 'custom|default',
    'updatedAt' => <DateTime>,
]

Result Details

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

When the router was created.

description
Type: string

The router's description.

fallbackModel
Required: Yes
Type: PromptRouterTargetModel structure

The router's fallback model.

models
Required: Yes
Type: Array of PromptRouterTargetModel structures

The router's models.

promptRouterArn
Required: Yes
Type: string

The prompt router's ARN

promptRouterName
Required: Yes
Type: string

The router's name.

routingCriteria
Required: Yes
Type: RoutingCriteria structure

The router's routing criteria.

status
Required: Yes
Type: string

The router's status.

type
Required: Yes
Type: string

The router's type.

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

When the router was 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.

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|DISTILLATION',
            '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 all existing evaluation jobs.

Parameter Syntax

$result = $client->listEvaluationJobs([
    'applicationTypeEquals' => 'ModelEvaluation|RagEvaluation',
    '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
applicationTypeEquals
Type: string

A filter to only list evaluation jobs that are either model evaluations or knowledge base evaluations.

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

A filter to only list evaluation jobs created after a specified time.

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

A filter to only list evaluation jobs created before a specified time.

maxResults
Type: int

The maximum number of results to return.

nameContains
Type: string

A filter to only list evaluation jobs that contain a specified string in the job name.

nextToken
Type: string

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

sortBy
Type: string

Specifies a creation time to sort the list of evaluation jobs by when they were created.

sortOrder
Type: string

Specifies whether to sort the list of evaluation jobs by either ascending or descending order.

statusEquals
Type: string

A filter to only list evaluation jobs that are of a certain status.

Result Syntax

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

Result Details

Members
jobSummaries
Type: Array of EvaluationSummary structures

A list of summaries of the 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|DISTILLATION',
    '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>,
            'instructSupported' => true || false,
            'modelArchitecture' => '<string>',
            '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. For more information, see Increase throughput and resilience with cross-region inference in Amazon Bedrock. in the Amazon Bedrock User Guide.

Parameter Syntax

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

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.

typeEquals
Type: string

Filters for inference profiles that match the type you specify.

  • SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

  • APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

Result Syntax

[
    'inferenceProfileSummaries' => [
        [
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'inferenceProfileArn' => '<string>',
            'inferenceProfileId' => '<string>',
            'inferenceProfileName' => '<string>',
            'models' => [
                [
                    'modelArn' => '<string>',
                ],
                // ...
            ],
            'status' => 'ACTIVE',
            'type' => 'SYSTEM_DEFINED|APPLICATION',
            '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.

ListMarketplaceModelEndpoints

$result = $client->listMarketplaceModelEndpoints([/* ... */]);
$promise = $client->listMarketplaceModelEndpointsAsync([/* ... */]);

Lists the endpoints for models from Amazon Bedrock Marketplace in your Amazon Web Services account.

Parameter Syntax

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

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return in a single call. If more results are available, the operation returns a NextToken value.

modelSourceEquals
Type: string

If specified, only endpoints for the given model source identifier are returned.

nextToken
Type: string

The token for the next set of results. You receive this token from a previous ListMarketplaceModelEndpoints call.

Result Syntax

[
    'marketplaceModelEndpoints' => [
        [
            'createdAt' => <DateTime>,
            'endpointArn' => '<string>',
            'modelSourceIdentifier' => '<string>',
            'status' => 'REGISTERED|INCOMPATIBLE_ENDPOINT',
            'statusMessage' => '<string>',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
marketplaceModelEndpoints
Type: Array of MarketplaceModelEndpointSummary structures

An array of endpoint summaries.

nextToken
Type: string

The token for the next set of results. Use this token to get the next set 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.

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|DISTILLATION',
            '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.

The following statuses are possible:

  • Submitted – This job has been submitted to a queue for validation.

  • Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following:

    • Your IAM service role has access to the Amazon S3 buckets containing your files.

    • Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model.

    • Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock.

  • Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn.

  • Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request.

  • InProgress – This job has begun. You can start viewing the results in the output S3 location.

  • Completed – This job has successfully completed. View the output files in the output S3 location.

  • PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location.

  • Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center.

  • Stopped – This job was stopped by a user.

  • Stopping – This job is being stopped by a user.

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.

ListPromptRouters

$result = $client->listPromptRouters([/* ... */]);
$promise = $client->listPromptRoutersAsync([/* ... */]);

Retrieves a list of prompt routers.

Parameter Syntax

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

Parameter Details

Members
maxResults
Type: int

The maximum number of prompt routers to return in one page of results.

nextToken
Type: string

Specify the pagination token from a previous request to retrieve the next page of results.

Result Syntax

[
    'nextToken' => '<string>',
    'promptRouterSummaries' => [
        [
            'createdAt' => <DateTime>,
            'description' => '<string>',
            'fallbackModel' => [
                'modelArn' => '<string>',
            ],
            'models' => [
                [
                    'modelArn' => '<string>',
                ],
                // ...
            ],
            'promptRouterArn' => '<string>',
            'promptRouterName' => '<string>',
            'routingCriteria' => [
                'responseQualityDifference' => <float>,
            ],
            'status' => 'AVAILABLE',
            'type' => 'custom|default',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

Specify the pagination token from a previous request to retrieve the next page of results.

promptRouterSummaries
Type: Array of PromptRouterSummary structures

A list of prompt router summaries.

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,
        'videoDataDeliveryEnabled' => 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.

RegisterMarketplaceModelEndpoint

$result = $client->registerMarketplaceModelEndpoint([/* ... */]);
$promise = $client->registerMarketplaceModelEndpointAsync([/* ... */]);

Registers an existing Amazon SageMaker endpoint with Amazon Bedrock Marketplace, allowing it to be used with Amazon Bedrock APIs.

Parameter Syntax

$result = $client->registerMarketplaceModelEndpoint([
    'endpointIdentifier' => '<string>', // REQUIRED
    'modelSourceIdentifier' => '<string>', // REQUIRED
]);

Parameter Details

Members
endpointIdentifier
Required: Yes
Type: string

The ARN of the Amazon SageMaker endpoint you want to register with Amazon Bedrock Marketplace.

modelSourceIdentifier
Required: Yes
Type: string

The ARN of the model from Amazon Bedrock Marketplace that is deployed on the endpoint.

Result Syntax

[
    'marketplaceModelEndpoint' => [
        'createdAt' => <DateTime>,
        'endpointArn' => '<string>',
        'endpointConfig' => [
            'sageMaker' => [
                'executionRole' => '<string>',
                'initialInstanceCount' => <integer>,
                'instanceType' => '<string>',
                'kmsEncryptionKey' => '<string>',
                'vpc' => [
                    'securityGroupIds' => ['<string>', ...],
                    'subnetIds' => ['<string>', ...],
                ],
            ],
        ],
        'endpointStatus' => '<string>',
        'endpointStatusMessage' => '<string>',
        'modelSourceIdentifier' => '<string>',
        'status' => 'REGISTERED|INCOMPATIBLE_ENDPOINT',
        'statusMessage' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
marketplaceModelEndpoint
Required: Yes
Type: MarketplaceModelEndpoint structure

Details about the registered endpoint.

Errors

ResourceNotFoundException:

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

ServiceUnavailableException:

Returned if the service cannot complete the request.

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 evaluation job that is current being created or running.

Parameter Syntax

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

Parameter Details

Members
jobIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the 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
            [
                'inputModalities' => ['<string>', ...],
                'inputStrength' => 'NONE|LOW|MEDIUM|HIGH', // REQUIRED
                'outputModalities' => ['<string>', ...],
                '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.

UpdateMarketplaceModelEndpoint

$result = $client->updateMarketplaceModelEndpoint([/* ... */]);
$promise = $client->updateMarketplaceModelEndpointAsync([/* ... */]);

Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace.

Parameter Syntax

$result = $client->updateMarketplaceModelEndpoint([
    'clientRequestToken' => '<string>',
    'endpointArn' => '<string>', // REQUIRED
    'endpointConfig' => [ // REQUIRED
        'sageMaker' => [
            'executionRole' => '<string>', // REQUIRED
            'initialInstanceCount' => <integer>, // REQUIRED
            'instanceType' => '<string>', // REQUIRED
            'kmsEncryptionKey' => '<string>',
            'vpc' => [
                'securityGroupIds' => ['<string>', ...], // REQUIRED
                'subnetIds' => ['<string>', ...], // REQUIRED
            ],
        ],
    ],
]);

Parameter Details

Members
clientRequestToken
Type: string

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail.

endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint you want to update.

endpointConfig
Required: Yes
Type: EndpointConfig structure

The new configuration for the endpoint, including the number and type of instances to use.

Result Syntax

[
    'marketplaceModelEndpoint' => [
        'createdAt' => <DateTime>,
        'endpointArn' => '<string>',
        'endpointConfig' => [
            'sageMaker' => [
                'executionRole' => '<string>',
                'initialInstanceCount' => <integer>,
                'instanceType' => '<string>',
                'kmsEncryptionKey' => '<string>',
                'vpc' => [
                    'securityGroupIds' => ['<string>', ...],
                    'subnetIds' => ['<string>', ...],
                ],
            ],
        ],
        'endpointStatus' => '<string>',
        'endpointStatusMessage' => '<string>',
        'modelSourceIdentifier' => '<string>',
        'status' => 'REGISTERED|INCOMPATIBLE_ENDPOINT',
        'statusMessage' => '<string>',
        'updatedAt' => <DateTime>,
    ],
]

Result Details

Members
marketplaceModelEndpoint
Required: Yes
Type: MarketplaceModelEndpoint structure

Details about the updated endpoint.

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

AdditionalModelRequestFieldsValue

Members

AutomatedEvaluationConfig

Description

The configuration details of an automated 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

Configuration details of the prompt datasets and metrics you want to use for your evaluation job.

evaluatorModelConfig
Type: EvaluatorModelConfig structure

Contains the evaluator model configuration details. EvaluatorModelConfig is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.

BatchDeleteEvaluationJobError

Description

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

Members
code
Required: Yes
Type: string

A HTTP status code of the evaluation job being deleted.

jobIdentifier
Required: Yes
Type: string

The ARN of the evaluation job being deleted.

message
Type: string

A status message about the evaluation job deletion.

BatchDeleteEvaluationJobItem

Description

An evaluation job for deletion, and it’s current status.

Members
jobIdentifier
Required: Yes
Type: string

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

jobStatus
Required: Yes
Type: string

The status of the evaluation job for deletion.

BedrockEvaluatorModel

Description

The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.

Members
modelIdentifier
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the evaluator model used used in knowledge base evaluation job or in model evaluation job that use a model as judge.

ByteContentDoc

Description

Contains the document contained in the wrapper object, along with its attributes/fields.

Members
contentType
Required: Yes
Type: string

The MIME type of the document contained in the wrapper object.

data
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The byte value of the file to upload, encoded as a Base-64 string.

identifier
Required: Yes
Type: string

The file name of the document contained in the wrapper object.

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.

CustomizationConfig

Description

A model customization configuration

Members
distillationConfig
Type: DistillationConfig structure

The distillation configuration for the custom model.

DistillationConfig

Description

Settings for distilling a foundation model into a smaller and more efficient model.

Members
teacherModelConfig
Required: Yes
Type: TeacherModelConfig structure

The teacher model configuration.

EndpointConfig

Description

Specifies the configuration for the endpoint.

Members
sageMaker
Type: SageMakerEndpoint structure

The configuration specific to Amazon SageMaker for the endpoint.

EvaluationBedrockModel

Description

Contains the ARN of the Amazon Bedrock model or inference profile specified in your 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
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

The configuration details of either an automated or human-based evaluation job.

Members
automated
Type: AutomatedEvaluationConfig structure

Contains the configuration details of an automated evaluation job that computes metrics.

human
Type: HumanEvaluationConfig structure

Contains the configuration details of an evaluation job that uses human workers.

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 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 you want to use for your evaluation job.

For knowledge base evaluation jobs that evaluate retrieval only, valid values are "Builtin.ContextRelevance", "Builtin.ContextConverage".

For knowledge base evaluation jobs that evaluate retrieval with response generation, valid values are "Builtin.Correctness", "Builtin.Completeness", "Builtin.Helpfulness", "Builtin.LogicalCoherence", "Builtin.Faithfulness", "Builtin.Harmfulness", "Builtin.Stereotyping", "Builtin.Refusal".

For automated model evaluation jobs, valid values are "Builtin.Accuracy", "Builtin.Robustness", and "Builtin.Toxicity". In model evaluation jobs that use a LLM as judge you can specify "Builtin.Correctness", "Builtin.Completeness", "Builtin.Faithfulness", "Builtin.Helpfulness", "Builtin.Coherence", "Builtin.Relevance", "Builtin.FollowingInstructions", "Builtin.ProfessionalStyleAndTone", You can also specify the following responsible AI related metrics only for model evaluation job that use a LLM as judge "Builtin.Harmfulness", "Builtin.Stereotyping", and "Builtin.Refusal".

For human-based model evaluation jobs, the list of strings must match the name parameter specified in HumanEvaluationCustomMetric.

taskType
Required: Yes
Type: string

The the type of task you want to evaluate for your evaluation job. This applies only to model evaluation jobs and is ignored for knowledge base evaluation jobs.

EvaluationInferenceConfig

Description

The configuration details of the inference model for an evaluation job.

For automated model evaluation jobs, only a single model is supported.

For human-based model evaluation jobs, your annotator can compare the responses for up to two different models.

Members
models
Type: Array of EvaluationModelConfig structures

Specifies the inference models.

ragConfigs
Type: Array of RAGConfig structures

Contains the configuration details of the inference for a knowledge base evaluation job, including either the retrieval only configuration or the retrieval with response generation configuration.

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 evaluation job are saved.

Members
s3Uri
Required: Yes
Type: string

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

EvaluationSummary

Description

Summary information of an evaluation job.

Members
applicationType
Type: string

Specifies whether the evaluation job is for evaluating a model or evaluating a knowledge base (retrieval and response generation).

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

The time the evaluation job was created.

evaluationTaskTypes
Required: Yes
Type: Array of strings

The type of task for model evaluation.

evaluatorModelIdentifiers
Type: Array of strings

The Amazon Resource Names (ARNs) of the models used to compute the metrics for a knowledge base evaluation job.

jobArn
Required: Yes
Type: string

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

jobName
Required: Yes
Type: string

The name for the evaluation job.

jobType
Required: Yes
Type: string

Specifies whether the evaluation job is automated or human-based.

modelIdentifiers
Type: Array of strings

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

ragIdentifiers
Type: Array of strings

The Amazon Resource Names (ARNs) of the knowledge base resources used for a knowledge base evaluation job.

status
Required: Yes
Type: string

The current status of the evaluation job.

EvaluatorModelConfig

Description

Specifies the model configuration for the evaluator model. EvaluatorModelConfig is required for evaluation jobs that use a knowledge base or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.

Members
bedrockEvaluatorModels
Type: Array of BedrockEvaluatorModel structures

The evaluator model used in knowledge base evaluation job or in model evaluation job that use a model as judge. This model computes all evaluation related metrics.

ExternalSource

Description

The unique external source of the content contained in the wrapper object.

Members
byteContent
Type: ByteContentDoc structure

The identifier, content type, and data of the external source wrapper object.

s3Location
Type: S3ObjectDoc structure

The S3 location of the external source wrapper object.

sourceType
Required: Yes
Type: string

The source type of the external source wrapper object.

ExternalSourcesGenerationConfiguration

Description

The response generation configuration of the external source wrapper object.

Members
additionalModelRequestFields
Type: Associative array of custom strings keys (AdditionalModelRequestFieldsKey) to document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documentss

Additional model parameters and their corresponding values not included in the text inference configuration for an external source. Takes in custom model parameters specific to the language model being used.

guardrailConfiguration
Type: GuardrailConfiguration structure

Configuration details for the guardrail.

kbInferenceConfig
Type: KbInferenceConfig structure

Configuration details for inference when using RetrieveAndGenerate to generate responses while using an external source.

promptTemplate
Type: PromptTemplate structure

Contains the template for the prompt for the external source wrapper object.

ExternalSourcesRetrieveAndGenerateConfiguration

Description

The configuration of the external source wrapper object in the retrieveAndGenerate function.

Members
generationConfiguration

Contains configurations details for response generation based on retrieved text chunks.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses.

sources
Required: Yes
Type: Array of ExternalSource structures

The document for the external source wrapper object in the retrieveAndGenerate function.

FilterAttribute

Description

Specifies the name of the metadata attribute/field to apply filters. You must match the name of the attribute/field in your data source/document metadata.

Members
key
Required: Yes
Type: string

The name of metadata attribute/field, which must match the name in your data source/document metadata.

value
Required: Yes
Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents

The value of the metadata attribute/field.

FilterValue

Members

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.

GenerationConfiguration

Description

The configuration details for response generation based on retrieved text chunks.

Members
additionalModelRequestFields
Type: Associative array of custom strings keys (AdditionalModelRequestFieldsKey) to document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documentss

Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows you to provide custom model parameters specific to the language model being used.

guardrailConfiguration
Type: GuardrailConfiguration structure

Contains configuration details for the guardrail.

kbInferenceConfig
Type: KbInferenceConfig structure

Contains configuration details for inference for knowledge base retrieval and response generation.

promptTemplate
Type: PromptTemplate structure

Contains the template for the prompt that's sent to the model for response generation.

GuardrailConfiguration

Description

The configuration details for the guardrail.

Members
guardrailId
Required: Yes
Type: string

The unique identifier for the guardrail.

guardrailVersion
Required: Yes
Type: string

The version of the guardrail.

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
inputModalities
Type: Array of strings

The input modalities selected for the guardrail content filter.

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.

outputModalities
Type: Array of strings

The output modalities selected for the guardrail content filter.

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
inputModalities
Type: Array of strings

The input modalities selected for the guardrail content filter configuration.

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.

outputModalities
Type: Array of strings

The output modalities selected for the guardrail content filter configuration.

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 example, 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," Guardrails 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

    • CREDIT_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 the imported model.

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

Creation time of the imported model.

instructSupported
Type: boolean

Specifies if the imported model supports converse.

modelArchitecture
Type: string

The architecture 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.

InferenceProfileModelSource

Description

Contains information about the model or system-defined inference profile that is the source for an inference profile..

Members
copyFrom
Type: string

The ARN of the model or system-defined inference profile that is the source for the inference profile.

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 ready to be used.

type
Required: Yes
Type: string

The type of the inference profile. The following types are possible:

  • SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can route inference requests across regions with these inference profiles.

  • APPLICATION – The inference profile was created by a user. This type of inference profile can track metrics and costs when invoking the model in it. The inference profile may route requests to one or multiple regions.

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

InvocationLogSource

Description

A storage location for invocation logs.

Members
s3Uri
Type: string

The URI of an invocation log in a bucket.

InvocationLogsConfig

Description

Settings for using invocation logs to customize a model.

Members
invocationLogSource
Required: Yes
Type: InvocationLogSource structure

The source of the invocation logs.

requestMetadataFilters
Type: RequestMetadataFilters structure

Rules for filtering invocation logs based on request metadata.

usePromptResponse
Type: boolean

Whether to use the model's response for training, or just the prompt. The default value is False.

KbInferenceConfig

Description

Contains configuration details of the inference for knowledge base retrieval and response generation.

Members
textInferenceConfig
Type: TextInferenceConfig structure

Contains configuration details for text generation using a language model via the RetrieveAndGenerate function.

KnowledgeBaseConfig

Description

The configuration details for retrieving information from a knowledge base and generating responses.

Members
retrieveAndGenerateConfig

Contains configuration details for retrieving information from a knowledge base and generating responses.

retrieveConfig
Type: RetrieveConfig structure

Contains configuration details for retrieving information from a knowledge base.

KnowledgeBaseRetrievalConfiguration

Description

Contains configuration details for retrieving information from a knowledge base.

Members
vectorSearchConfiguration
Required: Yes
Type: KnowledgeBaseVectorSearchConfiguration structure

Contains configuration details for returning the results from the vector search.

KnowledgeBaseRetrieveAndGenerateConfiguration

Description

Contains configuration details for retrieving information from a knowledge base and generating responses.

Members
generationConfiguration
Type: GenerationConfiguration structure

Contains configurations details for response generation based on retrieved text chunks.

knowledgeBaseId
Required: Yes
Type: string

The unique identifier of the knowledge base.

modelArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the foundation model or inference profile used to generate responses.

orchestrationConfiguration
Type: OrchestrationConfiguration structure

Contains configuration details for the model to process the prompt prior to retrieval and response generation.

retrievalConfiguration

Contains configuration details for retrieving text chunks.

KnowledgeBaseVectorSearchConfiguration

Description

The configuration details for returning the results from the knowledge base vector search.

Members
filter
Type: RetrievalFilter structure

Specifies the filters to use on the metadata fields in the knowledge base data sources before returning results.

numberOfResults
Type: int

The number of text chunks to retrieve; the number of results to return.

overrideSearchType
Type: string

By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID search using both vector embeddings and raw text, or SEMANTIC search using only vector embeddings. For other vector store configurations, only SEMANTIC search is available.

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.

videoDataDeliveryEnabled
Type: boolean

Set to include video data in the log delivery.

MarketplaceModelEndpoint

Description

Contains details about an endpoint for a model from Amazon Bedrock Marketplace.

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

The timestamp when the endpoint was registered.

endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint.

endpointConfig
Required: Yes
Type: EndpointConfig structure

The configuration of the endpoint, including the number and type of instances used.

endpointStatus
Required: Yes
Type: string

The current status of the endpoint (e.g., Creating, InService, Updating, Failed).

endpointStatusMessage
Type: string

Additional information about the endpoint status, if available.

modelSourceIdentifier
Required: Yes
Type: string

The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint.

status
Type: string

The overall status of the endpoint in Amazon Bedrock Marketplace (e.g., ACTIVE, INACTIVE).

statusMessage
Type: string

Additional information about the overall status, if available.

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

The timestamp when the endpoint was last updated.

MarketplaceModelEndpointSummary

Description

Provides a summary of an endpoint for a model from Amazon Bedrock Marketplace.

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

The timestamp when the endpoint was created.

endpointArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the endpoint.

modelSourceIdentifier
Required: Yes
Type: string

The ARN of the model from Amazon Bedrock Marketplace that is deployed on this endpoint.

status
Type: string

The overall status of the endpoint in Amazon Bedrock Marketplace.

statusMessage
Type: string

Additional information about the overall status, if available.

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

The timestamp when the endpoint was last updated.

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.

The following statuses are possible:

  • Submitted – This job has been submitted to a queue for validation.

  • Validating – This job is being validated for the requirements described in Format and upload your batch inference data. The criteria include the following:

    • Your IAM service role has access to the Amazon S3 buckets containing your files.

    • Your files are .jsonl files and each individual record is a JSON object in the correct format. Note that validation doesn't check if the modelInput value matches the request body for the model.

    • Your files fulfill the requirements for file size and number of records. For more information, see Quotas for Amazon Bedrock.

  • Scheduled – This job has been validated and is now in a queue. The job will automatically start when it reaches its turn.

  • Expired – This job timed out because it was scheduled but didn't begin before the set timeout duration. Submit a new job request.

  • InProgress – This job has begun. You can start viewing the results in the output S3 location.

  • Completed – This job has successfully completed. View the output files in the output S3 location.

  • PartiallyCompleted – This job has partially completed. Not all of your records could be processed in time. View the output files in the output S3 location.

  • Failed – This job has failed. Check the failure message for any further details. For further assistance, reach out to the Amazon Web Services Support Center.

  • Stopped – This job was stopped by a user.

  • Stopping – This job is being stopped by a user.

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.

OrchestrationConfiguration

Description

The configuration details for the model to process the prompt prior to retrieval and response generation.

Members
queryTransformationConfiguration
Required: Yes
Type: QueryTransformationConfiguration structure

Contains configuration details for transforming the prompt.

OutputDataConfig

Description

S3 Location of the output data.

Members
s3Uri
Required: Yes
Type: string

The S3 URI where the output data is stored.

PromptRouterSummary

Description

Details about a prompt router.

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

When the router was created.

description
Type: string

The router's description.

fallbackModel
Required: Yes
Type: PromptRouterTargetModel structure

The router's fallback model.

models
Required: Yes
Type: Array of PromptRouterTargetModel structures

The router's models.

promptRouterArn
Required: Yes
Type: string

The router's ARN.

promptRouterName
Required: Yes
Type: string

The router's name.

routingCriteria
Required: Yes
Type: RoutingCriteria structure

The router's routing criteria.

status
Required: Yes
Type: string

The router's status.

type
Required: Yes
Type: string

The summary's type.

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

When the router was updated.

PromptRouterTargetModel

Description

The target model for a prompt router.

Members
modelArn
Type: string

The target model's ARN.

PromptTemplate

Description

The template for the prompt that's sent to the model for response generation.

Members
textPromptTemplate
Type: string

The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.

For more information, see Knowledge base prompt template and Use XML tags with Anthropic Claude models.

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.

QueryTransformationConfiguration

Description

The configuration details for transforming the prompt.

Members
type
Required: Yes
Type: string

The type of transformation to apply to the prompt.

RAGConfig

Description

Contains configuration details for retrieval of information and response generation.

Members
knowledgeBaseConfig
Type: KnowledgeBaseConfig structure

Contains configuration details for knowledge base retrieval and response generation.

RequestMetadataBaseFilters

Description

A mapping of a metadata key to a value that it should or should not equal.

Members
equals
Type: Associative array of custom strings keys (RequestMetadataMapKeyString) to strings

Include results where the key equals the value.

notEquals
Type: Associative array of custom strings keys (RequestMetadataMapKeyString) to strings

Include results where the key does not equal the value.

RequestMetadataFilters

Description

Rules for filtering invocation logs. A filter can be a mapping of a metadata key to a value that it should or should not equal (a base filter), or a list of base filters that are all applied with AND or OR logical operators

Members
andAll
Type: Array of RequestMetadataBaseFilters structures

Include results where all of the based filters match.

equals
Type: Associative array of custom strings keys (RequestMetadataMapKeyString) to strings

Include results where the key equals the value.

notEquals
Type: Associative array of custom strings keys (RequestMetadataMapKeyString) to strings

Include results where the key does not equal the value.

orAll
Type: Array of RequestMetadataBaseFilters structures

Include results where any of the base filters match.

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

RetrievalFilter

Description

Specifies the filters to use on the metadata attributes/fields in the knowledge base data sources before returning results.

Members
andAll
Type: Array of RetrievalFilter structures

Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.

equals
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object.

The following example would return data sources with an animal attribute whose value is 'cat': "equals": { "key": "animal", "value": "cat" }

greaterThan
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object.

The following example would return data sources with an year attribute whose value is greater than '1989': "greaterThan": { "key": "year", "value": 1989 }

greaterThanOrEquals
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object.

The following example would return data sources with an year attribute whose value is greater than or equal to '1989': "greaterThanOrEquals": { "key": "year", "value": 1989 }

in
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object.

The following example would return data sources with an animal attribute that is either 'cat' or 'dog': "in": { "key": "animal", "value": ["cat", "dog"] }

lessThan
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object.

The following example would return data sources with an year attribute whose value is less than to '1989': "lessThan": { "key": "year", "value": 1989 }

lessThanOrEquals
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object.

The following example would return data sources with an year attribute whose value is less than or equal to '1989': "lessThanOrEquals": { "key": "year", "value": 1989 }

listContains
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members.

The following example would return data sources with an animals attribute that is a list containing a cat member (for example, ["dog", "cat"]): "listContains": { "key": "animals", "value": "cat" }

notEquals
Type: FilterAttribute structure

Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned.

The following example would return data sources that don't contain an animal attribute whose value is 'cat': "notEquals": { "key": "animal", "value": "cat" }

notIn
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object.

The following example would return data sources whose animal attribute is neither 'cat' nor 'dog': "notIn": { "key": "animal", "value": ["cat", "dog"] }

orAll
Type: Array of RetrievalFilter structures

Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.

startsWith
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.

The following example would return data sources with an animal attribute starts with 'ca' (for example, 'cat' or 'camel'). "startsWith": { "key": "animal", "value": "ca" }

stringContains
Type: FilterAttribute structure

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following:

A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example, 'cat'): "stringContains": { "key": "animal", "value": "at" }

A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example, ["dog", "cat"]): "stringContains": { "key": "animals", "value": "at" }

RetrieveAndGenerateConfiguration

Description

Contains configuration details for a knowledge base retrieval and response generation.

Members
externalSourcesConfiguration

The configuration for the external source wrapper object in the retrieveAndGenerate function.

knowledgeBaseConfiguration

Contains configuration details for the knowledge base retrieval and response generation.

type
Required: Yes
Type: string

The type of resource that contains your data for retrieving information and generating responses.

If you choose to use EXTERNAL_SOURCES, then currently only Claude 3 Sonnet models for knowledge bases are supported.

RetrieveConfig

Description

The configuration details for retrieving information from a knowledge base.

Members
knowledgeBaseId
Required: Yes
Type: string

The unique identifier of the knowledge base.

knowledgeBaseRetrievalConfiguration
Required: Yes
Type: KnowledgeBaseRetrievalConfiguration structure

Contains configuration details for knowledge base retrieval.

RoutingCriteria

Description

Routing criteria for a prompt router.

Members
responseQualityDifference
Required: Yes
Type: double

The criteria's response quality difference.

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.

S3ObjectDoc

Description

The unique wrapper object of the document from the S3 location.

Members
uri
Required: Yes
Type: string

The S3 URI location for the wrapper object of the document.

SageMakerEndpoint

Description

Specifies the configuration for a Amazon SageMaker endpoint.

Members
executionRole
Required: Yes
Type: string

The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on Amazon EC2 compute instances or for batch transform jobs.

initialInstanceCount
Required: Yes
Type: int

The number of Amazon EC2 compute instances to deploy for initial endpoint creation.

instanceType
Required: Yes
Type: string

The Amazon EC2 compute instance type to deploy for hosting the model.

kmsEncryptionKey
Type: string

The Amazon Web Services KMS key that Amazon SageMaker uses to encrypt data on the storage volume attached to the Amazon EC2 compute instance that hosts the endpoint.

vpc
Type: VpcConfig structure

The VPC configuration for the endpoint.

ServiceQuotaExceededException

Description

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

Members
message
Type: string

ServiceUnavailableException

Description

Returned if the service cannot complete the request.

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.

TeacherModelConfig

Description

Details about a teacher model used for model customization.

Members
maxResponseLengthForInference
Type: int

The maximum number of tokens requested when the customization job invokes the teacher model.

teacherModelIdentifier
Required: Yes
Type: string

The identifier of the teacher model.

TextInferenceConfig

Description

The configuration details for text generation using a language model via the RetrieveAndGenerate function.

Members
maxTokens
Type: int

The maximum number of tokens to generate in the output text. Do not use the minimum of 0 or the maximum of 65536. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.

stopSequences
Type: Array of strings

A list of sequences of characters that, if generated, will cause the model to stop generating further tokens. Do not use a minimum length of 1 or a maximum length of 1000. The limit values described here are arbitrary values, for actual values consult the limits defined by your specific model.

temperature
Type: float

Controls the random-ness of text generated by the language model, influencing how much the model sticks to the most predictable next words versus exploring more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model outputs more deterministic or predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the outputs more creative or unpredictable.

topP
Type: float

A probability distribution threshold which controls what the model considers for the set of possible next tokens. The model will only consider the top p% of the probability distribution when generating the next token.

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
invocationLogsConfig
Type: InvocationLogsConfig structure

Settings for using invocation logs to customize a model.

s3Uri
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.