Class: PromptRouter
March 31, 2025 ยท View on GitHub
@cdklabs/generative-ai-cdk-constructs
@cdklabs/generative-ai-cdk-constructs / bedrock / PromptRouter
Class: PromptRouter
Represents an Amazon Bedrock abstraction on which you can
run the Invoke API. This can be a Foundational Model,
a Custom Model, or an Inference Profile.
Implements
Constructors
Constructor
new PromptRouter(
props,region):PromptRouter
Parameters
props
region
string
Returns
PromptRouter
Properties
invokableArn
readonlyinvokableArn:string
The ARN of the Bedrock invokable abstraction.
Implementation of
promptRouterArn
readonlypromptRouterArn:string
The ARN of the prompt router.
Implementation of
promptRouterId
readonlypromptRouterId:string
The Id of the prompt router.
Implementation of
routingEndpoints
readonlyroutingEndpoints:IInvokable[]
The foundation models / profiles this router will route to.
Implementation of
IPromptRouter.routingEndpoints
Methods
grantInvoke()
grantInvoke(
grantee):Grant
Gives the appropriate policies to invoke and use the invokable abstraction.
Parameters
grantee
IGrantable
Returns
Grant
Implementation of
fromDefaultId()
staticfromDefaultId(defaultRouter,region):PromptRouter
Parameters
defaultRouter
region
string
Returns
PromptRouter