@@ -6,6 +6,8 @@ import * as events from 'aws-cdk-lib/aws-events';
66import * as iam from 'aws-cdk-lib/aws-iam' ;
77import * as kms from 'aws-cdk-lib/aws-kms' ;
88import * as s3 from 'aws-cdk-lib/aws-s3' ;
9+ import { addConstructMetadata , MethodMetadata } from 'aws-cdk-lib/core/lib/metadata-resource' ;
10+ import { propertyInjectable } from 'aws-cdk-lib/core/lib/prop-injectable' ;
911import { Construct , IConstruct } from 'constructs' ;
1012// Internal Libs
1113import { AgentActionGroup } from './action-group' ;
@@ -333,7 +335,11 @@ export interface AgentAttributes {
333335 * Class to create (or import) an Agent with CDK.
334336 * @cloudformationResource AWS::Bedrock::Agent
335337 */
338+ @propertyInjectable
336339export class Agent extends AgentBase implements IAgent {
340+ /** Uniquely identifies this class. */
341+ public static readonly PROPERTY_INJECTION_ID : string = '@aws-cdk.aws-bedrock-alpha.Agent' ;
342+
337343 /**
338344 * Static Method for importing an existing Bedrock Agent.
339345 */
@@ -429,6 +435,8 @@ export class Agent extends AgentBase implements IAgent {
429435 // ------------------------------------------------------
430436 constructor ( scope : Construct , id : string , props : AgentProps ) {
431437 super ( scope , id ) ;
438+ // Enhanced CDK Analytics Telemetry
439+ addConstructMetadata ( this , props ) ;
432440
433441 // ------------------------------------------------------
434442 // Validate props
@@ -580,6 +588,7 @@ export class Agent extends AgentBase implements IAgent {
580588 * - Lambda function invoke permissions if executor is present
581589 * - S3 GetObject permissions if apiSchema.s3File is present
582590 */
591+ @MethodMetadata ( )
583592 public addActionGroup ( actionGroup : AgentActionGroup ) {
584593 validation . throwIfInvalid ( this . validateActionGroup , actionGroup ) ;
585594 this . actionGroups . push ( actionGroup ) ;
@@ -640,6 +649,7 @@ export class Agent extends AgentBase implements IAgent {
640649 *
641650 * @default - No collaboration configuration.
642651 */
652+ @MethodMetadata ( )
643653 public addActionGroups ( ...actionGroups : AgentActionGroup [ ] ) {
644654 actionGroups . forEach ( ag => this . addActionGroup ( ag ) ) ;
645655 }
0 commit comments