BedrockClient.create_advanced_prompt_optimization_job
rboto-bedrock==0.4.0 · Service index · Types
Model summary (excerpt): Creates an advanced prompt optimization job. The job optimizes your prompt templates for specific models using your evaluation dataset and criteria.
Install and imports
from rboto import BedrockClient
from collections.abc import Sequence
from rboto_bedrock.types import (
AdvancedPromptOptimizationInputConfig,
AdvancedPromptOptimizationOutputConfig,
CreateAdvancedPromptOptimizationJobOutput,
ModelConfiguration,
Tag,
)
Signature
async def create_advanced_prompt_optimization_job(
*,
job_name: str,
input_config: AdvancedPromptOptimizationInputConfig,
output_config: AdvancedPromptOptimizationOutputConfig,
model_configurations: Sequence[ModelConfiguration],
job_description: str | None = None,
client_token: str | None = None,
encryption_key_arn: str | None = None,
tags: Sequence[Tag] | None = None,
) -> CreateAdvancedPromptOptimizationJobOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
job_name |
Yes | A name for the advanced prompt optimization job. |
input_config |
Yes | Specifies the S3 location of your JSONL input file containing prompt templates and evaluation samples. |
output_config |
Yes | Specifies the S3 location where optimization results will be stored. |
model_configurations |
Yes | A list of model configurations specifying the target models for prompt optimization. You can specify up to 5 models. |
job_description |
No | A description of the advanced prompt optimization job. |
client_token |
No | 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. |
encryption_key_arn |
No | The Amazon Resource Name (ARN) of the KMS key used for encrypting the output data. If not specified, the output is encrypted with an Amazon-owned KMS key. |
tags |
No | Tags to associate with the advanced prompt optimization job. |
Output
CreateAdvancedPromptOptimizationJobOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
job_arn |
str |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
AdvancedPromptOptimizationInputConfig, AdvancedPromptOptimizationOutputConfig, CreateAdvancedPromptOptimizationJobOutput, ModelConfiguration, Tag
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_bedrock.exceptions:
AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, TooManyTagsError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.