class AgentAliasBase
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Alpha.AgentAliasBase |
Go | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#AgentAliasBase |
Java | software.amazon.awscdk.services.bedrock.alpha.AgentAliasBase |
Python | aws_cdk.aws_bedrock_alpha.AgentAliasBase |
TypeScript (source) | @aws-cdk/aws-bedrock-alpha ยป AgentAliasBase |
Implements
IConstruct, IDependable, IResource, IEnvironment, IAgent
Extends
Resource
Implemented by
Agent
Abstract base class for an Agent.
Contains methods and attributes valid for Agents either created with CDK or imported.
Initializer
new AgentAliasBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct - id
string - props
ResourceProps
Properties
| Name | Type | Description |
|---|---|---|
| agent | IAgent | The underlying agent for this alias. |
| alias | string | The ARN of the agent alias. |
| alias | string | The unique identifier of the agent alias. |
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
agent
Type:
IAgent
The underlying agent for this alias.
aliasArn
Type:
string
The ARN of the agent alias.
aliasId
Type:
string
The unique identifier of the agent alias.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| grant(grantee, ...actions) | Grant the given principal identity permissions to perform actions on this agent alias. |
| grant | Grant the given identity permissions to get the agent alias. |
| grant | Grant the given identity permissions to invoke the agent alias. |
| on | Define an EventBridge rule that triggers when something happens to this agent alias. |
| to | Returns a string representation of this construct. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable - actions
string
Returns
Grant the given principal identity permissions to perform actions on this agent alias.
Note: This grant will only work when the grantee is in the same AWS account where the agent alias is defined. Cross-account grant is not supported.
grantGet(grantee)
public grantGet(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to get the agent alias.
Note: This grant will only work when the grantee is in the same AWS account where the agent alias is defined. Cross-account agent read is not supported.
grantInvoke(grantee)
public grantInvoke(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to invoke the agent alias.
Note: This grant will only work when the grantee is in the same AWS account where the agent alias is defined. Cross-account invocation is not supported.
onCloudTrailEvent(id, options?)
public onCloudTrailEvent(id: string, options?: OnEventOptions): Rule
Parameters
- id
stringโ The id of the rule. - options
Onโ Options for adding the rule.Event Options
Returns
Define an EventBridge rule that triggers when something happens to this agent alias.
Requires that there exists at least one CloudTrail Trail in your account that captures the event. This method will not create the Trail.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.

.NET
Go
Java
Python
TypeScript (