Skip to content

Commit 7465d56

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: New options for how to handle harmful content detected by Amazon Bedrock Guardrails.
1 parent 2319d3a commit 7465d56

File tree

2 files changed

+75
-6
lines changed

2 files changed

+75
-6
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": "New options for how to handle harmful content detected by Amazon Bedrock Guardrails."
6+
}

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

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@
231231
"content":{
232232
"shape":"GuardrailContentBlockList",
233233
"documentation":"<p>The content details used in the request to apply the guardrail.</p>"
234+
},
235+
"outputScope":{
236+
"shape":"GuardrailOutputScope",
237+
"documentation":"<p>Specifies the scope of the output that you get in the response. Set to <code>FULL</code> to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.</p> <p>Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).</p>"
234238
}
235239
}
236240
},
@@ -251,6 +255,10 @@
251255
"shape":"GuardrailAction",
252256
"documentation":"<p>The action taken in the response from the guardrail.</p>"
253257
},
258+
"actionReason":{
259+
"shape":"String",
260+
"documentation":"<p>The reason for the action taken when harmful content is detected.</p>"
261+
},
254262
"outputs":{
255263
"shape":"GuardrailOutputContentList",
256264
"documentation":"<p>The output details in the response from the guardrail.</p>"
@@ -392,6 +400,10 @@
392400
"min":0,
393401
"sensitive":true
394402
},
403+
"Boolean":{
404+
"type":"boolean",
405+
"box":true
406+
},
395407
"CachePointBlock":{
396408
"type":"structure",
397409
"required":["type"],
@@ -1111,6 +1123,10 @@
11111123
"action":{
11121124
"shape":"GuardrailContentPolicyAction",
11131125
"documentation":"<p>The guardrail action.</p>"
1126+
},
1127+
"detected":{
1128+
"shape":"Boolean",
1129+
"documentation":"<p>Indicates whether content that breaches the guardrail configuration is detected.</p>"
11141130
}
11151131
},
11161132
"documentation":"<p>The content filter for a guardrail.</p>"
@@ -1150,7 +1166,10 @@
11501166
},
11511167
"GuardrailContentPolicyAction":{
11521168
"type":"string",
1153-
"enum":["BLOCKED"]
1169+
"enum":[
1170+
"BLOCKED",
1171+
"NONE"
1172+
]
11541173
},
11551174
"GuardrailContentPolicyAssessment":{
11561175
"type":"structure",
@@ -1214,6 +1233,10 @@
12141233
"action":{
12151234
"shape":"GuardrailContextualGroundingPolicyAction",
12161235
"documentation":"<p>The action performed by the guardrails contextual grounding filter.</p>"
1236+
},
1237+
"detected":{
1238+
"shape":"Boolean",
1239+
"documentation":"<p>Indicates whether content that fails the contextual grounding evaluation (grounding or relevance score less than the corresponding threshold) was detected.</p>"
12171240
}
12181241
},
12191242
"documentation":"<p>The details for the guardrails contextual grounding filter.</p>"
@@ -1374,6 +1397,10 @@
13741397
"action":{
13751398
"shape":"GuardrailWordPolicyAction",
13761399
"documentation":"<p>The action for the custom word.</p>"
1400+
},
1401+
"detected":{
1402+
"shape":"Boolean",
1403+
"documentation":"<p>Indicates whether custom word content that breaches the guardrail configuration is detected.</p>"
13771404
}
13781405
},
13791406
"documentation":"<p>A custom word configured in a guardrail.</p>"
@@ -1481,6 +1508,10 @@
14811508
"action":{
14821509
"shape":"GuardrailWordPolicyAction",
14831510
"documentation":"<p>The action for the managed word.</p>"
1511+
},
1512+
"detected":{
1513+
"shape":"Boolean",
1514+
"documentation":"<p>Indicates whether managed word content that breaches the guardrail configuration is detected.</p>"
14841515
}
14851516
},
14861517
"documentation":"<p>A managed word configured in a guardrail.</p>"
@@ -1507,6 +1538,13 @@
15071538
"type":"list",
15081539
"member":{"shape":"GuardrailOutputContent"}
15091540
},
1541+
"GuardrailOutputScope":{
1542+
"type":"string",
1543+
"enum":[
1544+
"INTERVENTIONS",
1545+
"FULL"
1546+
]
1547+
},
15101548
"GuardrailOutputText":{"type":"string"},
15111549
"GuardrailPiiEntityFilter":{
15121550
"type":"structure",
@@ -1527,6 +1565,10 @@
15271565
"action":{
15281566
"shape":"GuardrailSensitiveInformationPolicyAction",
15291567
"documentation":"<p>The PII entity filter action.</p>"
1568+
},
1569+
"detected":{
1570+
"shape":"Boolean",
1571+
"documentation":"<p>Indicates whether personally identifiable information (PII) that breaches the guardrail configuration is detected.</p>"
15301572
}
15311573
},
15321574
"documentation":"<p>A Personally Identifiable Information (PII) entity configured in a guardrail.</p>"
@@ -1594,6 +1636,10 @@
15941636
"action":{
15951637
"shape":"GuardrailSensitiveInformationPolicyAction",
15961638
"documentation":"<p>The region filter action.</p>"
1639+
},
1640+
"detected":{
1641+
"shape":"Boolean",
1642+
"documentation":"<p>Indicates whether custom regex entities that breach the guardrail configuration are detected.</p>"
15971643
}
15981644
},
15991645
"documentation":"<p>A Regex filter configured in a guardrail.</p>"
@@ -1606,7 +1652,8 @@
16061652
"type":"string",
16071653
"enum":[
16081654
"ANONYMIZED",
1609-
"BLOCKED"
1655+
"BLOCKED",
1656+
"NONE"
16101657
]
16111658
},
16121659
"GuardrailSensitiveInformationPolicyAssessment":{
@@ -1716,6 +1763,10 @@
17161763
"action":{
17171764
"shape":"GuardrailTopicPolicyAction",
17181765
"documentation":"<p>The action the guardrail should take when it intervenes on a topic.</p>"
1766+
},
1767+
"detected":{
1768+
"shape":"Boolean",
1769+
"documentation":"<p>Indicates whether topic content that breaches the guardrail configuration is detected.</p>"
17191770
}
17201771
},
17211772
"documentation":"<p>Information about a topic guardrail.</p>"
@@ -1726,7 +1777,10 @@
17261777
},
17271778
"GuardrailTopicPolicyAction":{
17281779
"type":"string",
1729-
"enum":["BLOCKED"]
1780+
"enum":[
1781+
"BLOCKED",
1782+
"NONE"
1783+
]
17301784
},
17311785
"GuardrailTopicPolicyAssessment":{
17321786
"type":"structure",
@@ -1751,7 +1805,8 @@
17511805
"type":"string",
17521806
"enum":[
17531807
"enabled",
1754-
"disabled"
1808+
"disabled",
1809+
"enabled_full"
17551810
]
17561811
},
17571812
"GuardrailTraceAssessment":{
@@ -1768,6 +1823,10 @@
17681823
"outputAssessments":{
17691824
"shape":"GuardrailAssessmentListMap",
17701825
"documentation":"<p>the output assessments.</p>"
1826+
},
1827+
"actionReason":{
1828+
"shape":"String",
1829+
"documentation":"<p>Provides the reason for the action taken when harmful content is detected.</p>"
17711830
}
17721831
},
17731832
"documentation":"<p>A Top level guardrail trace object. For more information, see <a>ConverseTrace</a>.</p>"
@@ -1820,7 +1879,10 @@
18201879
},
18211880
"GuardrailWordPolicyAction":{
18221881
"type":"string",
1823-
"enum":["BLOCKED"]
1882+
"enum":[
1883+
"BLOCKED",
1884+
"NONE"
1885+
]
18241886
},
18251887
"GuardrailWordPolicyAssessment":{
18261888
"type":"structure",
@@ -3004,7 +3066,8 @@
30043066
"type":"string",
30053067
"enum":[
30063068
"ENABLED",
3007-
"DISABLED"
3069+
"DISABLED",
3070+
"ENABLED_FULL"
30083071
]
30093072
},
30103073
"ValidationException":{

0 commit comments

Comments
 (0)