BedrockClient.create_prompt_router
rboto-bedrock==0.4.0 · Service index · Types
Model summary (excerpt): Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.
Install and imports
from rboto import BedrockClient
from collections.abc import Sequence
from rboto_bedrock.types import (
CreatePromptRouterOutput,
PromptRouterTargetModel,
RoutingCriteria,
Tag,
)
Signature
async def create_prompt_router(
*,
prompt_router_name: str,
models: Sequence[PromptRouterTargetModel],
routing_criteria: RoutingCriteria,
fallback_model: PromptRouterTargetModel,
client_request_token: str | None = None,
description: str | None = None,
tags: Sequence[Tag] | None = None,
) -> CreatePromptRouterOutput: ...
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) |
|---|---|---|
prompt_router_name |
Yes | The name of the prompt router. The name must be unique within your Amazon Web Services account in the current region. |
models |
Yes | A list of foundation models that the prompt router can route requests to. At least one model must be specified. |
routing_criteria |
Yes | The criteria, which is the response quality difference, used to determine how incoming requests are routed to different models. |
fallback_model |
Yes | The default model to use when the routing criteria is not met. |
client_request_token |
No | A unique, case-sensitive identifier that you provide to ensure idempotency of your requests. If not specified, the Amazon Web Services SDK automatically generates one for you. |
description |
No | An optional description of the prompt router to help identify its purpose. |
tags |
No | An array of key-value pairs to apply to this resource as tags. You can use tags to categorize and manage your Amazon Web Services resources. |
Output
CreatePromptRouterOutput.
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 |
|---|---|---|---|
prompt_router_arn |
str | None |
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
CreatePromptRouterOutput, PromptRouterTargetModel, RoutingCriteria, 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.