prompt_routers
Creates, updates, deletes, gets or lists a prompt_routers resource.
Overview
| Name | prompt_routers |
| Type | Resource |
| Id | aws.bedrock.prompt_routers |
Fields
The following fields are returned by SELECT queries:
- get_prompt_router
- list_prompt_routers
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | When the router was created. |
description | string | The router's description. (pattern: <code>([0-9a-zA-Z:.][ _-]?)+</code>) |
fallback_model | object | The target model for a prompt router. |
models | array | The router's models. |
prompt_router_arn | string | The prompt router's ARN (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:default-prompt-router/[a-zA-Z0-9-:.]+</code>) |
prompt_router_name | string | The router's name. (pattern: <code>([0-9a-zA-Z][ _-]?)+</code>) |
routing_criteria | object | Routing criteria for a prompt router. |
status | string | The router's status. (AVAILABLE) |
type_ | string | The router's type. (custom, default) |
updated_at | string (date-time) | When the router was updated. |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | When the router was created. |
description | string | The router's description. (pattern: <code>([0-9a-zA-Z:.][ _-]?)+</code>) |
fallback_model | object | The target model for a prompt router. |
models | array | The router's models. |
prompt_router_arn | string | The router's ARN. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:default-prompt-router/[a-zA-Z0-9-:.]+</code>) |
prompt_router_name | string | The router's name. (pattern: <code>([0-9a-zA-Z][ _-]?)+</code>) |
routing_criteria | object | Routing criteria for a prompt router. |
status | string | The router's status. (AVAILABLE) |
type_ | string | The summary's type. (custom, default) |
updated_at | string (date-time) | When the router was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_prompt_router | select | prompt_router_arn, region | Retrieves details about a prompt router. | |
list_prompt_routers | select | region | maxResults, nextToken, type | Retrieves a list of prompt routers. |
create_prompt_router | insert | region, promptRouterName, models, routingCriteria, fallbackModel | Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria. | |
delete_prompt_router | delete | prompt_router_arn, region | Deletes a specified prompt router. This action cannot be undone. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
prompt_router_arn | string | The Amazon Resource Name (ARN) of the prompt router to delete. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of prompt routers to return in one page of results. |
nextToken | string | Specify the pagination token from a previous request to retrieve the next page of results. |
type | string | The type of the prompt routers, such as whether it's default or custom. |
SELECT examples
- get_prompt_router
- list_prompt_routers
Retrieves details about a prompt router.
SELECT
created_at,
description,
fallback_model,
models,
prompt_router_arn,
prompt_router_name,
routing_criteria,
status,
type_,
updated_at
FROM aws.bedrock.prompt_routers
WHERE prompt_router_arn = '{{ prompt_router_arn }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of prompt routers.
SELECT
created_at,
description,
fallback_model,
models,
prompt_router_arn,
prompt_router_name,
routing_criteria,
status,
type_,
updated_at
FROM aws.bedrock.prompt_routers
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND type = '{{ type }}'
;
INSERT examples
- create_prompt_router
- Manifest
Creates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.
INSERT INTO aws.bedrock.prompt_routers (
clientRequestToken,
promptRouterName,
models,
description,
routingCriteria,
fallbackModel,
tags,
region
)
SELECT
'{{ clientRequestToken }}',
'{{ promptRouterName }}' /* required */,
'{{ models }}' /* required */,
'{{ description }}',
'{{ routingCriteria }}' /* required */,
'{{ fallbackModel }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
prompt_router_arn
;
# Description fields are for documentation purposes
- name: prompt_routers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the prompt_routers resource.
- name: clientRequestToken
value: "{{ clientRequestToken }}"
- name: promptRouterName
value: "{{ promptRouterName }}"
- name: models
value:
- modelArn: "{{ modelArn }}"
- name: description
value: "{{ description }}"
- name: routingCriteria
description: |
Routing criteria for a prompt router.
value:
responseQualityDifference: {{ responseQualityDifference }}
- name: fallbackModel
description: |
The target model for a prompt router.
value:
modelArn: "{{ modelArn }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_prompt_router
Deletes a specified prompt router. This action cannot be undone.
DELETE FROM aws.bedrock.prompt_routers
WHERE prompt_router_arn = '{{ prompt_router_arn }}' --required
AND region = '{{ region }}' --required
;