Skip to main content

prompt_routers

Creates, updates, deletes, gets or lists a prompt_routers resource.

Overview

Nameprompt_routers
TypeResource
Idaws.bedrock.prompt_routers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)When the router was created.
descriptionstringThe router's description. (pattern: <code>([0-9a-zA-Z:.][ _-]?)+</code>)
fallback_modelobjectThe target model for a prompt router.
modelsarrayThe router's models.
prompt_router_arnstringThe 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_namestringThe router's name. (pattern: <code>([0-9a-zA-Z][ _-]?)+</code>)
routing_criteriaobjectRouting criteria for a prompt router.
statusstringThe router's status. (AVAILABLE)
type_stringThe router's type. (custom, default)
updated_atstring (date-time)When the router was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_prompt_routerselectprompt_router_arn, regionRetrieves details about a prompt router.
list_prompt_routersselectregionmaxResults, nextToken, typeRetrieves a list of prompt routers.
create_prompt_routerinsertregion, promptRouterName, models, routingCriteria, fallbackModelCreates a prompt router that manages the routing of requests between multiple foundation models based on the routing criteria.
delete_prompt_routerdeleteprompt_router_arn, regionDeletes 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.

NameDatatypeDescription
prompt_router_arnstringThe Amazon Resource Name (ARN) of the prompt router to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of prompt routers to return in one page of results.
nextTokenstringSpecify the pagination token from a previous request to retrieve the next page of results.
typestringThe type of the prompt routers, such as whether it's default or custom.

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

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
;