@@ -123,6 +123,7 @@ describe('Agent with guardrails through addGuardrail', () => {
123
123
promptConfigurations : [ preprocessingPrompt , orchestrationPrompt ] ,
124
124
} ,
125
125
aliasName : 'prod' ,
126
+ enableUserInput : true ,
126
127
} ) ;
127
128
128
129
agent . addActionGroups ( [ actiongroup ] ) ;
@@ -238,12 +239,12 @@ describe('Agent with guardrails through addGuardrail', () => {
238
239
template . resourceCountIs ( 'AWS::Bedrock::KnowledgeBase' , 1 ) ;
239
240
template . hasResourceProperties ( 'AWS::Bedrock::KnowledgeBase' , {
240
241
KnowledgeBaseConfiguration : {
241
- Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
242
+ Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
242
243
} ,
243
- Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
244
+ Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
244
245
RoleArn : {
245
246
'Fn::GetAtt' :
246
- [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
247
+ [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
247
248
248
249
} ,
249
250
@@ -256,6 +257,12 @@ describe('Agent with guardrails through addGuardrail', () => {
256
257
template . hasResourceProperties ( 'AWS::Bedrock::Agent' , {
257
258
258
259
ActionGroups : [
260
+ {
261
+ ActionGroupName : 'UserInputAction' ,
262
+ ActionGroupState : 'ENABLED' ,
263
+ ParentActionGroupSignature : 'AMAZON.UserInput' ,
264
+ SkipResourceInUseCheckOnDelete : false ,
265
+ } ,
259
266
{
260
267
ActionGroupExecutor : {
261
268
Lambda : {
@@ -508,12 +515,12 @@ describe('Agent with guardrails through constructor', () => {
508
515
template . resourceCountIs ( 'AWS::Bedrock::KnowledgeBase' , 1 ) ;
509
516
template . hasResourceProperties ( 'AWS::Bedrock::KnowledgeBase' , {
510
517
KnowledgeBaseConfiguration : {
511
- Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
518
+ Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
512
519
} ,
513
- Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
520
+ Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
514
521
RoleArn : {
515
522
'Fn::GetAtt' :
516
- [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
523
+ [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
517
524
518
525
} ,
519
526
@@ -526,6 +533,12 @@ describe('Agent with guardrails through constructor', () => {
526
533
template . hasResourceProperties ( 'AWS::Bedrock::Agent' , {
527
534
528
535
ActionGroups : [
536
+ {
537
+ ActionGroupName : 'UserInputAction' ,
538
+ ActionGroupState : 'DISABLED' ,
539
+ ParentActionGroupSignature : 'AMAZON.UserInput' ,
540
+ SkipResourceInUseCheckOnDelete : false ,
541
+ } ,
529
542
{
530
543
ActionGroupExecutor : {
531
544
Lambda : {
@@ -765,12 +778,12 @@ describe('Agent without guardrails', () => {
765
778
template . resourceCountIs ( 'AWS::Bedrock::KnowledgeBase' , 1 ) ;
766
779
template . hasResourceProperties ( 'AWS::Bedrock::KnowledgeBase' , {
767
780
KnowledgeBaseConfiguration : {
768
- Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
781
+ Type : Match . stringLikeRegexp ( 'VECTOR' ) ,
769
782
} ,
770
- Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
783
+ Name : Match . stringLikeRegexp ( 'KBteststack' ) ,
771
784
RoleArn : {
772
785
'Fn::GetAtt' :
773
- [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
786
+ [ Match . stringLikeRegexp ( 'KBRole' ) , 'Arn' ] ,
774
787
775
788
} ,
776
789
@@ -783,6 +796,12 @@ describe('Agent without guardrails', () => {
783
796
template . hasResourceProperties ( 'AWS::Bedrock::Agent' , {
784
797
785
798
ActionGroups : [
799
+ {
800
+ ActionGroupName : 'UserInputAction' ,
801
+ ActionGroupState : 'DISABLED' ,
802
+ ParentActionGroupSignature : 'AMAZON.UserInput' ,
803
+ SkipResourceInUseCheckOnDelete : false ,
804
+ } ,
786
805
{
787
806
ActionGroupExecutor : {
788
807
Lambda : {
0 commit comments