Skip to content

Commit e418551

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: Added new fields to Amazon Bedrock Guardrails trace
1 parent afbb178 commit e418551

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Bedrock Runtime",
4+
"contributor": "",
5+
"description": "Added new fields to Amazon Bedrock Guardrails trace"
6+
}

services/bedrockruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@
198198
"assessments":{
199199
"shape":"GuardrailAssessmentList",
200200
"documentation":"<p>The assessment details in the response from the guardrail.</p>"
201+
},
202+
"guardrailCoverage":{
203+
"shape":"GuardrailCoverage",
204+
"documentation":"<p>The guardrail coverage details in the apply guardrail response.</p>"
201205
}
202206
}
203207
},
@@ -709,6 +713,10 @@
709713
"contextualGroundingPolicy":{
710714
"shape":"GuardrailContextualGroundingPolicyAssessment",
711715
"documentation":"<p>The contextual grounding policy used for the guardrail assessment.</p>"
716+
},
717+
"invocationMetrics":{
718+
"shape":"GuardrailInvocationMetrics",
719+
"documentation":"<p>The invocation metrics for the guardrail assessment.</p>"
712720
}
713721
},
714722
"documentation":"<p>A behavior assessment of the guardrail policies used in a call to the Converse API. </p>"
@@ -780,6 +788,10 @@
780788
"shape":"GuardrailContentFilterConfidence",
781789
"documentation":"<p>The guardrail confidence.</p>"
782790
},
791+
"filterStrength":{
792+
"shape":"GuardrailContentFilterStrength",
793+
"documentation":"<p>The filter strength setting for the guardrail content filter.</p>"
794+
},
783795
"action":{
784796
"shape":"GuardrailContentPolicyAction",
785797
"documentation":"<p>The guardrail action.</p>"
@@ -800,6 +812,15 @@
800812
"type":"list",
801813
"member":{"shape":"GuardrailContentFilter"}
802814
},
815+
"GuardrailContentFilterStrength":{
816+
"type":"string",
817+
"enum":[
818+
"NONE",
819+
"LOW",
820+
"MEDIUM",
821+
"HIGH"
822+
]
823+
},
803824
"GuardrailContentFilterType":{
804825
"type":"string",
805826
"enum":[
@@ -959,6 +980,16 @@
959980
},
960981
"documentation":"<p>A text block that contains text that you want to assess with a guardrail. For more information, see <a>GuardrailConverseContentBlock</a>.</p>"
961982
},
983+
"GuardrailCoverage":{
984+
"type":"structure",
985+
"members":{
986+
"textCharacters":{
987+
"shape":"GuardrailTextCharactersCoverage",
988+
"documentation":"<p>The text characters of the guardrail coverage details.</p>"
989+
}
990+
},
991+
"documentation":"<p>The action of the guardrail coverage details.</p>"
992+
},
962993
"GuardrailCustomWord":{
963994
"type":"structure",
964995
"required":[
@@ -987,6 +1018,24 @@
9871018
"min":0,
9881019
"pattern":"(([a-z0-9]+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+))"
9891020
},
1021+
"GuardrailInvocationMetrics":{
1022+
"type":"structure",
1023+
"members":{
1024+
"guardrailProcessingLatency":{
1025+
"shape":"GuardrailProcessingLatency",
1026+
"documentation":"<p>The processing latency details for the guardrail invocation metrics.</p>"
1027+
},
1028+
"usage":{
1029+
"shape":"GuardrailUsage",
1030+
"documentation":"<p>The usage details for the guardrail invocation metrics.</p>"
1031+
},
1032+
"guardrailCoverage":{
1033+
"shape":"GuardrailCoverage",
1034+
"documentation":"<p>The coverage details for the guardrail invocation metrics.</p>"
1035+
}
1036+
},
1037+
"documentation":"<p>The invocation metrics for the guardrail.</p>"
1038+
},
9901039
"GuardrailManagedWord":{
9911040
"type":"structure",
9921041
"required":[
@@ -1096,6 +1145,10 @@
10961145
"VEHICLE_IDENTIFICATION_NUMBER"
10971146
]
10981147
},
1148+
"GuardrailProcessingLatency":{
1149+
"type":"long",
1150+
"box":true
1151+
},
10991152
"GuardrailRegexFilter":{
11001153
"type":"structure",
11011154
"required":["action"],
@@ -1204,6 +1257,20 @@
12041257
},
12051258
"documentation":"<p>The text block to be evaluated by the guardrail.</p>"
12061259
},
1260+
"GuardrailTextCharactersCoverage":{
1261+
"type":"structure",
1262+
"members":{
1263+
"guarded":{
1264+
"shape":"TextCharactersGuarded",
1265+
"documentation":"<p>The text characters that were guarded by the guardrail coverage.</p>"
1266+
},
1267+
"total":{
1268+
"shape":"TextCharactersTotal",
1269+
"documentation":"<p>The total text characters by the guardrail coverage.</p>"
1270+
}
1271+
},
1272+
"documentation":"<p>The guardrail coverage for the text characters.</p>"
1273+
},
12071274
"GuardrailTopic":{
12081275
"type":"structure",
12091276
"required":[
@@ -1859,6 +1926,14 @@
18591926
"type":"list",
18601927
"member":{"shape":"SystemContentBlock"}
18611928
},
1929+
"TextCharactersGuarded":{
1930+
"type":"integer",
1931+
"box":true
1932+
},
1933+
"TextCharactersTotal":{
1934+
"type":"integer",
1935+
"box":true
1936+
},
18621937
"ThrottlingException":{
18631938
"type":"structure",
18641939
"members":{

0 commit comments

Comments
 (0)