Class AgentBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrock.alpha.AgentBase
- All Implemented Interfaces:
IEnvironmentAware,IResource,IAgent,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Agent
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:49.438Z")
@Stability(Experimental)
public abstract class AgentBase
extends Resource
implements IAgent
(experimental) Abstract base class for an Agent.
Contains methods and attributes valid for Agents either created with CDK or imported.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrock.alpha.IAgent
IAgent.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAgentBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAgentBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedAgentBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionabstract String(experimental) The ARN of the agent.abstract String(experimental) The ID of the Agent.abstract String(experimental) The version of the agent.abstract IPrincipal(experimental) The principal to grant permissions to.abstract IKey(experimental) Optional KMS encryption key associated with this agent.abstract String(experimental) When this agent was last updated.abstract IRolegetRole()(experimental) The IAM role associated to the agent.grantInvoke(IGrantable grantee) (experimental) Grant invoke permissions on this agent to an IAM principal.(experimental) Creates a CloudWatch metric for tracking agent invocations.metricCount(MetricOptions props) (experimental) Creates a CloudWatch metric for tracking agent invocations.(experimental) Creates an EventBridge rule for agent events.onEvent(String id, OnEventOptions options) (experimental) Creates an EventBridge rule for agent events.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AgentBase
protected AgentBase(software.amazon.jsii.JsiiObjectRef objRef) -
AgentBase
protected AgentBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AgentBase
@Stability(Stable) protected AgentBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
AgentBase
@Stability(Stable) protected AgentBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
grantInvoke
(experimental) Grant invoke permissions on this agent to an IAM principal.Default: - Default grant configuration: - actions: ['bedrock:InvokeAgent'] - resourceArns: [this.agentArn]
- Specified by:
grantInvokein interfaceIAgent- Parameters:
grantee-- The IAM principal to grant invoke permissions to.
- Returns:
- An IAM Grant object representing the granted permissions
-
metricCount
(experimental) Creates a CloudWatch metric for tracking agent invocations.Default: - Default metric configuration: - namespace: 'AWS/Bedrock' - metricName: 'Invocations' - dimensionsMap: { AgentId: this.agentId }
- Specified by:
metricCountin interfaceIAgent- Parameters:
props-- Configuration options for the metric.
- Returns:
- A CloudWatch Metric configured for agent invocation counts
-
metricCount
(experimental) Creates a CloudWatch metric for tracking agent invocations.Default: - Default metric configuration: - namespace: 'AWS/Bedrock' - metricName: 'Invocations' - dimensionsMap: { AgentId: this.agentId }
- Specified by:
metricCountin interfaceIAgent- Returns:
- A CloudWatch Metric configured for agent invocation counts
-
onEvent
@Stability(Experimental) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) (experimental) Creates an EventBridge rule for agent events.Default: - Default event pattern: - source: ['aws.bedrock'] - detail: { 'agent-id': [this.agentId] }
-
onEvent
(experimental) Creates an EventBridge rule for agent events.Default: - Default event pattern: - source: ['aws.bedrock'] - detail: { 'agent-id': [this.agentId] }
-
getAgentArn
(experimental) The ARN of the agent.- Specified by:
getAgentArnin interfaceIAgent
-
getAgentId
(experimental) The ID of the Agent.- Specified by:
getAgentIdin interfaceIAgent
-
getAgentVersion
(experimental) The version of the agent. -
getGrantPrincipal
(experimental) The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getRole
(experimental) The IAM role associated to the agent. -
getKmsKey
(experimental) Optional KMS encryption key associated with this agent. -
getLastUpdated
(experimental) When this agent was last updated.- Specified by:
getLastUpdatedin interfaceIAgent
-