Show / Hide Table of Contents

Class AgentBase

(experimental) Abstract base class for an Agent.

Inheritance
object
Resource
AgentBase
Agent
Implements
IAgent
IResource
IConstruct
IDependable
IGrantable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Bedrock.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Alpha.dll
Syntax (csharp)
public abstract class AgentBase : Resource, IAgent, IResource, IConstruct, IDependable, IGrantable
Syntax (vb)
Public MustInherit Class AgentBase Inherits Resource Implements IAgent, IResource, IConstruct, IDependable, IGrantable
Remarks

Contains methods and attributes valid for Agents either created with CDK or imported.

Stability: Experimental

Synopsis

Constructors

AgentBase(Construct, string, IResourceProps?)

(experimental) Abstract base class for an Agent.

Properties

AgentArn

(experimental) The ARN of the agent.

AgentId

(experimental) The ID of the Agent.

AgentVersion

(experimental) The version of the agent.

GrantPrincipal

(experimental) The principal to grant permissions to.

KmsKey

(experimental) Optional KMS encryption key associated with this agent.

LastUpdated

(experimental) When this agent was last updated.

Role

(experimental) The IAM role associated to the agent.

Methods

GrantInvoke(IGrantable)

(experimental) Grant invoke permissions on this agent to an IAM principal.

MetricCount(IMetricOptions?)

(experimental) Creates a CloudWatch metric for tracking agent invocations.

OnEvent(string, IOnEventOptions?)

(experimental) Creates an EventBridge rule for agent events.

Constructors

AgentBase(Construct, string, IResourceProps?)

(experimental) Abstract base class for an Agent.

protected AgentBase(Construct scope, string id, IResourceProps? props = null)
Parameters
scope Construct
id string
props IResourceProps
Remarks

Contains methods and attributes valid for Agents either created with CDK or imported.

Stability: Experimental

Properties

AgentArn

(experimental) The ARN of the agent.

public abstract string AgentArn { get; }
Property Value

string

Remarks

Stability: Experimental

AgentId

(experimental) The ID of the Agent.

public abstract string AgentId { get; }
Property Value

string

Remarks

Stability: Experimental

AgentVersion

(experimental) The version of the agent.

public abstract string AgentVersion { get; }
Property Value

string

Remarks

Stability: Experimental

Attribute: true

GrantPrincipal

(experimental) The principal to grant permissions to.

public abstract IPrincipal GrantPrincipal { get; }
Property Value

IPrincipal

Remarks

Stability: Experimental

KmsKey

(experimental) Optional KMS encryption key associated with this agent.

public abstract IKey? KmsKey { get; }
Property Value

IKey

Remarks

Stability: Experimental

LastUpdated

(experimental) When this agent was last updated.

public abstract string? LastUpdated { get; }
Property Value

string

Remarks

Stability: Experimental

Role

(experimental) The IAM role associated to the agent.

public abstract IRole Role { get; }
Property Value

IRole

Remarks

Stability: Experimental

Methods

GrantInvoke(IGrantable)

(experimental) Grant invoke permissions on this agent to an IAM principal.

public virtual Grant GrantInvoke(IGrantable grantee)
Parameters
grantee IGrantable
  • The IAM principal to grant invoke permissions to.
Returns

Grant

An IAM Grant object representing the granted permissions

Remarks

Default: - Default grant configuration:

  • actions: ['bedrock:InvokeAgent']
  • resourceArns: [this.agentArn]

Stability: Experimental

MetricCount(IMetricOptions?)

(experimental) Creates a CloudWatch metric for tracking agent invocations.

public virtual Metric MetricCount(IMetricOptions? props = null)
Parameters
props IMetricOptions
  • Configuration options for the metric.
Returns

Metric

A CloudWatch Metric configured for agent invocation counts

Remarks

Default: - Default metric configuration:

  • namespace: 'AWS/Bedrock'
  • metricName: 'Invocations'
  • dimensionsMap: { AgentId: this.agentId }

Stability: Experimental

OnEvent(string, IOnEventOptions?)

(experimental) Creates an EventBridge rule for agent events.

public virtual Rule OnEvent(string id, IOnEventOptions? options = null)
Parameters
id string
  • Unique identifier for the rule.
options IOnEventOptions
  • Configuration options for the event rule.
Returns

Rule

An EventBridge Rule configured for agent events

Remarks

Default: - Default event pattern:

  • source: ['aws.bedrock']
  • detail: { 'agent-id': [this.agentId] }

Stability: Experimental

Implements

IAgent
IResource
Constructs.IConstruct
Constructs.IDependable
IGrantable
Back to top Generated by DocFX