aws-sdk-bedrockruntime 1.25.0 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d906df1bc397501e4ee608d6190153dbc590534090431219f77ffb5585f2a7ad
4
- data.tar.gz: a3235cdff0088916b0473cbd845f8e5efc1e6846df6e49944bc42ca23795195f
3
+ metadata.gz: ac013384f5ffb43bd5e6a40b48889d48c224d1d67ecc6871a8b503f2ccdd8b85
4
+ data.tar.gz: 6be8fb5852934c5302841569277fb9aa5262113d16d601a31a1ed5a008f875e1
5
5
  SHA512:
6
- metadata.gz: 13b7cdd3c8b0452f15610ca7127fa4f9eb77bebea4adefa3aa05a3569d0941b7028ba476c19215a7853568d7f6d9067c23ac6335651bec5c119642e1115881d5
7
- data.tar.gz: 1d78660873c94f80624af93f4d1acef972028c08cde78927425bd9c74f00cfcf8a8ac9f053af24d45fdfca409eb7a30da1eca6b52b1bb782b5dc3f81afaabd6a
6
+ metadata.gz: 82c7229d80772baba32fc03e5e9a75d4273268d476ce70ae3c975ac985489c8dc1d6429eb8b87a2d4d6f8d7335fb08505af89e6565fa16dd428a2d545ff120db
7
+ data.tar.gz: 695bf5a2a88bc10b11dc5d7b5a3f5ea4b5f0df3c67c0bac0107455e24d211d9e8a74b55c2dc054447a9a8b8d3af131586f001e76af83c5abd63726d9ef1efa23
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.26.0 (2024-10-02)
5
+ ------------------
6
+
7
+ * Feature - Added new fields to Amazon Bedrock Guardrails trace
8
+
4
9
  1.25.0 (2024-09-24)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.25.0
1
+ 1.26.0
@@ -478,6 +478,7 @@ module Aws::BedrockRuntime
478
478
  # * {Types::ApplyGuardrailResponse#action #action} => String
479
479
  # * {Types::ApplyGuardrailResponse#outputs #outputs} => Array<Types::GuardrailOutputContent>
480
480
  # * {Types::ApplyGuardrailResponse#assessments #assessments} => Array<Types::GuardrailAssessment>
481
+ # * {Types::ApplyGuardrailResponse#guardrail_coverage #guardrail_coverage} => Types::GuardrailCoverage
481
482
  #
482
483
  # @example Request syntax with placeholder values
483
484
  #
@@ -514,6 +515,7 @@ module Aws::BedrockRuntime
514
515
  # resp.assessments[0].content_policy.filters #=> Array
515
516
  # resp.assessments[0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
516
517
  # resp.assessments[0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
518
+ # resp.assessments[0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
517
519
  # resp.assessments[0].content_policy.filters[0].action #=> String, one of "BLOCKED"
518
520
  # resp.assessments[0].word_policy.custom_words #=> Array
519
521
  # resp.assessments[0].word_policy.custom_words[0].match #=> String
@@ -536,6 +538,17 @@ module Aws::BedrockRuntime
536
538
  # resp.assessments[0].contextual_grounding_policy.filters[0].threshold #=> Float
537
539
  # resp.assessments[0].contextual_grounding_policy.filters[0].score #=> Float
538
540
  # resp.assessments[0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
541
+ # resp.assessments[0].invocation_metrics.guardrail_processing_latency #=> Integer
542
+ # resp.assessments[0].invocation_metrics.usage.topic_policy_units #=> Integer
543
+ # resp.assessments[0].invocation_metrics.usage.content_policy_units #=> Integer
544
+ # resp.assessments[0].invocation_metrics.usage.word_policy_units #=> Integer
545
+ # resp.assessments[0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
546
+ # resp.assessments[0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
547
+ # resp.assessments[0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
548
+ # resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
549
+ # resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
550
+ # resp.guardrail_coverage.text_characters.guarded #=> Integer
551
+ # resp.guardrail_coverage.text_characters.total #=> Integer
539
552
  #
540
553
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrail AWS API Documentation
541
554
  #
@@ -822,6 +835,7 @@ module Aws::BedrockRuntime
822
835
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
823
836
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
824
837
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
838
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
825
839
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
826
840
  # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
827
841
  # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
@@ -844,6 +858,15 @@ module Aws::BedrockRuntime
844
858
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].threshold #=> Float
845
859
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].score #=> Float
846
860
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
861
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_processing_latency #=> Integer
862
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.topic_policy_units #=> Integer
863
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_units #=> Integer
864
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.word_policy_units #=> Integer
865
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
866
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
867
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
868
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
869
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
847
870
  # resp.trace.guardrail.output_assessments #=> Hash
848
871
  # resp.trace.guardrail.output_assessments["String"] #=> Array
849
872
  # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
@@ -853,6 +876,7 @@ module Aws::BedrockRuntime
853
876
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
854
877
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
855
878
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
879
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
856
880
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
857
881
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
858
882
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
@@ -875,6 +899,15 @@ module Aws::BedrockRuntime
875
899
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].threshold #=> Float
876
900
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].score #=> Float
877
901
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
902
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_processing_latency #=> Integer
903
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.topic_policy_units #=> Integer
904
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_units #=> Integer
905
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.word_policy_units #=> Integer
906
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
907
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
908
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
909
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
910
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
878
911
  #
879
912
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
880
913
  #
@@ -1339,6 +1372,7 @@ module Aws::BedrockRuntime
1339
1372
  # event.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
1340
1373
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1341
1374
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1375
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1342
1376
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
1343
1377
  # event.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
1344
1378
  # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
@@ -1361,6 +1395,15 @@ module Aws::BedrockRuntime
1361
1395
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].threshold #=> Float
1362
1396
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].score #=> Float
1363
1397
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1398
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_processing_latency #=> Integer
1399
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.topic_policy_units #=> Integer
1400
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_units #=> Integer
1401
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.word_policy_units #=> Integer
1402
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
1403
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
1404
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1405
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
1406
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1364
1407
  # event.trace.guardrail.output_assessments #=> Hash
1365
1408
  # event.trace.guardrail.output_assessments["String"] #=> Array
1366
1409
  # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
@@ -1370,6 +1413,7 @@ module Aws::BedrockRuntime
1370
1413
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
1371
1414
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1372
1415
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1416
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1373
1417
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
1374
1418
  # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
1375
1419
  # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
@@ -1392,6 +1436,15 @@ module Aws::BedrockRuntime
1392
1436
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].threshold #=> Float
1393
1437
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].score #=> Float
1394
1438
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1439
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_processing_latency #=> Integer
1440
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.topic_policy_units #=> Integer
1441
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_units #=> Integer
1442
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.word_policy_units #=> Integer
1443
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
1444
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
1445
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1446
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
1447
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1395
1448
  #
1396
1449
  # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1397
1450
  # event.message #=> String
@@ -1876,7 +1929,7 @@ module Aws::BedrockRuntime
1876
1929
  tracer: tracer
1877
1930
  )
1878
1931
  context[:gem_name] = 'aws-sdk-bedrockruntime'
1879
- context[:gem_version] = '1.25.0'
1932
+ context[:gem_version] = '1.26.0'
1880
1933
  Seahorse::Client::Request.new(handlers, context)
1881
1934
  end
1882
1935
 
@@ -61,6 +61,7 @@ module Aws::BedrockRuntime
61
61
  GuardrailContentFilter = Shapes::StructureShape.new(name: 'GuardrailContentFilter')
62
62
  GuardrailContentFilterConfidence = Shapes::StringShape.new(name: 'GuardrailContentFilterConfidence')
63
63
  GuardrailContentFilterList = Shapes::ListShape.new(name: 'GuardrailContentFilterList')
64
+ GuardrailContentFilterStrength = Shapes::StringShape.new(name: 'GuardrailContentFilterStrength')
64
65
  GuardrailContentFilterType = Shapes::StringShape.new(name: 'GuardrailContentFilterType')
65
66
  GuardrailContentPolicyAction = Shapes::StringShape.new(name: 'GuardrailContentPolicyAction')
66
67
  GuardrailContentPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailContentPolicyAssessment')
@@ -80,9 +81,11 @@ module Aws::BedrockRuntime
80
81
  GuardrailConverseContentQualifier = Shapes::StringShape.new(name: 'GuardrailConverseContentQualifier')
81
82
  GuardrailConverseContentQualifierList = Shapes::ListShape.new(name: 'GuardrailConverseContentQualifierList')
82
83
  GuardrailConverseTextBlock = Shapes::StructureShape.new(name: 'GuardrailConverseTextBlock')
84
+ GuardrailCoverage = Shapes::StructureShape.new(name: 'GuardrailCoverage')
83
85
  GuardrailCustomWord = Shapes::StructureShape.new(name: 'GuardrailCustomWord')
84
86
  GuardrailCustomWordList = Shapes::ListShape.new(name: 'GuardrailCustomWordList')
85
87
  GuardrailIdentifier = Shapes::StringShape.new(name: 'GuardrailIdentifier')
88
+ GuardrailInvocationMetrics = Shapes::StructureShape.new(name: 'GuardrailInvocationMetrics')
86
89
  GuardrailManagedWord = Shapes::StructureShape.new(name: 'GuardrailManagedWord')
87
90
  GuardrailManagedWordList = Shapes::ListShape.new(name: 'GuardrailManagedWordList')
88
91
  GuardrailManagedWordType = Shapes::StringShape.new(name: 'GuardrailManagedWordType')
@@ -92,6 +95,7 @@ module Aws::BedrockRuntime
92
95
  GuardrailPiiEntityFilter = Shapes::StructureShape.new(name: 'GuardrailPiiEntityFilter')
93
96
  GuardrailPiiEntityFilterList = Shapes::ListShape.new(name: 'GuardrailPiiEntityFilterList')
94
97
  GuardrailPiiEntityType = Shapes::StringShape.new(name: 'GuardrailPiiEntityType')
98
+ GuardrailProcessingLatency = Shapes::IntegerShape.new(name: 'GuardrailProcessingLatency')
95
99
  GuardrailRegexFilter = Shapes::StructureShape.new(name: 'GuardrailRegexFilter')
96
100
  GuardrailRegexFilterList = Shapes::ListShape.new(name: 'GuardrailRegexFilterList')
97
101
  GuardrailSensitiveInformationPolicyAction = Shapes::StringShape.new(name: 'GuardrailSensitiveInformationPolicyAction')
@@ -101,6 +105,7 @@ module Aws::BedrockRuntime
101
105
  GuardrailStreamConfiguration = Shapes::StructureShape.new(name: 'GuardrailStreamConfiguration')
102
106
  GuardrailStreamProcessingMode = Shapes::StringShape.new(name: 'GuardrailStreamProcessingMode')
103
107
  GuardrailTextBlock = Shapes::StructureShape.new(name: 'GuardrailTextBlock')
108
+ GuardrailTextCharactersCoverage = Shapes::StructureShape.new(name: 'GuardrailTextCharactersCoverage')
104
109
  GuardrailTopic = Shapes::StructureShape.new(name: 'GuardrailTopic')
105
110
  GuardrailTopicList = Shapes::ListShape.new(name: 'GuardrailTopicList')
106
111
  GuardrailTopicPolicyAction = Shapes::StringShape.new(name: 'GuardrailTopicPolicyAction')
@@ -155,6 +160,8 @@ module Aws::BedrockRuntime
155
160
  String = Shapes::StringShape.new(name: 'String')
156
161
  SystemContentBlock = Shapes::UnionShape.new(name: 'SystemContentBlock')
157
162
  SystemContentBlocks = Shapes::ListShape.new(name: 'SystemContentBlocks')
163
+ TextCharactersGuarded = Shapes::IntegerShape.new(name: 'TextCharactersGuarded')
164
+ TextCharactersTotal = Shapes::IntegerShape.new(name: 'TextCharactersTotal')
158
165
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
159
166
  TokenUsage = Shapes::StructureShape.new(name: 'TokenUsage')
160
167
  TokenUsageInputTokensInteger = Shapes::IntegerShape.new(name: 'TokenUsageInputTokensInteger')
@@ -193,6 +200,7 @@ module Aws::BedrockRuntime
193
200
  ApplyGuardrailResponse.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailAction, required: true, location_name: "action"))
194
201
  ApplyGuardrailResponse.add_member(:outputs, Shapes::ShapeRef.new(shape: GuardrailOutputContentList, required: true, location_name: "outputs"))
195
202
  ApplyGuardrailResponse.add_member(:assessments, Shapes::ShapeRef.new(shape: GuardrailAssessmentList, required: true, location_name: "assessments"))
203
+ ApplyGuardrailResponse.add_member(:guardrail_coverage, Shapes::ShapeRef.new(shape: GuardrailCoverage, location_name: "guardrailCoverage"))
196
204
  ApplyGuardrailResponse.struct_class = Types::ApplyGuardrailResponse
197
205
 
198
206
  AutoToolChoice.struct_class = Types::AutoToolChoice
@@ -329,6 +337,7 @@ module Aws::BedrockRuntime
329
337
  GuardrailAssessment.add_member(:word_policy, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAssessment, location_name: "wordPolicy"))
330
338
  GuardrailAssessment.add_member(:sensitive_information_policy, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAssessment, location_name: "sensitiveInformationPolicy"))
331
339
  GuardrailAssessment.add_member(:contextual_grounding_policy, Shapes::ShapeRef.new(shape: GuardrailContextualGroundingPolicyAssessment, location_name: "contextualGroundingPolicy"))
340
+ GuardrailAssessment.add_member(:invocation_metrics, Shapes::ShapeRef.new(shape: GuardrailInvocationMetrics, location_name: "invocationMetrics"))
332
341
  GuardrailAssessment.struct_class = Types::GuardrailAssessment
333
342
 
334
343
  GuardrailAssessmentList.member = Shapes::ShapeRef.new(shape: GuardrailAssessment)
@@ -354,6 +363,7 @@ module Aws::BedrockRuntime
354
363
 
355
364
  GuardrailContentFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailContentFilterType, required: true, location_name: "type"))
356
365
  GuardrailContentFilter.add_member(:confidence, Shapes::ShapeRef.new(shape: GuardrailContentFilterConfidence, required: true, location_name: "confidence"))
366
+ GuardrailContentFilter.add_member(:filter_strength, Shapes::ShapeRef.new(shape: GuardrailContentFilterStrength, location_name: "filterStrength"))
357
367
  GuardrailContentFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailContentPolicyAction, required: true, location_name: "action"))
358
368
  GuardrailContentFilter.struct_class = Types::GuardrailContentFilter
359
369
 
@@ -387,12 +397,20 @@ module Aws::BedrockRuntime
387
397
  GuardrailConverseTextBlock.add_member(:qualifiers, Shapes::ShapeRef.new(shape: GuardrailConverseContentQualifierList, location_name: "qualifiers"))
388
398
  GuardrailConverseTextBlock.struct_class = Types::GuardrailConverseTextBlock
389
399
 
400
+ GuardrailCoverage.add_member(:text_characters, Shapes::ShapeRef.new(shape: GuardrailTextCharactersCoverage, location_name: "textCharacters"))
401
+ GuardrailCoverage.struct_class = Types::GuardrailCoverage
402
+
390
403
  GuardrailCustomWord.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
391
404
  GuardrailCustomWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, required: true, location_name: "action"))
392
405
  GuardrailCustomWord.struct_class = Types::GuardrailCustomWord
393
406
 
394
407
  GuardrailCustomWordList.member = Shapes::ShapeRef.new(shape: GuardrailCustomWord)
395
408
 
409
+ GuardrailInvocationMetrics.add_member(:guardrail_processing_latency, Shapes::ShapeRef.new(shape: GuardrailProcessingLatency, location_name: "guardrailProcessingLatency"))
410
+ GuardrailInvocationMetrics.add_member(:usage, Shapes::ShapeRef.new(shape: GuardrailUsage, location_name: "usage"))
411
+ GuardrailInvocationMetrics.add_member(:guardrail_coverage, Shapes::ShapeRef.new(shape: GuardrailCoverage, location_name: "guardrailCoverage"))
412
+ GuardrailInvocationMetrics.struct_class = Types::GuardrailInvocationMetrics
413
+
396
414
  GuardrailManagedWord.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
397
415
  GuardrailManagedWord.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailManagedWordType, required: true, location_name: "type"))
398
416
  GuardrailManagedWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, required: true, location_name: "action"))
@@ -434,6 +452,10 @@ module Aws::BedrockRuntime
434
452
  GuardrailTextBlock.add_member(:qualifiers, Shapes::ShapeRef.new(shape: GuardrailContentQualifierList, location_name: "qualifiers"))
435
453
  GuardrailTextBlock.struct_class = Types::GuardrailTextBlock
436
454
 
455
+ GuardrailTextCharactersCoverage.add_member(:guarded, Shapes::ShapeRef.new(shape: TextCharactersGuarded, location_name: "guarded"))
456
+ GuardrailTextCharactersCoverage.add_member(:total, Shapes::ShapeRef.new(shape: TextCharactersTotal, location_name: "total"))
457
+ GuardrailTextCharactersCoverage.struct_class = Types::GuardrailTextCharactersCoverage
458
+
437
459
  GuardrailTopic.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "name"))
438
460
  GuardrailTopic.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailTopicType, required: true, location_name: "type"))
439
461
  GuardrailTopic.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailTopicPolicyAction, required: true, location_name: "action"))
@@ -75,13 +75,18 @@ module Aws::BedrockRuntime
75
75
  # The assessment details in the response from the guardrail.
76
76
  # @return [Array<Types::GuardrailAssessment>]
77
77
  #
78
+ # @!attribute [rw] guardrail_coverage
79
+ # The guardrail coverage details in the apply guardrail response.
80
+ # @return [Types::GuardrailCoverage]
81
+ #
78
82
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrailResponse AWS API Documentation
79
83
  #
80
84
  class ApplyGuardrailResponse < Struct.new(
81
85
  :usage,
82
86
  :action,
83
87
  :outputs,
84
- :assessments)
88
+ :assessments,
89
+ :guardrail_coverage)
85
90
  SENSITIVE = []
86
91
  include Aws::Structure
87
92
  end
@@ -749,6 +754,10 @@ module Aws::BedrockRuntime
749
754
  # The contextual grounding policy used for the guardrail assessment.
750
755
  # @return [Types::GuardrailContextualGroundingPolicyAssessment]
751
756
  #
757
+ # @!attribute [rw] invocation_metrics
758
+ # The invocation metrics for the guardrail assessment.
759
+ # @return [Types::GuardrailInvocationMetrics]
760
+ #
752
761
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAssessment AWS API Documentation
753
762
  #
754
763
  class GuardrailAssessment < Struct.new(
@@ -756,7 +765,8 @@ module Aws::BedrockRuntime
756
765
  :content_policy,
757
766
  :word_policy,
758
767
  :sensitive_information_policy,
759
- :contextual_grounding_policy)
768
+ :contextual_grounding_policy,
769
+ :invocation_metrics)
760
770
  SENSITIVE = []
761
771
  include Aws::Structure
762
772
  end
@@ -821,6 +831,10 @@ module Aws::BedrockRuntime
821
831
  # The guardrail confidence.
822
832
  # @return [String]
823
833
  #
834
+ # @!attribute [rw] filter_strength
835
+ # The filter strength setting for the guardrail content filter.
836
+ # @return [String]
837
+ #
824
838
  # @!attribute [rw] action
825
839
  # The guardrail action.
826
840
  # @return [String]
@@ -830,6 +844,7 @@ module Aws::BedrockRuntime
830
844
  class GuardrailContentFilter < Struct.new(
831
845
  :type,
832
846
  :confidence,
847
+ :filter_strength,
833
848
  :action)
834
849
  SENSITIVE = []
835
850
  include Aws::Structure
@@ -944,6 +959,20 @@ module Aws::BedrockRuntime
944
959
  include Aws::Structure
945
960
  end
946
961
 
962
+ # The action of the guardrail coverage details.
963
+ #
964
+ # @!attribute [rw] text_characters
965
+ # The text characters of the guardrail coverage details.
966
+ # @return [Types::GuardrailTextCharactersCoverage]
967
+ #
968
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailCoverage AWS API Documentation
969
+ #
970
+ class GuardrailCoverage < Struct.new(
971
+ :text_characters)
972
+ SENSITIVE = []
973
+ include Aws::Structure
974
+ end
975
+
947
976
  # A custom word configured in a guardrail.
948
977
  #
949
978
  # @!attribute [rw] match
@@ -963,6 +992,30 @@ module Aws::BedrockRuntime
963
992
  include Aws::Structure
964
993
  end
965
994
 
995
+ # The invocation metrics for the guardrail.
996
+ #
997
+ # @!attribute [rw] guardrail_processing_latency
998
+ # The processing latency details for the guardrail invocation metrics.
999
+ # @return [Integer]
1000
+ #
1001
+ # @!attribute [rw] usage
1002
+ # The usage details for the guardrail invocation metrics.
1003
+ # @return [Types::GuardrailUsage]
1004
+ #
1005
+ # @!attribute [rw] guardrail_coverage
1006
+ # The coverage details for the guardrail invocation metrics.
1007
+ # @return [Types::GuardrailCoverage]
1008
+ #
1009
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailInvocationMetrics AWS API Documentation
1010
+ #
1011
+ class GuardrailInvocationMetrics < Struct.new(
1012
+ :guardrail_processing_latency,
1013
+ :usage,
1014
+ :guardrail_coverage)
1015
+ SENSITIVE = []
1016
+ include Aws::Structure
1017
+ end
1018
+
966
1019
  # A managed word configured in a guardrail.
967
1020
  #
968
1021
  # @!attribute [rw] match
@@ -1126,6 +1179,25 @@ module Aws::BedrockRuntime
1126
1179
  include Aws::Structure
1127
1180
  end
1128
1181
 
1182
+ # The guardrail coverage for the text characters.
1183
+ #
1184
+ # @!attribute [rw] guarded
1185
+ # The text characters that were guarded by the guardrail coverage.
1186
+ # @return [Integer]
1187
+ #
1188
+ # @!attribute [rw] total
1189
+ # The total text characters by the guardrail coverage.
1190
+ # @return [Integer]
1191
+ #
1192
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTextCharactersCoverage AWS API Documentation
1193
+ #
1194
+ class GuardrailTextCharactersCoverage < Struct.new(
1195
+ :guarded,
1196
+ :total)
1197
+ SENSITIVE = []
1198
+ include Aws::Structure
1199
+ end
1200
+
1129
1201
  # Information about a topic guardrail.
1130
1202
  #
1131
1203
  # @!attribute [rw] name
@@ -56,7 +56,7 @@ module Aws::BedrockRuntime
56
56
  autoload :Endpoints, 'aws-sdk-bedrockruntime/endpoints'
57
57
  autoload :EventStreams, 'aws-sdk-bedrockruntime/event_streams'
58
58
 
59
- GEM_VERSION = '1.25.0'
59
+ GEM_VERSION = '1.26.0'
60
60
 
61
61
  end
62
62
 
data/sig/client.rbs CHANGED
@@ -84,6 +84,7 @@ module Aws
84
84
  def action: () -> ("NONE" | "GUARDRAIL_INTERVENED")
85
85
  def outputs: () -> ::Array[Types::GuardrailOutputContent]
86
86
  def assessments: () -> ::Array[Types::GuardrailAssessment]
87
+ def guardrail_coverage: () -> Types::GuardrailCoverage
87
88
  end
88
89
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#apply_guardrail-instance_method
89
90
  def apply_guardrail: (
data/sig/types.rbs CHANGED
@@ -29,6 +29,7 @@ module Aws::BedrockRuntime
29
29
  attr_accessor action: ("NONE" | "GUARDRAIL_INTERVENED")
30
30
  attr_accessor outputs: ::Array[Types::GuardrailOutputContent]
31
31
  attr_accessor assessments: ::Array[Types::GuardrailAssessment]
32
+ attr_accessor guardrail_coverage: Types::GuardrailCoverage
32
33
  SENSITIVE: []
33
34
  end
34
35
 
@@ -208,6 +209,7 @@ module Aws::BedrockRuntime
208
209
  attr_accessor word_policy: Types::GuardrailWordPolicyAssessment
209
210
  attr_accessor sensitive_information_policy: Types::GuardrailSensitiveInformationPolicyAssessment
210
211
  attr_accessor contextual_grounding_policy: Types::GuardrailContextualGroundingPolicyAssessment
212
+ attr_accessor invocation_metrics: Types::GuardrailInvocationMetrics
211
213
  SENSITIVE: []
212
214
  end
213
215
 
@@ -232,6 +234,7 @@ module Aws::BedrockRuntime
232
234
  class GuardrailContentFilter
233
235
  attr_accessor type: ("INSULTS" | "HATE" | "SEXUAL" | "VIOLENCE" | "MISCONDUCT" | "PROMPT_ATTACK")
234
236
  attr_accessor confidence: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
237
+ attr_accessor filter_strength: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
235
238
  attr_accessor action: ("BLOCKED")
236
239
  SENSITIVE: []
237
240
  end
@@ -271,12 +274,24 @@ module Aws::BedrockRuntime
271
274
  SENSITIVE: []
272
275
  end
273
276
 
277
+ class GuardrailCoverage
278
+ attr_accessor text_characters: Types::GuardrailTextCharactersCoverage
279
+ SENSITIVE: []
280
+ end
281
+
274
282
  class GuardrailCustomWord
275
283
  attr_accessor match: ::String
276
284
  attr_accessor action: ("BLOCKED")
277
285
  SENSITIVE: []
278
286
  end
279
287
 
288
+ class GuardrailInvocationMetrics
289
+ attr_accessor guardrail_processing_latency: ::Integer
290
+ attr_accessor usage: Types::GuardrailUsage
291
+ attr_accessor guardrail_coverage: Types::GuardrailCoverage
292
+ SENSITIVE: []
293
+ end
294
+
280
295
  class GuardrailManagedWord
281
296
  attr_accessor match: ::String
282
297
  attr_accessor type: ("PROFANITY")
@@ -324,6 +339,12 @@ module Aws::BedrockRuntime
324
339
  SENSITIVE: []
325
340
  end
326
341
 
342
+ class GuardrailTextCharactersCoverage
343
+ attr_accessor guarded: ::Integer
344
+ attr_accessor total: ::Integer
345
+ SENSITIVE: []
346
+ end
347
+
327
348
  class GuardrailTopic
328
349
  attr_accessor name: ::String
329
350
  attr_accessor type: ("DENY")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.0
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-24 00:00:00.000000000 Z
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core