intelligent_prompt_routers
Creates, updates, deletes or gets an intelligent_prompt_router resource or lists intelligent_prompt_routers in a region
Overview
| Name | intelligent_prompt_routers |
| Type | Resource |
| Description | Definition of AWS::Bedrock::IntelligentPromptRouter Resource Type |
| Id | awscc.bedrock.intelligent_prompt_routers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
created_at | string | Time Stamp |
description | string | Description of the Prompt Router. |
fallback_model | object | Model configuration |
models | array | List of model configuration |
prompt_router_arn | string | Arn of the Prompt Router. |
prompt_router_name | string | Name of the Prompt Router. |
routing_criteria | object | Represents the criteria used for routing requests. |
status | string | Status of a PromptRouter |
tags | array | List of Tags |
type | string | Type of a Prompt Router |
updated_at | string | Time Stamp |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
prompt_router_arn | string | Arn of the Prompt Router. |
region | string | AWS region. |
For more information, see AWS::Bedrock::IntelligentPromptRouter.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | intelligent_prompt_routers | INSERT | FallbackModel, Models, PromptRouterName, RoutingCriteria, region |
delete_resource | intelligent_prompt_routers | DELETE | Identifier, region |
update_resource | intelligent_prompt_routers | UPDATE | Identifier, PatchDocument, region |
list_resources | intelligent_prompt_routers_list_only | SELECT | region |
get_resource | intelligent_prompt_routers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual intelligent_prompt_router.
SELECT
region,
created_at,
description,
fallback_model,
models,
prompt_router_arn,
prompt_router_name,
routing_criteria,
status,
tags,
type,
updated_at
FROM awscc.bedrock.intelligent_prompt_routers
WHERE
region = '{{ region }}' AND
Identifier = '{{ prompt_router_arn }}';
Lists all intelligent_prompt_routers in a region.
SELECT
region,
prompt_router_arn
FROM awscc.bedrock.intelligent_prompt_routers_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new intelligent_prompt_router resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.bedrock.intelligent_prompt_routers (
FallbackModel,
Models,
PromptRouterName,
RoutingCriteria,
region
)
SELECT
'{{ fallback_model }}',
'{{ models }}',
'{{ prompt_router_name }}',
'{{ routing_criteria }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.bedrock.intelligent_prompt_routers (
Description,
FallbackModel,
Models,
PromptRouterName,
RoutingCriteria,
Tags,
region
)
SELECT
'{{ description }}',
'{{ fallback_model }}',
'{{ models }}',
'{{ prompt_router_name }}',
'{{ routing_criteria }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: intelligent_prompt_router
props:
- name: description
value: '{{ description }}'
- name: fallback_model
value:
model_arn: '{{ model_arn }}'
- name: models
value:
- null
- name: prompt_router_name
value: '{{ prompt_router_name }}'
- name: routing_criteria
value:
response_quality_difference: null
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a intelligent_prompt_router resource, using stack-deploy.
/*+ update */
UPDATE awscc.bedrock.intelligent_prompt_routers
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ prompt_router_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.bedrock.intelligent_prompt_routers
WHERE
Identifier = '{{ prompt_router_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the intelligent_prompt_routers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
bedrock:CreatePromptRouter,
bedrock:GetPromptRouter,
bedrock:TagResource,
bedrock:ListTagsForResource
bedrock:GetPromptRouter,
bedrock:ListTagsForResource
bedrock:GetPromptRouter,
bedrock:ListTagsForResource,
bedrock:TagResource,
bedrock:UntagResource
bedrock:DeletePromptRouter,
bedrock:GetPromptRouter
bedrock:ListPromptRouters